diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-27 20:18:58 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-30 22:31:40 +0200 |
commit | bd73f0920d3eee73011ce84d145e9176ce791345 (patch) | |
tree | d916419970e73a4e1510fe735a8a35e611a76cb5 | |
parent | a2618b789a5c90f54844932e8f2e87f88290920e (diff) |
trx_toolkit/gsm_shared.py: s/GSM_BURST_LEN/GMSK_BURST_LEN/g
Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
-rw-r--r-- | src/target/trx_toolkit/data_msg.py | 8 | ||||
-rw-r--r-- | src/target/trx_toolkit/gsm_shared.py | 4 | ||||
-rw-r--r-- | src/target/trx_toolkit/rand_burst_gen.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py index f5d570f0..5e429643 100644 --- a/src/target/trx_toolkit/data_msg.py +++ b/src/target/trx_toolkit/data_msg.py @@ -347,7 +347,7 @@ class DATAMSG_L12TRX(DATAMSG): raise ValueError("Tx burst bits are not set") # FIXME: properly handle IDLE / NOPE indications - if len(self.burst) not in (GSM_BURST_LEN, EDGE_BURST_LEN): + if len(self.burst) not in (GMSK_BURST_LEN, EDGE_BURST_LEN): raise ValueError("Tx burst has odd length %u" % len(self.burst)) def rand_pwr(self, min = None, max = None): @@ -411,9 +411,9 @@ class DATAMSG_L12TRX(DATAMSG): if length >= EDGE_BURST_LEN: self.burst = list(burst[:EDGE_BURST_LEN]) else: - self.burst = list(burst[:GSM_BURST_LEN]) + self.burst = list(burst[:GMSK_BURST_LEN]) - def rand_burst(self, length = GSM_BURST_LEN): + def rand_burst(self, length = GMSK_BURST_LEN): ''' Generate a random message specific burst. ''' self.burst = [random.randint(0, 1) for _ in range(length)] @@ -578,7 +578,7 @@ class DATAMSG_TRX2L1(DATAMSG): raise ValueError("Rx burst bits are not set") # ... and can be either of GSM (GMSK) or EDGE (8-PSK) - if len(self.burst) not in (GSM_BURST_LEN, EDGE_BURST_LEN): + if len(self.burst) not in (GMSK_BURST_LEN, EDGE_BURST_LEN): raise ValueError("Rx burst has odd length %u" % len(self.burst)) def _validate_burst_v1(self): diff --git a/src/target/trx_toolkit/gsm_shared.py b/src/target/trx_toolkit/gsm_shared.py index aac152e0..7c50245a 100644 --- a/src/target/trx_toolkit/gsm_shared.py +++ b/src/target/trx_toolkit/gsm_shared.py @@ -29,8 +29,8 @@ GSM_SUPERFRAME = 26 * 51 GSM_HYPERFRAME = 2048 * GSM_SUPERFRAME # Burst length -GSM_BURST_LEN = 148 -EDGE_BURST_LEN = GSM_BURST_LEN * 3 +GMSK_BURST_LEN = 148 +EDGE_BURST_LEN = GMSK_BURST_LEN * 3 class BurstType(Enum): """ Burst types defined in 3GPP TS 45.002 """ diff --git a/src/target/trx_toolkit/rand_burst_gen.py b/src/target/trx_toolkit/rand_burst_gen.py index 0eb2e8f2..b9846ab2 100644 --- a/src/target/trx_toolkit/rand_burst_gen.py +++ b/src/target/trx_toolkit/rand_burst_gen.py @@ -80,7 +80,7 @@ class RandBurstGen: # Generate a frequency correction burst def gen_fb(self): - return [0] * GSM_BURST_LEN + return [0] * GMSK_BURST_LEN # Generate a synchronization burst def gen_sb(self, tsc = None): |