RSLEM: add f_rslem_auto_chan_act_ack(boolean)
Allow to switch off automatic Channel Activation ACK via a new port
signature.
Required for upcoming BSC_Tests.TC_lost_sdcch_during_assignment().
Related: SYS#5627
Change-Id: I9a9d191aa66ec27f4f80c2baa2c5aa3c7b668d66
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 31647df..30adfba 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -98,11 +98,13 @@
signature RSLEM_suspend(boolean suspend);
signature RSLEM_wait_queue(boolean enable);
signature RSLEM_get_last_act(in uint8_t trx_nr, in RslChannelNr chan_nr, out RSL_Message chan_act);
+signature RSLEM_set_auto_chan_act_ack(boolean enable);
type port RSLEM_PROC_PT procedure {
inout RSLEM_register, RSLEM_unregister,
RSLEM_suspend, RSLEM_wait_queue,
- RSLEM_get_last_act;
+ RSLEM_get_last_act,
+ RSLEM_set_auto_chan_act_ack;
} with { extension "internal" };
/***********************************************************************
@@ -491,6 +493,7 @@
* in a queue. These messages will remain in the queue until the appropriate
* connection handler is registered. */
var boolean wait_queue_enabled := false;
+ var boolean auto_chan_act_ack := true;
f_conn_table_init();
f_trx_conn_map_init();
@@ -594,12 +597,17 @@
CCHAN_PT.send(rx_rsl);
}
- /* blindly acknowledge all channel activations */
+ /* Channel Activation: store in LastActTable, possibly ACK. */
[bts_role] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV), sid := ?)) -> value rx_rsl {
chan_nr := rx_rsl.rsl.ies[0].body.chan_nr;
trx_nr := f_trx_by_streamId(rx_rsl.streamId);
f_store_last_act_data(trx_nr, chan_nr, rx_rsl.rsl);
- IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_CHAN_ACT_ACK(chan_nr, 23), rx_rsl.streamId));
+ if (auto_chan_act_ack) {
+ /* blindly acknowledge all channel activations */
+ IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_CHAN_ACT_ACK(chan_nr, 23), rx_rsl.streamId));
+ } else {
+ CLIENT_PT.send(rx_rsl);
+ }
}
[not dchan_suspended] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeDR(?), sid := ?)) -> value rx_rsl {
@@ -706,6 +714,10 @@
var RSL_Message last_chan_act := f_lookup_last_act(trx_nr, chan_nr);
RSL_PROC.reply(RSLEM_get_last_act:{trx_nr, chan_nr, last_chan_act}) to vc_conn;
}
+
+ [] RSL_PROC.getcall(RSLEM_set_auto_chan_act_ack:{?}) -> param(auto_chan_act_ack) sender vc_conn {
+ RSL_PROC.reply(RSLEM_set_auto_chan_act_ack:{auto_chan_act_ack}) to vc_conn;
+ }
}
}
}
@@ -800,7 +812,11 @@
return chan_act;
}
-
-
+function f_rslem_set_auto_chan_act_ack(RSLEM_PROC_PT PT, boolean enable)
+runs on RSL_DchanHdlr {
+ PT.call(RSLEM_set_auto_chan_act_ack:{enable}) {
+ [] PT.getreply(RSLEM_set_auto_chan_act_ack:{enable}) {};
+ }
+}
}