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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">LLC_Templates: Add XID related templates<br><br>Change-Id: I383e8761f91fac18625a442088e865ad6a9b472b<br>---<br>M library/LLC_Templates.ttcn<br>1 file changed, 96 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/LLC_Templates.ttcn b/library/LLC_Templates.ttcn</span><br><span>index b1cdb75..b71bce1 100644</span><br><span>--- a/library/LLC_Templates.ttcn</span><br><span>+++ b/library/LLC_Templates.ttcn</span><br><span>@@ -84,6 +84,37 @@</span><br><span>             fCS := '000000'O /* provided by decoder if FCS OK */</span><br><span>         }</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_XID_MO_CMD(template XID_Information xid, template BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+       tr_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_XID_MO_RSP(template XID_Information xid, template BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  tr_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_XID_MT_CMD(template XID_Information xid, template BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  tr_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_XID_MT_RSP(template XID_Information xid, template BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  tr_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_XID(template (value) XID_Information xid,</span><br><span style="color: hsl(120, 100%, 40%);">+                                    template (value) BIT4 sapi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                   template (value) BIT1 cr,</span><br><span style="color: hsl(120, 100%, 40%);">+                             template (value) BIT1 p_f) := {</span><br><span style="color: hsl(120, 100%, 40%);">+   pDU_LLC_U := {</span><br><span style="color: hsl(120, 100%, 40%);">+                address_field := ts_LLC_Addr(sapi, cr),</span><br><span style="color: hsl(120, 100%, 40%);">+               control_field := ts_LLC_CtrlU('1011'B, p_f),</span><br><span style="color: hsl(120, 100%, 40%);">+          information_field_U := {</span><br><span style="color: hsl(120, 100%, 40%);">+                      xID := xid</span><br><span style="color: hsl(120, 100%, 40%);">+            },</span><br><span style="color: hsl(120, 100%, 40%);">+            fCS := omit /* causes encoder to generate FCS */</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) PDU_LLC ts_LLC_XID_MO_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+       ts_LLC_XID(xid, sapi, LLC_CR_UL_CMD, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_XID_MO_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  ts_LLC_XID(xid, sapi, LLC_CR_UL_RSP, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_XID_MT_CMD(template (value) XID_Information xid, template (value) BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  ts_LLC_XID(xid, sapi, LLC_CR_DL_CMD, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_XID_MT_RSP(template (value) XID_Information xid, template (value) BIT4 sapi) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  ts_LLC_XID(xid, sapi, LLC_CR_DL_RSP, '1'B);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> </span><br><span> template PDU_LLC tr_LLC_U(template BIT4 m_bits, template BIT1 p_f, template Information_field_U u,</span><br><span>                        template BIT4 sapi, template BIT1 cr) := {</span><br><span>@@ -173,4 +204,69 @@</span><br><span>                                          );</span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID(template XID_Data xd := ?) := {</span><br><span style="color: hsl(120, 100%, 40%);">+       xl := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+      typefield := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+       xID_length := ?,</span><br><span style="color: hsl(120, 100%, 40%);">+      xID_Data := xd</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID(template (value) BIT5 tf, template (value) XID_Data xd) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  xl := '0'B,</span><br><span style="color: hsl(120, 100%, 40%);">+   typefield := tf,</span><br><span style="color: hsl(120, 100%, 40%);">+      xID_length := {</span><br><span style="color: hsl(120, 100%, 40%);">+               short_len := 0</span><br><span style="color: hsl(120, 100%, 40%);">+        },</span><br><span style="color: hsl(120, 100%, 40%);">+    xID_Data := xd</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 XID tr_XID_kU(template uint8_t ku) := tr_XID({kU := ku});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_kU(template (value) uint8_t ku) := ts_XID('01010'B, {kU := ku});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_kD(template uint8_t kd) := tr_XID({kD := kd});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_kD(template (value) uint8_t kd) := ts_XID('01001'B, {kD := kd});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_mD(template uint15_t md) := tr_XID({mD := {spare := '0'B, mDValue := md}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_mD(template (value) uint15_t md) := ts_XID('00111'B, {mD := { spare := '0'B, mDValue := md}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_mU(template uint15_t mu) := tr_XID({mU := {spare := '0'B, mUValue := mu}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_mU(template (value) uint15_t mu) := ts_XID('01000'B, {mU := { spare := '0'B, mUValue := mu}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_N201I(template uint11_t n201i) :=</span><br><span style="color: hsl(120, 100%, 40%);">+     tr_XID({n201_I := {spare := '00000'B, n201IValue := n201i}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_N201I(template (value) uint11_t n201i) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  ts_XID('00110'B, {n201_I := { spare := '00000'B, n201IValue := n201i}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_N201U(template uint11_t n201u) :=</span><br><span style="color: hsl(120, 100%, 40%);">+     tr_XID({n201_U := {spare := '00000'B, n201UValue := n201u}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_N201U(template (value) uint11_t n201u) :=</span><br><span style="color: hsl(120, 100%, 40%);">+  ts_XID('00101'B, {n201_U := { spare := '00000'B, n201UValue := n201u}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_N200(template uint4_t n200) :=</span><br><span style="color: hsl(120, 100%, 40%);">+        tr_XID({n200 := { retransmissions := n200, spare := '0000'B}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_N200(template (value) uint4_t n200) :=</span><br><span style="color: hsl(120, 100%, 40%);">+   ts_XID('00100'B, {n200 := { retransmissions := n200, spare := '0000'B}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_T200(template uint12_t t200) :=</span><br><span style="color: hsl(120, 100%, 40%);">+      tr_XID({t200 := { spare := '0000'B, t200Value := t200}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_T200(template (value) uint12_t t200) :=</span><br><span style="color: hsl(120, 100%, 40%);">+        ts_XID('00011'B, {t200 := { spare := '0000'B, t200Value := t200}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_version(template uint4_t v) :=</span><br><span style="color: hsl(120, 100%, 40%);">+     tr_XID({version := {version_value := v, spare := '0000'B}});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_version(template (value) uint4_t v) :=</span><br><span style="color: hsl(120, 100%, 40%);">+      ts_XID('00000'B, {version := {version_value := v, spare := '0000'B}});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_IOV_UI(template OCT4 iov) := tr_XID({iOV_UI := iov});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_IOV_UI(template (value) OCT4 iov) := ts_XID('00001'B, {iOV_UI := iov});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_IOV_I(template OCT4 iov) := tr_XID({iOV_I := iov});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_IOV_I(template (value) OCT4 iov) := ts_XID('00010'B, {iOV_I := iov});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_L3(template octetstring l3) := tr_XID({l3param := l3});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_L3(template (value) octetstring l3) := ts_XID('01011'B, {l3param := l3});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template XID tr_XID_RESET := tr_XID({reset := ''O});</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) XID ts_XID_RESET := ts_XID('01100'B, {reset := ''O});</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13841">change 13841</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/13841"/><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: I383e8761f91fac18625a442088e865ad6a9b472b </div>
<div style="display:none"> Gerrit-Change-Number: 13841 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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>