pcu: Split f_ms_tx_ul_data_block() into helper functions
This allows shrinking some tests which wish to send specificaly crafter
LlcBlocks (since the way LlcBlocks are created for f_ms_tx_ul_data_block
only allows sending data related to the same upper LLC PDU)
Change-Id: I81176fa5c7caa2535bcc97eec26833579933ed7a
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index c360e97..82ecb57 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3603,7 +3603,6 @@
var PCUIF_info_ind info_ind;
var RlcmacDlBlock dl_block;
var octetstring payload;
- var template (value) RlcmacUlBlock ul_data;
var template (value) LlcBlockHdr blk_hdr;
var template (value) LlcBlocks blocks;
var uint32_t sched_fn;
@@ -3644,14 +3643,7 @@
more := false, e := true);
blocks := { t_RLCMAC_LLCBLOCK(payload, blk_hdr) };
/* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */
- ul_data := t_RLCMAC_UL_DATA_TLLI(cs := ms.ul_tbf.tx_cs_mcs,
- tfi := ms.ul_tbf.tfi,
- cv := 15,
- bsn := ms.ul_tbf.bsn,
- blocks := blocks,
- tlli := ms.tlli);
- f_ultbf_inc_bsn(ms.ul_tbf);
- f_ms_tx_ul_block(ms, ul_data, f_next_pdch_block(sched_fn));
+ f_ms_tx_ul_data_blocks_gprs(ms, blocks, cv := 15, with_tlli := true, fn := sched_fn);
blocks_sent := blocks_sent + 1;
/* UL block should be received in SGSN */
@@ -3662,12 +3654,6 @@
tr_AckNackDescription(final_ack := '0'B)))
f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn, acknack_tmpl);
- ul_data := t_RLCMAC_UL_DATA(cs := ms.ul_tbf.tx_cs_mcs,
- tfi := ms.ul_tbf.tfi,
- cv := 15,
- bsn := ms.ul_tbf.bsn,
- blocks := blocks);
-
nr := f_ms_tx_TsTrxBtsNum(ms);
BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
sapi := PCU_IF_SAPI_PDTCH, fn := 0,
@@ -3683,9 +3669,7 @@
log("ACKING FN ", data_msg.raw.fn, " on FN ", ack_fn);
f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), ack_fn);
}
- ul_data.data.mac_hdr.bsn := ms.ul_tbf.bsn;
- f_ms_tx_ul_block(ms, ul_data, 0);
- f_ultbf_inc_bsn(ms.ul_tbf);
+ f_ms_tx_ul_data_blocks_gprs(ms, blocks);
blocks_sent := blocks_sent + 1;
if (blocks_sent == target_bsn_set) {
@@ -3703,9 +3687,7 @@
tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
tr_RLCMAC_DL_DUMMY_CTRL)) -> value data_msg {
- ul_data.data.mac_hdr.bsn := ms.ul_tbf.bsn;
- f_ms_tx_ul_block(ms, ul_data, 0);
- f_ultbf_inc_bsn(ms.ul_tbf);
+ f_ms_tx_ul_data_blocks_gprs(ms, blocks);
blocks_sent := blocks_sent + 1;
if (blocks_sent == target_bsn_set) {