kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/40074?usp=email )
Change subject: trx_toolkit/data_msg: Remove burst from *Msg constructor arguments
......................................................................
trx_toolkit/data_msg: Remove burst from *Msg constructor arguments
Grepping through whole codebase does not reveal any place which invokes *Msg(burst=...).
Sonn we will add type to burst and it will be different types for TxMsg and RxMsg.
Adjust *Msg signature not to accept any burst argument as a preparatory
step for that.
Change-Id: I189956fdc0591ec64c09d4c7e1e3659dfc630fc0
---
M src/target/trx_toolkit/data_msg.pyx
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/74/40074/1
diff --git a/src/target/trx_toolkit/data_msg.pyx b/src/target/trx_toolkit/data_msg.pyx
index ccbdd71..4b59fce 100644
--- a/src/target/trx_toolkit/data_msg.pyx
+++ b/src/target/trx_toolkit/data_msg.pyx
@@ -77,8 +77,8 @@
CHDR_VERSION_MAX = 0b1111
KNOWN_VERSIONS = tuple(range(KNOWN_VERSION_MAX+1))
- def __init__(self, fn = None, tn = None, burst = None, ver = 0):
- self.burst = burst # bytes|bytearray for ubit, array[b] for sbit, array[B] for usbit
+ def __init__(self, fn = None, tn = None, ver = 0):
+ self.burst = None # bytes|bytearray for ubit, array[b] for sbit, array[B] for usbit
self.ver = ver
self.fn = fn
self.tn = tn
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/40074?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I189956fdc0591ec64c09d4c7e1e3659dfc630fc0
Gerrit-Change-Number: 40074
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/40079?usp=email )
Change subject: trx_toolkit/data_msg: Push checking whether .burst is None from Msg.gen_msg to TxMsg/RxMsg .append_burst_to
......................................................................
trx_toolkit/data_msg: Push checking whether .burst is None from Msg.gen_msg to TxMsg/RxMsg .append_burst_to
TxMsg and RxMsg have different types for their bursts, so inside Msg
functions accessing .burst goes via py-level, while inside TxMsg/RxMsg
functions accessing .burst goes via C-level.
Change-Id: Ie3d38131db8964c7f134e03a9676b1e0e84be6ae
---
M src/target/trx_toolkit/data_msg.pyx
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/40079/1
diff --git a/src/target/trx_toolkit/data_msg.pyx b/src/target/trx_toolkit/data_msg.pyx
index ac3dc49..34f6a12 100644
--- a/src/target/trx_toolkit/data_msg.pyx
+++ b/src/target/trx_toolkit/data_msg.pyx
@@ -260,8 +260,7 @@
self.append_hdr_to(buf)
# Generate burst
- if self.burst is not None:
- self.append_burst_to(buf)
+ self.append_burst_to(buf)
# This is a rudiment from (legacy) OpenBTS transceiver,
# some L1 implementations still expect two dummy bytes.
@@ -403,6 +402,8 @@
''' Generate message specific burst by appending it to buf. '''
# Copy burst 'as is'
+ if self.burst is None:
+ return
return buf.extend(self.burst)
cdef parse_burst(self, bytearray burst):
@@ -727,6 +728,8 @@
# Convert soft-bits to unsigned soft-bits
l = PyByteArray_GET_SIZE(buf)
+ if self.burst is None:
+ return
PyByteArray_Resize(buf, l+len(self.burst))
Msg.__sbit2usbit(<int8_t*>self.burst.data.as_chars, len(self.burst),
<uint8_t*>&PyByteArray_AS_STRING(buf)[l])
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/40079?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie3d38131db8964c7f134e03a9676b1e0e84be6ae
Gerrit-Change-Number: 40079
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/40068?usp=email )
Change subject: trx_toolkit/_fake_trx: No need to initialize .rf_muted in FakeTRX
......................................................................
trx_toolkit/_fake_trx: No need to initialize .rf_muted in FakeTRX
Because .rf_muted is attribute of Transceiver and is initialized to that
value in Transceiver.__cinit__ .
Change-Id: Ibd6b5dd7fa65e42cc864be0153fa9906dd3ddf7e
---
M src/target/trx_toolkit/_fake_trx.pyx
1 file changed, 0 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/68/40068/1
diff --git a/src/target/trx_toolkit/_fake_trx.pyx b/src/target/trx_toolkit/_fake_trx.pyx
index e49d056..7c0fd35 100644
--- a/src/target/trx_toolkit/_fake_trx.pyx
+++ b/src/target/trx_toolkit/_fake_trx.pyx
@@ -113,8 +113,6 @@
# When disabled, RSSI is calculated based on Tx power and Rx path loss
self.fake_rssi_enabled = False
- self.rf_muted = False
-
# Actual ToA, RSSI, C/I, TA values
self.tx_power_base = self.NOMINAL_TX_POWER_DEFAULT
self.tx_att_base = self.TX_ATT_DEFAULT
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/40068?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ibd6b5dd7fa65e42cc864be0153fa9906dd3ddf7e
Gerrit-Change-Number: 40068
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/40071?usp=email )
Change subject: trx_toolkit/data_msg: Replace `from gsm_shared import *` with explicit import and at C level
......................................................................
trx_toolkit/data_msg: Replace `from gsm_shared import *` with explicit import and at C level
gsm_shared is currently pure-py module, but still we can import needed
constants and set them to C-level typed variables. It is both goods: all
imports are explicit, and access to the constant now go faster instead
of going through py-level module dict lookup.
Change-Id: Ica8c73d6136053845415bdece48b24a7df6520be
---
M src/target/trx_toolkit/data_msg.pyx
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/40071/1
diff --git a/src/target/trx_toolkit/data_msg.pyx b/src/target/trx_toolkit/data_msg.pyx
index af0aac6..0da4f7c 100644
--- a/src/target/trx_toolkit/data_msg.pyx
+++ b/src/target/trx_toolkit/data_msg.pyx
@@ -25,7 +25,11 @@
from typing import List
from enum import Enum
from array import array
-from gsm_shared import *
+
+import gsm_shared
+cdef int GMSK_BURST_LEN = gsm_shared.GMSK_BURST_LEN
+cdef int EDGE_BURST_LEN = gsm_shared.EDGE_BURST_LEN
+cdef int GSM_HYPERFRAME = gsm_shared.GSM_HYPERFRAME
# _bu2s converts unsigned byte to signed.
def _bu2s(x):
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/40071?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ica8c73d6136053845415bdece48b24a7df6520be
Gerrit-Change-Number: 40071
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>