aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-30 11:56:38 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-02 18:19:05 +0200
commitb1726c90dc7341c0132f5f4ab28f378c802425fc (patch)
tree49264742db6996eb2cc9d48c40e0f8ac2068ba36
parent98eb1bf6d29c159f9127c97996c76aa852f7e100 (diff)
bts: new f_rsl_transceive_ret(): like f_rsl_transceive() with return value
-rw-r--r--bts/BTS_Tests.ttcn17
1 files changed, 13 insertions, 4 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ecb54973..b68e99b3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -393,14 +393,15 @@ runs on ConnHdlr {
fn.apply(id);
}
-function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id,
- boolean ignore_other := false)
-runs on ConnHdlr {
+function f_rsl_transceive_ret(template RSL_Message tx, template RSL_Message exp_rx, charstring id,
+ boolean ignore_other := false)
+runs on ConnHdlr return RSL_Message {
+ var RSL_Message rx;
timer T := 3.0;
RSL.send(tx);
T.start;
alt {
- [] RSL.receive(exp_rx) {
+ [] RSL.receive(exp_rx) -> value rx {
T.stop;
setverdict(pass);
}
@@ -413,9 +414,17 @@ runs on ConnHdlr {
[not ignore_other] as_l1_dcch();
[not ignore_other] RSL.receive {
setverdict(fail, "Unexpected RSL message received");
+ self.stop;
}
[ignore_other] RSL.receive { repeat; }
}
+ return rx;
+}
+
+function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id,
+ boolean ignore_other := false)
+runs on ConnHdlr {
+ var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other);
}
function f_rsl_chan_act(RSL_IE_ChannelMode mode) runs on ConnHdlr {