MCS: move Coding Scheme enum outside of class definition
Move generic MCS enum to C header file to simplify further modifications
to GprsCodingScheme class in follow-up patches. This also allows us
to use standard libosmocore value_sting functions in upcoming patches
for IA Rest Octet encoding/decoding.
Related: OS#3014
Change-Id: I993b49d9a82b8c7ad677d52d11003794aeabe117
diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp
index bbac6e7..990e278 100644
--- a/src/gprs_coding_scheme.cpp
+++ b/src/gprs_coding_scheme.cpp
@@ -27,7 +27,7 @@
* 1st level is Original MCS( index 0 corresponds to MCS1 and so on)
* 2nd level is MS MCS (index 0 corresponds to MCS1 and so on)
*/
-enum GprsCodingScheme::Scheme GprsCodingScheme::egprs_mcs_retx_tbl[MAX_NUM_ARQ]
+enum CodingScheme GprsCodingScheme::egprs_mcs_retx_tbl[MAX_NUM_ARQ]
[MAX_NUM_MCS][MAX_NUM_MCS] = {
{
{MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1},
@@ -71,7 +71,7 @@
const char *name;
GprsCodingScheme::HeaderType data_hdr;
enum Family family;
-} mcs_info[GprsCodingScheme::NUM_SCHEMES] = {
+} mcs_info[NUM_SCHEMES] = {
{{0, 0}, {0, 0}, 0, 0, "UNKNOWN",
GprsCodingScheme::HEADER_INVALID, FAMILY_INVALID},
{{23, 0}, {23, 0}, 20, 0, "CS-1",
@@ -233,7 +233,7 @@
/* This should not happen. TODO: Use assert? */
return;
- Scheme new_cs(Scheme(m_scheme + 1));
+ CodingScheme new_cs(CodingScheme(m_scheme + 1));
if (!GprsCodingScheme(new_cs).isCompatible(mode))
/* Clipping, do not change the value */
return;
@@ -247,7 +247,7 @@
/* This should not happen. TODO: Use assert? */
return;
- Scheme new_cs(Scheme(m_scheme - 1));
+ CodingScheme new_cs(CodingScheme(m_scheme - 1));
if (!GprsCodingScheme(new_cs).isCompatible(mode))
/* Clipping, do not change the value */
return;
@@ -266,7 +266,7 @@
if (!isValid())
return;
- m_scheme = Scheme(m_scheme + 1);
+ m_scheme = CodingScheme(m_scheme + 1);
}
void GprsCodingScheme::dec()
@@ -280,7 +280,7 @@
if (!isValid())
return;
- m_scheme = Scheme(m_scheme - 1);
+ m_scheme = CodingScheme(m_scheme - 1);
}
const char *GprsCodingScheme::modeName(Mode mode)