Change in osmo-ttcn3-hacks[master]: bts/BTS_Tests: add 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/.

laforge gerrit-no-reply at lists.osmocom.org
Fri May 29 19:40:50 UTC 2020


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

Change subject: bts/BTS_Tests: add frequency hopping parameters
......................................................................

bts/BTS_Tests: add frequency hopping parameters

Change-Id: I111a14ca5d77c589529b40429d99d9ec6fa55a98
Related: Ib5ad31388ae25399ad09739aac3fdcb0b3a1f78b
Related: OS#4546
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_perf.ttcn
2 files changed, 38 insertions(+), 16 deletions(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0f89ec6..80804ec 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -84,6 +84,9 @@
 	charstring mp_rsl_ip := "127.0.0.2";
 	integer mp_rsl_port := 3003;
 	integer mp_trx0_arfcn := 871;
+	integer mp_trx1_arfcn := 873;
+	integer mp_trx2_arfcn := 875;
+	integer mp_trx3_arfcn := 877;
 	charstring mp_bts_trxc_ip := "127.0.0.1";
 	integer mp_bts_trxc_port := 5701;
 	charstring mp_pcu_socket := PCU_SOCK_DEFAULT;
@@ -207,7 +210,14 @@
 	ConnL1Pars l1_pars,
 	TestSpecUnion spec optional,
 	RSL_IE_EncryptionInfo encr optional,
-	BtsBand bts0_band optional
+	BtsBand bts0_band optional,
+
+	/* Frequency hopping parameters (disabled if absent) */
+	MaioHsn maio_hsn optional,
+	/* MA bitmap to be indicated in RR Immediate Assignment */
+	MobileAllocation ma_map,
+	/* The actual Mobile Allocation (ARFCN list) to be used */
+	L1ctlMA ma
 }
 
 /* Test-specific parameters */
@@ -587,8 +597,13 @@
 			"RF CHAN REL", true);
 }
 
+/* Default Mobile Allocation to be used for frequency hopping */
+private const L1ctlMA l1ctl_ma_def := { { false, mp_trx0_arfcn }, { false, mp_trx1_arfcn },
+					{ false, mp_trx2_arfcn }, { false, mp_trx3_arfcn } };
+
 friend template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,
 					template RSL_IE_ChannelMode chan_mode,
+					template (omit) MaioHsn maio_hsn := omit,
 					float t_guard := 20.0) := {
 	chan_nr := valueof(chan_nr),
 	chan_mode := valueof(chan_mode),
@@ -613,7 +628,10 @@
 	},
 	spec := omit,
 	encr := omit,
-	bts0_band := omit
+	bts0_band := omit,
+	maio_hsn := maio_hsn,
+	ma_map := c_MA_null,
+	ma := l1ctl_ma_def
 }
 
 /***********************************************************************
@@ -1906,6 +1924,7 @@
 private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr {
 	var GsmFrameNumber fn;
 	var ImmediateAssignment imm_ass;
+	var ChannelDescription ch_desc;
 	var integer ra := 23;
 
 	/* Send RACH request and wait for ChanReq */
@@ -1914,26 +1933,28 @@
 	/* Activate channel on BTS side */
 	f_rsl_chan_act(g_pars.chan_mode, encr_enable, more_ies);
 
+	/* Craft channel description (with or without frequency hopping parameters) */
+	if (ispresent(g_pars.maio_hsn)) {
+		ch_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, maio_hsn := g_pars.maio_hsn));
+	} else {
+		ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr));
+	}
+
 	/* Send IMM.ASS via CCHAN */
-	var ChannelDescription ch_desc := {
-		chan_nr := g_pars.chan_nr,
-		tsc := 7,
-		h := false,
-		arfcn := mp_trx0_arfcn,
-		maio_hsn := omit
-	};
-	var MobileAllocation ma := {
-		len := 0,
-		ma := ''B
-	};
-	var GsmRrMessage rr_msg := valueof(ts_IMM_ASS(ra, fn, 0, ch_desc, ma));
+	var GsmRrMessage rr_msg := valueof(ts_IMM_ASS(ra, fn, 0, ch_desc, g_pars.ma_map));
 	RSL.send(ts_RSL_IMM_ASSIGN(enc_GsmRrMessage(rr_msg)));
 
 	/* receive IMM.ASS on MS side */
 	var ImmediateAssignment ia_um;
 	ia_um := f_L1CTL_WAIT_IMM_ASS(L1CTL, ra, fn);
+
+	/* Make sure that IMM.ASS contains hopping parameters (if enabled) */
+	if (ch_desc.h != ia_um.chan_desc.h) {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Hopping parameters mismatch");
+	}
+
 	/* enable dedicated mode */
-	f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um);
+	f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um, ma := g_pars.ma);
 	/* enable encryption, if requested */
 	if (encr_enable) {
 		var uint8_t alg_id := f_alg_id_to_l1ctl(g_pars.encr.alg_id);
diff --git a/bts/BTS_Tests_perf.ttcn b/bts/BTS_Tests_perf.ttcn
index 1e70bc8..5b3b672 100644
--- a/bts/BTS_Tests_perf.ttcn
+++ b/bts/BTS_Tests_perf.ttcn
@@ -86,7 +86,8 @@
 }
 testcase TC_highchanload_tchh() runs on test_CT {
 	var ConnHdlr vc_conn; /* 1..7 * 2 */
-	var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN, 60.0 + mp_wait_time));
+	var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN,
+						t_guard := 60.0 + mp_wait_time));
 
 	f_init();
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18530
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: I111a14ca5d77c589529b40429d99d9ec6fa55a98
Gerrit-Change-Number: 18530
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
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/20200529/a9a18e7a/attachment.htm>


More information about the gerrit-log mailing list