diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-29 14:18:46 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-07-03 13:17:22 +0200 |
commit | ac89a555fa73b24a77bb861811774a5af885bc84 (patch) | |
tree | d0edad2d9003d7355f5637e61aa4f8f2f73879f8 /tests/ms/MsTest.cpp | |
parent | 699b8dca49df30b7bf6db7090eb416d1ad4fd46d (diff) |
ms: Add tbf() method to get the TBF based on the direction
To avoid the need for a switch or conditional statement when needing
a TBF from an MS object in direction independant code, this method
contains that case distinction. For additional flexibility, a
reverse() function is added to get the opposite direction.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/ms/MsTest.cpp')
-rw-r--r-- | tests/ms/MsTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index f2faefc3..5a25d76f 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -69,6 +69,9 @@ static void test_ms_state() OSMO_ASSERT(ms->ul_tbf() == ul_tbf); OSMO_ASSERT(ms->dl_tbf() == dl_tbf); + OSMO_ASSERT(ms->tbf(GPRS_RLCMAC_UL_TBF) == ul_tbf); + OSMO_ASSERT(ms->tbf(GPRS_RLCMAC_DL_TBF) == dl_tbf); + ms->detach_tbf(ul_tbf); OSMO_ASSERT(!ms->is_idle()); OSMO_ASSERT(ms->ul_tbf() == NULL); |