<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25661">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">RSLEM: add f_chan_act_verify_tsc()<br><br>Will need this code again to verify the TSC during handover, so cast<br>this in a separate function.<br><br>Related: SYS#4895<br>Change-Id: I7a3f68ed1deba6a4a0a1cc4df7613638225c1640<br>---<br>M library/RSL_Emulation.ttcn<br>1 file changed, 13 insertions(+), 10 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/61/25661/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn</span><br><span>index 30adfba..effe83b 100644</span><br><span>--- a/library/RSL_Emulation.ttcn</span><br><span>+++ b/library/RSL_Emulation.ttcn</span><br><span>@@ -136,6 +136,18 @@</span><br><span>       return rx_rsl;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+function f_chan_act_verify_tsc(RSL_Message chan_act, template uint3_t tsc) {</span><br><span style="color: hsl(120, 100%, 40%);">+ var RSL_IE_Body ie;</span><br><span style="color: hsl(120, 100%, 40%);">+   if (f_rsl_find_ie(chan_act, RSL_IE_CHAN_IDENT, ie)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         var uint3_t got_tsc := ie.chan_ident.ch_desc.v.tsc;</span><br><span style="color: hsl(120, 100%, 40%);">+           if (not match(got_tsc, tsc)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        setverdict(fail, "RSL CHANnel ACTIVation: unexpected TSC in Channel Description: expected ",</span><br><span style="color: hsl(120, 100%, 40%);">+                                   tsc, " got ", got_tsc);</span><br><span style="color: hsl(120, 100%, 40%);">+                  mtc.stop;</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> /* establish a dedicated channel using 'ra' */</span><br><span> function f_chan_est(OCT1 ra, octetstring est_l3, template RslLinkId link_id, GsmFrameNumber fn := 23,</span><br><span>                template uint3_t tsc := ?, RSL_DCHAN_PT rsl_pt := RSL, RSLEM_PROC_PT rsl_proc_pt := RSL_PROC)</span><br><span>@@ -158,16 +170,7 @@</span><br><span>     rsl_pt.send(ts_RSL_EST_IND(g_chan_nr, valueof(link_id), est_l3));</span><br><span> </span><br><span>        /* Check above CHAN ACTIV */</span><br><span style="color: hsl(0, 100%, 40%);">-    var RSL_Message chan_act := f_rslem_get_last_act(rsl_proc_pt, 0, g_chan_nr);</span><br><span style="color: hsl(0, 100%, 40%);">-    var RSL_IE_Body ie;</span><br><span style="color: hsl(0, 100%, 40%);">-     if (f_rsl_find_ie(chan_act, RSL_IE_CHAN_IDENT, ie)) {</span><br><span style="color: hsl(0, 100%, 40%);">-           var uint3_t got_tsc := ie.chan_ident.ch_desc.v.tsc;</span><br><span style="color: hsl(0, 100%, 40%);">-             if (not match(got_tsc, tsc)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                  setverdict(fail, "RSL CHANnel ACTIVation: unexpected TSC in Channel Description: expected ",</span><br><span style="color: hsl(0, 100%, 40%);">-                             tsc, " got ", got_tsc);</span><br><span style="color: hsl(0, 100%, 40%);">-                    mtc.stop;</span><br><span style="color: hsl(0, 100%, 40%);">-               }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(120, 100%, 40%);">+     f_chan_act_verify_tsc(f_rslem_get_last_act(rsl_proc_pt, 0, g_chan_nr), tsc);</span><br><span> }</span><br><span> </span><br><span> function f_deact_chan(RSL_Cause cause) runs on RSL_DchanHdlr</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25661">change 25661</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/+/25661"/><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: I7a3f68ed1deba6a4a0a1cc4df7613638225c1640 </div>
<div style="display:none"> Gerrit-Change-Number: 25661 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>