summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-10-04 06:18:59 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-10-04 06:18:59 +0700
commitad131c874a4e1a315e1993dd2bd1db2ae70c81f8 (patch)
treef8cae079758dd35061c825d671a5959e9d7e4366
parent0aad596264b85e7a51b8ef62b05334b3cfdb0f3a (diff)
BTS_Tests.ttcn: share as_rsl_sacch_ind() and as_rsl_any_ind()
-rw-r--r--bts/BTS_Tests.ttcn31
1 files changed, 19 insertions, 12 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 162bfe6..c95f48a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3728,6 +3728,23 @@ function f_unitdata_mt(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
}
}
+/* Expect (or not expect) SACCH messages (Measurement Reports) */
+private altstep as_rsl_sacch_ind(boolean exp_sacch) runs on ConnHdlr {
+ [exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }
+ [not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {
+ setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");
+ mtc.stop;
+ }
+}
+/* Expect (or not expect) other kinds of messages */
+private altstep as_rsl_any_ind(boolean exp_any) runs on ConnHdlr {
+ [exp_any] RSL.receive { repeat; }
+ [not exp_any] RSL.receive {
+ setverdict(fail, "Unexpected RSL message!");
+ mtc.stop;
+ }
+}
+
/* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */
function f_unitdata_mo(
RslLinkId link_id,
@@ -3743,18 +3760,8 @@ function f_unitdata_mo(
[] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3)) {
setverdict(pass);
}
- /* Expect (or not expect) SACCH messages (Measurement Reports) */
- [exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }
- [not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {
- setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");
- mtc.stop;
- }
- /* Expect (or not expect) other kinds of messages */
- [exp_any] RSL.receive { repeat; }
- [not exp_any] RSL.receive {
- setverdict(fail, "Unexpected RSL message!");
- mtc.stop;
- }
+ [] as_rsl_sacch_ind(exp_sacch);
+ [] as_rsl_any_ind(exp_any);
[] T.timeout {
setverdict(fail, "Timeout waiting for UNIT_DATA_IND");
mtc.stop;