BSSMAP: Support setting LastUsedPLMNId in CommonId msg
Related: SYS#5337
Change-Id: I1b7c7fbe010033e726dde3c68152543a63760ffd
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index a323502..458fa48 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -1110,6 +1110,20 @@
digits := imsi_digits
}
+template (value) BSSAMAP_IE_LastUsedEUTRANPLMNId ts_BSSMAP_LastUsedEUTRANPLMNId(OCT3 mcc_mnc) := {
+ elementIdentifier := '95'O,
+ mcc_mnc := mcc_mnc
+}
+
+function f_ts_BSSMAP_LastUsedEUTRANPLMNId(template (omit) OCT3 mcc_mnc)
+ return template (omit) BSSAMAP_IE_LastUsedEUTRANPLMNId {
+ if (not istemplatekind(mcc_mnc, "omit")) {
+ return ts_BSSMAP_LastUsedEUTRANPLMNId(valueof(mcc_mnc));
+ } else {
+ return omit;
+ }
+}
+
template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := {
cIl_noCell := ''O
}
@@ -1658,7 +1672,8 @@
}
}
-template PDU_BSSAP ts_BSSMAP_CommonId(hexstring imsi_digits)
+template PDU_BSSAP ts_BSSMAP_CommonId(hexstring imsi_digits,
+ template (omit) OCT3 last_eutran_plmn := omit)
modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
@@ -1667,7 +1682,7 @@
iMSI := ts_BSSMAP_Imsi(imsi_digits),
sNAAccessInformation := omit,
selectedPLMNId := omit,
- lastUsedEUTRANPLMNId := omit
+ lastUsedEUTRANPLMNId := f_ts_BSSMAP_LastUsedEUTRANPLMNId(last_eutran_plmn)
}
}
}