Commit 9e231b13 authored by mullers's avatar mullers
Browse files

Ipv4 port and Ipv4TestNode added

parent 5bb34067
Loading
Loading
Loading
Loading
+57 −2
Changes for ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration.ttcn: 57 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -437,6 +437,37 @@


	}//end cfMob03
	}//end cfMob03


	group cfTrans01 {
	
		/*
		 * @desc Creates configuration according to CF_CORE_01
	 	 * @param p_cfMsg Configuration message for Test Adapter
		*/
		function f_cfTrans01Up(
			out Ipv4CfMessage 	p_ipv4CfMsg,
			out CfMessage 		p_cfMsg
		)
		runs on Ipv4Node {
			//Variables
			var FncRetCode v_ret := e_success;
			//Map
			if (PX_MAC_LAYER == e_eth) {
				map(self:ipv4Port, system:ethernetPort) ;
				map(self:cfPort, system:cfTaPort) ;
				connect(self:syncPort, self:syncSendPort) ;
			}
			else {
				log("**** f_cfTrans01Up: Error with Pixit PX_MAC_LAYER ****") ;
				v_ret := e_error;
			}
			// create cf msg
			p_ipv4CfMsg := f_createIpv4CfMsg_rt01() ;
			p_cfMsg		:= f_createCfMsg_rt01() ;
			f_setVerdict(v_ret);
		}//end f_cfTrans01Up

	}//end group cfTrans01

	group createParams {
	group createParams {


		/*
		/*
@@ -1374,6 +1405,30 @@
	
	
	}//end group cfDown
	}//end group cfDown


	group ipv4CfDown {
		
		/*
		 * @desc Deletes IPv4 configuration for non-concurrent CFs
		*/
		function f_ipv4CfPtcDown()
		runs on Ipv4Node {
			//Variables
			var FncRetCode v_ret := e_success;
			if (PX_MAC_LAYER == e_eth) {
				unmap(self:ipv4Port, system:ethernetPort) ;
				unmap(self:cfPort, system:cfTaPort) ;
				disconnect(self:syncPort, self:syncSendPort) ;
				log("**** f_ipv4CfPtcDown: Ports unmapped and disconnected ****") ;
			}
			else {
				log("**** f_ipv4CfPtcDown: Error with Pixit PX_MAC_LAYER ****") ;
				v_ret := e_error;
			}
			f_setVerdict(v_ret);
		}//end f_ipv4CfPtcDown
		
	}//end ipv4CfDown
	
	group changeMacAddress{
	group changeMacAddress{


	/*
	/*
@@ -1525,7 +1580,7 @@
			//v_cfMsg.paramsHs03 := f_createParamsHs03(PX_MAC_UCA_RT03_A, false);
			//v_cfMsg.paramsHs03 := f_createParamsHs03(PX_MAC_UCA_RT03_A, false);
			v_cfMsg.paramsRt01 := {
			v_cfMsg.paramsRt01 := {
				useInTa := true,
				useInTa := true,
				gla := PX_IPV4_GLA_RT01_A,
				ipv4Addr := PX_IPV4_GLA_RT01_A,
				macUca := PX_MAC_UCA_RT01_A
				macUca := PX_MAC_UCA_RT01_A
			};
			};
			//v_cfMsg.paramsRt02 := omit;			
			//v_cfMsg.paramsRt02 := omit;			
@@ -1534,7 +1589,7 @@
			//v_cfMsg.paramsMn01 := v_paramsMn01;
			//v_cfMsg.paramsMn01 := v_paramsMn01;
			v_cfMsg.paramsIut  := {
			v_cfMsg.paramsIut  := {
				useInTa := true,
				useInTa := true,
				gla := PX_IPV4_GLA_IUT_1,
				ipv4Addr := PX_IPV4_GLA_IUT_1,
				macUca := PX_MAC_UCA_IUT_1
				macUca := PX_MAC_UCA_IUT_1
			};
			};
			
			
+15 −9
Changes for ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration_TypesAndValues.ttcn: 15 added lines, 9 removed lines.
Original line number Original line Diff line number Diff line
@@ -69,7 +69,9 @@ module AtsIpv6_TestConfiguration_TypesAndValues {
	group cfMsgTypes {
	group cfMsgTypes {


		type port CfPort message {
		type port CfPort message {
			inout CfMessage
			inout
			CfMessage,
			Ipv4CfMessage
		}
		}
	
	
		/*
		/*
@@ -99,6 +101,17 @@ module AtsIpv6_TestConfiguration_TypesAndValues {
		  	encode "ExtFuncCodec"
		  	encode "ExtFuncCodec"
		}
		}


		const UInt16 c_maxNrIpv6Addresses := 10 ; // max nr of IpAddresses that can be used to configure the filter
		const UInt16 c_maxNrNodes := 10 ; // max nr of Nodes that participate in a test scenario

		type record length(1 .. c_maxNrIpv6Address) of Oct6to15 MacAddressList;

		type record length(1 .. c_maxNrNodes) of Ipv6NodeParams Ipv6NodeParamsList;
		
	}//end group cfMsgTypes

	group ipv4CfMsgTypes {
		
		type record Ipv4CfMessage {
		type record Ipv4CfMessage {
			String1To64				role,
			String1To64				role,
			String1to255			netDeviceId,
			String1to255			netDeviceId,
@@ -110,14 +123,7 @@ module AtsIpv6_TestConfiguration_TypesAndValues {
		  	encode "ExtFuncCodec"
		  	encode "ExtFuncCodec"
		}
		}
		
		
		const UInt16 c_maxNrIpv6Addresses := 10 ; // max nr of IpAddresses that can be used to configure the filter
	}//end ipv4CfMsgTypes
		const UInt16 c_maxNrNodes := 10 ; // max nr of Nodes that participate in a test scenario

		type record length(1 .. c_maxNrIpv6Address) of Oct6to15 MacAddressList;

		type record length(1 .. c_maxNrNodes) of Ipv6NodeParams Ipv6NodeParamsList;
		
	}//end group cfMsgTypes 


	type enumerated ConfigId {
	type enumerated ConfigId {
	    e_cf01,
	    e_cf01,
+18
Changes for ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestSystem.ttcn: 18 added lines, 0 removed lines.
Original line number Original line Diff line number Diff line
@@ -94,4 +94,22 @@
		timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT;
		timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT;
	}
	}


	type component Ipv4Node {
		// definitions required for LibIpv6COmp type compatibility
		port Ipv4Port ipv4Port;
		port CfPort cfPort;
		timer tc_ac:= PX_TAC;
		timer tc_noAc:= PX_TNOAC;
		timer tc_wait:= PX_TWAIT;
		timer tc_loop := PX_LOOP ;
		// parts needed for Client,SelfSyncComp type compatibility
		var StringStack v_stateStack:= c_initStringStack;
		port SyncPort syncSendPort;
		port SyncPort syncPort;
		timer tc_sync := PX_TSYNC_TIME_LIMIT;
		timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT;
		var CleanupLevel vc_cleanup := e_cleanGla;
	}


} // end module AtsIpv6_TestSystem
} // end module AtsIpv6_TestSystem
+22 −20
Changes for ttcn3/EtsiAts/AtsIpv6/AtsTransitioning/AtsIpv6_Prototype_Testcases.ttcn: 22 added lines, 20 removed lines.
Original line number Original line Diff line number Diff line
@@ -38,18 +38,19 @@ module AtsIpv6_Protoype_Testcases {
	 * @desc  Sends IPv4 Packet which includes IPv6 Packet
	 * @desc  Sends IPv4 Packet which includes IPv6 Packet
	 *        Uses test configuration 1.
	 *        Uses test configuration 1.
	*/
	*/
	testcase TC_TRANS_IPv4withTunneledIPv6() runs on Ipv6Node system NodeTestAdapter {
	testcase TC_TRANS_IPv4withTunneledIPv6() runs on Ipv4Node system NodeTestAdapter {
		//Variables
		//Variables
		var CfMessage v_cfMsg;
		var Ipv4CfMessage v_ipv4CfMsg;
		var CfMessage v_ipv6cfMsg;
		var FncRetCode v_ret := e_error;
		var FncRetCode v_ret := e_error;


		//Configuration
		//Configuration
		f_cfCore01Up(v_cfMsg);
		f_cfTrans01Up(v_ipv4CfMsg, v_ipv6cfMsg);


		activate(a_tn_nut(v_cfMsg, v_cfMsg.paramsRt01, v_cfMsg.paramsIut));
		//activate(a_tn_nut(v_ipv6cfMsg, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut));


		//Preamble
		//Preamble
		f_PR_tn_nut(v_cfMsg, e_cleanGla, v_cfMsg.paramsRt01, v_cfMsg.paramsIut);
		//f_PR_tn_nut(v_ipv6cfMsg, e_cleanGla, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut);


		// test body
		// test body
		v_ret := f_sendIpv4Packet ( 
		v_ret := f_sendIpv4Packet ( 
@@ -57,8 +58,8 @@ module AtsIpv6_Protoype_Testcases {
				'00000000'O,//TODO configure and set ipv4 address
				'00000000'O,//TODO configure and set ipv4 address
				'00000000'O,
				'00000000'O,
				m_echoRequest_noExtHdr_noData (
				m_echoRequest_noExtHdr_noData (
					v_cfMsg.paramsRt01.gla,
					v_ipv6cfMsg.paramsRt01.gla,
					v_cfMsg.paramsIut.gla,
					v_ipv6cfMsg.paramsIut.gla,
					c_defId,
					c_defId,
					c_defSeqNo
					c_defSeqNo
				)
				)
@@ -68,12 +69,12 @@ module AtsIpv6_Protoype_Testcases {


		tc_ac.start;
		tc_ac.start;
		alt{
		alt{
			[] ipPort.receive(mw_ipv4Packet_tunneledIpv6 (
			[] ipv4Port.receive(mw_ipv4Packet_tunneledIpv6 (
									'00000000'O,//TODO configure and set ipv4 address
									'00000000'O,//TODO configure and set ipv4 address
									'00000000'O,
									'00000000'O,
									mw_echoReply_noExtHdr_noData (
									mw_echoReply_noExtHdr_noData (
										v_cfMsg.paramsIut.gla,
										v_ipv6cfMsg.paramsIut.gla,
										v_cfMsg.paramsRt01.gla,
										v_ipv6cfMsg.paramsRt01.gla,
										c_defId,
										c_defId,
										c_defSeqNo
										c_defSeqNo
									)
									)
@@ -89,11 +90,11 @@ module AtsIpv6_Protoype_Testcases {




		// postamble
		// postamble
		f_PO_tn_nut(v_cfMsg, c_cleanOnlyLla, v_cfMsg.paramsRt01, v_cfMsg.paramsIut);
		//f_PO_tn_nut(v_ipv6cfMsg, c_cleanOnlyLla, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut);


		deactivate;
		deactivate;


		f_cfPtcDown();
		f_ipv4CfPtcDown();


	}//end TC_TRANS_IPv4withTunneledIPv6
	}//end TC_TRANS_IPv4withTunneledIPv6


@@ -101,18 +102,19 @@ module AtsIpv6_Protoype_Testcases {
	 * @desc  Sends IPv4 Packet without IPv6 Packet
	 * @desc  Sends IPv4 Packet without IPv6 Packet
	 *        Uses test configuration 1.
	 *        Uses test configuration 1.
	*/
	*/
	testcase TC_TRANS_PING_IPv4() runs on Ipv6Node system NodeTestAdapter {
	testcase TC_TRANS_PING_IPv4() runs on Ipv4Node system NodeTestAdapter {
		//Variables
		//Variables
		var CfMessage v_cfMsg;
		var Ipv4CfMessage v_ipv4CfMsg;
		var CfMessage v_ipv6cfMsg;
		var FncRetCode v_ret := e_error;
		var FncRetCode v_ret := e_error;


		//Configuration
		//Configuration
		f_cfCore01Up(v_cfMsg);
		f_cfTrans01Up(v_ipv4CfMsg, v_ipv6cfMsg);


		activate(a_tn_nut(v_cfMsg, v_cfMsg.paramsRt01, v_cfMsg.paramsIut));
		//activate(a_tn_nut(v_ipv6cfMsg, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut));


		//Preamble
		//Preamble
		f_PR_tn_nut(v_cfMsg, e_cleanGla, v_cfMsg.paramsRt01, v_cfMsg.paramsIut);
		//f_PR_tn_nut(v_ipv6cfMsg, e_cleanGla, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut);


		// test body
		// test body
		v_ret := f_sendIpv4Packet ( 
		v_ret := f_sendIpv4Packet ( 
@@ -125,7 +127,7 @@ module AtsIpv6_Protoype_Testcases {


		tc_ac.start;
		tc_ac.start;
		alt{
		alt{
			[] ipPort.receive(mw_ipv4EchoReply_noData (
			[] ipv4Port.receive(mw_ipv4EchoReply_noData (
									'00000000'O,//TODO configure and set ipv4 address
									'00000000'O,//TODO configure and set ipv4 address
									'00000000'O )) {
									'00000000'O )) {
				log("**** TC_TRANS_PING_IPv4: Timeout ****");
				log("**** TC_TRANS_PING_IPv4: Timeout ****");
@@ -138,11 +140,11 @@ module AtsIpv6_Protoype_Testcases {
		}//end alt
		}//end alt


		// postamble
		// postamble
		f_PO_tn_nut(v_cfMsg, c_cleanOnlyLla, v_cfMsg.paramsRt01, v_cfMsg.paramsIut);
		//f_PO_tn_nut(v_ipv6cfMsg, c_cleanOnlyLla, v_ipv6cfMsg.paramsRt01, v_ipv6cfMsg.paramsIut);


		deactivate;
		deactivate;


		f_cfPtcDown();
		f_ipv4CfPtcDown();


	}//end TC_TRANS_PING_IPv4
	}//end TC_TRANS_PING_IPv4