trx_toolkit/gsm_shared.py: s/GSM_BURST_LEN/GMSK_BURST_LEN/g

Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
This commit is contained in:
Vadim Yanitskiy 2021-04-27 20:18:58 +02:00
parent a2618b789a
commit bd73f0920d
3 changed files with 7 additions and 7 deletions

View File

@ -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):

View File

@ -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 """

View File

@ -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):