laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33144 )
Change subject: BSSMAP_Templates: Add templates to receive CellID IE ......................................................................
BSSMAP_Templates: Add templates to receive CellID IE
Change-Id: I42d52d871c8011db7e0897dfe752afeefa6d9662 --- M library/BSSMAP_Templates.ttcn 1 file changed, 99 insertions(+), 0 deletions(-)
Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index c564cfd..fca051a 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -349,6 +349,14 @@ cellIdentification := ? }
+template BSSMAP_IE_CellIdentifier tr_BSSMAP_IE_CellID := { + elementIdentifier := '05'O, + lengthIndicator := ?, + cellIdentifierDiscriminator := ?, + spare1_4 := '0000'B, + cellIdentification := ? +} + type uint16_t BssmapLAC; type uint16_t BssmapCI; type uint16_t BssmapSAC; @@ -360,6 +368,15 @@ } }
+template (present) BSSMAP_IE_CellIdentifier tr_CellId_CGI(template (present) OCT3 mcc_mnc, + template (present) BssmapLAC lac, + template (present) BssmapCI ci) +modifies tr_BSSMAP_IE_CellID := { + cellIdentification := { + cI_CGI := tr_BSSMAP_CI_CGI(mcc_mnc, lac, ci) + } +} + template (value) BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci) modifies ts_BSSMAP_IE_CellID := { cellIdentification := { @@ -370,6 +387,17 @@ } }
+template (present) BSSMAP_IE_CellIdentifier tr_CellID_LAC_CI(template (present) BssmapLAC lac, + template (present) BssmapCI ci) +modifies tr_BSSMAP_IE_CellID := { + cellIdentification := { + cI_LAC_CI := { + lac := f_tr_LAC(lac), + ci := f_tr_CI(ci) + } + } +} + template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci) modifies ts_BSSMAP_IE_CellID := { cellIdentification := { @@ -377,6 +405,13 @@ } }
+template (present) BSSMAP_IE_CellIdentifier tr_CellId_CI(template (present) BssmapCI ci) +modifies tr_BSSMAP_IE_CellID := { + cellIdentification := { + cI_CI := f_tr_CI(ci) + } +} + template BSSMAP_IE_CellIdentifier ts_CellId_none modifies ts_BSSMAP_IE_CellID := { cellIdentification := { @@ -384,6 +419,13 @@ } }
+template BSSMAP_IE_CellIdentifier tr_CellId_none +modifies tr_BSSMAP_IE_CellID := { + cellIdentification := { + cI_noCell := ''O + } +} + template (value) BSSMAP_IE_CellIdentifier ts_CellID_SAI(OCT3 mcc_mnc, BssmapLAC lac, BssmapSAC sac) modifies ts_BSSMAP_IE_CellID := { cellIdentification := { @@ -395,6 +437,46 @@ } }
+template (present) BSSMAP_IE_CellIdentifier tr_CellID_SAI(template (present) OCT3 mcc_mnc, + template (present) BssmapLAC lac, + template (present) BssmapSAC sac) +modifies tr_BSSMAP_IE_CellID := { + cellIdentification := { + cI_SAI := { + mcc_mnc := mcc_mnc, + lac := f_tr_LAC(lac), + sac := f_tr_SAC(sac) + } + } +} + +private function f_tr_LAC(template (present) BssmapLAC lac) +return template (present) OCT2 { + if (istemplatekind(lac, "?")) { + return ?; + } else { + return int2oct(valueof(lac), 2); + } +} + +private function f_tr_SAC(template (present) BssmapSAC sac) +return template (present) OCT2 { + if (istemplatekind(sac, "?")) { + return ?; + } else { + return int2oct(valueof(sac), 2); + } +} + +private function f_tr_CI(template (present) BssmapCI ci) +return template (present) OCT2 { + if (istemplatekind(ci, "?")) { + return ?; + } else { + return int2oct(valueof(ci), 2); + } +} +
template (value) BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(template (value) octetstring l3info) := { elementIdentifier := '17'O, @@ -1381,6 +1463,14 @@ ci := int2oct(ci, 2) }
+template (present) BSSMAP_FIELD_CellIdentification_CGI tr_BSSMAP_CI_CGI(template (present) OCT3 mcc_mnc, + template (present) GsmLac lac, + template (present) GsmCellId ci) := { + mcc_mnc := mcc_mnc, + lac := f_tr_LAC(lac), + ci := f_tr_CI(ci) +} + template (value) BSSMAP_FIELD_CellIdentification_LAC_CI ts_BSSMAP_CI_LAC_CI(GsmLac lac, GsmCellId ci) := { lac := int2oct(lac, 2), ci := int2oct(ci, 2)