Change in osmo-ttcn3-hacks[master]: BTS_Tests_LAPDm: consider frequency hopping parameters

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:05 UTC 2020


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

Change subject: BTS_Tests_LAPDm: consider frequency hopping parameters
......................................................................

BTS_Tests_LAPDm: consider frequency hopping parameters

Change-Id: Idd1ffe0ee97805b40bb5e37645aa53a9b1dc4b0a
Related: SYS#4868, OS#4546
---
M bts/BTS_Tests_LAPDm.ttcn
M library/LAPDm_RAW_PT.ttcn
2 files changed, 32 insertions(+), 12 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_LAPDm.ttcn b/bts/BTS_Tests_LAPDm.ttcn
index 4242502..9981bbc 100644
--- a/bts/BTS_Tests_LAPDm.ttcn
+++ b/bts/BTS_Tests_LAPDm.ttcn
@@ -6,6 +6,7 @@
 import from LAPDm_Types all;
 import from RSL_Types all;
 import from BTS_Tests all;
+import from GSM_RR_Types all;
 import from Misc_Helpers all;
 
 /* test that use exclusively only LAPDm over L1CTL */
@@ -51,9 +52,16 @@
 }
 
 /* master function switching to a dedicated radio channel */
-function f_switch_dcch(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) runs on lapdm_test_CT {
-	var BCCH_tune_req tune_req := { arfcn := arfcn, combined_ccch := true };
-	var DCCH_switch_req sw_req := { arfcn, chan_nr, tsc };
+function f_switch_dcch() runs on ConnHdlr {
+	var BCCH_tune_req tune_req := { arfcn := { false, mp_trx0_arfcn }, combined_ccch := true };
+	var DCCH_switch_req sw_req := { ma := g_pars.ma };
+
+	/* Craft channel description (with or without frequency hopping parameters) */
+	if (ispresent(g_pars.maio_hsn)) {
+		sw_req.chan_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, g_pars.maio_hsn));
+	} else {
+		sw_req.chan_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx0_arfcn));
+	}
 
 	LAPDM.send(tune_req);
 	LAPDM.send(sw_req);
@@ -237,7 +245,7 @@
 	/* activate the channel on the BTS side */
 	f_rsl_chan_act(g_pars.chan_mode, false, {});
 	/* activate the channel on the MS side */
-	f_switch_dcch({false, mp_trx0_arfcn}, g_chan_nr, 7);
+	f_switch_dcch();
 }
 
 private function fp_common_fini() runs on ConnHdlr
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index 394deab..77f0452 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -38,9 +38,8 @@
 
 	/* directly switch to a dedicated channel (without RACH/IMM.ASS */
 	type record DCCH_switch_req {
-		Arfcn arfcn,
-		RslChannelNr chan_nr,
-		GsmTsc tsc
+		ChannelDescription chan_desc,
+		L1ctlMA ma
 	}
 
 	type record DCCH_switch_res {
@@ -236,17 +235,30 @@
 		/* store/save channel description */
 		chan_desc := imm_ass.chan_desc;
 
-		/* send DM_EST_REQ */
+		/* send DM_EST_REQ, TODO: Mobile Allocation */
 		f_L1CTL_DM_EST_REQ_IA(L1CTL, imm_ass);
 		set_ph_state(PH_STATE_DCH);
 	}
 
 	/* switching directly to a dedicated channel *without RACH/IMM-ASS */
-	private function f_switch_dcch(Arfcn arfcn, RslChannelNr chan_nr, GsmTsc tsc) runs on lapdm_CT {
+	private function f_switch_dcch(in DCCH_switch_req sw_req) runs on lapdm_CT {
 		set_ph_state(PH_STATE_TUNING_DCH);
 		/* store/save channel description */
-		chan_desc.chan_nr := chan_nr;
-		L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(chan_nr, tsc, arfcn.arfcn));
+		chan_desc := sw_req.chan_desc;
+
+		/* tune the L1 to the indicated channel */
+		if (chan_desc.h) {
+			L1CTL.send(ts_L1CTL_DM_EST_REQ_H1(chan_desc.chan_nr,
+							  chan_desc.tsc,
+							  chan_desc.maio_hsn.hsn,
+							  chan_desc.maio_hsn.maio,
+							  sw_req.ma));
+		} else {
+			L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(chan_desc.chan_nr,
+							  chan_desc.tsc,
+							  chan_desc.arfcn));
+		}
+
 		set_ph_state(PH_STATE_DCH);
 	}
 
@@ -431,7 +443,7 @@
 			}
 			[] LAPDM_SP.receive(DCCH_switch_req:?) -> value sw_req {
 				var DCCH_switch_res res;
-				f_switch_dcch(sw_req.arfcn, sw_req.chan_nr, sw_req.tsc);
+				f_switch_dcch(sw_req);
 				if (ph_state == PH_STATE_DCH) {
 					res := { omit };
 				} else {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19253
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: Idd1ffe0ee97805b40bb5e37645aa53a9b1dc4b0a
Gerrit-Change-Number: 19253
Gerrit-PatchSet: 2
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/530e83a3/attachment.htm>


More information about the gerrit-log mailing list