aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tbf')
-rw-r--r--tests/tbf/TbfTest.cpp9
-rw-r--r--tests/tbf/TbfTest.err16
2 files changed, 11 insertions, 14 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index f4b2e01b..08115206 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -125,13 +125,8 @@ static void test_tbf_final_ack()
llc_data[i] = i%256;
/* Schedule two blocks */
- dl_msg = msgb_alloc(sizeof(llc_data), "llc data");
- memcpy(msgb_put(dl_msg, sizeof(llc_data)), llc_data, sizeof(llc_data));
- dl_tbf->m_llc.enqueue(dl_msg);
-
- dl_msg = msgb_alloc(sizeof(llc_data), "llc data");
- memcpy(msgb_put(dl_msg, sizeof(llc_data)), llc_data, sizeof(llc_data));
- dl_tbf->m_llc.enqueue(dl_msg);
+ dl_tbf->append_data(ms_class, 1000, llc_data, sizeof(llc_data));
+ dl_tbf->append_data(ms_class, 1000, llc_data, sizeof(llc_data));
/* FIXME: Need correct frame number here? */
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 34663703..28f25a90 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -27,6 +27,8 @@ Slot Allocation (Algorithm A) for class 45
- Assign downlink TS=4
- Setting Control TS 4
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL) changes state from NULL to FLOW
+TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) append
+TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) append
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Downlink Assignment -------------------------
@@ -37,16 +39,16 @@ TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==0)
- Sending new block at BSN 0
-- Chunk with length 0 is less than remaining space (20): add length header to to delimit LLC frame
Complete DL frame for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW)len=0
-- Dequeue next LLC for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) (len=168)
--- Chunk with length 168 larger than space (19) left in block: copy only remaining space, and we are done
-data block: 07 00 00 03 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32
-Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=1 block=0 data=07 00 00 03 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32
+- Dequeue next LLC for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) (len=200)
+-- Chunk with length 200 larger than space (19) left in block: copy only remaining space, and we are done
+data block: 07 00 00 03 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12
+Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=1 block=0 data=07 00 00 03 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12
Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4)
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==1)
- Sending new block at BSN 1
--- Chunk with length 149 larger than space (20) left in block: copy only remaining space, and we are done
-data block: 07 00 03 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46
-Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=2 block=0 data=07 00 03 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46
+-- Chunk with length 181 larger than space (20) left in block: copy only remaining space, and we are done
+data block: 07 00 03 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26
+Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=2 block=0 data=07 00 03 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) downlink acknowledge
- Final ACK received.
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE