<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13757">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;">LLC_Templates: Add SABM, UA, FRMR, DM templates<br><br>Related: OS#3953<br>Change-Id: Idb40dcd53310b76ea9df6c0090e31175a4382460<br>---<br>M library/LLC_Templates.ttcn<br>1 file changed, 59 insertions(+), 2 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 086207c..024ae0b 100644</span><br><span>--- a/library/LLC_Templates.ttcn</span><br><span>+++ b/library/LLC_Templates.ttcn</span><br><span>@@ -10,6 +10,14 @@</span><br><span>    cR := cr,</span><br><span>    pD := '0'B</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) Address_field ts_LLC_Addr(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 pd := '0'B) := {</span><br><span style="color: hsl(120, 100%, 40%);">+     sAPI := sapi,</span><br><span style="color: hsl(120, 100%, 40%);">+ spare := '00'B,</span><br><span style="color: hsl(120, 100%, 40%);">+       cR := cr,</span><br><span style="color: hsl(120, 100%, 40%);">+     pD := '0'B</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> template (value) Control_field_UI ts_LLC_CtrlUI(uint9_t n_u, boolean encrypted := false,</span><br><span>                                        boolean protected := false) := {</span><br><span>@@ -20,7 +28,7 @@</span><br><span>         pM := bool2bit(protected)</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-template (value) Control_field_U ts_LLC_CtrlU(BIT4 m_bits, BIT1 p_f) := {</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) Control_field_U ts_LLC_CtrlU(template (value) BIT4 m_bits, template (value) BIT1 p_f) := {</span><br><span>     mBits := m_bits,</span><br><span>     pF := p_f,</span><br><span>   format := '111'B</span><br><span>@@ -47,7 +55,7 @@</span><br><span> template PDU_LLC ts_LLC_UI(octetstring payload, BIT4 sapi, BIT1 cr, uint9_t n_u,</span><br><span>                        boolean encrypted := false, boolean protected := false) := {</span><br><span>      pDU_LLC_UI := {</span><br><span style="color: hsl(0, 100%, 40%);">-         address_field := t_LLC_Addr(sapi, cr),</span><br><span style="color: hsl(120, 100%, 40%);">+                address_field := ts_LLC_Addr(sapi, cr),</span><br><span>              control_field := ts_LLC_CtrlUI(n_u, encrypted, protected),</span><br><span>           information_field_UI := payload,</span><br><span>             fCS := omit /* causes encoder to generate FCS */</span><br><span>@@ -77,6 +85,55 @@</span><br><span>        }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_U(template BIT4 m_bits, template BIT1 p_f, template Information_field_U u,</span><br><span style="color: hsl(120, 100%, 40%);">+                          template BIT4 sapi, template BIT1 cr) := {</span><br><span style="color: hsl(120, 100%, 40%);">+  pDU_LLC_U := {</span><br><span style="color: hsl(120, 100%, 40%);">+                address_field := t_LLC_Addr(sapi, cr),</span><br><span style="color: hsl(120, 100%, 40%);">+                control_field := tr_LLC_CtrlU(m_bits, p_f),</span><br><span style="color: hsl(120, 100%, 40%);">+           information_field_U := u,</span><br><span style="color: hsl(120, 100%, 40%);">+             fCS := '000000'O /* provided by decoder if FCS OK */</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_U(template (value) BIT4 m_bits, template (value) BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template (value) Information_field_U u,</span><br><span style="color: hsl(120, 100%, 40%);">+                               template (value) BIT4 sapi, template (value) BIT1 cr) := {</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(m_bits, p_f),</span><br><span style="color: hsl(120, 100%, 40%);">+           information_field_U := u,</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 PDU_LLC tr_LLC_SABM(template SABM_Information sabm_xid, template BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                        template BIT4 sapi, template BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ tr_LLC_U('0111'B, p_f, Information_field_U:{sABM := sabm_xid}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_SABM(template (value) SABM_Information sabm_xid,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template (value) BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                                    template (value) BIT4 sapi, template (value) BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ ts_LLC_U('0111'B, p_f, Information_field_U:{sABM := sabm_xid}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_UA(template UA_Information ua_xid, template BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                       template BIT4 sapi, template BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+   tr_LLC_U('0110'B, p_f, Information_field_U:{uA := ua_xid}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_UA(template (value) UA_Information ua_xid,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template (value) BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                            template (value) BIT4 sapi, template (value) BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+   ts_LLC_U('0110'B, p_f, Information_field_U:{uA := ua_xid}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_FRMR(template FRMR_Information frmr, template BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                           template BIT4 sapi, template BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ tr_LLC_U('1000'B, p_f, Information_field_U:{fRMR := frmr}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_FRMR(template (value) FRMR_Information frmr,</span><br><span style="color: hsl(120, 100%, 40%);">+                                template (value) BIT1 p_f,</span><br><span style="color: hsl(120, 100%, 40%);">+                                    template (value) BIT4 sapi, template (value) BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+ ts_LLC_U('1000'B, p_f, Information_field_U:{fRMR := frmr}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template PDU_LLC tr_LLC_DM(template BIT1 p_f, template BIT4 sapi, template BIT1 cr) :=</span><br><span style="color: hsl(120, 100%, 40%);">+       tr_LLC_U('0001'B, p_f, Information_field_U:{dM := ''O}, sapi, cr);</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) PDU_LLC ts_LLC_DM(template (value) BIT1 p_f, 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%);">+       ts_LLC_U('0001'B, p_f, Information_field_U:{dM := ''O}, sapi, cr);</span><br><span> </span><br><span> const BIT4 c_LLC_SAPI_LLGMM := '0001'B;</span><br><span> const BIT4 c_LLC_SAPI_TOM2 := '0010'B;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13757">change 13757</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/13757"/><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: Idb40dcd53310b76ea9df6c0090e31175a4382460 </div>
<div style="display:none"> Gerrit-Change-Number: 13757 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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>