<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf<br><br>As it turned out, OsmoPCU is not supposed to change the Coding<br>Scheme immediately when the recent link quality value leaves the<br>current window. Instead, in order to avoid rapid changes of the<br>Coding Scheme, it also takes the previous value into account.<br>Thus the current Coding Scheme is only changed if both current<br>and old values fit into a new window.<br><br>This change makes the test case pass.<br><br>Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb<br>---<br>M pcu/PCU_Tests_RAW.ttcn<br>1 file changed, 20 insertions(+), 7 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/10/16010/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn</span><br><span>index af1ef99..6a5f5d0 100644</span><br><span>--- a/pcu/PCU_Tests_RAW.ttcn</span><br><span>+++ b/pcu/PCU_Tests_RAW.ttcn</span><br><span>@@ -912,8 +912,11 @@</span><br><span>           tai6_ta := ?));</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Default link quality adaptation (Coding Scheme) ranges:</span><br><span style="color: hsl(0, 100%, 40%);">-/* CS1: ... 6 dB, CS2: 5 .. 8 dB, CS3: 7 .. 13 db, CS4: 12 ... dB */</span><br><span style="color: hsl(120, 100%, 40%);">+/* Default link quality adaptation (Coding Scheme) ranges (inclusive).</span><br><span style="color: hsl(120, 100%, 40%);">+ * OsmoPCU (VTY): cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * NOTE: the ranges are intentionally overlapping because OsmoPCU</span><br><span style="color: hsl(120, 100%, 40%);">+ * does not change CS/MCS on the range borders (5-6, 7-8, 12-13). */</span><br><span> private template integer CS1_lqual_dB_range := (-infinity .. 6);</span><br><span> private template integer CS2_lqual_dB_range := (5 .. 8);</span><br><span> private template integer CS3_lqual_dB_range := (7 .. 13);</span><br><span>@@ -952,14 +955,22 @@</span><br><span>     /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */</span><br><span>   ul_data.data.tlli := '00000001'O;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* 16 UL blocks (0 .. 32 dB, step = 2 dB) */</span><br><span style="color: hsl(120, 100%, 40%);">+  /* The actual / old link quality values. We need to keep track of the old</span><br><span style="color: hsl(120, 100%, 40%);">+      * (basically previous) link quality value, because OsmoPCU actually</span><br><span style="color: hsl(120, 100%, 40%);">+   * changes the coding scheme if not only the actual, but also the old</span><br><span style="color: hsl(120, 100%, 40%);">+  * value leaves the current link quality range (window). */</span><br><span style="color: hsl(120, 100%, 40%);">+   var integer lqual := 0;</span><br><span style="color: hsl(120, 100%, 40%);">+       var integer lqual_old;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* 16 UL blocks (0 .. 15 dB, step = 1 dB) */</span><br><span>         for (var integer i := 0; i < 16; i := i + 1) {</span><br><span>            /* Prepare a new UL block (CV, random payload) */</span><br><span>            ul_data.data.mac_hdr.countdown := (15 - i);</span><br><span>          ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-         /* Link quality in dB and our CS1-4 expectations */</span><br><span style="color: hsl(0, 100%, 40%);">-             var integer lqual := i * 2;</span><br><span style="color: hsl(120, 100%, 40%);">+           /* Update the old / actual link quality */</span><br><span style="color: hsl(120, 100%, 40%);">+            lqual_old := lqual;</span><br><span style="color: hsl(120, 100%, 40%);">+           lqual := i;</span><br><span> </span><br><span>              /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */</span><br><span>             log("Sending DATA.ind with link quality (dB): ", lqual);</span><br><span>@@ -971,9 +982,11 @@</span><br><span>            log("Rx Packet Uplink ACK / NACK with Channel Coding Command: ",</span><br><span>               dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                /* Match the received Channel Coding Command */</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Match the received Channel Coding Command. Since we are increasing</span><br><span style="color: hsl(120, 100%, 40%);">+          * the link quality value on each iteration and not decreasing, there</span><br><span style="color: hsl(120, 100%, 40%);">+          * is no need to check the both old and current link quality values. */</span><br><span>              var template ChCodingCommand ch_coding;</span><br><span style="color: hsl(0, 100%, 40%);">-         select (lqual) {</span><br><span style="color: hsl(120, 100%, 40%);">+              select (lqual_old) {</span><br><span>                 case (CS1_lqual_dB_range) { ch_coding := CH_CODING_CS1; }</span><br><span>            case (CS2_lqual_dB_range) { ch_coding := CH_CODING_CS2; }</span><br><span>            case (CS3_lqual_dB_range) { ch_coding := CH_CODING_CS3; }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010">change 16010</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/+/16010"/><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: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb </div>
<div style="display:none"> Gerrit-Change-Number: 16010 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>