aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-07 05:21:50 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-09-07 06:12:51 +0200
commit1220a24ebda6786f6939e2ce8dae485719a276a7 (patch)
treeadca3ed70c92bc64be13d91638dca8302ca871e1
parent9843b669526136d8b66091b085b89a044b73cbb7 (diff)
RAW_NS: implement f_outgoing_ns_reset
-> RESET <- RESET ACK Change-Id: I1a50615de4650266ca99216f8e4a18202678d669
-rw-r--r--pcu/RAW_NS.ttcn16
1 files changed, 16 insertions, 0 deletions
diff --git a/pcu/RAW_NS.ttcn b/pcu/RAW_NS.ttcn
index c04a3e20..15a02260 100644
--- a/pcu/RAW_NS.ttcn
+++ b/pcu/RAW_NS.ttcn
@@ -105,6 +105,22 @@ function f_outgoing_ns_alive_no_ack(integer idx := 0, float tout := 10.0) runs o
}
}
+function f_outgoing_ns_reset(integer idx := 0, float tout := 10.0) runs on RAW_NS_CT {
+ timer T := tout;
+ var template PDU_NS reset := ts_NS_RESET(NS_CAUSE_EQUIPMENT_FAILURE, g_nsconfig[idx].nsvci, g_nsconfig[idx].nsei)
+ NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], reset));
+ T.start;
+ alt {
+ [] NSCP[idx].receive(t_NS_RecvFrom(ts_NS_RESET_ACK(g_nsconfig[idx].nsvci, g_nsconfig[idx].nsei))) {
+ setverdict(pass);
+ }
+ [] NSCP[idx].receive { repeat; }
+ [] T.timeout {
+ setverdict(fail, "Failed to receive a RESET ACK");
+ }
+ }
+}
+
/* perform outbound NS-BLOCK procedure */
function f_outgoing_ns_block(NsCause cause, integer idx := 0) runs on RAW_NS_CT {
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_BLOCK(cause, g_nsconfig[idx].nsvci)));