aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-03-12 15:50:57 +0100
committerMax <msuraev@sysmocom.de>2019-03-27 12:32:04 +0000
commit898dddb1d122068700694b59b9261fe07fa9cdef (patch)
tree6035fb7f0eaa15f4c5dffcf51c4a4f5c9df31fc2 /tests
parent48b1e7a86f2923c9de466c4e30697b3d2b13072b (diff)
MCS: add Channel Coding Command encoder
Add function to encode MCS value as proper EDGE or GPRS Channel Coding value according to 3GPP TS 44.060 and corresponding helpers. Use it for everything except IA Rest Octet encoding which is done in a follow-up patches to make sure that we distinguish between encoding-related changes to test output and unrelated changes. Change-Id: I127fb29f5aaf77a7f6c4c565dfeb3b711af9845d
Diffstat (limited to 'tests')
-rw-r--r--tests/ms/MsTest.cpp4
-rw-r--r--tests/tbf/TbfTest.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index 2b0bc0f..aa600e5 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -520,11 +520,11 @@ static void test_ms_cs_selection()
dl_tbf->set_ms(ms);
OSMO_ASSERT(!ms->is_idle());
- OSMO_ASSERT(ms->current_cs_dl().to_num() == 4);
+ OSMO_ASSERT(mcs_chan_code(ms->current_cs_dl()) == 3);
bts->cs_downgrade_threshold = 200;
- OSMO_ASSERT(ms->current_cs_dl().to_num() == 3);
+ OSMO_ASSERT(mcs_chan_code(ms->current_cs_dl()) == 2);
talloc_free(dl_tbf);
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 993ca10..6dc802c 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -2737,12 +2737,12 @@ static void tbf_cleanup(gprs_rlcmac_dl_tbf *dl_tbf)
#define CHECK_UNACKED(tbf, cs, bsn) do { \
OSMO_ASSERT(tbf->window()->m_v_b.is_unacked(bsn)); \
- OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \
+ OSMO_ASSERT(mcs_chan_code(tbf->m_rlc.block(bsn)->cs_current_trans) == cs - 1); \
} while(0)
#define CHECK_NACKED(tbf, cs, bsn) do { \
OSMO_ASSERT(tbf->window()->m_v_b.is_nacked(bsn)); \
- OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \
+ OSMO_ASSERT(mcs_chan_code(tbf->m_rlc.block(bsn)->cs_current_trans) == cs - 1); \
} while(0)
#define MAKE_ACKED(m, tbf, fn, cs, check_unacked) do { \