aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty_functions.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-05 15:33:03 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 13:58:14 +0100
commitcb7289094a40f179f6c538780f3117f7ad9688bd (patch)
treedc25962feb9c18814fe944fe9d39adedcf859dc6 /src/pcu_vty_functions.cpp
parent96ccea8436f9a5bbd9f459c6c1bdb9a24dd2bed9 (diff)
edge: Replace integer cs by GprsCodingScheme
Currently the TBF and MS object use a plain integer value (current_cs) to manage the coding scheme. This makes it difficult to support the MCS schemes. GprsCodingScheme supports a partial ordering of these values (CS and MCS) and provides safe increment and decrement methods. Use the GprsCodingScheme type instead of integer for cs fields and variables. Add a 'mode' to GprsMs which can be set to either GPRS, EGPRS, or EGPRS_GMSK which also set the initial values of current_cs_ul/dl. Select the mode based on max_mcs_ul and max_mcs_dl. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_vty_functions.cpp')
-rw-r--r--src/pcu_vty_functions.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index 7082d990..c0592338 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -55,7 +55,8 @@ static void tbf_print_vty_info(struct vty *vty, gprs_rlcmac_tbf *tbf)
if (tbf->pdch[i])
vty_out(vty, "%d ", i);
}
- vty_out(vty, " CS=%d%s%s", tbf->ms() ? tbf->ms()->current_cs_dl() : 1,
+ vty_out(vty, " CS=%s%s%s",
+ tbf->ms() ? tbf->ms()->current_cs_dl().name() : "???",
VTY_NEWLINE, VTY_NEWLINE);
}
@@ -83,10 +84,11 @@ int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts_data)
llist_for_each(ms_iter, &bts->ms_store().ms_list()) {
GprsMs *ms = ms_iter->entry();
- vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%d, CS-DL=%d, LLC=%d, "
+ vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%d, "
"IMSI=%s%s",
ms->tlli(),
- ms->ta(), ms->current_cs_ul(), ms->current_cs_dl(),
+ ms->ta(), ms->current_cs_ul().name(),
+ ms->current_cs_dl().name(),
ms->llc_queue()->size(),
ms->imsi(),
VTY_NEWLINE);
@@ -101,9 +103,9 @@ static int show_ms(struct vty *vty, GprsMs *ms)
vty_out(vty, "MS TLLI=%08x, IMSI=%s%s", ms->tlli(), ms->imsi(), VTY_NEWLINE);
vty_out(vty, " Timing advance (TA): %d%s", ms->ta(), VTY_NEWLINE);
- vty_out(vty, " Coding scheme uplink: CS-%d%s", ms->current_cs_ul(),
+ vty_out(vty, " Coding scheme uplink: %s%s", ms->current_cs_ul().name(),
VTY_NEWLINE);
- vty_out(vty, " Coding scheme downlink: CS-%d%s", ms->current_cs_dl(),
+ vty_out(vty, " Coding scheme downlink: %s%s", ms->current_cs_dl().name(),
VTY_NEWLINE);
vty_out(vty, " MS class: %d%s", ms->ms_class(), VTY_NEWLINE);
vty_out(vty, " EGPRS MS class: %d%s", ms->egprs_ms_class(), VTY_NEWLINE);