Change in osmo-ttcn3-hacks[master]: BTS_Tests: tolerate empty measurement result on chan est.

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
Wed Dec 18 09:58:26 UTC 2019


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


Change subject: BTS_Tests: tolerate empty measurement result on chan est.
......................................................................

BTS_Tests: tolerate empty measurement result on chan est.

On channel establishment the first measurement result may lack the
measurement reports from the MS. This is normal behavior, so lets
tolerate that.

Change-Id: Ib2f511991349ab15e02db9c5e45f0df3645835a4
Related: OS#2975
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 75 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 779f7c3..50cb7bb 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1730,10 +1730,49 @@
 				    ?, t_toffs);
 }
 
+/* build a template for matching measurement results that do not contain any
+ * MS related measurement (l1_info, l3_info and ms timing offset. */
+private function f_build_meas_res_tmpl_empty() runs on ConnHdlr return template RSL_Message {
+	var ConnL1Pars l1p := g_pars.l1_pars;
+	var template RSL_IE_UplinkMeas ul_meas := {
+		len := 3,
+		rfu := '0'B,
+		dtx_d := l1p.dtx_enabled,
+		rxlev_f_u := ?,
+		reserved1 := '00'B,
+		rxlev_s_u := ?,
+		reserved2 := '00'B,
+		rxq_f_u := ?,
+		rxq_s_u := ?,
+		supp_meas_info := omit
+	};
+	if (l1p.toa256_enabled) {
+		ul_meas.len := (3+8);
+		ul_meas.supp_meas_info := {
+			toa256_mean := f_tolerance(l1p.timing_offset_256syms, -63*256, 192*256, mp_tolerance_timing_offset_256syms),
+			toa256_min := ?,
+			toa256_max := ?,
+			toa256_std_dev := ?
+		}
+	}
+	var template RSL_IE_BS_Power bs_power := {
+		reserved := 0,
+		epc := false,
+		fpc := false,
+		power_level := l1p.bs_power_level
+	};
+
+	return tr_RSL_MEAS_RES_EMPTY(g_chan_nr, g_next_meas_res_nr, ul_meas, bs_power);
+}
+
 /* verify we regularly receive measurement reports with incrementing numbers */
 altstep as_meas_res(boolean verify_meas := true) runs on ConnHdlr {
 	var RSL_Message rsl;
 	[not verify_meas] RSL.receive(tr_RSL_MEAS_RES(?)) { repeat; }
+
+	/* Receive osmocom specific measurement reports. This is the normal
+	 * case. Here we verify that the measurement reports we sent are
+	 * comming back as we expect them. */
 	[] RSL.receive(f_build_meas_res_tmpl()) -> value rsl {
 		/* increment counter of next to-be-expected meas rep */
 		g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
@@ -1741,9 +1780,29 @@
 		f_timer_safe_restart(g_Tmeas_exp);
 		repeat;
 		}
+
+	/* When the BTS has established the channel, the MS might need slightly
+	 * more time to establish the channel and actually start sending. The
+	 * result is then a measurement report that just lacks the measurement
+	 * information of the MS. This is normal and we tolerate this behavior. */
+	[] RSL.receive(f_build_meas_res_tmpl_empty()) -> value rsl {
+		/* increment counter of next to-be-expected meas rep */
+		g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
+		/* Re-start the timer expecting the next MEAS RES */
+		f_timer_safe_restart(g_Tmeas_exp);
+		repeat;
+		}
+
+	/* Due to the TDMA nature of GSM, TRXCON implements a way to emit dummy
+	 * measurements if the TTCN3 side does not supply measurement input in
+	 * time. In those cases TRXCON will either use a cached measurement
+	 * report or a hardcoded one. If TRXCON picks the hardcoded measurement
+	 * report the templates above will not match. We tolerate this
+	 * behavior, but only once. */
 	[] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl {
 		/* increment counter of next to-be-expected meas rep */
 		g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
+
 		if (g_first_meas_res) {
 			g_first_meas_res := false;
 			repeat;
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index d982e02..f905973 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1363,6 +1363,22 @@
 		}
 	}
 
+	/* Receive template for a measurement report that lacks the measurement report
+	 * from the MS (l1_info, l3_info and ms timing offset */
+	template RSL_Message tr_RSL_MEAS_RES_EMPTY(template RslChannelNr chan_nr,
+					     template uint8_t meas_res_nr := ?,
+					     template RSL_IE_UplinkMeas ul_meas := ?,
+					     template RSL_IE_BS_Power bs_power := ?) := {
+		msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
+		msg_type := RSL_MT_MEAS_RES,
+		ies := {
+			tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+			tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}),
+			tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}),
+			tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power})
+		}
+	}
+
 	/* Osmocom specific template, require lots of optional fields to be present */
 	template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr,
 					     template uint8_t meas_res_nr := ?,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16649
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: Ib2f511991349ab15e02db9c5e45f0df3645835a4
Gerrit-Change-Number: 16649
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191218/d8ad4fff/attachment.htm>


More information about the gerrit-log mailing list