bts: Add parameter to set and expect a specific MS power level

This change uses recently added ts_L1CTL_DATA_REQ_SACCH to be able to
set the L1 Header parameters to match the expected MS power level
announced by the BTS.

Change-Id: Iedab8681a0ba4652a6bb1c001418599a4ff746b6
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bb4c3da..b5bcc5b 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -57,6 +57,7 @@
 	integer mp_tolerance_rxlev := 3;
 	integer mp_tolerance_timing_offset_256syms := 0;
 	integer mp_rxlev_exp := 57;
+	integer mp_ms_power_level_exp := 7;
 	integer mp_ms_actual_ta_exp := 0;
 	integer mp_timing_offset_256syms_exp := 512;
 }
@@ -167,7 +168,7 @@
 
 template (value) CellSelectionParameters ts_CellSelPar_default := {
 	cell_resel_hyst_2dB := 2,
-	ms_txpwr_max_cch := 7,
+	ms_txpwr_max_cch := mp_ms_power_level_exp,
 	acs := '0'B,
 	neci := true,
 	rxlev_access_min := 0
@@ -526,7 +527,7 @@
 		},
 		timing_offset_256syms := mp_timing_offset_256syms_exp,
 		bs_power_level := 0,
-		ms_power_level := 0,
+		ms_power_level := mp_ms_power_level_exp,
 		ms_actual_ta := mp_ms_actual_ta_exp
 	},
 	spec := omit,
@@ -1163,9 +1164,13 @@
 		var GsmRrL3Message meas_rep := valueof(ts_MEAS_REP(true, 23, 23, 0, 0, omit));
 		var LapdmFrameAB lb := valueof(ts_LAPDm_AB(0, false, false, enc_GsmRrL3Message(meas_rep)));
 		log("LAPDm: ", lb);
-		var octetstring pl := '0000'O & enc_LapdmFrameAB(lb);
-		L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0),
-			f_pad_oct(pl, 23, '2B'O)));
+
+		var L1ctlDataReq data_req := {
+			l1header := valueof(ts_SacchL1Header(g_pars.l1_pars.ms_power_level, false, g_pars.l1_pars.ms_actual_ta)),
+			l2_payload := f_pad_oct(enc_LapdmFrameAB(lb), 21, '2B'O)
+		}
+		log("Sending Measurement Report: ", data_req);
+		L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, ts_RslLinkID_SACCH(0), data_req));
 		repeat;
 		}
 }