Change in osmocom-bb[master]: trx_toolkit/gsm_shared.py: s/GSM_BURST_LEN/GMSK_BURST_LEN/g

fixeria gerrit-no-reply at lists.osmocom.org
Fri Apr 30 20:33:07 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/24015 )


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

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

Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
---
M src/target/trx_toolkit/data_msg.py
M src/target/trx_toolkit/gsm_shared.py
M src/target/trx_toolkit/rand_burst_gen.py
3 files changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/24015/1

diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py
index f5d570f..5e42964 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -347,7 +347,7 @@
 			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 @@
 		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 @@
 			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 aac152e..7c50245 100644
--- a/src/target/trx_toolkit/gsm_shared.py
+++ b/src/target/trx_toolkit/gsm_shared.py
@@ -29,8 +29,8 @@
 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 0eb2e8f..b9846ab 100644
--- a/src/target/trx_toolkit/rand_burst_gen.py
+++ b/src/target/trx_toolkit/rand_burst_gen.py
@@ -80,7 +80,7 @@
 
 	# 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):

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/24015
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
Gerrit-Change-Number: 24015
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/23ff9524/attachment.htm>


More information about the gerrit-log mailing list