fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21317 )

Change subject: BTS_Tests: make TRX number configurable for ConnHdlr
......................................................................

BTS_Tests: make TRX number configurable for ConnHdlr

This change allows running test cases against additional transceivers.

Change-Id: Ifed3891658501e0a04ff89563d0a02f08211eed3
Related: SYS#4918
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_LAPDm.ttcn
2 files changed, 11 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 5757e35..2e35ce9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -300,6 +300,7 @@
 };

 type record ConnHdlrPars {
+       uint8_t trx_nr,
        RslChannelNr chan_nr,
        RSL_IE_ChannelMode chan_mode,
        float t_guard,
@@ -733,7 +734,7 @@
        g_Tguard.start(pars.t_guard);
        activate(as_Tguard());

-       f_rslem_register(0, pars.chan_nr);
+       f_rslem_register(pars.trx_nr, pars.chan_nr);
 
        /* call the user-supplied test case function */
        fn.apply(id);
@@ -797,7 +798,8 @@
 friend template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,
                                    template RSL_IE_ChannelMode chan_mode,
                                    template (omit) TestSpecUnion spec := omit,
-                                   float t_guard := 20.0) := {
+                                   uint8_t trx_nr := 0, float t_guard := 20.0) 
:= {
+       trx_nr := trx_nr,
        chan_nr := valueof(chan_nr),
        chan_mode := valueof(chan_mode),
        t_guard := t_guard,
@@ -2220,8 +2222,9 @@
 /* Tune to a dedicated channel: L1CTL only */
 private function f_l1ctl_est_dchan(L1CTL_PT pt, ConnHdlrPars pars) {
        if (not pars.fhp.enabled) {
+               var TrxParsItem trx_pars := mp_trx_pars[pars.trx_nr];
                pt.send(ts_L1CTL_DM_EST_REQ_H0(pars.chan_nr, pars.tsc,
-                                               mp_trx_pars[0].arfcn));
+                                               trx_pars.arfcn));
        } else {
                pt.send(ts_L1CTL_DM_EST_REQ_H1(pars.chan_nr, pars.tsc,
                                                pars.fhp.maio_hsn.hsn,
@@ -2241,7 +2244,8 @@
        if (g_pars.fhp.enabled) {
                ch_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, 
g_pars.fhp.maio_hsn, g_pars.tsc));
        } else {
-               ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, 
mp_trx_pars[0].arfcn, g_pars.tsc));
+               var TrxParsItem trx_pars := mp_trx_pars[g_pars.trx_nr];
+               ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, 
trx_pars.arfcn, g_pars.tsc));
        }

        /* enable dedicated mode */
diff --git a/bts/BTS_Tests_LAPDm.ttcn b/bts/BTS_Tests_LAPDm.ttcn
index 6d252e0..edd974b 100644
--- a/bts/BTS_Tests_LAPDm.ttcn
+++ b/bts/BTS_Tests_LAPDm.ttcn
@@ -43,7 +43,8 @@

 /* master function switching to a dedicated radio channel */
 function f_switch_dcch() runs on ConnHdlr {
-       var GsmBandArfcn arfcn := 
valueof(ts_GsmBandArfcn(mp_trx_pars[0].arfcn));
+       var TrxParsItem trx_pars := mp_trx_pars[g_pars.trx_nr];
+       var GsmBandArfcn arfcn := valueof(ts_GsmBandArfcn(trx_pars.arfcn));
        var BCCH_tune_req tune_req := { arfcn := arfcn, combined_ccch := true };
        var DCCH_switch_req sw_req;

@@ -55,7 +56,7 @@
                sw_req.ma := g_pars.fhp.ma;
        } else {
                sw_req.chan_desc := valueof(ts_ChanDescH0(g_pars.chan_nr,
-                                                         mp_trx_pars[0].arfcn,
+                                                         trx_pars.arfcn,
                                                          g_pars.tsc));
                sw_req.ma := omit;
        }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21317
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: Ifed3891658501e0a04ff89563d0a02f08211eed3
Gerrit-Change-Number: 21317
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to