<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22249">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  lynxis lazus: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Osmocom_Gb_Types: Extend RADIO-STATUS templates<br><br>RADIO-STATUS can occur with TLLI, but also with P-TMSI or IMSI.<br>Update our templates accordingly while keeping backwards compatibility.<br><br>Related: OS#4951<br>Change-Id: I1119e50e457b02d52e7c2c26a8b8039bf2118296<br>---<br>M library/Osmocom_Gb_Types.ttcn<br>1 file changed, 43 insertions(+), 8 deletions(-)<br><br></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 b82ca32..589108f 100644</span><br><span>--- a/library/Osmocom_Gb_Types.ttcn</span><br><span>+++ b/library/Osmocom_Gb_Types.ttcn</span><br><span>@@ -897,6 +897,22 @@</span><br><span>               },</span><br><span>           tLLI_Value := tlli</span><br><span>   }</span><br><span style="color: hsl(120, 100%, 40%);">+     private function f_ts_BSSGP_TLLI(template (omit) GprsTlli tlli) return template (omit) TLLI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+           if (istemplatekind(tlli, "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_TLLI(valueof(tlli));</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_TLLI(template GprsTlli tlli) return template TLLI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+         if (istemplatekind(tlli, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else if (istemplatekind(tlli, "*")) {</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_TLLI(valueof(tlli));</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span> </span><br><span>        template (value) Suspend_Reference_Number ts_BSSGP_SUSP_REF(template (value) OCT1 susp_ref) := {</span><br><span>             iEI := '1D'O,</span><br><span>@@ -932,6 +948,22 @@</span><br><span>                 oddevenIndicator := f_hex_is_odd_length(imsi),</span><br><span>               digits := imsi</span><br><span>       }</span><br><span style="color: hsl(120, 100%, 40%);">+     private function f_ts_BSSGP_IMSI(template (omit) hexstring imsi) return template (omit) IMSI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+          if (istemplatekind(imsi, "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_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%);">+     private function f_tr_BSSGP_IMSI(template hexstring imsi) return template IMSI_BSSGP {</span><br><span style="color: hsl(120, 100%, 40%);">+                if (istemplatekind(imsi, "omit")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 return omit;</span><br><span style="color: hsl(120, 100%, 40%);">+          } else if (istemplatekind(imsi, "*")) {</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_IMSI(imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span> </span><br><span>        template (present) TMSI_BSSGP tr_BSSGP_TMSI(GsmTmsi tmsi) := {</span><br><span>               iEI := '20'O,</span><br><span>@@ -2324,22 +2356,25 @@</span><br><span> </span><br><span>  /* 10.3.5 */</span><br><span>         template (value) PDU_BSSGP</span><br><span style="color: hsl(0, 100%, 40%);">-      ts_BSSGP_RADIO_STATUS(GprsTlli tlli, template (value) BssgpRadioCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     ts_BSSGP_RADIO_STATUS(template (omit) GprsTlli tlli, template (value) BssgpRadioCause cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                        template (omit) GsmTmsi tmsi := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+                         template (omit) hexstring imsi := omit) := {</span><br><span>           pDU_BSSGP_RADIO_STATUS := {</span><br><span>                  bssgpPduType := '0a'O,</span><br><span style="color: hsl(0, 100%, 40%);">-                  tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(0, 100%, 40%);">-                    tMSI := omit,</span><br><span style="color: hsl(0, 100%, 40%);">-                   iMSI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+                 tLLI := f_ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                        tMSI := f_ts_BSSGP_TMSI(tmsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := f_ts_BSSGP_IMSI(imsi),</span><br><span>                       radio_Cause := ts_BSSGP_RADIO_CAUSE(cause)</span><br><span>           }</span><br><span>    }</span><br><span>    template (present) PDU_BSSGP</span><br><span style="color: hsl(0, 100%, 40%);">-    tr_BSSGP_RADIO_STATUS(template (present) GprsTlli tlli, template (present) BssgpRadioCause cause) := {</span><br><span style="color: hsl(120, 100%, 40%);">+        tr_BSSGP_RADIO_STATUS(template GprsTlli tlli, template (present) BssgpRadioCause cause,</span><br><span style="color: hsl(120, 100%, 40%);">+                             template GsmTmsi tmsi := *, template hexstring imsi := *) := {</span><br><span>                 pDU_BSSGP_RADIO_STATUS := {</span><br><span>                  bssgpPduType := '0a'O,</span><br><span style="color: hsl(0, 100%, 40%);">-                  tLLI := ts_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(0, 100%, 40%);">-                    tMSI := omit,</span><br><span style="color: hsl(0, 100%, 40%);">-                   iMSI := omit,</span><br><span style="color: hsl(120, 100%, 40%);">+                 tLLI := f_tr_BSSGP_TLLI(tlli),</span><br><span style="color: hsl(120, 100%, 40%);">+                        tMSI := f_tr_BSSGP_TMSI(tmsi),</span><br><span style="color: hsl(120, 100%, 40%);">+                        iMSI := f_tr_BSSGP_IMSI(imsi),</span><br><span>                       radio_Cause := tr_BSSGP_RADIO_CAUSE(cause)</span><br><span>           }</span><br><span>    }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22249">change 22249</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/+/22249"/><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: I1119e50e457b02d52e7c2c26a8b8039bf2118296 </div>
<div style="display:none"> Gerrit-Change-Number: 22249 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>