pcu: Allow empty rlcmac blocks in data_req
They are used by osmo-pcu to signal idle blocks.
Change-Id: Ied6b133be5bfd181f08c445b76af0f570edfd2a4
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 4446b63..1014498 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -1094,7 +1094,7 @@
arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), block_nr := nr.blk_nr));
BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
- tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH))
+ tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH), *)
) -> value data_msg;
}
@@ -1138,6 +1138,12 @@
runs on MS_BTS_IFACE_CT {
var BTS_PDTCH_Block data_msg;
f_pcuif_rx_data_req_pdtch(data_msg, nr := nr);
+
+ if (data_msg.dl_block == omit) {
+ setverdict(fail, "Expected RLCMAC block but received idle block (", data_msg.raw.len, ")");
+ f_shutdown(__BFILE__, __LINE__);
+ }
+
dl_block := data_msg.dl_block;
dl_fn := data_msg.raw.fn;
diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn
index 66b2e21..30982da 100644
--- a/pcu/PCUIF_Components.ttcn
+++ b/pcu/PCUIF_Components.ttcn
@@ -133,12 +133,12 @@
type record BTS_PDTCH_Block {
uint8_t bts_nr,
PCUIF_data raw,
- RlcmacDlBlock dl_block
+ RlcmacDlBlock dl_block optional
};
type record BTS_PTCCH_Block {
uint8_t bts_nr,
PCUIF_data raw,
- PTCCHDownlinkMsg dl_block
+ PTCCHDownlinkMsg dl_block optional
};
type record BTS_CCCH_Block {
uint8_t bts_nr,
@@ -554,14 +554,22 @@
[decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_PDTCH)) -> value pcu_msg {
pcu_msg_pdtch.bts_nr := bts_nr;
pcu_msg_pdtch.raw := pcu_msg.u.data_req;
- pcu_msg_pdtch.dl_block := dec_RlcmacDlBlock(pcu_msg_pdtch.raw.data);
+ if (pcu_msg_pdtch.raw.len != 0) {
+ pcu_msg_pdtch.dl_block := dec_RlcmacDlBlock(pcu_msg_pdtch.raw.data);
+ } else {
+ pcu_msg_pdtch.dl_block := omit;
+ }
TC.send(pcu_msg_pdtch);
repeat;
}
[decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg {
pcu_msg_ptcch.bts_nr := bts_nr;
pcu_msg_ptcch.raw := pcu_msg.u.data_req;
- pcu_msg_ptcch.dl_block := dec_PTCCHDownlinkMsg(pcu_msg_ptcch.raw.data);
+ if (pcu_msg_ptcch.raw.len != 0) {
+ pcu_msg_ptcch.dl_block := dec_PTCCHDownlinkMsg(pcu_msg_ptcch.raw.data);
+ } else {
+ pcu_msg_ptcch.dl_block := omit;
+ }
TC.send(pcu_msg_ptcch);
repeat;
}