diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-30 11:56:38 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-02 18:19:05 +0200 |
commit | b1726c90dc7341c0132f5f4ab28f378c802425fc (patch) | |
tree | 49264742db6996eb2cc9d48c40e0f8ac2068ba36 | |
parent | 98eb1bf6d29c159f9127c97996c76aa852f7e100 (diff) |
bts: new f_rsl_transceive_ret(): like f_rsl_transceive() with return value
Change-Id: I0cdc6b87566b9d101ecb12a77eac18a50689e088
-rw-r--r-- | bts/BTS_Tests.ttcn | 17 |
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 { |