diff options
Diffstat (limited to 'library/SGsAP_Templates.ttcn')
-rw-r--r-- | library/SGsAP_Templates.ttcn | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/library/SGsAP_Templates.ttcn b/library/SGsAP_Templates.ttcn index 4414dd11..21fff9e8 100644 --- a/library/SGsAP_Templates.ttcn +++ b/library/SGsAP_Templates.ttcn @@ -13,6 +13,7 @@ module SGsAP_Templates { import from SGsAP_Types all; import from GSM_Types all; import from General_Types all; +import from Osmocom_Types all; import from MobileL3_CommonIE_Types all; /* 9.4.2 */ @@ -162,6 +163,29 @@ function tr_SGsAP_IE_Lai_omit(template LocationAreaIdValue lai) return template } } +/* 9.4.21a */ +template (value) TrackingAreaIdentityValue ts_SGsAP_TAI(GsmMcc mcc, GsmMnc mnc, uint16_t tac) := { + mccDigit1 := mcc[0], + mccDigit2 := mcc[1], + mccDigit3 := mcc[2], + mncDigit3 := f_enc_mnc_digit3(mnc), + mncDigit1 := mnc[0], + mncDigit2 := mnc[1], + tAC := int2oct(tac, 2) +} +template (value) TrackingAreaIdentity ts_SGsAP_IE_TAI(template (value) TrackingAreaIdentityValue tai) := { + iEI := '00100011'B, + lengthIndicator := 5, + iD := tai +} +function ts_SGsAP_IE_TAI_omit(template (omit) TrackingAreaIdentityValue tai) +return template (omit) TrackingAreaIdentity { + if (istemplatekind(tai, "omit")) { + return omit; + } else { + return ts_SGsAP_IE_TAI(tai); + } +} /* 9.4.12 */ @@ -505,7 +529,8 @@ template PDU_SGsAP tr_SGsAP_LU_REJECT(template hexstring imsi, template (value) PDU_SGsAP ts_SGsAP_LU_REQ(hexstring imsi, template (value) octetstring mme_name, template (value) EPS_location_update_type eps_lu_type, - template (value) LocationAreaIdValue new_lai) := { + template (value) LocationAreaIdValue new_lai, + template (omit) TrackingAreaIdentityValue tAI := omit) := { sGsAP_LOCATION_UPDATE_REQUEST := { messageType := '00001001'B, iMSI := ts_SGsAP_IMSI(imsi), @@ -515,7 +540,7 @@ template (value) PDU_SGsAP ts_SGsAP_LU_REQ(hexstring imsi, oldLocationAreaId := omit, tMSI_Status := omit, iMEI_SV := omit, - tAI := omit, + tAI := ts_SGsAP_IE_TAI_omit(tAI), eCGI := omit, tMSI_NRI := omit, cS_DomainOperator := omit |