Osmocom_Gb_Types: Extend RADIO-STATUS templates
RADIO-STATUS can occur with TLLI, but also with P-TMSI or IMSI.
Update our templates accordingly while keeping backwards compatibility.
Related: OS#4951
Change-Id: I1119e50e457b02d52e7c2c26a8b8039bf2118296
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index b82ca32..589108f 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -897,6 +897,22 @@
},
tLLI_Value := tlli
}
+ private function f_ts_BSSGP_TLLI(template (omit) GprsTlli tlli) return template (omit) TLLI_BSSGP {
+ if (istemplatekind(tlli, "omit")) {
+ return omit;
+ } else {
+ return ts_BSSGP_TLLI(valueof(tlli));
+ }
+ }
+ private function f_tr_BSSGP_TLLI(template GprsTlli tlli) return template TLLI_BSSGP {
+ if (istemplatekind(tlli, "omit")) {
+ return omit;
+ } else if (istemplatekind(tlli, "*")) {
+ return *;
+ } else {
+ return tr_BSSGP_TLLI(valueof(tlli));
+ }
+ }
template (value) Suspend_Reference_Number ts_BSSGP_SUSP_REF(template (value) OCT1 susp_ref) := {
iEI := '1D'O,
@@ -932,6 +948,22 @@
oddevenIndicator := f_hex_is_odd_length(imsi),
digits := imsi
}
+ private function f_ts_BSSGP_IMSI(template (omit) hexstring imsi) return template (omit) IMSI_BSSGP {
+ if (istemplatekind(imsi, "omit")) {
+ return omit;
+ } else {
+ return ts_BSSGP_IMSI(valueof(imsi));
+ }
+ }
+ private function f_tr_BSSGP_IMSI(template hexstring imsi) return template IMSI_BSSGP {
+ if (istemplatekind(imsi, "omit")) {
+ return omit;
+ } else if (istemplatekind(imsi, "*")) {
+ return *;
+ } else {
+ return tr_BSSGP_IMSI(imsi);
+ }
+ }
template (present) TMSI_BSSGP tr_BSSGP_TMSI(GsmTmsi tmsi) := {
iEI := '20'O,
@@ -2324,22 +2356,25 @@
/* 10.3.5 */
template (value) PDU_BSSGP
- ts_BSSGP_RADIO_STATUS(GprsTlli tlli, template (value) BssgpRadioCause cause) := {
+ ts_BSSGP_RADIO_STATUS(template (omit) GprsTlli tlli, template (value) BssgpRadioCause cause,
+ template (omit) GsmTmsi tmsi := omit,
+ template (omit) hexstring imsi := omit) := {
pDU_BSSGP_RADIO_STATUS := {
bssgpPduType := '0a'O,
- tLLI := ts_BSSGP_TLLI(tlli),
- tMSI := omit,
- iMSI := omit,
+ tLLI := f_ts_BSSGP_TLLI(tlli),
+ tMSI := f_ts_BSSGP_TMSI(tmsi),
+ iMSI := f_ts_BSSGP_IMSI(imsi),
radio_Cause := ts_BSSGP_RADIO_CAUSE(cause)
}
}
template (present) PDU_BSSGP
- tr_BSSGP_RADIO_STATUS(template (present) GprsTlli tlli, template (present) BssgpRadioCause cause) := {
+ tr_BSSGP_RADIO_STATUS(template GprsTlli tlli, template (present) BssgpRadioCause cause,
+ template GsmTmsi tmsi := *, template hexstring imsi := *) := {
pDU_BSSGP_RADIO_STATUS := {
bssgpPduType := '0a'O,
- tLLI := ts_BSSGP_TLLI(tlli),
- tMSI := omit,
- iMSI := omit,
+ tLLI := f_tr_BSSGP_TLLI(tlli),
+ tMSI := f_tr_BSSGP_TMSI(tmsi),
+ iMSI := f_tr_BSSGP_IMSI(imsi),
radio_Cause := tr_BSSGP_RADIO_CAUSE(cause)
}
}