diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-02 16:00:41 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-08 09:39:25 +0200 |
commit | a700dd9e11d31805cfe8dd07fc27ac96425cbf0c (patch) | |
tree | 7a7d6922c8cb5f1dbd3bfe95dcdb72e766bacddf /tests/tbf/TbfTest.cpp | |
parent | 17214bb06de4a1d8b626dab0f695017b0c74b358 (diff) |
tbf: Move the current CS field to GprsMs
Currently the current CS value is stored in the cs field of
gprs_rlcmac_tbf and initialised when it is used the first time.
This commit adds separate fields for UL and DL CS values to the
GprsMs class and provides corresponding getter methods for GprsMs and
gprs_rlcmac_tbf.
Ticket: #1739
Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/tbf/TbfTest.cpp')
-rw-r--r-- | tests/tbf/TbfTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 2184b324..e5e71566 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -133,13 +133,15 @@ int pcu_sock_send(struct msgb *msg) return 0; } -static void setup_bts(BTS *the_bts, uint8_t ts_no) +static void setup_bts(BTS *the_bts, uint8_t ts_no, uint8_t cs = 1) { gprs_rlcmac_bts *bts; gprs_rlcmac_trx *trx; bts = the_bts->bts_data(); bts->alloc_algorithm = alloc_algorithm_a; + bts->initial_cs_dl = cs; + bts->initial_cs_ul = cs; trx = &bts->trx[0]; trx->pdch[ts_no].enable(); @@ -492,7 +494,7 @@ static void test_tbf_two_phase() printf("=== start %s ===\n", __func__); - setup_bts(&the_bts, ts_no); + setup_bts(&the_bts, ts_no, 4); bts = the_bts.bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -524,8 +526,8 @@ static void test_tbf_two_phase() ul_tbf = the_bts.ul_tbf_by_tfi(tfi, trx_no); OSMO_ASSERT(ul_tbf != NULL); - fprintf(stderr, "Got '%s', TA=%d\n", - ul_tbf->name(), ul_tbf->ta()); + fprintf(stderr, "Got '%s', TA=%d, CS=%d\n", + ul_tbf->name(), ul_tbf->ta(), ul_tbf->current_cs()); OSMO_ASSERT(ul_tbf->ta() == qta / 4); |