<p>fixeria <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14586">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation<br><br>C/I (Carrier-to-Interference ratio) is a value in cB (centiBels),<br>computed from the training sequence of each received burst,<br>by comparing the "ideal" training sequence with the received one.<br><br>This change introduces a new command similar to FAKE_TOA and FAKE_RSSI,<br>so it can be used by TTCN-3 test case 'TC_pcu_data_ind_lqual_cb' to<br>verify that the link quality measurements are delivered to the PCU.<br><br>Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff<br>Related: OS#1855<br>---<br>M src/target/trx_toolkit/fake_trx.py<br>1 file changed, 29 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py</span><br><span>index de0e6ff..69cdd86 100755</span><br><span>--- a/src/target/trx_toolkit/fake_trx.py</span><br><span>+++ b/src/target/trx_toolkit/fake_trx.py</span><br><span>@@ -64,8 +64,16 @@</span><br><span>         from (rssi_base - rssi_rand_threshold)</span><br><span>                 to (rssi_base + rssi_rand_threshold).</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       Please note that randomization of both RSSI and ToA is optional,</span><br><span style="color: hsl(0, 100%, 40%);">-        and can be enabled from the control interface.</span><br><span style="color: hsl(120, 100%, 40%);">+          - C/I (Carrier-to-Interference ratio) - value in cB (centiBels),</span><br><span style="color: hsl(120, 100%, 40%);">+        computed from the training sequence of each received burst, by</span><br><span style="color: hsl(120, 100%, 40%);">+        comparing the "ideal" training sequence with the actual one.</span><br><span style="color: hsl(120, 100%, 40%);">+        A pair of both base and threshold values defines a range of</span><br><span style="color: hsl(120, 100%, 40%);">+           C/I randomization:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+            from (ci_base - ci_rand_threshold)</span><br><span style="color: hsl(120, 100%, 40%);">+              to (ci_base + ci_rand_threshold).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   Please note that the randomization is optional and disabled by default.</span><br><span> </span><br><span>  == Timing Advance handling</span><br><span> </span><br><span>@@ -263,6 +271,25 @@</span><br><span>                        self.rssi_base += int(request[1])</span><br><span>                    return 0</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+          # C/I simulation</span><br><span style="color: hsl(120, 100%, 40%);">+              # Absolute form: CMD FAKE_CI <BASE> <THRESH></span><br><span style="color: hsl(120, 100%, 40%);">+              elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 2):</span><br><span style="color: hsl(120, 100%, 40%);">+                        log.debug("(%s) Recv FAKE_CI cmd" % self)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 # Parse and apply both base and threshold</span><br><span style="color: hsl(120, 100%, 40%);">+                     self.ci_base = int(request[1])</span><br><span style="color: hsl(120, 100%, 40%);">+                        self.ci_rand_threshold = int(request[2])</span><br><span style="color: hsl(120, 100%, 40%);">+                      return 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+            # C/I simulation</span><br><span style="color: hsl(120, 100%, 40%);">+              # Relative form: CMD FAKE_CI <+-BASE_DELTA></span><br><span style="color: hsl(120, 100%, 40%);">+             elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 1):</span><br><span style="color: hsl(120, 100%, 40%);">+                        log.debug("(%s) Recv FAKE_CI cmd" % self)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 # Parse and apply delta</span><br><span style="color: hsl(120, 100%, 40%);">+                       self.ci_base += int(request[1])</span><br><span style="color: hsl(120, 100%, 40%);">+                       return 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>           # Path loss simulation: burst dropping</span><br><span>               # Syntax: CMD FAKE_DROP <AMOUNT></span><br><span>               # Dropping pattern: fn % 1 == 0</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14586">change 14586</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/osmocom-bb/+/14586"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff </div>
<div style="display:none"> Gerrit-Change-Number: 14586 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>