fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42011?usp=email )
Change subject: bts: as_rsl_meas_res(): move chan_est to ConnHdlr ......................................................................
bts: as_rsl_meas_res(): move chan_est to ConnHdlr
Altstep local variables are reset when another altstep, executed among with as_rsl_meas_res(), repeats. Move the chan_est variable to ConnHdlr, so that it does not get reset.
Change-Id: I3a31532494e123935fb2aede0e67e4271962ab5f Related: OS#6933 --- M bts/BTS_Tests.ttcn 1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/42011/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 940b409..836b033 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -222,6 +222,7 @@ /* RSL MEASurement RESult params for as_rsl_meas_res() */ var uint8_t g_rsl_meas_res_nr := 0; var boolean g_rsl_meas_res_first := true; + var boolean g_rsl_meas_res_chan_est := false;
/* PCU Interface of BTS */ port PCUIF_CODEC_PT PCU; @@ -2380,7 +2381,6 @@ /* verify we regularly receive measurement reports on RSL with incrementing numbers */ private altstep as_rsl_meas_res(boolean verify_meas := true) runs on ConnHdlr { var RSL_Message rsl; - var boolean chan_est := false;
[not verify_meas] RSL.receive(tr_RSL_MEAS_RES(?)) { repeat; }
@@ -2398,7 +2398,7 @@ * the "our" measurement report the first time, the channel * is established and empty or hardcoded TRXCON reports must * not occur anymore. */ - chan_est := true; + g_rsl_meas_res_chan_est := true;
repeat; } @@ -2407,7 +2407,7 @@ * 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. */ - [chan_est == false] RSL.receive(f_build_meas_res_tmpl_empty()) -> value rsl { + [not g_rsl_meas_res_chan_est] RSL.receive(f_build_meas_res_tmpl_empty()) -> value rsl { /* increment counter of next to-be-expected meas rep */ g_rsl_meas_res_nr := (g_rsl_meas_res_nr + 1) mod 256; /* Re-start the timer expecting the next MEAS RES */ @@ -2421,7 +2421,7 @@ * 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_rsl_meas_res_nr)) -> value rsl { + [not g_rsl_meas_res_chan_est] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_rsl_meas_res_nr)) -> value rsl { /* increment counter of next to-be-expected meas rep */ g_rsl_meas_res_nr := (g_rsl_meas_res_nr + 1) mod 256; if (g_rsl_meas_res_first) { @@ -2582,6 +2582,7 @@ }
g_rsl_meas_res_first := true; + g_rsl_meas_res_chan_est := false; }
private function get_start_amr_ft() runs on ConnHdlr return integer {