PCU: Move SNS specific functions to PCU_Tests_RAW_SNS.ttcn
Change-Id: Ie41a21b6f2b95f4aaea84d8b717e96efefb704e3
RelateD: OS#3372
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index eb06088..3640b01 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -96,41 +96,6 @@
return nrf.msg;
}
-/* perform inbound SNS-SIZE procedure */
-function f_incoming_sns_size(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
- var PDU_NS rx;
- /* expect one single SNS-SIZE with RESET flag; one remote v4 EP; no v6 EP */
- rx := f_ns_exp(tr_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := ?,
- num_v4 := 1, num_v6 := omit));
- NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_SIZE_ACK(mp_nsconfig.nsei, cause)));
-}
-
-/* perform outbound SNS-SIZE procedure */
-function f_outgoing_sns_size(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
- var PDU_NS rx;
- NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := 1,
- num_v4 := 1, num_v6 := omit)
- ));
- /* expect one single SNS-SIZE with RESET flag; one remote v4 EP; no v6 EP */
- rx := f_ns_exp(tr_SNS_SIZE_ACK(mp_nsconfig.nsei, cause));
-}
-
-/* perform inbound SNS-CONFIG procedure */
-function f_incoming_sns_config(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
- var PDU_NS rx;
- rx := f_ns_exp(tr_SNS_CONFIG(mp_nsconfig.nsei, end_flag := true, v4 := ?));
- NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_CONFIG_ACK(mp_nsconfig.nsei, cause)));
-}
-
-/* perform outbound SNS-CONFIG procedure */
-function f_outgoing_sns_config(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
- var PDU_NS rx;
- var template (omit) IP4_Elements v4 := { ts_SNS_IPv4(mp_nsconfig.local_ip,
- mp_nsconfig.local_udp_port) }
- NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_CONFIG(mp_nsconfig.nsei, true, v4)));
- rx := f_ns_exp(tr_SNS_CONFIG_ACK(mp_nsconfig.nsei, cause));
-}
-
/* perform outbound NS-ALIVE procedure */
function f_outgoing_ns_alive() runs on RAW_NS_CT {
NSCP.send(t_NS_Send(g_ns_conn_id, t_NS_ALIVE));
diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn
index fa906a8..a306fe4 100644
--- a/pcu/PCU_Tests_RAW_SNS.ttcn
+++ b/pcu/PCU_Tests_RAW_SNS.ttcn
@@ -3,11 +3,49 @@
import from Osmocom_Types all;
import from PCU_Tests all;
import from PCU_Tests_RAW all;
+import from Osmocom_Gb_Types all;
+import from NS_CodecPort all;
+import from NS_Types all;
/**********************************************************************************
* Modern Gb/IP bring-up test cases using IP Sub-Network Service (SNS)
**********************************************************************************/
+/* perform inbound SNS-SIZE procedure */
+function f_incoming_sns_size(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
+ var PDU_NS rx;
+ /* expect one single SNS-SIZE with RESET flag; one remote v4 EP; no v6 EP */
+ rx := f_ns_exp(tr_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := ?,
+ num_v4 := 1, num_v6 := omit));
+ NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_SIZE_ACK(mp_nsconfig.nsei, cause)));
+}
+
+/* perform outbound SNS-SIZE procedure */
+function f_outgoing_sns_size(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
+ var PDU_NS rx;
+ NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := 1,
+ num_v4 := 1, num_v6 := omit)
+ ));
+ /* expect one single SNS-SIZE with RESET flag; one remote v4 EP; no v6 EP */
+ rx := f_ns_exp(tr_SNS_SIZE_ACK(mp_nsconfig.nsei, cause));
+}
+
+/* perform inbound SNS-CONFIG procedure */
+function f_incoming_sns_config(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
+ var PDU_NS rx;
+ rx := f_ns_exp(tr_SNS_CONFIG(mp_nsconfig.nsei, end_flag := true, v4 := ?));
+ NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_CONFIG_ACK(mp_nsconfig.nsei, cause)));
+}
+
+/* perform outbound SNS-CONFIG procedure */
+function f_outgoing_sns_config(template (omit) NsCause cause := omit) runs on RAW_NS_CT {
+ var PDU_NS rx;
+ var template (omit) IP4_Elements v4 := { ts_SNS_IPv4(mp_nsconfig.local_ip,
+ mp_nsconfig.local_udp_port) }
+ NSCP.send(t_NS_Send(g_ns_conn_id, ts_SNS_CONFIG(mp_nsconfig.nsei, true, v4)));
+ rx := f_ns_exp(tr_SNS_CONFIG_ACK(mp_nsconfig.nsei, cause));
+}
+
/* PCU-originated SNS-SIZE: successful case */
testcase TC_sns_po_size_success() runs on RAW_NS_CT {
f_init_ns_codec();