diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-06-01 01:32:48 +0700 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-31 20:41:57 +0000 |
commit | 2f01fbd040bc9ad4e4f9a5073ad27cb329c249da (patch) | |
tree | 66d6e5ebc25b595e624332a7aa9519c746da54bb /library | |
parent | 32658b31c958caaaae806d05e4c57d5fe6d733c8 (diff) |
ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values
Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b
Diffstat (limited to 'library')
-rw-r--r-- | library/TRXC_Types.ttcn | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/TRXC_Types.ttcn b/library/TRXC_Types.ttcn index 37b86100..a87266e7 100644 --- a/library/TRXC_Types.ttcn +++ b/library/TRXC_Types.ttcn @@ -68,7 +68,11 @@ external function enc_TrxcMessage(in TrxcMessage id) return charstring 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) } |