diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-06 05:56:36 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-12-07 03:06:54 +0700 |
commit | 72c8296bfe22eab749f9f29fe91f30d2588ded9c (patch) | |
tree | 95c4e858ba903bd458f2991829859ceaab8cc720 /src/target/trx_toolkit/burst_fwd.py | |
parent | 6c4d9b628498277756b646c9b1a44039d2485f2d (diff) |
trx_toolkit/fake_trx.py: drop randomization related cmd options
The randomization of both UL/DL RSSI and ToA values is optional,
and can be configured from the control interface (see both
FAKE_RSSI and FAKE_TOA commands).
The command line options for enabling / disabling the randomization
were redundant, so let's get rid of them and check if the
corresponding treshold value is set.
Change-Id: I6adc13b8989ade2fab895673525c0ca17bf9b3f2
Diffstat (limited to 'src/target/trx_toolkit/burst_fwd.py')
-rw-r--r-- | src/target/trx_toolkit/burst_fwd.py | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index 6e79d44f..31f882e9 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -74,7 +74,7 @@ class BurstForwarder: to (rssi_ul_base + rssi_ul_threshold). Please note that the randomization of both RSSI and ToA - is optional, and should be enabled manually. + is optional, and can be enabled from the control interface. === Timing Advance handling @@ -104,14 +104,6 @@ class BurstForwarder: self.bts_link = bts_link self.bb_link = bb_link - # Randomization of RSSI - randomize_dl_rssi = False - randomize_ul_rssi = False - - # Randomization of ToA - randomize_dl_toa256 = False - randomize_ul_toa256 = False - # Init default parameters self.reset_dl() self.reset_ul() @@ -164,7 +156,7 @@ class BurstForwarder: # Calculates a random ToA value for Downlink bursts def calc_dl_toa256(self): # Check if randomization is required - if not self.randomize_dl_toa256: + if self.toa256_dl_threshold is 0: return self.toa256_dl_base # Calculate a range for randomization @@ -179,7 +171,7 @@ class BurstForwarder: # Calculates a random ToA value for Uplink bursts def calc_ul_toa256(self): # Check if randomization is required - if not self.randomize_ul_toa256: + if self.toa256_ul_threshold is 0: return self.toa256_ul_base # Calculate a range for randomization @@ -194,7 +186,7 @@ class BurstForwarder: # Calculates a random RSSI value for Downlink bursts def calc_dl_rssi(self): # Check if randomization is required - if not self.randomize_dl_rssi: + if self.rssi_dl_threshold is 0: return self.rssi_dl_base # Calculate a range for randomization @@ -207,7 +199,7 @@ class BurstForwarder: # Calculates a random RSSI value for Uplink bursts def calc_ul_rssi(self): # Check if randomization is required - if not self.randomize_ul_rssi: + if self.rssi_ul_threshold is 0: return self.rssi_ul_base # Calculate a range for randomization |