aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Sirsikar <Arvind.Sirsikar@radisys.com>2016-07-13 11:37:47 +0530
committerHolger Freyther <holger@freyther.de>2016-07-13 13:50:04 +0000
commite8ccafc63d6a445c6bd9c075dc68f20ad9cc7eb3 (patch)
tree0ec5ae274655917beda079e3de9c4bc49c17df92
parent914955209e37329b5a9bd38ea204a5f4b36d2663 (diff)
Add Accessor functions for ARQ-II in EGPRS DL
Add accessor function in existing classes to support ARQ-II for retransmission in EGPRS DL Change-Id: Iefff956bf2dcfe8fb0b2f5a7a7a2122d5d555f9e
-rw-r--r--src/gprs_coding_scheme.h17
-rw-r--r--src/gprs_ms.cpp5
-rw-r--r--src/gprs_ms.h1
3 files changed, 22 insertions, 1 deletions
diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h
index bb0bad4..60a8e79 100644
--- a/src/gprs_coding_scheme.h
+++ b/src/gprs_coding_scheme.h
@@ -70,6 +70,7 @@ public:
unsigned int to_num() const;
GprsCodingScheme& operator =(Scheme s);
+ bool operator == (Scheme s) const;
GprsCodingScheme& operator =(GprsCodingScheme o);
bool isValid() const {return UNKNOWN <= m_scheme && m_scheme <= MCS9;}
@@ -111,6 +112,9 @@ public:
static GprsCodingScheme getEgprsByNum(unsigned num);
static const char *modeName(Mode mode);
+ static Scheme get_retx_mcs(const GprsCodingScheme mcs,
+ const GprsCodingScheme retx_mcs);
+
static enum Scheme egprs_mcs_retx_tbl[MAX_NUM_ARQ]
[MAX_NUM_MCS][MAX_NUM_MCS];
private:
@@ -196,6 +200,11 @@ inline bool operator ==(GprsCodingScheme a, GprsCodingScheme b)
return GprsCodingScheme::Scheme(a) == GprsCodingScheme::Scheme(b);
}
+inline bool GprsCodingScheme::operator == (Scheme scheme) const
+{
+ return this->m_scheme == scheme;
+}
+
inline bool operator !=(GprsCodingScheme a, GprsCodingScheme b)
{
return !(a == b);
@@ -221,4 +230,10 @@ inline bool operator >=(GprsCodingScheme a, GprsCodingScheme b)
{
return a == b || a > b;
}
-
+inline GprsCodingScheme::Scheme GprsCodingScheme::get_retx_mcs(
+ const GprsCodingScheme mcs,
+ const GprsCodingScheme demanded_mcs)
+{
+ return egprs_mcs_retx_tbl[EGPRS_ARQ2][mcs.to_num() - 1]
+ [demanded_mcs.to_num() - 1];
+}
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index 4f71892..b3270b1 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -574,6 +574,11 @@ GprsCodingScheme GprsMs::max_cs_ul() const
return GprsCodingScheme(GprsCodingScheme::MCS4);
}
+void GprsMs::set_current_cs_dl(GprsCodingScheme::Scheme scheme)
+{
+ m_current_cs_dl = scheme;
+}
+
GprsCodingScheme GprsMs::max_cs_dl() const
{
struct gprs_rlcmac_bts *bts_data;
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index b07f175..bcc4fb3 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -86,6 +86,7 @@ public:
uint8_t egprs_ms_class() const;
void set_ms_class(uint8_t ms_class);
void set_egprs_ms_class(uint8_t ms_class);
+ void set_current_cs_dl(GprsCodingScheme::Scheme scheme);
GprsCodingScheme current_cs_ul() const;
GprsCodingScheme current_cs_dl() const;