Change in osmo-ttcn3-hacks[master]: BTS_Tests: make transceiver number configurable

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 Nov 24 11:10:40 UTC 2020


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


Change subject: BTS_Tests: make transceiver number configurable
......................................................................

BTS_Tests: make transceiver number configurable

Change-Id: Ifed3891658501e0a04ff89563d0a02f08211eed3
Related: SYS#4918
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_LAPDm.ttcn
M library/RSL_Emulation.ttcn
3 files changed, 17 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/21317/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 32a110a..c2a0d6d 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -279,6 +279,7 @@
 };
 
 type record ConnHdlrPars {
+	uint8_t trx_nr,
 	RslChannelNr chan_nr,
 	RSL_IE_ChannelMode chan_mode,
 	float t_guard,
@@ -651,6 +652,7 @@
 	/* connect to RSL Emulation main component */
 	connect(vc_conn:RSL, vc_RSL:CLIENT_PT);
 	connect(vc_conn:RSL_PROC, vc_RSL:RSL_PROC);
+	connect(vc_conn:RSL_CCHAN, vc_RSL:CCHAN_PT);
 
 	/* The ConnHdlr component may want to talk to some ports directly,
 	 * so we disconnect it from the test_CT and connect it to the component.
@@ -710,7 +712,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);
@@ -772,8 +774,9 @@
 }
 
 friend template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,
-					template RSL_IE_ChannelMode chan_mode,
-					float t_guard := 20.0) := {
+				    template RSL_IE_ChannelMode chan_mode,
+				    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,
@@ -2182,8 +2185,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,
@@ -2194,6 +2198,8 @@
 
 /* Establish dedicated channel: L1CTL + RSL side */
 private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr {
+	var TrxParsItem trx_pars := mp_trx_pars[g_pars.trx_nr];
+	var uint3_t tn := g_pars.chan_nr.tn;
 	var GsmFrameNumber fn;
 	var ImmediateAssignment imm_ass;
 	var ChannelDescription ch_desc;
@@ -2212,9 +2218,9 @@
 		ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx_pars[0].arfcn, g_pars.tsc));
 	}
 
-	/* Send IMM.ASS via CCHAN */
+	/* Send IMM.ASS via CCHAN, so it appears on C0/TRX0 regardless of g_pars.trx_nr */
 	var GsmRrMessage rr_msg := valueof(ts_IMM_ASS(ra, fn, 0, ch_desc, g_pars.fhp.ma_map));
-	RSL.send(ts_RSL_IMM_ASSIGN(enc_GsmRrMessage(rr_msg)));
+	RSL_CCHAN.send(ts_ASP_RSL_UD(ts_RSL_IMM_ASSIGN(enc_GsmRrMessage(rr_msg))));
 
 	/* receive IMM.ASS on MS side */
 	var ImmediateAssignment ia_um;
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;
 	}
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 0a20459..d8933a9 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -44,6 +44,8 @@
 /* General "base class" component definition, of which specific implementations
  * derive themselves by means of the "extends" feature */
 type component RSL_DchanHdlr {
+	/* port for Common Channel / TRX Management */
+	port RSL_CCHAN_PT RSL_CCHAN;
 	/* port facing up towards dedicated channel handler */
 	port RSL_DCHAN_PT RSL;
 	port RSLEM_PROC_PT RSL_PROC;

-- 
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: 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/20201124/e7d93f85/attachment.htm>


More information about the gerrit-log mailing list