RAW_NS: rework NS connection to use NS_Provider

Previous RAW_NS only supported NS over UDP because
it handled the UDP connection on it's own.
Because of this there was no cleanup function for the tests
because no virtual component were started.
Using the new NS_Provider allows to use the same tests over
UDP and FR with no changes.

Change-Id: I8a3b6c72798a75f434f54229fdbfc802cd13967e
diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index e782b6e..9cf37b5 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -15,12 +15,9 @@
 import from PCU_Tests all;
 import from SGSN_Components all;
 import from Osmocom_Gb_Types all;
-import from NS_CodecPort all;
 import from NS_Types all;
 import from BSSGP_Types all;
 import from UD_Types all;
-import from NS_CodecPort all;
-import from NS_CodecPort_CtrlFunct all;
 import from NS_Emulation all;
 import from Native_Functions all;
 import from IPL4asp_Types all;
@@ -70,7 +67,7 @@
 	timer T := tout;
 	T.start;
 	alt {
-	[] NSCP[idx].receive(t_NS_RecvFrom(ns)) {
+	[] NSCP[idx].receive(ns) {
 		setverdict(fail, "NS-ALIVE from unconfigured (possibly initial) endpoint");
 		}
 	[] T.timeout {
@@ -88,6 +85,7 @@
 	/* Expect inbound NS-RESET procedure */
 	as_rx_ns_reset_ack(oneshot := true);
 	setverdict(pass);
+	f_clean_ns_codec();
 }
 
 /* ensure NS-RESET are re-transmitted */
@@ -97,13 +95,14 @@
 
 	var integer i;
 	for (i := 0; i < 3; i := i+1) {
-		NSCP[0].receive(t_NS_RecvFrom(tr_NS_RESET(NS_CAUSE_OM_INTERVENTION,
-							g_nsconfig[0].nsvc[0].nsvci, g_nsconfig[0].nsei)));
+		NSCP[0].receive(tr_NS_RESET(NS_CAUSE_OM_INTERVENTION,
+					    g_nsconfig.nsvc[0].nsvci, g_nsconfig.nsei));
 	}
 
 	/* Expect inbound NS-RESET procedure */
 	as_rx_ns_reset_ack(oneshot := true);
 	setverdict(pass);
+	f_clean_ns_codec();
 }
 
 /* test the inbound NS-ALIVE procedure after NS-RESET */
@@ -116,9 +115,10 @@
 
 	alt {
 	/* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
-	[] NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE)) { setverdict(pass); };
-	[] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
+	[] NSCP[0].receive(t_NS_ALIVE) { setverdict(pass); };
+	[] NSCP[0].receive(t_NS_UNBLOCK) { repeat; }
 	}
+	f_clean_ns_codec();
 }
 
 /* Test for NS-RESET after NS-ALIVE timeout */
@@ -132,15 +132,17 @@
 	/* wait for at least one NS-ALIVE */
 	alt {
 	[] as_rx_alive_tx_ack(oneshot := true) { };
-	[] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
+	[] NSCP[0].receive(t_NS_UNBLOCK) { repeat; }
 	}
 
 	/* wait for NS-RESET to re-appear, ignoring any NS-ALIVE until then */
 	alt {
 	[] as_rx_ns_reset_ack(oneshot := true) { setverdict(pass); }
-	[] NSCP[0].receive(t_NS_RecvFrom(t_NS_ALIVE)) { repeat; }
-	[] NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK)) { repeat; }
+	[] NSCP[0].receive(t_NS_ALIVE) { repeat; }
+	[] NSCP[0].receive(t_NS_UNBLOCK) { repeat; }
 	}
+
+	f_clean_ns_codec();
 }
 
 /* test for NS-RESET/NS-ALIVE/NS-UNBLOCK */
@@ -156,6 +158,7 @@
 
 	as_rx_ns_unblock_ack(oneshot := true);
 	setverdict(pass);
+	f_clean_ns_codec();
 }
 
 /* test for NS-UNBLOCK re-transmissions */
@@ -170,11 +173,12 @@
 	activate(as_rx_alive_tx_ack());
 
 	/* wait for first NS-UNBLOCK, don't respond */
-	NSCP[0].receive(t_NS_RecvFrom(t_NS_UNBLOCK));
+	NSCP[0].receive(t_NS_UNBLOCK);
 
 	/* wait for re-transmission of NS-UNBLOCK */
 	as_rx_ns_unblock_ack(oneshot := true);
 	setverdict(pass);
+	f_clean_ns_codec();
 }
 
 /* full bring-up of the Gb link for NS and BSSGP layer up to BVC-FC */
@@ -205,6 +209,7 @@
 	as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvc[0].bvci, oneshot := true);
 	activate(as_rx_bvc_fc_tx_ack(mp_gb_cfg.bvc[0].bvci));
 	setverdict(pass);
+	f_clean_ns_codec();
 }
 
 /* test outbound (SGSN-originated) NS-BLOCK procedure */
@@ -224,6 +229,7 @@
 
 	f_outgoing_ns_block(NS_CAUSE_EQUIPMENT_FAILURE);
 	setverdict(pass);
+	f_clean_ns_codec();
 }