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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19245 ) Change subject: BTS_Tests: implement optional frequency hopping support ...................................................................... BTS_Tests: implement optional frequency hopping support Change-Id: If0318fd320d4f112341465844555bf8d65b5f88f Depends: I7822c3581fccba3277a63577e740e7486307635d Related: SYS#4868, OS#4546 --- M bts/BTS_Tests.ttcn M bts/BTS_Tests_LAPDm.ttcn 2 files changed, 58 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1cecf4e..7c6886d 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -111,6 +111,10 @@ boolean mp_l1_supports_gprs := false; /* how many transceivers do we expect to connect */ integer mp_transceiver_num := 1; + /* frequency hopping status */ + boolean mp_freq_hop_enabled := false; + /* frequency hopping parameters */ + FreqHopConfig mp_fh_config; } type record of RslChannelNr ChannelNrs; @@ -510,6 +514,49 @@ private type function void_fn(charstring id) runs on ConnHdlr; +private type record length(8) of FreqHopGroups FreqHopConfig; + +private type record of FreqHopGroup FreqHopGroups; +private type record FreqHopGroup { + uint6_t hsn, + FreqHopGroupItems trx_maio +}; + +private type record of FreqHopGroupItem FreqHopGroupItems; +private type record FreqHopGroupItem { + uint8_t trx_nr, + uint6_t maio +}; + +friend function f_resolve_fh_params(inout ConnHdlrPars pars, uint8_t trx_nr := 0) +{ + var FreqHopGroups groups := mp_fh_config[pars.chan_nr.tn]; + var integer i, j; + + for (i := 0; i < lengthof(groups); i := i + 1) { + var FreqHopGroup g := groups[i]; + for (j := 0; j < lengthof(g.trx_maio); j := j + 1) { + var FreqHopGroupItem gi := g.trx_maio[j]; + if (gi.trx_nr == trx_nr) { + pars.maio_hsn := valueof(ts_HsnMaio(g.hsn, gi.maio)); + pars.ma := { }; /* to be composed below */ + break; + } + } + + if (ispresent(pars.maio_hsn)) { + /* Compose the Mobile Allocation */ + for (j := 0; j < lengthof(g.trx_maio); j := j + 1) { + var FreqHopGroupItem gi := g.trx_maio[j]; + pars.ma := pars.ma & { l1ctl_ma_def[gi.trx_nr] }; + } + + log("Freq. hopping parameters: ", pars.maio_hsn, pars.ma); + break; /* We're done */ + } + } +} + /* create a new test component */ friend function f_start_handler(void_fn fn, ConnHdlrPars pars, boolean pcu_comp := false, @@ -535,6 +582,11 @@ map(vc_conn:BTS_TRXC, system:BTS_TRXC); } + /* Obtain frequency hopping parameters for a given timeslot */ + if (mp_freq_hop_enabled and mp_transceiver_num > 1) { + f_resolve_fh_params(pars); + } + vc_conn.start(f_handler_init(fn, id, pars)); return vc_conn; } diff --git a/bts/BTS_Tests_LAPDm.ttcn b/bts/BTS_Tests_LAPDm.ttcn index 4d4a988..4242502 100644 --- a/bts/BTS_Tests_LAPDm.ttcn +++ b/bts/BTS_Tests_LAPDm.ttcn @@ -228,6 +228,12 @@ /* undo what f_start_handler is doing and pull LAPDm_CT into the loop */ unmap(self:L1CTL, system:L1CTL); f_lapdm_init(); + + /* Obtain frequency hopping parameters for a given timeslot */ + if (mp_freq_hop_enabled and mp_transceiver_num > 1) { + f_resolve_fh_params(g_pars); + } + /* activate the channel on the BTS side */ f_rsl_chan_act(g_pars.chan_mode, false, {}); /* activate the channel on the MS side */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If0318fd320d4f112341465844555bf8d65b5f88f Gerrit-Change-Number: 19245 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200714/955c2eda/attachment.htm>