Change in osmo-ttcn3-hacks[master]: BTS_Tests: introduce and use helper f_l1ctl_est_dchan()

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.org
Tue Jul 14 18:24:04 UTC 2020


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

Change subject: BTS_Tests: introduce and use helper f_l1ctl_est_dchan()
......................................................................

BTS_Tests: introduce and use helper f_l1ctl_est_dchan()

This is required for the upcoming test cases running on hopping
channels.  Dealing with module / hopping parameters in every
test case is definitely not a good idea, so let's add a function.

Change-Id: Ia4f078ebbb278246ee117f580ff93f301dc60f7c
Related: SYS#4868, OS#4546
---
M bts/BTS_Tests.ttcn
1 file changed, 22 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1582fae..1cecf4e 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1149,7 +1149,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_ASYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that no DL SACCH is being received */
 	f_sacch_missing(?);
@@ -1167,7 +1167,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_ASYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that DL SACCH is being received */
 	f_sacch_present(si5);
@@ -1205,7 +1205,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_SYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that no DL SACCH is being received */
 	f_sacch_missing(?);
@@ -1223,7 +1223,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that no DL SACCH is being received */
 	f_sacch_missing(?);
@@ -1241,7 +1241,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that no DL SACCH is being received */
 	f_sacch_missing(?);
@@ -1260,7 +1260,7 @@
 	f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
 	/* don't perform immediate assignment here, as we're testing non-IA case */
 	/* enable dedicated mode */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Verify that DL SACCH is being received */
 	f_sacch_present(si5);
@@ -1626,7 +1626,7 @@
 
 	/* Switch the MS side (e.g. trxcon) to a dedicated channel without
 	 * waiting for Immediate Assignment and sending Access Burst */
-	L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(g_pars.chan_nr, 7, mp_trx0_arfcn));
+	f_l1ctl_est_dchan(L1CTL, g_pars);
 
 	/* Send handover Access Burst */
 	fn := f_L1CTL_RACH(L1CTL, ho_ref, chan_nr := g_pars.chan_nr);
@@ -1990,6 +1990,21 @@
 	return fn;
 }
 
+/* Tune to a dedicated channel: L1CTL only */
+private function f_l1ctl_est_dchan(L1CTL_PT pt, ConnHdlrPars pars) {
+	if (not ispresent(pars.maio_hsn)) {
+		pt.send(ts_L1CTL_DM_EST_REQ_H0(pars.chan_nr,
+						7 /* TODO: mp_tsc */,
+						mp_trx0_arfcn));
+	} else {
+		pt.send(ts_L1CTL_DM_EST_REQ_H1(pars.chan_nr,
+						7 /* TODO: mp_tsc */,
+						pars.maio_hsn.hsn,
+						pars.maio_hsn.maio,
+						pars.ma));
+	}
+}
+
 /* Establish dedicated channel: L1CTL + RSL side */
 private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr {
 	var GsmFrameNumber fn;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19244
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: Ia4f078ebbb278246ee117f580ff93f301dc60f7c
Gerrit-Change-Number: 19244
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/275841d7/attachment.htm>


More information about the gerrit-log mailing list