Review at https://gerrit.osmocom.org/7001
fake_trx/burst_fwd.py: disable field randomization by default
Both RSSI and ToA fields randomization is only required in some
specific test / use cases, so let's disable it by default.
Change-Id: I94835a840b6239f2c05197292825cb26977d0216
---
M src/target/fake_trx/burst_fwd.py
1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/01/7001/1
diff --git a/src/target/fake_trx/burst_fwd.py b/src/target/fake_trx/burst_fwd.py
index 503d035..d059e13 100644
--- a/src/target/fake_trx/burst_fwd.py
+++ b/src/target/fake_trx/burst_fwd.py
@@ -34,6 +34,14 @@
bts_freq = None
bb_freq = None
+ # Randomization of RSSI
+ randomize_dl_rssi = False
+ randomize_ul_rssi = False
+
+ # Randomization of ToA
+ randomize_dl_toa256 = False
+ randomize_ul_toa256 = False
+
# Timing Advance value indicated by MS (0 by default)
# Valid range: 0..63, where each unit means
# one GSM symbol advance.
@@ -64,6 +72,10 @@
# Calculates a random ToA value for Downlink bursts
def calc_dl_toa256(self):
+ # Check if randomization is required
+ if not self.randomize_dl_toa256:
+ return self.toa256_dl_base
+
# Calculate a range for randomization
toa256_min = self.toa256_dl_base - self.toa256_dl_threshold
toa256_max = self.toa256_dl_base + self.toa256_dl_threshold
@@ -75,6 +87,10 @@
# Calculates a random ToA value for Uplink bursts
def calc_ul_toa256(self):
+ # Check if randomization is required
+ if not self.randomize_ul_toa256:
+ return self.toa256_ul_base
+
# Calculate a range for randomization
toa256_min = self.toa256_ul_base - self.toa256_ul_threshold
toa256_max = self.toa256_ul_base + self.toa256_ul_threshold
@@ -90,6 +106,10 @@
# Calculates a random RSSI value for Downlink bursts
def calc_dl_rssi(self):
+ # Check if randomization is required
+ if not self.randomize_dl_rssi:
+ return self.rssi_dl_base
+
# Calculate a range for randomization
rssi_min = self.rssi_dl_base - self.rssi_dl_threshold
rssi_max = self.rssi_dl_base + self.rssi_dl_threshold
@@ -99,6 +119,10 @@
# Calculates a random RSSI value for Uplink bursts
def calc_ul_rssi(self):
+ # Check if randomization is required
+ if not self.randomize_ul_rssi:
+ return self.rssi_ul_base
+
# Calculate a range for randomization
rssi_min = self.rssi_ul_base - self.rssi_ul_threshold
rssi_max = self.rssi_ul_base + self.rssi_ul_threshold
--
To view, visit https://gerrit.osmocom.org/7001
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94835a840b6239f2c05197292825cb26977d0216
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Vadim Yanitskiy <[email protected]>