aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_coding_scheme.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-03-06 17:04:59 +0100
committerMax <msuraev@sysmocom.de>2019-03-12 15:35:40 +0100
commitbea2edbc46ad990fdbee700a1ecf421f4988de5e (patch)
tree1c055b347c471b23e0b185c04d79747fdfd18fd2 /src/gprs_coding_scheme.cpp
parent1beed38b54592368d627f0cb58c655627c02ef7e (diff)
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
Diffstat (limited to 'src/gprs_coding_scheme.cpp')
-rw-r--r--src/gprs_coding_scheme.cpp12
1 files changed, 6 insertions, 6 deletions
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 @@ static struct {
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 @@ void GprsCodingScheme::inc(Mode mode)
/* 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 @@ void GprsCodingScheme::dec(Mode mode)
/* 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 @@ void GprsCodingScheme::inc()
if (!isValid())
return;
- m_scheme = Scheme(m_scheme + 1);
+ m_scheme = CodingScheme(m_scheme + 1);
}
void GprsCodingScheme::dec()
@@ -280,7 +280,7 @@ void GprsCodingScheme::dec()
if (!isValid())
return;
- m_scheme = Scheme(m_scheme - 1);
+ m_scheme = CodingScheme(m_scheme - 1);
}
const char *GprsCodingScheme::modeName(Mode mode)