aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-03-25 16:32:50 +0100
committerMax <msuraev@sysmocom.de>2019-03-26 11:19:30 +0100
commit8a8e0fb2675878c045d9770da0940c7c895b89ec (patch)
treef24bf858ddbc36b3f51ca0270a56b5a4e606e5f0 /src/gprs_ms.cpp
parentfb3fd093536af6c4f40709b8170bf32cf435fc94 (diff)
MCS: add mcs_is_*() helpers
In preparation for Channel Coding Command encoder in follow-up patches let's add necessary helpers. Those are similar to previously used helpers from GprsCodingScheme class but without CamelCase and with less typo chances between Gprs and Egprs cases. Change-Id: I6699cbc8d7ae766fa4d2b3d37e5f9ff1cf158b7e
Diffstat (limited to 'src/gprs_ms.cpp')
-rw-r--r--src/gprs_ms.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index e64bee4f..f8f6227a 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -222,13 +222,13 @@ void GprsMs::set_mode(enum mcs_kind mode)
switch (m_mode) {
case GPRS:
- if (!m_current_cs_ul.isGprs()) {
+ if (!mcs_is_gprs(m_current_cs_ul)) {
m_current_cs_ul = GprsCodingScheme::getGprsByNum(
m_bts->bts_data()->initial_cs_ul);
if (!m_current_cs_ul.isValid())
m_current_cs_ul = CS1;
}
- if (!m_current_cs_dl.isGprs()) {
+ if (!mcs_is_gprs(m_current_cs_dl)) {
m_current_cs_dl = GprsCodingScheme::getGprsByNum(
m_bts->bts_data()->initial_cs_dl);
if (!m_current_cs_dl.isValid())
@@ -238,13 +238,13 @@ void GprsMs::set_mode(enum mcs_kind mode)
case EGPRS_GMSK:
case EGPRS:
- if (!m_current_cs_ul.isEgprs()) {
+ if (!mcs_is_edge(m_current_cs_ul)) {
m_current_cs_ul = GprsCodingScheme::getEgprsByNum(
m_bts->bts_data()->initial_mcs_ul);
if (!m_current_cs_ul.isValid())
m_current_cs_ul = MCS1;
}
- if (!m_current_cs_dl.isEgprs()) {
+ if (!mcs_is_edge(m_current_cs_dl)) {
m_current_cs_dl = GprsCodingScheme::getEgprsByNum(
m_bts->bts_data()->initial_mcs_dl);
if (!m_current_cs_dl.isValid())
@@ -564,14 +564,14 @@ GprsCodingScheme GprsMs::max_cs_ul() const
OSMO_ASSERT(m_bts != NULL);
bts_data = m_bts->bts_data();
- if (m_current_cs_ul.isGprs()) {
+ if (mcs_is_gprs(m_current_cs_ul)) {
if (!bts_data->max_cs_ul)
return GprsCodingScheme(CS4);
return GprsCodingScheme::getGprsByNum(bts_data->max_cs_ul);
}
- if (!m_current_cs_ul.isEgprs())
+ if (!mcs_is_edge(m_current_cs_ul))
return GprsCodingScheme(); /* UNKNOWN */
if (bts_data->max_mcs_ul)
@@ -594,14 +594,14 @@ GprsCodingScheme GprsMs::max_cs_dl() const
OSMO_ASSERT(m_bts != NULL);
bts_data = m_bts->bts_data();
- if (m_current_cs_dl.isGprs()) {
+ if (mcs_is_gprs(m_current_cs_dl)) {
if (!bts_data->max_cs_dl)
return GprsCodingScheme(CS4);
return GprsCodingScheme::getGprsByNum(bts_data->max_cs_dl);
}
- if (!m_current_cs_dl.isEgprs())
+ if (!mcs_is_edge(m_current_cs_dl))
return GprsCodingScheme(); /* UNKNOWN */
if (bts_data->max_mcs_dl)
@@ -650,12 +650,12 @@ void GprsMs::update_cs_ul(const pcu_l1_meas *meas)
old_link_qual = meas->link_qual;
- if (m_current_cs_ul.isGprs()) {
+ if (mcs_is_gprs(m_current_cs_ul)) {
if (current_cs_num > MAX_GPRS_CS)
current_cs_num = MAX_GPRS_CS;
low = bts_data->cs_lqual_ranges[current_cs_num-1].low;
high = bts_data->cs_lqual_ranges[current_cs_num-1].high;
- } else if (m_current_cs_ul.isEgprs()) {
+ } else if (mcs_is_edge(m_current_cs_ul)) {
if (current_cs_num > MAX_EDGE_MCS)
current_cs_num = MAX_EDGE_MCS;
low = bts_data->mcs_lqual_ranges[current_cs_num-1].low;