<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11305">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add SGsAP_Templates for SGsAP on the MME<->MSC interface<br><br>Change-Id: I435dab312fc4965c69ffb9cc22917539ebab93e7<br>---<br>M deps/Makefile<br>A library/SGsAP_Templates.ttcn<br>M msc/gen_links.sh<br>3 files changed, 867 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/deps/Makefile b/deps/Makefile</span><br><span>index cb9e359..f2f38bd 100644</span><br><span>--- a/deps/Makefile</span><br><span>+++ b/deps/Makefile</span><br><span>@@ -40,6 +40,7 @@</span><br><span>                    titan.ProtocolModules.LLC_v7.1.0 \</span><br><span>                   titan.ProtocolModules.MobileL3_v13.4.0 \</span><br><span>                     titan.ProtocolModules.NS_v7.3.0 \</span><br><span style="color: hsl(120, 100%, 40%);">+                     titan.ProtocolModules.SGsAP_13.2.0 \</span><br><span>                         titan.ProtocolModules.SNDCP_v7.0.0 \</span><br><span>                         titan.ProtocolEmulations.SCCP</span><br><span> </span><br><span>@@ -77,6 +78,7 @@</span><br><span> titan.ProtocolModules.RTP_commit=              R.5.A</span><br><span> titan.ProtocolModules.ROSE_commit=             R.1.C</span><br><span> titan.ProtocolModules.SCTP_commit=             R.2.A</span><br><span style="color: hsl(120, 100%, 40%);">+titan.ProtocolModules.SGsAP_13.2.0_commit=       81544cf008378058b95ff20d33f3770fadb7e235</span><br><span> titan.ProtocolModules.SDP_commit=           R.14.A</span><br><span> titan.ProtocolModules.SMPP_commit=            R.2.A-2-gb7aee69</span><br><span> titan.ProtocolModules.SNDCP_v7.0.0_commit=  R.2.A</span><br><span>diff --git a/library/SGsAP_Templates.ttcn b/library/SGsAP_Templates.ttcn</span><br><span>new file mode 100644</span><br><span>index 0000000..aac045e</span><br><span>--- /dev/null</span><br><span>+++ b/library/SGsAP_Templates.ttcn</span><br><span>@@ -0,0 +1,860 @@</span><br><span style="color: hsl(120, 100%, 40%);">+module SGsAP_Templates {</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Templates for the SGsAP protocol as per 3GPP TS 29.118</span><br><span style="color: hsl(120, 100%, 40%);">+ * (C) 2018 by Harald Welte <laforg@gnumonks.org></span><br><span style="color: hsl(120, 100%, 40%);">+ * All rights reserved.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Released under the terms of the GNU General Public License, Version 2 or</span><br><span style="color: hsl(120, 100%, 40%);">+ * (at your option) any later version.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+import from SGsAP_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+import from GSM_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+import from General_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+import from MobileL3_CommonIE_Types all;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) EPS_LocationUpdateType ts_SGsAP_IE_EpsLuType(template (value) EPS_location_update_type lut) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      iEI := '00001010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ locationUpdateType := lut</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template EPS_LocationUpdateType tr_SGsAP_IE_EpsLuType(template EPS_location_update_type lut) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       iEI := '00001010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ locationUpdateType := lut</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.3 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) ErroneousMessage ts_SGsAP_IE_ErrMsg(template (value) octetstring err_msg) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  iEI := '00011011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := lengthof(valueof(err_msg)),</span><br><span style="color: hsl(120, 100%, 40%);">+        erroneousMessage := err_msg</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template ErroneousMessage tr_SGsAP_IE_ErrMsg(template octetstring err_msg) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       iEI := '00011011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ erroneousMessage := err_msg</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.6 */</span><br><span style="color: hsl(120, 100%, 40%);">+private function ts_SGsAP_IMSI(hexstring digits) return template (value) IMSI {</span><br><span style="color: hsl(120, 100%, 40%);">+      var template (value) IMSI imsi := {</span><br><span style="color: hsl(120, 100%, 40%);">+           iEI := '00000001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           lengthIndicator := lengthof(digits)/2 + 1,</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI := {</span><br><span style="color: hsl(120, 100%, 40%);">+                     field1 := '001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                     parity := '0'B, /* even */</span><br><span style="color: hsl(120, 100%, 40%);">+                    digits := digits,</span><br><span style="color: hsl(120, 100%, 40%);">+                     fillerDigit := '1111'B /* even */</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (lengthof(digits) mod 2 == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* odd number of digits */</span><br><span style="color: hsl(120, 100%, 40%);">+            imsi.iMSI.parity := '1'B;</span><br><span style="color: hsl(120, 100%, 40%);">+             imsi.iMSI.fillerDigit := omit;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+     return imsi;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+private function ts_SGsAP_IMSI_omit(template (omit) hexstring digits) return template (omit) IMSI {</span><br><span style="color: hsl(120, 100%, 40%);">+  if (istemplatekind(digits, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+               return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              return ts_SGsAP_IMSI(valueof(digits));</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+private function tr_SGsAP_IMSI(template hexstring digits) return template IMSI {</span><br><span style="color: hsl(120, 100%, 40%);">+        if (istemplatekind(digits, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+               return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else if (istemplatekind(digits, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+           return *;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     var template IMSI imsi := {</span><br><span style="color: hsl(120, 100%, 40%);">+           iEI := '00000001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           lengthIndicator := lengthof(digits)/2 + 1,</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI := {</span><br><span style="color: hsl(120, 100%, 40%);">+                     field1 := '001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                     parity := '0'B, /* even */</span><br><span style="color: hsl(120, 100%, 40%);">+                    digits := digits,</span><br><span style="color: hsl(120, 100%, 40%);">+                     fillerDigit := '1111'B /* even */</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     if (lengthof(digits) mod 2 == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* odd number of digits */</span><br><span style="color: hsl(120, 100%, 40%);">+            /* odd number of digits */</span><br><span style="color: hsl(120, 100%, 40%);">+            imsi.iMSI.parity := '1'B;</span><br><span style="color: hsl(120, 100%, 40%);">+             imsi.iMSI.fillerDigit := omit;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+     return imsi;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.7 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) IMSI_DetachFromEPS_ServiceType ts_SGsAP_IE_DetServiceType(template (value) IMSI_detachFromEPS_serviceType st) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   iEI := '00010000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ serviceType := st</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template IMSI_DetachFromEPS_ServiceType tr_SGsAP_IE_DetServiceType(template IMSI_detachFromEPS_serviceType st) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     iEI := '00010000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ serviceType := st</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.8 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) IMSI_DetachFromNonEPS_ServiceType ts_SGsAP_IE_DetNonEpsServiceType(template (value) IMSI_detachFromNonEPS_serviceType st) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  iEI := '00010001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ serviceType := st</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template IMSI_DetachFromNonEPS_ServiceType tr_SGsAP_IE_DetNonEpsServiceType(template IMSI_detachFromNonEPS_serviceType st) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ iEI := '00010001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ serviceType := st</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.11 */</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_enc_mnc_digit3(GsmMnc mnc) return HEX1 {</span><br><span style="color: hsl(120, 100%, 40%);">+     if (lengthof(mnc) == 2) {</span><br><span style="color: hsl(120, 100%, 40%);">+             return 'F'H;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              return mnc[2];</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) LocationAreaIdValue ts_SGsAP_LAI(GsmMcc mcc, GsmMnc mnc, GsmLac lac) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      mccDigit1 := mcc[0],</span><br><span style="color: hsl(120, 100%, 40%);">+  mccDigit2 := mcc[1],</span><br><span style="color: hsl(120, 100%, 40%);">+  mccDigit3 := mcc[2],</span><br><span style="color: hsl(120, 100%, 40%);">+  mncDigit3 := f_enc_mnc_digit3(mnc),</span><br><span style="color: hsl(120, 100%, 40%);">+   mncDigit1 := mnc[0],</span><br><span style="color: hsl(120, 100%, 40%);">+  mncDigit2 := mnc[1],</span><br><span style="color: hsl(120, 100%, 40%);">+  lac := int2oct(lac, 2)</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) LocationAreaId ts_SGsAP_IE_Lai(template (value) LocationAreaIdValue lai) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     iEI := '00000100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 5,</span><br><span style="color: hsl(120, 100%, 40%);">+ locationAreaId := lai</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template LocationAreaId tr_SGsAP_IE_Lai(template LocationAreaIdValue lai) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      iEI := '00000100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 5,</span><br><span style="color: hsl(120, 100%, 40%);">+ locationAreaId := lai</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+function ts_SGsAP_IE_Lai_omit(template (omit) LocationAreaIdValue lai) return template (omit) LocationAreaId {</span><br><span style="color: hsl(120, 100%, 40%);">+      if (istemplatekind(lai, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+          return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              return ts_SGsAP_IE_Lai(lai);</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+function tr_SGsAP_IE_Lai_omit(template LocationAreaIdValue lai) return template LocationAreaId {</span><br><span style="color: hsl(120, 100%, 40%);">+        if (istemplatekind(lai, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+          return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else if (istemplatekind(lai, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+              return *;</span><br><span style="color: hsl(120, 100%, 40%);">+     } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              return tr_SGsAP_IE_Lai(lai);</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.12 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) MM_Information ts_SGsAP_IE_MmInfo(template (value) octetstring mm_info) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       iEI := '00010111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := lengthof(valueof(mm_info)),</span><br><span style="color: hsl(120, 100%, 40%);">+        information := mm_info</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template MM_Information tr_SGsAP_IE_MmInfo(template octetstring mm_info) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      iEI := '00010111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ information := mm_info</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.13 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) MME_Name ts_SGsAP_IE_MmeName(template (value) charstring name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   iEI := '00001001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := lengthof(valueof(name)),</span><br><span style="color: hsl(120, 100%, 40%);">+   name := name</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+template MME_Name tr_SGsAP_IE_MmeName(template charstring name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        iEI := '00001001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ name := name</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.14 */</span><br><span style="color: hsl(120, 100%, 40%);">+function f_l3_to_sgs_id(MobileIdentityLV l3) return MobileIdentityValue {</span><br><span style="color: hsl(120, 100%, 40%);">+   var OddEvenInd_Identity l3v := l3.mobileIdentityV.oddEvenInd_identity;</span><br><span style="color: hsl(120, 100%, 40%);">+        var MobileIdentityValue ret;</span><br><span style="color: hsl(120, 100%, 40%);">+  ret.typeOfIdentity := l3.mobileIdentityV.typeOfIdentity;</span><br><span style="color: hsl(120, 100%, 40%);">+      if (ischosen(l3v.imei)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ret.iD.imei.oddevenIndicator := l3v.imei.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.imei.digits := l3v.imei.digits;</span><br><span style="color: hsl(120, 100%, 40%);">+        } else if (ischosen(l3v.imsi)) {</span><br><span style="color: hsl(120, 100%, 40%);">+              ret.iD.imsi.oddevenIndicator := l3v.imsi.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.imsi.digits := l3v.imsi.digits;</span><br><span style="color: hsl(120, 100%, 40%);">+                ret.iD.imsi.fillerDigit := l3v.imsi.fillerDigit;</span><br><span style="color: hsl(120, 100%, 40%);">+      } else if (ischosen(l3v.imei_sv)) {</span><br><span style="color: hsl(120, 100%, 40%);">+           ret.iD.imei_sv.oddevenIndicator := l3v.imei_sv.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+              ret.iD.imei_sv.digits := l3v.imei_sv.digits;</span><br><span style="color: hsl(120, 100%, 40%);">+          ret.iD.imei_sv.fillerDigit := l3v.imei_sv.fillerDigit;</span><br><span style="color: hsl(120, 100%, 40%);">+        } else if (ischosen(l3v.tmsi_ptmsi)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                ret.iD.tmsi_ptmsi.oddevenIndicator := l3v.tmsi_ptmsi.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+                ret.iD.tmsi_ptmsi.fillerDigit := l3v.tmsi_ptmsi.fillerDigit;</span><br><span style="color: hsl(120, 100%, 40%);">+          ret.iD.tmsi_ptmsi.octets := l3v.tmsi_ptmsi.octets;</span><br><span style="color: hsl(120, 100%, 40%);">+    } else if (ischosen(l3v.tmgi_and_MBMS_SessionID)) {</span><br><span style="color: hsl(120, 100%, 40%);">+           ret.iD.tmgi_and_MBMS_SessionID.oddevenIndicator := l3v.tmgi_and_MBMS_SessionID.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+              ret.iD.tmgi_and_MBMS_SessionID.mCC_MNCIndicator := l3v.tmgi_and_MBMS_SessionID.mCC_MNCIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+              ret.iD.tmgi_and_MBMS_SessionID.mBMS_SessionIdentityIndicator := l3v.tmgi_and_MBMS_SessionID.mBMS_SessionIdentityIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.spare := l3v.tmgi_and_MBMS_SessionID.spare;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mBMS_ServiceID := l3v.tmgi_and_MBMS_SessionID.mBMS_ServiceID;</span><br><span style="color: hsl(120, 100%, 40%);">+          ret.iD.tmgi_and_MBMS_SessionID.mccDigit1 := l3v.tmgi_and_MBMS_SessionID.mccDigit1;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mccDigit2 := l3v.tmgi_and_MBMS_SessionID.mccDigit2;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mccDigit3 := l3v.tmgi_and_MBMS_SessionID.mccDigit3;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mccDigit3 := l3v.tmgi_and_MBMS_SessionID.mccDigit3;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mccDigit1 := l3v.tmgi_and_MBMS_SessionID.mccDigit1;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mccDigit2 := l3v.tmgi_and_MBMS_SessionID.mccDigit2;</span><br><span style="color: hsl(120, 100%, 40%);">+            ret.iD.tmgi_and_MBMS_SessionID.mBMS_SessionIdentity := l3v.tmgi_and_MBMS_SessionID.mBMS_SessionIdentity;</span><br><span style="color: hsl(120, 100%, 40%);">+      } else if (ischosen(l3v.no_identity)) {</span><br><span style="color: hsl(120, 100%, 40%);">+               ret.iD.no_identity.oddevenIndicator := l3v.no_identity.oddevenIndicator;</span><br><span style="color: hsl(120, 100%, 40%);">+              ret.iD.no_identity.fillerDigits := l3v.no_identity.fillerDigits;</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+     return ret;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template MobileIdentity ts_SGsAP_IE_MobileID(template (value) MobileIdentityLV l3_mi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    iEI := '00001110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 0, /* overwritten */</span><br><span style="color: hsl(120, 100%, 40%);">+       iD := f_l3_to_sgs_id(valueof(l3_mi))</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.15 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) NAS_MessageContainer ts_SGsAP_NasContainer(template (value) octetstring nas_pdu) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     iEI := '00010110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := lengthof(valueof(nas_pdu)),</span><br><span style="color: hsl(120, 100%, 40%);">+        nAS_MessageContainer := nas_pdu</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template NAS_MessageContainer tr_SGsAP_NasContainer(template octetstring nas_pdu) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    iEI := '00010110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ nAS_MessageContainer := nas_pdu</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.16 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) RejectCause ts_SGsAP_IE_RejCause(template (value) Reject_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       iEI := '00001111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ cause := cause</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template RejectCause tr_SGsAP_IE_RejCause(template Reject_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        iEI := '00001111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ cause := cause</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.17 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) ServiceIndicator ts_SGsAP_ServiceInd(template (value) Service_Indicator si) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  iEI := '00100000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ indicator := si</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template ServiceIndicator tr_SGsAP_ServiceInd(template Service_Indicator si) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ iEI := '00100000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ indicator := si</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.18 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) SGsCause ts_SGsAP_IE_SgsCause(template (value) SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   iEI := '00001000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ cause := cause</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+function tr_SGsAP_IE_SgsCause(template SGs_Cause cause) return template SGsCause {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (istemplatekind(cause, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+  } else if (istemplatekind(cause, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+            return *;</span><br><span style="color: hsl(120, 100%, 40%);">+     } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              var template SGsCause ret := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        iEI := '00001000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+                   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+                 cause := cause</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+             return ret;</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.21c */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) UE_EMM_Mode ts_SGsAP_IE_UeEmmMode(template (value) UE_EMM_mode mode) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     iEI := '00100101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ mode := mode</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template UE_EMM_Mode tr_SGsAP_IE_UeEmmMode(template UE_EMM_mode mode) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   iEI := '00100101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ mode := mode</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 9.4.22 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) VLR_Name ts_SGsAP_IE_VlrName(template (value) charstring name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       iEI := '00000010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := lengthof(name),</span><br><span style="color: hsl(120, 100%, 40%);">+    name := name</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template VLR_Name tr_SGsAP_IE_VlrName(template charstring name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ iEI := '00000010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   lengthIndicator := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+ name := name</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 3GPP TS 29.118 Section 8.1 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_ALERT_ACK(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_ALERT_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00001110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_ALERT_ACK(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_ALERT_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00001110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 3GPP TS 29.118 Section 8.2 */</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP ts_SGsAP_ALERT_REJECT(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                     template (value) SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_ALERT_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+               messageType := '00001111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := ts_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_ALERT_REJECT(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template SGs_Cause cause := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_ALERT_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+               messageType := '00001111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := tr_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 3GPP TS 29.118 Section 8.3 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_ALERT_REQ(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_ALERT_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00001101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_ALERT_REQ(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_ALERT_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00001101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 3GPP TS 29.118 Section 8.4 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_DL_UD(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                     template (value) octetstring nas_pdu) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_DOWNLINK_UNITDATA := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00000111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          nAS_MessageContainer := ts_SGsAP_NasContainer(nas_pdu)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_DL_UD(template hexstring imsi, template octetstring nas_pdu := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_DOWNLINK_UNITDATA := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00000111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          nAS_MessageContainer := tr_SGsAP_NasContainer(nas_pdu)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.5 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_EPS_DETACH_ACK(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_EPS_DETACH_ACK:= {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00010010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_EPS_DETACH_ACK(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_EPS_DETACH_ACK:= {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00010010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(valueof(imsi))</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.6 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_EPS_DETACH_IND(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            template (value) charstring mme_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                 template (value) IMSI_detachFromEPS_serviceType det_serv_typ) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ sGsAP_EPS_DETACH_INDICATION:= {</span><br><span style="color: hsl(120, 100%, 40%);">+               messageType := '00010001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mME_Name := ts_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI_DetachFromEPS_ServiceType := ts_SGsAP_IE_DetServiceType(det_serv_typ)</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_EPS_DETACH_IND(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template charstring mme_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                         template IMSI_detachFromEPS_serviceType det_serv_typ) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ sGsAP_EPS_DETACH_INDICATION:= {</span><br><span style="color: hsl(120, 100%, 40%);">+               messageType := '00010001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(valueof(imsi)),</span><br><span style="color: hsl(120, 100%, 40%);">+         mME_Name := tr_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI_DetachFromEPS_ServiceType := tr_SGsAP_IE_DetServiceType(det_serv_typ)</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.7 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_IMSI_DETACH_ACK(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   sGsAP_IMSI_DETACH_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00010100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_IMSI_DETACH_ACK(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_IMSI_DETACH_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00010100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.8 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_IMSI_DETACH_IND(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                    template (value) charstring mme_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                 template (value) IMSI_detachFromNonEPS_serviceType det_serv_typ) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_IMSI_DETACH_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00010011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mME_Name := ts_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI_DetachFromNonEPS_ServiceType := ts_SGsAP_IE_DetNonEpsServiceType(det_serv_typ)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_IMSI_DETACH_IND(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template charstring mme_name := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            template IMSI_detachFromNonEPS_serviceType det_serv_typ := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_IMSI_DETACH_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00010011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mME_Name := tr_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMSI_DetachFromNonEPS_ServiceType := tr_SGsAP_IE_DetNonEpsServiceType(det_serv_typ)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.9 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_LU_ACCEPT(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            template (value) LocationAreaIdValue lai,</span><br><span style="color: hsl(120, 100%, 40%);">+                                             template (value) MobileIdentityLV mobile_id) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_LOCATION_UPDATE_ACCEPT := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00001010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          locationAreaId := ts_SGsAP_IE_Lai(lai),</span><br><span style="color: hsl(120, 100%, 40%);">+               newTMSIorIMSI := ts_SGsAP_IE_MobileID(mobile_id)</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_LU_ACCEPT(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template LocationAreaIdValue lai := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_LOCATION_UPDATE_ACCEPT := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00001010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          locationAreaId := tr_SGsAP_IE_Lai(lai),</span><br><span style="color: hsl(120, 100%, 40%);">+               newTMSIorIMSI := *</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.10 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_LU_REJECT(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           template (value) Reject_Cause rej_cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                                              template (omit) LocationAreaIdValue lai) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   sGsAP_LOCATION_UPDATE_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00001011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          rejectCause := ts_SGsAP_IE_RejCause(rej_cause),</span><br><span style="color: hsl(120, 100%, 40%);">+               locationAreaId := ts_SGsAP_IE_Lai_omit(lai)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_LU_REJECT(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template Reject_Cause rej_cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                                      template LocationAreaIdValue lai) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_LOCATION_UPDATE_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00001011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          rejectCause := tr_SGsAP_IE_RejCause(rej_cause),</span><br><span style="color: hsl(120, 100%, 40%);">+               locationAreaId := tr_SGsAP_IE_Lai_omit(lai)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.11 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_LU_REQ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           template (value) charstring mme_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                         template (value) EPS_location_update_type eps_lu_type,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template (value) LocationAreaIdValue new_lai) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ sGsAP_LOCATION_UPDATE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00001001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mME_Name := ts_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            ePS_LocationUpdateType := ts_SGsAP_IE_EpsLuType(eps_lu_type),</span><br><span style="color: hsl(120, 100%, 40%);">+         newLocationAreaId := ts_SGsAP_IE_Lai(new_lai),</span><br><span style="color: hsl(120, 100%, 40%);">+                oldLocationAreaId := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+            tMSI_Status := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          iMEI_SV := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              tAI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          eCGI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+         tMSI_NRI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+             cS_DomainOperator := omit</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_LU_REQ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template charstring mme_name := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+                            template EPS_location_update_type eps_lu_type := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+                                   template LocationAreaIdValue new_lai := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_LOCATION_UPDATE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00001001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mME_Name := tr_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            ePS_LocationUpdateType := tr_SGsAP_IE_EpsLuType(eps_lu_type),</span><br><span style="color: hsl(120, 100%, 40%);">+         newLocationAreaId := tr_SGsAP_IE_Lai_omit(new_lai),</span><br><span style="color: hsl(120, 100%, 40%);">+           oldLocationAreaId := *,</span><br><span style="color: hsl(120, 100%, 40%);">+               tMSI_Status := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             iMEI_SV := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         tAI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             eCGI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+            tMSI_NRI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+                cS_DomainOperator := *</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.12 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_MM_INFO_REQ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           template (value) octetstring mm_info) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_MM_INFORMATION_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mM_Information := ts_SGsAP_IE_MmInfo(mm_info)</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_MM_INFO_REQ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template octetstring mm_info :=?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_MM_INFORMATION_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          mM_Information := tr_SGsAP_IE_MmInfo(mm_info)</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.13 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_PAGING_REJ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            template (value) SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_PAGING_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00000010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := ts_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_PAGING_REJ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 template SGs_Cause cause := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   sGsAP_PAGING_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00000010'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := tr_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.14 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_PAGING_REQ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            template (value) charstring vlr_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                         template (value) Service_Indicator serv_ind,</span><br><span style="color: hsl(120, 100%, 40%);">+                                          template (omit) OCT4 tmsi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_PAGING_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00000001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          vLR_Name := ts_SGsAP_IE_VlrName(vlr_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            serviceIndicator := ts_SGsAP_ServiceInd(serv_ind),</span><br><span style="color: hsl(120, 100%, 40%);">+            tMSI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+         cLI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          locationAreaId := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+               globalCN_Id := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          sS_Code := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              lCS_Indicator := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+                lCS_ClientIdentity := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+           channelNeeded := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+                eMLPP_Priority := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+               additionalPagingIndicator := omit</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_PAGING_REQ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 template charstring vlr_name,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 template Service_Indicator serv_ind,</span><br><span style="color: hsl(120, 100%, 40%);">+                                  template OCT4 tmsi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_PAGING_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00000001'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          vLR_Name := tr_SGsAP_IE_VlrName(vlr_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            serviceIndicator := tr_SGsAP_ServiceInd(serv_ind),</span><br><span style="color: hsl(120, 100%, 40%);">+            tMSI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+            cLI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             locationAreaId := *,</span><br><span style="color: hsl(120, 100%, 40%);">+          globalCN_Id := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             sS_Code := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         lCS_Indicator := *,</span><br><span style="color: hsl(120, 100%, 40%);">+           lCS_ClientIdentity := *,</span><br><span style="color: hsl(120, 100%, 40%);">+              channelNeeded := *,</span><br><span style="color: hsl(120, 100%, 40%);">+           eMLPP_Priority := *,</span><br><span style="color: hsl(120, 100%, 40%);">+          additionalPagingIndicator := *</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.15 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_RESET_ACK_MME(template (value) charstring mme_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_RESET_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00010110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := ts_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            vLR_Name := omit</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_RESET_ACK_VLR(template (value) charstring vlr_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_RESET_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00010110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+             vLR_Name := ts_SGsAP_IE_VlrName(vlr_name)</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_RESET_ACK(template charstring mme_name, template charstring vlr_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_RESET_ACK := {</span><br><span style="color: hsl(120, 100%, 40%);">+          messageType := '00010110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := tr_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            vLR_Name := tr_SGsAP_IE_VlrName(vlr_name)</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.16 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_RESET_IND_MME(template (value) charstring mme_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_RESET_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+           messageType := '00010101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := ts_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            vLR_Name := omit</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_RESET_IND_VLR(template (value) charstring vlr_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_RESET_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+           messageType := '00010101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+             vLR_Name := ts_SGsAP_IE_VlrName(vlr_name)</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_RESET_IND(template charstring mme_name, template charstring vlr_name) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_RESET_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+           messageType := '00010101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           mME_Name := tr_SGsAP_IE_MmeName(mme_name),</span><br><span style="color: hsl(120, 100%, 40%);">+            vLR_Name := tr_SGsAP_IE_VlrName(vlr_name)</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.17 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_SERVICE_REQ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           template (value) Service_Indicator serv_ind,</span><br><span style="color: hsl(120, 100%, 40%);">+                                          template (value) UE_EMM_mode emm_mode) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   sGsAP_SERVICE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00000110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          serviceIndicator := ts_SGsAP_ServiceInd(serv_ind),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMEI_SV := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              uE_TimeZone := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          mobileStationClassmark2 := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              tAI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          eCGI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+         /* optional, but "the MME shall include this IE." */</span><br><span style="color: hsl(120, 100%, 40%);">+                uE_EMM_Mode := ts_SGsAP_IE_UeEmmMode(emm_mode)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_SERVICE_REQ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template Service_Indicator serv_ind := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+                                     template UE_EMM_mode emm_mode := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_SERVICE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00000110'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          serviceIndicator := tr_SGsAP_ServiceInd(serv_ind),</span><br><span style="color: hsl(120, 100%, 40%);">+            iMEI_SV := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         uE_TimeZone := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             mobileStationClassmark2 := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         tAI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             eCGI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+            /* optional, but "the MME shall include this IE." */</span><br><span style="color: hsl(120, 100%, 40%);">+                uE_EMM_Mode := tr_SGsAP_IE_UeEmmMode(emm_mode)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.18 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_STATUS(template (omit) hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                         template (value) SGs_Cause cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                                     template (value) octetstring err_msg) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ sGsAP_STATUS := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI_omit(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+             sGsCause := ts_SGsAP_IE_SgsCause(cause),</span><br><span style="color: hsl(120, 100%, 40%);">+              erroneousMessage := ts_SGsAP_IE_ErrMsg(err_msg)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_STATUS(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template SGs_Cause cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                             template octetstring err_msg) := {</span><br><span style="color: hsl(120, 100%, 40%);">+ sGsAP_STATUS := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011101'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := tr_SGsAP_IE_SgsCause(cause),</span><br><span style="color: hsl(120, 100%, 40%);">+              erroneousMessage := tr_SGsAP_IE_ErrMsg(err_msg)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.19 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_TMSI_REALL_CMPL(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_TMSI_REALLOCATION_COMPLETE := {</span><br><span style="color: hsl(120, 100%, 40%);">+         messageType := '00001100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_TMSI_REALL_CMPL(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_TMSI_REALLOCATION_COMPLETE := {</span><br><span style="color: hsl(120, 100%, 40%);">+         messageType := '00001100'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.20 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_UE_ACT_IND(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       sGsAP_UE_ACTIVITY_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00010000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Rel 14: Max UE Avail Time */</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_UE_ACT_IND(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+    sGsAP_UE_ACTIVITY_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00010000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Rel 14: Max UE Avail Time */</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.21 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_UE_UNREACHABLE(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                   template (value) SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_UE_UNREACHABLE := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := ts_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Rel 14: Requested Retransmission Time */</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Rel 14: Additional UE Unreachable indicators */</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_UE_UNREACHABLE(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template SGs_Cause cause := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_UE_UNREACHABLE := {</span><br><span style="color: hsl(120, 100%, 40%);">+             messageType := '00011111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := tr_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Rel 14: Requested Retransmission Time */</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Rel 14: Additional UE Unreachable indicators */</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.22 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_UL_UD(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                   template (value) octetstring nas_msg) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  sGsAP_UPLINK_UNITDATA := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00001000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          nAS_MessageContainer := ts_SGsAP_NasContainer(nas_msg),</span><br><span style="color: hsl(120, 100%, 40%);">+               iMEI_SV := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              uE_TimeZone := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          mobileStationClassmark2 := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+              tAI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          eCGI := omit</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_UL_UD(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template octetstring nas_msg := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_UPLINK_UNITDATA := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00001000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          nAS_MessageContainer := tr_SGsAP_NasContainer(nas_msg),</span><br><span style="color: hsl(120, 100%, 40%);">+               iMEI_SV := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         uE_TimeZone := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             mobileStationClassmark2 := *,</span><br><span style="color: hsl(120, 100%, 40%);">+         tAI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             eCGI := *</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.23 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_RELEASE_REQ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           template (value) SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_RELEASE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00011011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := ts_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_RELEASE_REQ(template hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        template SGs_Cause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_RELEASE_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+            messageType := '00011011'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          sGsCause := tr_SGsAP_IE_SgsCause(cause)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.24 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_SERVICE_ABORT_REQ(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        sGsAP_SERVICE_ABORT_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00010111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_SERVICE_ABORT_REQ(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sGsAP_SERVICE_ABORT_REQUEST := {</span><br><span style="color: hsl(120, 100%, 40%);">+              messageType := '00010111'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* 8.25 */</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_SGsAP ts_SGsAP_MO_CSFB_IND(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+      sGsAP_MO_CSFB_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+         messageType := '00011000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := ts_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          tAI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+          eCGI := omit</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_SGsAP tr_SGsAP_MO_CSFB_IND(template hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   sGsAP_MO_CSFB_INDICATION := {</span><br><span style="color: hsl(120, 100%, 40%);">+         messageType := '00011000'B,</span><br><span style="color: hsl(120, 100%, 40%);">+           iMSI := tr_SGsAP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+          tAI := *,</span><br><span style="color: hsl(120, 100%, 40%);">+             eCGI := *</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span>diff --git a/msc/gen_links.sh b/msc/gen_links.sh</span><br><span>index a191aa5..df646d9 100755</span><br><span>--- a/msc/gen_links.sh</span><br><span>+++ b/msc/gen_links.sh</span><br><span>@@ -81,6 +81,9 @@</span><br><span> FILES="SMPP_EncDec.cc  SMPP_Types.ttcn"</span><br><span> gen_links $DIR $FILES</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+DIR=$BASEDIR/titan.ProtocolModules.SGsAP_13.2.0/src</span><br><span style="color: hsl(120, 100%, 40%);">+FILES="SGsAP_Types.ttcn"</span><br><span style="color: hsl(120, 100%, 40%);">+gen_links $DIR $FILES</span><br><span> </span><br><span> DIR=../library</span><br><span> FILES="General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn MNCC_Types.ttcn MNCC_EncDec.cc MNCC_CodecPort.ttcn mncc.h MNCC_Emulation.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "</span><br><span>@@ -90,7 +93,8 @@</span><br><span> FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "</span><br><span> FILES+="MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc "</span><br><span> FILES+="SMPP_CodecPort.ttcn SMPP_CodecPort_CtrlFunct.ttcn SMPP_CodecPort_CtrlFunctDef.cc SMPP_Emulation.ttcn SMPP_Templates.ttcn "</span><br><span style="color: hsl(0, 100%, 40%);">-FILES+="SS_Templates.ttcn SCCP_Templates.ttcn USSD_Helpers.ttcn"</span><br><span style="color: hsl(120, 100%, 40%);">+FILES+="SS_Templates.ttcn SCCP_Templates.ttcn USSD_Helpers.ttcn "</span><br><span style="color: hsl(120, 100%, 40%);">+FILES+="SGsAP_Templates.ttcn "</span><br><span> gen_links $DIR $FILES</span><br><span> </span><br><span> ignore_pp_results</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11305">change 11305</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11305"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I435dab312fc4965c69ffb9cc22917539ebab93e7 </div>
<div style="display:none"> Gerrit-Change-Number: 11305 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>