<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/14304">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values<br><br>Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b<br>---<br>M bts/BTS_Tests.ttcn<br>M library/TRXC_Types.ttcn<br>2 files changed, 6 insertions(+), 2 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/04/14304/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn</span><br><span>index 0506e64..8e35469 100644</span><br><span>--- a/bts/BTS_Tests.ttcn</span><br><span>+++ b/bts/BTS_Tests.ttcn</span><br><span>@@ -467,7 +467,7 @@</span><br><span>         g_bts_trxc_conn_id := res.connId;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_trxc_fake_rssi(TRXC_RSSI rssi) runs on ConnHdlr {</span><br><span>   var TrxcMessage ret;</span><br><span>         ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi)));</span><br><span> }</span><br><span>diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn</span><br><span>index 37b8610..a87266e 100644</span><br><span>--- a/library/TRXC_Types.ttcn</span><br><span>+++ b/library/TRXC_Types.ttcn</span><br><span>@@ -68,7 +68,11 @@</span><br><span> external function dec_TrxcMessage(in charstring id) return TrxcMessage</span><br><span>       with { extension "prototype(convert) decode(TEXT)" };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-template (value) TrxcMessage ts_TRXC_FAKE_RSSI(uint8_t rssi, int16_t thresh := 0) := {</span><br><span style="color: hsl(120, 100%, 40%);">+/* rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise */</span><br><span style="color: hsl(120, 100%, 40%);">+type integer TRXC_RSSI          (-120..-47);</span><br><span style="color: hsl(120, 100%, 40%);">+type integer TRXC_RSSI_THRESH     (-120..120);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+template (value) TrxcMessage ts_TRXC_FAKE_RSSI(TRXC_RSSI rssi, TRXC_RSSI_THRESH thresh := 0) := {</span><br><span>    cmd := {</span><br><span>             verb := "FAKE_RSSI",</span><br><span>               params := { int2str(rssi), int2str(thresh) }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/14304">change 14304</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/14304"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b </div>
<div style="display:none"> Gerrit-Change-Number: 14304 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>