Change in osmo-ttcn3-hacks[master]: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Fri May 31 18:38:18 UTC 2019


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/14304


Change subject: ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values
......................................................................

ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values

Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b
---
M bts/BTS_Tests.ttcn
M library/TRXC_Types.ttcn
2 files changed, 6 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/14304/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0506e64..8e35469 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -467,7 +467,7 @@
 	g_bts_trxc_conn_id := res.connId;
 }
 
-private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr {
+private function f_trxc_fake_rssi(TRXC_RSSI rssi) runs on ConnHdlr {
 	var TrxcMessage ret;
 	ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi)));
 }
diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn
index 37b8610..a87266e 100644
--- a/library/TRXC_Types.ttcn
+++ b/library/TRXC_Types.ttcn
@@ -68,7 +68,11 @@
 external function dec_TrxcMessage(in charstring id) return TrxcMessage
 	with { extension "prototype(convert) decode(TEXT)" };
 
-template (value) TrxcMessage ts_TRXC_FAKE_RSSI(uint8_t rssi, int16_t thresh := 0) := {
+/* rxlev2dbm(0..63) gives us [-110..-47], plus -10 dbm for noise */
+type integer TRXC_RSSI		(-120..-47);
+type integer TRXC_RSSI_THRESH	(-120..120);
+
+template (value) TrxcMessage ts_TRXC_FAKE_RSSI(TRXC_RSSI rssi, TRXC_RSSI_THRESH thresh := 0) := {
 	cmd := {
 		verb := "FAKE_RSSI",
 		params := { int2str(rssi), int2str(thresh) }

-- 
To view, visit https://gerrit.osmocom.org/14304
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b
Gerrit-Change-Number: 14304
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190531/ae1e4a10/attachment.htm>


More information about the gerrit-log mailing list