Change in osmo-ttcn3-hacks[master]: RAW_NS: implement f_outgoing_ns_reset

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Mon Sep 7 04:13:05 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20007 )


Change subject: RAW_NS: implement f_outgoing_ns_reset
......................................................................

RAW_NS: implement f_outgoing_ns_reset

-> RESET
<- RESET ACK

Change-Id: I1a50615de4650266ca99216f8e4a18202678d669
---
M pcu/RAW_NS.ttcn
1 file changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/20007/1

diff --git a/pcu/RAW_NS.ttcn b/pcu/RAW_NS.ttcn
index c04a3e2..15a0226 100644
--- a/pcu/RAW_NS.ttcn
+++ b/pcu/RAW_NS.ttcn
@@ -105,6 +105,22 @@
 	}
 }
 
+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)));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20007
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1a50615de4650266ca99216f8e4a18202678d669
Gerrit-Change-Number: 20007
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200907/46b94840/attachment.htm>


More information about the gerrit-log mailing list