bts: Add TC_ipa_dlcx_not_active()
Change-Id: I5c8eec8ba56b35aa8d7df87649389392ffd1a78c
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ed37428..92fde03 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -999,6 +999,29 @@
f_exp_err_rep(RSL_ERR_IE_CONTENT);
}
+/* Send IPA DLCX to inactive lchan */
+function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
+ timer T := 3.0;
+ RSL.send(ts_RSL_IPA_DLCX(g_chan_nr));
+ T.start;
+ alt {
+ [] RSL.receive(tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?)) {
+ setverdict(pass);
+ }
+ [] RSL.receive(tr_RSL_IPA_DLCX_NACK(g_chan_nr, ?)) {
+ setverdict(fail);
+ }
+ [] T.timeout {
+ setverdict(fail, "Timeout expecting RF_CHAN_REL_ACK");
+ }
+ }
+}
+testcase TC_ipa_dlcx_not_active() runs on test_CT {
+ var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN));
+ f_init(testcasename());
+ var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_dlcx_not_active), pars);
+ vc_conn.done;
+}
/* TODO Areas:
@@ -1050,6 +1073,7 @@
execute( TC_rsl_protocol_error() );
execute( TC_rsl_mand_ie_error() );
execute( TC_rsl_ie_content_error() );
+ execute( TC_ipa_dlcx_not_active() );
}
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index ba467c6..79f5920 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1409,6 +1409,15 @@
}
}
+ template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr,
+ template (omit) uint16_t ipa_conn_id := omit) := {
+ msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+ msg_type := RSL_MT_IPAC_DLCX,
+ ies := {
+ t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr})
+ /* FIXME: optional conn_id */
+ }
+ }
template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr,
template uint16_t ipa_conn_id := omit) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
@@ -1430,6 +1439,19 @@
t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats})
}
}
+ template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr,
+ template uint16_t ipa_conn_id,
+ template RSL_IE_IPA_ConnectionStats stats) := {
+ msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+ msg_type := RSL_MT_IPAC_DLCX_ACK,
+ ies := {
+ tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+ tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}),
+ tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats})
+ }
+ }
+
+
template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause,
template uint16_t ipa_conn_id) := {
@@ -1442,6 +1464,18 @@
t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)})
}
}
+ template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr,
+ template RSL_Cause cause) := {
+ msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+ msg_type := RSL_MT_IPAC_DLCX_NACK,
+ ies := {
+ tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+ /* optional connection ID */
+ *,
+ tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)})
+ }
+ }
+
template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),