Change in osmo-ttcn3-hacks[master]: BTS_Tests: Verify RSL MS POWER CONTROL and SACCH MS POWER LEVEL

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/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Dec 20 13:01:02 UTC 2018


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/12391


Change subject: BTS_Tests: Verify RSL MS POWER CONTROL and SACCH MS POWER LEVEL
......................................................................

BTS_Tests: Verify RSL MS POWER CONTROL and SACCH MS POWER LEVEL

Usually the MS power is controlled by the BTS and there is no continou
supervison by the BSC needed. However, a scheme where the BSC takes care
of the power control loop exists. The power is then set via RSL using an
RSL MS POWER CONTROL message.

This tests establishes a dchan and then sends MS POWER CONTROL messages
with differen power levels and then checks the presence of the power
level set in the MS POWER LEVEL field of the SACCH L1 header.

Change-Id: I82b04a3bf94d355175f7f6ff3fdc43672e8080a2
Related: OS#1622
---
M bts/BTS_Tests.ttcn
M bts/expected-results.xml
M library/RSL_Types.ttcn
3 files changed, 84 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 753d89b..5f8885f 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1502,6 +1502,76 @@
 	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }
 
+/* establish DChan, and send MS POWER CONTROL messages via RSL, verify that
+ * the BTS is forwarding those values to the MS via the SACCH L1 header. */
+function f_tc_rsl_ms_pwr_ctrl(charstring id) runs on ConnHdlr {
+	var L1ctlDlMessage l1_dl;
+	var RSL_IE_MS_Power ms_power;
+	var RSL_Message rsl;
+	var uint5_t power_level := 0;
+
+	f_l1_tune(L1CTL);
+	RSL.clear;
+
+	f_est_dchan();
+
+	ms_power.reserved := 0;
+	ms_power.fpc_epc := false;
+
+	/* Send the first power control command. This will disable any BTS/TRX
+	 * internal power control and switch the MS (which is not in scope of
+	 * this test) to a constant power level. We start with a power level
+	 * of 0 */
+	ms_power.power_level := power_level;
+	rsl := valueof(ts_RSL_MS_PWR_CTRL(g_chan_nr, ms_power));
+	RSL.send(rsl);
+
+	alt {
+
+	/* Pick all SACCH blocks for checking */
+	[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl {
+
+		/* The first byte of the L1 header contains the power level.
+		 * The reserved bits and the fpc bit is set to 0, so we may
+		 * compare directly. */
+		if (not (l1_dl.payload.data_ind.payload[0] == int2oct(power_level, 1))) {
+			setverdict(fail, "Power level in L1 header does not match the signaled (RSL) power level.");
+		}
+
+		/* Signal a new power level via RSL for the next turn. */
+		if (power_level < 31) {
+			power_level := power_level + 1;
+			ms_power.power_level := power_level;
+			rsl := valueof(ts_RSL_MS_PWR_CTRL(g_chan_nr, ms_power));
+			RSL.send(rsl);
+			repeat;
+		}
+
+		}
+
+	/* Ignore all other blocks */
+	[] L1CTL.receive { repeat; }
+
+	}
+
+	f_rsl_chan_deact();
+	f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+
+	setverdict(pass);
+}
+
+testcase TC_rsl_ms_pwr_ctrl() runs on test_CT {
+	var ConnHdlr vc_conn;
+	var ConnHdlrPars pars;
+	f_init(testcasename());
+
+	for (var integer tn := 1; tn <= 4; tn := tn+1) {
+		pars := valueof(t_Pars(t_RslChanNr_Bm(tn), ts_RSL_ChanMode_SIGN));
+		vc_conn := f_start_handler(refers(f_tc_rsl_ms_pwr_ctrl), pars);
+		vc_conn.done;
+	}
+	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
 
 /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
@@ -4164,6 +4234,7 @@
 	execute( TC_meas_res_sign_sdcch4() );
 	execute( TC_meas_res_sign_sdcch8() );
 	execute( TC_meas_res_sign_tchh_toa256() );
+	execute( TC_rsl_ms_pwr_ctrl() );
 	execute( TC_conn_fail_crit() );
 	execute( TC_paging_imsi_80percent() );
 	execute( TC_paging_tmsi_80percent() );
diff --git a/bts/expected-results.xml b/bts/expected-results.xml
index 73de1fb..bad4d6f 100644
--- a/bts/expected-results.xml
+++ b/bts/expected-results.xml
@@ -17,6 +17,7 @@
   <testcase classname='BTS_Tests' name='TC_meas_res_sign_sdcch4' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_meas_res_sign_sdcch8' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_meas_res_sign_tchh_toa256' time='MASKED'/>
+  <testcase classname='BTS_Tests' name='TC_rsl_ms_pwr_ctrl' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_conn_fail_crit' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_paging_imsi_80percent' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_paging_tmsi_80percent' time='MASKED'/>
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index cd4ba58..3b1a311 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1318,6 +1318,18 @@
 		}
 	}
 
+	/* 8.4.15: BTS <- BSC */
+	template (value) RSL_Message ts_RSL_MS_PWR_CTRL(template (value) RslChannelNr chan_nr,
+							template (value) RSL_IE_MS_Power ms_power) := {
+		msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
+		msg_type := RSL_MT_MS_POWER_CONTROL,
+		ies := {
+			t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}),
+			t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power})
+			/* One optional IE: MS POWER PARAMETERS */
+		}
+	}
+
 	/* 8.4.19 BTS -> BSC */
 	template (value) RSL_Message ts_RSL_RF_CHAN_REL_ACK(template (value) RslChannelNr chan_nr) :=
 		ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),

-- 
To view, visit https://gerrit.osmocom.org/12391
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I82b04a3bf94d355175f7f6ff3fdc43672e8080a2
Gerrit-Change-Number: 12391
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181220/7998eeb8/attachment.htm>


More information about the gerrit-log mailing list