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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/12182 ) Change subject: trx_toolkit/burst_fwd.py: properly pass-filter multiple time-slots ...................................................................... trx_toolkit/burst_fwd.py: properly pass-filter multiple time-slots Previously it was only possible to configure a single time-slot that would be pass-filtered by a BurstForwarder instance. In some applications it would be useful to configure multiple time-slots, so let's refactor the time-slot pass-filtering algorithm. Change-Id: Ie1490adaf7a7c62c966aeb60c1898eaf3b5a1e84 --- M src/target/trx_toolkit/burst_fwd.py M src/target/trx_toolkit/ctrl_if_bb.py 2 files changed, 19 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index f3eeddd..746b281 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -43,11 +43,10 @@ and transmit frequencies. It would be great to distinguish between RX and TX frequencies for both BTS and MS. - - ts_pass - currently active timeslot, configured by the MS. - It can be activated or deactivated using SETSLOT control - command from the MS. + - ts_pass_list - the list of active (i.e. configured) + timeslot numbers for the MS. A timeslot can be activated + or deactivated using SETSLOT control command from the MS. - FIXME: only a single timeslot can be activated! FIXME: there is no such list for the BTS side. == Preprocessing and measurement simulation @@ -152,7 +151,7 @@ self.burst_ul_drop_period = 1 # Init timeslot filter (drop everything by default) - self.ts_pass = None + self.ts_pass_list = [] # Reset Timing Advance value self.ta = 0 @@ -288,7 +287,7 @@ return None # Timeslot filter - if msg.tn != self.ts_pass: + if msg.tn not in self.ts_pass_list: return None # Path loss simulation diff --git a/src/target/trx_toolkit/ctrl_if_bb.py b/src/target/trx_toolkit/ctrl_if_bb.py index 3528c98..97a3d9d 100644 --- a/src/target/trx_toolkit/ctrl_if_bb.py +++ b/src/target/trx_toolkit/ctrl_if_bb.py @@ -109,9 +109,21 @@ # TS activation / deactivation # We don't care about ts_type if ts_type == 0: - self.burst_fwd.ts_pass = None + # Deactivate TS (remove from TS pass-filter list) + if ts in self.burst_fwd.ts_pass_list: + self.burst_fwd.ts_pass_list.remove(ts) + else: + print("[!] TS %u was not activated before" % ts) + # TODO: uncomment as soon as RESET is introduced + # return -1 else: - self.burst_fwd.ts_pass = ts + # Activate TS (add to TS pass-filter list) + if ts not in self.burst_fwd.ts_pass_list: + self.burst_fwd.ts_pass_list.append(ts) + else: + print("[!] TS %u was already activated before" % ts) + # TODO: uncomment as soon as RESET is introduced + # return -1 return 0 -- To view, visit https://gerrit.osmocom.org/12182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie1490adaf7a7c62c966aeb60c1898eaf3b5a1e84 Gerrit-Change-Number: 12182 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181207/ea345509/attachment.htm>