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/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 1 file changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/19245/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index f4631ce..46bb9d9 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 +}; + +private function f_resolve_fh_params(inout ConnHdlrPars pars, uint8_t trx_nr := 0) +runs on test_CT { + 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; } -- 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: 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/20200714/4fd9b58b/attachment.htm>