PCUIF_Components: add compatibility for PCU_IF_SAPI_PCH_DT
When we receive a PCUIF_DATA_REQ, f_BTS_CT_handler will mangle the
incoming message for us. The resulting BTS_CCCH_Block that is sent up to
the component not only contains the PCUIF message, but will also have
the already parsed MAC block attached. This currently only works for
PCU_IF_SAPI_PCH, but not for PCU_IF_SAPI_PCH_DT.
Let's add compatibility for PCU_IF_SAPI_PCH_DT.
Related: OS#5927
Change-Id: Ibaa6d170ef0f1f61b708a872a3c2364585063503
diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn
index 375af8e..8a1207a 100644
--- a/pcu/PCUIF_Components.ttcn
+++ b/pcu/PCUIF_Components.ttcn
@@ -20,6 +20,7 @@
import from PCUIF_CodecPort all;
import from Osmocom_Types all;
+import from General_Types all;
import from RLCMAC_Types all;
import from GSM_RR_Types all;
@@ -139,6 +140,8 @@
type record BTS_CCCH_Block {
uint8_t bts_nr,
PCUIF_data raw,
+ OCT4 tlli optional,
+ charstring imsi optional,
GsmRrMessage rr_msg
};
template BTS_PDTCH_Block tr_PCUIF_DATA_PDTCH(template uint8_t bts_nr,
@@ -157,9 +160,13 @@
};
template BTS_CCCH_Block tr_PCUIF_DATA_RR(template uint8_t bts_nr,
template PCUIF_data raw,
- template GsmRrMessage rr_msg := ?) := {
+ template GsmRrMessage rr_msg := ?,
+ template OCT4 tlli := *,
+ template charstring imsi := *) := {
bts_nr := bts_nr,
raw := raw,
+ tlli := tlli,
+ imsi := imsi,
rr_msg := rr_msg
};
@@ -492,7 +499,7 @@
/* Wait until the PCU is connected */
PCUIF.receive(tr_RAW_PCU_EV(PCU_EV_CONNECT));
- var template PCUIF_Sapi tr_ccch_sapi := (PCU_IF_SAPI_PCH, PCU_IF_SAPI_AGCH);
+ var template PCUIF_Sapi tr_ccch_sapi := (PCU_IF_SAPI_PCH, PCU_IF_SAPI_PCH_DT, PCU_IF_SAPI_AGCH);
alt {
/* Wait for TXT.ind (PCU_VERSION) and respond with INFO.ind (SI13) */
[] PCUIF.receive(tr_PCUIF_TXT_IND(bts_nr, PCU_VERSION, ?)) -> value pcu_msg {
@@ -530,6 +537,7 @@
}
[decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := tr_ccch_sapi)) -> value pcu_msg {
var octetstring data;
+ var PCUIF_pch_dt pch_dt;
/* On PCH the payload is prefixed with paging group (3 octets): skip it.
* TODO: add an additional template parameter, so we can match it. */
if (pcu_msg.u.data_req.sapi == PCU_IF_SAPI_PCH) {
@@ -539,7 +547,17 @@
}
pcu_msg_rr.bts_nr := bts_nr;
pcu_msg_rr.raw := pcu_msg.u.data_req;
- pcu_msg_rr.rr_msg := dec_GsmRrMessage(data);
+
+ if (pcu_msg_rr.raw.sapi == PCU_IF_SAPI_PCH_DT) {
+ pch_dt := dec_PCUIF_pch_dt(pcu_msg_rr.raw.data);
+ pcu_msg_rr.tlli := pch_dt.tlli;
+ pcu_msg_rr.imsi := pch_dt.imsi;
+ pcu_msg_rr.rr_msg := dec_GsmRrMessage(pch_dt.data);
+ } else {
+ pcu_msg_rr.tlli := omit;
+ pcu_msg_rr.imsi := omit;
+ pcu_msg_rr.rr_msg := dec_GsmRrMessage(data);
+ }
TC.send(pcu_msg_rr);
repeat;
}