This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16090 ) Change subject: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation ...................................................................... trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation The burst transformation in BurstForwarder.forward_msg() used to be done only once, so then the resulting message was distributed over the list of connected (and active) transceivers. This approach limits the path loss simulation capabilities, because a reference to the same message is passed to FakeTRX.send_data_msg(). If one transceiver changes (or removes) the burst bits, the other transceivers would not receive the original message. Let's do the transformation individually for each transceiver, so the original message will always remain unchanged. Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b --- M src/target/trx_toolkit/burst_fwd.py M src/target/trx_toolkit/fake_trx.py 2 files changed, 5 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/90/16090/1 diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index b418aef..fd6013b 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -65,12 +65,6 @@ self.trx_list.remove(trx) def forward_msg(self, src_trx, rx_msg): - # Transform from L12TRX to TRX2L1 - tx_msg = rx_msg.gen_trx2l1() - if tx_msg is None: - log.error("Forwarding failed, could not transform " - "message (%s) => dropping..." % rx_msg.desc_hdr()) - # Iterate over all known transceivers for trx in self.trx_list: if trx == src_trx: @@ -81,7 +75,9 @@ continue if trx.rx_freq != src_trx.tx_freq: continue - if tx_msg.tn not in trx.ts_list: + if rx_msg.tn not in trx.ts_list: continue - trx.send_data_msg(src_trx, rx_msg, tx_msg) + # Transform from L12TRX to TRX2L1 and forward + tx_msg = rx_msg.gen_trx2l1(ver = trx.data_if._hdr_ver) + trx.handle_data_msg(src_trx, rx_msg, tx_msg) diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index 8beee6e..5153722 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -199,10 +199,7 @@ # Takes (partially initialized) TRX2L1 message, # simulates RF path parameters (such as RSSI), # and sends towards the L1 - def send_data_msg(self, src_trx, src_msg, msg): - # Override header version - msg.ver = self.data_if._hdr_ver - + def handle_data_msg(self, src_trx, src_msg, msg): # Complete message header msg.toa256 = self.toa256 msg.rssi = self.rssi -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b Gerrit-Change-Number: 16090 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191117/4ec7af67/attachment.htm>