fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41935?usp=email )
Change subject: bts: move as_rsl_meas_res() params to ConnHdlrPars ......................................................................
bts: move as_rsl_meas_res() params to ConnHdlrPars
This is where all other ConnHdlr parameters live.
Change-Id: Iceb58bb636817afcd0fdf1eb3344d03153860a56 Related: OS#6933 --- M bts/BTS_Tests.ttcn 1 file changed, 14 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/41935/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 217e590..3a24d48 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -218,8 +218,6 @@ timer g_Tmeas_exp := 2.0; /* >= 103 SACCH multiframe ~ 500ms */
var ConnHdlrPars g_pars; - var uint8_t g_next_meas_res_nr := 0; - var boolean g_first_meas_res := true;
/* PCU Interface of BTS */ port PCUIF_CODEC_PT PCU; @@ -327,6 +325,10 @@ RSL_IE_EncryptionInfo encr optional, BtsBand bts0_band optional,
+ /* RSL MEASurement RESult params for as_rsl_meas_res() */ + uint8_t rsl_meas_res_nr, + boolean rsl_meas_res_first, + /* Training Sequence Code */ GsmTsc tsc, /* Frequency hopping parameters */ @@ -919,6 +921,8 @@ spec := spec, encr := omit, bts0_band := omit, + rsl_meas_res_nr := 0, + rsl_meas_res_first := true, tsc := mp_tsc_def, fhp := { enabled := false, @@ -2330,7 +2334,7 @@ }; var uint8_t offs := toffs256s_to_rsl(l1p.timing_offset_256syms); var template uint8_t t_toffs := f_tolerance(offs, 0, 255, mp_tolerance_timing_offset_256syms/256); - return tr_RSL_MEAS_RES_OSMO(g_chan_nr, g_next_meas_res_nr, ul_meas, bs_power, l1_info, + return tr_RSL_MEAS_RES_OSMO(g_chan_nr, g_pars.rsl_meas_res_nr, ul_meas, bs_power, l1_info, ?, t_toffs); }
@@ -2366,7 +2370,7 @@ power_level := l1p.bs_power_level };
- return tr_RSL_MEAS_RES_EMPTY(g_chan_nr, g_next_meas_res_nr, ul_meas, bs_power); + return tr_RSL_MEAS_RES_EMPTY(g_chan_nr, g_pars.rsl_meas_res_nr, ul_meas, bs_power); }
/* verify we regularly receive measurement reports on RSL with incrementing numbers */ @@ -2381,7 +2385,7 @@ * 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; + g_pars.rsl_meas_res_nr := (g_pars.rsl_meas_res_nr + 1) mod 256; /* Re-start the timer expecting the next MEAS RES */ f_timer_safe_restart(g_Tmeas_exp);
@@ -2401,7 +2405,7 @@ * information of the MS. This is normal and we tolerate this behavior. */ [chan_est == false] 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; + g_pars.rsl_meas_res_nr := (g_pars.rsl_meas_res_nr + 1) mod 256; /* Re-start the timer expecting the next MEAS RES */ f_timer_safe_restart(g_Tmeas_exp); repeat; @@ -2413,11 +2417,11 @@ * 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. */ - [chan_est == false] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl { + [chan_est == false] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_pars.rsl_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; + g_pars.rsl_meas_res_nr := (g_pars.rsl_meas_res_nr + 1) mod 256; + if (g_pars.rsl_meas_res_first) { + g_pars.rsl_meas_res_first := false; repeat; } else { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Received unspecific MEAS RES ", rsl)); @@ -2572,8 +2576,6 @@ amr_start_codec := amr_start_codec, amr_codecs_bitmask := amr_codecs_bitmask)); } - - g_first_meas_res := true; }
private function get_start_amr_ft() runs on ConnHdlr return integer {