<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Osmocom_Gb_Types: Add templates for various BSSGP PDU types<br><br>Change-Id: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d<br>---<br>M library/Osmocom_Gb_Types.ttcn<br>1 file changed, 204 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/22242/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn</span><br><span>index 9054785..b82ca32 100644</span><br><span>--- a/library/Osmocom_Gb_Types.ttcn</span><br><span>+++ b/library/Osmocom_Gb_Types.ttcn</span><br><span>@@ -946,6 +946,24 @@</span><br><span>              lengthIndicator := { length1 := 4 },</span><br><span>                 tMSI_Value := int2oct(tmsi, 4)</span><br><span>       }</span><br><span style="color: hsl(120, 100%, 40%);">+     private function f_ts_BSSGP_TMSI(template (omit) GsmTmsi tmsi) return template (omit) TMSI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+            if (istemplatekind(tmsi, "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_BSSGP_TMSI(valueof(tmsi));</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 f_tr_BSSGP_TMSI(template GsmTmsi tmsi) return template TMSI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+          if (istemplatekind(tmsi, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else if (istemplatekind(tmsi, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                     return *;</span><br><span style="color: hsl(120, 100%, 40%);">+             } else if (istemplatekind(tmsi, "?")) {</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_BSSGP_TMSI(valueof(tmsi));</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span> </span><br><span>        function f_bssgp_length_ind(integer len) return LIN2_2a {</span><br><span>            var LIN2_2a ret;</span><br><span>@@ -1828,6 +1846,28 @@</span><br><span>            rac := int2oct(input.rac, 1)</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ private function f_ts_BSSGP_RA_ID(template (omit) GSM_Types.RoutingAreaIdentification input)</span><br><span style="color: hsl(120, 100%, 40%);">+  return template (omit) Routeing_Area {</span><br><span style="color: hsl(120, 100%, 40%);">+                if (istemplatekind(input, "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_BSSGP_RA_ID(valueof(input));</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%);">+   private function f_tr_BSSGP_RA_ID(template GSM_Types.RoutingAreaIdentification input)</span><br><span style="color: hsl(120, 100%, 40%);">+ return template Routeing_Area {</span><br><span style="color: hsl(120, 100%, 40%);">+               if (istemplatekind(input, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else if (istemplatekind(input, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                    return *;</span><br><span style="color: hsl(120, 100%, 40%);">+             } else if (istemplatekind(input, "?")) {</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 ts_BSSGP_RA_ID(valueof(input));</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>  /* 10.3.6 */</span><br><span>         template (value) PDU_BSSGP ts_BSSGP_SUSPEND(GprsTlli tlli, RoutingAreaIdentification ra_id) := {</span><br><span>             pDU_BSSGP_SUSPEND := {</span><br><span>@@ -1944,6 +1984,170 @@</span><br><span>             }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* 10.3.12 */</span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                       template (omit) RoutingAreaIdentification ra) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                pDU_BSSGP_DUMMY_PAGING_PS := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '12'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := ts_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := f_ts_BSSGP_RA_ID(ra),</span><br><span style="color: hsl(120, 100%, 40%);">+                        eDRX_Paremeters := 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 (present) PDU_BSSGP tr_BSSGP_DUMMY_PAGING_PS(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                       template RoutingAreaIdentification ra) := {</span><br><span style="color: hsl(120, 100%, 40%);">+             pDU_BSSGP_DUMMY_PAGING_PS := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '12'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := tr_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  routeing_Area := f_tr_BSSGP_RA_ID(ra),</span><br><span style="color: hsl(120, 100%, 40%);">+                        eDRX_Paremeters := 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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   template (value) Time_Until_Next_Paging_Occasion ts_TimeNextPag(uint8_t mins, uint8_t secs) := {</span><br><span style="color: hsl(120, 100%, 40%);">+              iEI := '93'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 2</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            minutes := mins,</span><br><span style="color: hsl(120, 100%, 40%);">+              spare := '00'B,</span><br><span style="color: hsl(120, 100%, 40%);">+               seconds := secs,</span><br><span style="color: hsl(120, 100%, 40%);">+              spare2 := '00'B</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+     template (present) Time_Until_Next_Paging_Occasion tr_TimeNextPag(template (present) uint8_t mins,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                                      template (present) uint8_t secs) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               iEI := '93'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 2</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            minutes := mins,</span><br><span style="color: hsl(120, 100%, 40%);">+              spare := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+           seconds := secs,</span><br><span style="color: hsl(120, 100%, 40%);">+              spare2 := ?</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%);">+   /* 10.3.13 */</span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) PDU_BSSGP ts_BSSGP_DUMMY_PAGING_PS_RESP(hexstring imsi, uint8_t mins, uint8_t secs) := {</span><br><span style="color: hsl(120, 100%, 40%);">+             pDU_BSSGP_DUMMY_PAGING_PS_RESPONSE := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '13'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := ts_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  time_Until_Next_Paging_Occasion := ts_TimeNextPag(mins, secs)</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 (present) PDU_BSSGP tr_BSSGP_DUMMY_PAGING_PS_RESP(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                               template (present) uint8_t mins,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                              template (present) uint8_t secs) := {</span><br><span style="color: hsl(120, 100%, 40%);">+              pDU_BSSGP_DUMMY_PAGING_PS_RESPONSE := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '13'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := tr_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  time_Until_Next_Paging_Occasion := tr_TimeNextPag(mins, secs)</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%);">+   /* 10.3.14 */</span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) PDU_BSSGP ts_BSSGP_PAGING_PS_REJ(hexstring imsi, uint8_t mins, uint8_t secs,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                   template (omit) GsmTmsi tmsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+          pDU_BSSGP_PAGING_PS_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '11'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := ts_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  pTMSI := f_ts_BSSGP_TMSI(tmsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                       time_Until_Next_Paging_Occasion := ts_TimeNextPag(mins, secs)</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 (present) PDU_BSSGP tr_BSSGP_PAGING_PS_REJ(hexstring imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                       template (present) uint8_t mins,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                      template (present) uint8_t secs,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                      template GsmTmsi tmsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+               pDU_BSSGP_PAGING_PS_REJECT := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '11'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := tr_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  pTMSI := f_tr_BSSGP_TMSI(tmsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                       time_Until_Next_Paging_Occasion := tr_TimeNextPag(mins, secs)</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%);">+   /* 10.3.15 */</span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) PDU_BSSGP ts_BSSGP_MS_REG_ENQ(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+           pDU_BSSGP_MS_REGISTRATION_ENQUIRY := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '14'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := ts_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  mME_Query := 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 (present) PDU_BSSGP tr_BSSGP_MS_REG_ENQ(hexstring imsi) := {</span><br><span style="color: hsl(120, 100%, 40%);">+         pDU_BSSGP_MS_REGISTRATION_ENQUIRY := {</span><br><span style="color: hsl(120, 100%, 40%);">+                        bssgpPduType := '14'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := tr_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  mME_Query := *</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%);">+   /* 11.3.126 */</span><br><span style="color: hsl(120, 100%, 40%);">+        template (value) PLMN_Identity ts_BSSGP_PlmnId(template (value) BcdMccMnc mccmnc) := {</span><br><span style="color: hsl(120, 100%, 40%);">+                iEI := '96'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 3</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            mccDigit1 := mccmnc[0],</span><br><span style="color: hsl(120, 100%, 40%);">+               mccDigit2 := mccmnc[1],</span><br><span style="color: hsl(120, 100%, 40%);">+               mccDigit3 := mccmnc[2],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit3 := mccmnc[5],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit1 := mccmnc[3],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit2 := mccmnc[4]</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+     template (present) PLMN_Identity tr_BSSGP_PlmnId(template (present) BcdMccMnc mccmnc) := {</span><br><span style="color: hsl(120, 100%, 40%);">+            iEI := '96'O,</span><br><span style="color: hsl(120, 100%, 40%);">+         ext := '1'B,</span><br><span style="color: hsl(120, 100%, 40%);">+          lengthIndicator := {</span><br><span style="color: hsl(120, 100%, 40%);">+                  length1 := 3</span><br><span style="color: hsl(120, 100%, 40%);">+          },</span><br><span style="color: hsl(120, 100%, 40%);">+            mccDigit1 := mccmnc[0],</span><br><span style="color: hsl(120, 100%, 40%);">+               mccDigit2 := mccmnc[1],</span><br><span style="color: hsl(120, 100%, 40%);">+               mccDigit3 := mccmnc[2],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit3 := mccmnc[5],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit1 := mccmnc[3],</span><br><span style="color: hsl(120, 100%, 40%);">+               mncDigit2 := mccmnc[4]</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+     private function f_ts_BSSGP_PlmnId(template (omit) BcdMccMnc mccmnc)</span><br><span style="color: hsl(120, 100%, 40%);">+  return template (omit) PLMN_Identity {</span><br><span style="color: hsl(120, 100%, 40%);">+                if (istemplatekind(mccmnc, "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_BSSGP_PlmnId(mccmnc);</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 f_tr_BSSGP_PlmnId(template BcdMccMnc mccmnc)</span><br><span style="color: hsl(120, 100%, 40%);">+ return template PLMN_Identity {</span><br><span style="color: hsl(120, 100%, 40%);">+               if (istemplatekind(mccmnc, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else if (istemplatekind(mccmnc, "*")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   return *;</span><br><span style="color: hsl(120, 100%, 40%);">+             } else if (istemplatekind(mccmnc, "?")) {</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 ts_BSSGP_PlmnId(mccmnc);</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%);">+   /* 10.3.16 */</span><br><span style="color: hsl(120, 100%, 40%);">+ template (value) PDU_BSSGP ts_BSSGP_MS_REW_ENQ_RESP(hexstring imsi, template (omit) BcdMccMnc mccmnc) := {</span><br><span style="color: hsl(120, 100%, 40%);">+            pDU_BSSGP_MS_REGISTRATION_ENQUIRY_RESPONSE := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '15'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := ts_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  pS_Registered_Operator := f_ts_BSSGP_PlmnId(mccmnc)</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 (present) PDU_BSSGP tr_BSSGP_MS_REW_ENQ_RESP(hexstring imsi, template BcdMccMnc mccmnc) := {</span><br><span style="color: hsl(120, 100%, 40%);">+         pDU_BSSGP_MS_REGISTRATION_ENQUIRY_RESPONSE := {</span><br><span style="color: hsl(120, 100%, 40%);">+                       bssgpPduType := '15'O,</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := tr_BSSGP_IMSI(imsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                  pS_Registered_Operator := f_tr_BSSGP_PlmnId(mccmnc)</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>  /* 10.4.1 */</span><br><span>         template (value) PDU_BSSGP ts_BSSGP_FLUSH_LL(GprsTlli tlli, template (value) BssgpBvci bvci_old,</span><br><span>                                                  template (omit) BssgpBvci bvci_new := omit,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22242">change 22242</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/c/osmo-ttcn3-hacks/+/22242"/><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-Change-Id: I89044bf8e736cc1997dff1a550b3e194f8ac1b9d </div>
<div style="display:none"> Gerrit-Change-Number: 22242 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>