Commit a9a79dca authored by juvancic's avatar juvancic
Browse files

modification of functions/parameters due to splited monitor components per protocol

parent d4ef9e7b
Loading
Loading
Loading
Loading
+321 −6
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ module AtsImsIot_TestConfiguration {
    import from LibIot_Functions  { altstep a_receiveIOTVerdict; function f_setConformanceVerdict, f_setE2EVerdict; }
	import from LibIot_TestConfiguration { function f_cf_oracle_up, f_cf_oracle_down; }
	import from LibIot_TestInterface {type IotEquipmentUser;}
	import from AtsImsIot_TestSystem {type ImsInterfaceMonitor, ImsTestCoordinator, CF_INT_CALL, CF_INT_AS, CF_ROAM_AS, CF_EPC_CALL, CF_ATT;}
	import from AtsImsIot_TestSystem {type ImsInterfaceMonitor, SipInterfaceMonitor, DiameterInterfaceMonitor, NaptrInterfaceMonitor, SgiInterfaceMonitor, ImsTestCoordinator, CF_INT_CALL, CF_INT_AS, CF_ROAM_AS, CF_EPC_CALL, CF_ATT, CF_ATT_old;}
	import from LibIot_TestInterface {type InterfaceMonitor;}
	import from AtsImsIot_Templates {
		template	m_generalConfigurationReq_offline, m_generalConfigurationReq_online, m_generalConfigurationReq_merge,
					m_generalConfigurationRsp_success, m_generalConfigurationRsp_error, m_generalConfigurationRsp_timeout,
@@ -138,6 +139,66 @@ module AtsImsIot_TestConfiguration {
				// configure oracle
				f_cf_oracle_up(p_monitor);
			}
						/**
			* @desc 	configures monitor component: connects to the synchronnization
			* 			port, maps to the TSI port and connects to the oracle 
			* @param 	p_monitor	monitor component 
			*/	
			function f_cf_monitor_up_sip(in SipInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				connect(p_monitor:syncPort, self:syncPort);
				connect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				map(p_monitor:sipPort, system:sipPort);
				map(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_up(p_monitor);
			}
			/**
			* @desc 	configures monitor component: connects to the synchronnization
			* 			port, maps to the TSI port and connects to the oracle 
			* @param 	p_monitor	monitor component 
			*/	
			function f_cf_monitor_up_diameter(in DiameterInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				connect(p_monitor:syncPort, self:syncPort);
				connect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				map(p_monitor:diameterPort, system:diameterPort);
				map(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_up(p_monitor);
			}
			/**
			* @desc 	configures monitor component: connects to the synchronnization
			* 			port, maps to the TSI port and connects to the oracle 
			* @param 	p_monitor	monitor component 
			*/	
			function f_cf_monitor_up_naptr(in NaptrInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				connect(p_monitor:syncPort, self:syncPort);
				connect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				map(p_monitor:naptrPort, system:naptrPort);
				map(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_up(p_monitor);
			}
			/**
			* @desc 	configures monitor component: connects to the synchronnization
			* 			port, maps to the TSI port and connects to the oracle 
			* @param 	p_monitor	monitor component 
			*/	
			function f_cf_monitor_up_sgi(in SgiInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				connect(p_monitor:syncPort, self:syncPort);
				connect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				map(p_monitor:sgiPort, system:sgiPort);
				map(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_up(p_monitor);
}
		
			/**
			* @desc 	frees monitor component: disconnects the synchronnization
@@ -154,12 +215,71 @@ module AtsImsIot_TestConfiguration {
				// configure oracle
				f_cf_oracle_down(p_monitor);
			}
	
			/**
			* @desc 	frees monitor component: disconnects the synchronnization
			* 			port, unmaps from the TSI port and disconnects from the oracle 
			* @param 	p_monitor	monitor component 
			*/		
			function f_cf_monitor_down_sip(in SipInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				disconnect(p_monitor:syncPort, self:syncPort);
				disconnect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				unmap(p_monitor:sipPort, system:sipPort);
				unmap(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_down(p_monitor);
			}
			/**
			* @desc 	frees monitor component: disconnects the synchronnization
			* 			port, unmaps from the TSI port and disconnects from the oracle 
			* @param 	p_monitor	monitor component 
			*/		
			function f_cf_monitor_down_diameter(in DiameterInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				disconnect(p_monitor:syncPort, self:syncPort);
				disconnect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				unmap(p_monitor:diameterPort, system:diameterPort);
				unmap(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_down(p_monitor);
			}
			/**
			* @desc 	frees monitor component: disconnects the synchronnization
			* 			port, unmaps from the TSI port and disconnects from the oracle 
			* @param 	p_monitor	monitor component 
			*/		
			function f_cf_monitor_down_naptr(in NaptrInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				disconnect(p_monitor:syncPort, self:syncPort);
				disconnect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				unmap(p_monitor:naptrPort, system:naptrPort);
				unmap(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_down(p_monitor);
			}
			/**
			* @desc 	frees monitor component: disconnects the synchronnization
			* 			port, unmaps from the TSI port and disconnects from the oracle 
			* @param 	p_monitor	monitor component 
			*/		
			function f_cf_monitor_down_sgi(in SgiInterfaceMonitor p_monitor) runs on ImsTestCoordinator {
				// connect sync ports
				disconnect(p_monitor:syncPort, self:syncPort);
				disconnect(p_monitor:icpPort, self:icpPort);
				// mapp TSI port
				unmap(p_monitor:sgiPort, system:sgiPort);
				unmap(p_monitor:acPort, system:acPort);
				// configure oracle
				f_cf_oracle_down(p_monitor);
			}
	}
	
	group adapterConfiguration {
		
		function f_cf_setFilter(in SetFilterReq p_req) runs on ImsInterfaceMonitor {
		function f_cf_setFilter(in SetFilterReq p_req) runs on /*Ims*/InterfaceMonitor {
			var SetFilterRsp v_rsp;
			var template Status v_status := {
				code := e_success,
@@ -202,6 +322,50 @@ module AtsImsIot_TestConfiguration {
				v_monitor.done;				 
				return v_monitor; 
			}
		/**
		* @desc 	creates a monitor component 
		* @param 	p_name	name of the monitor component 
		* @return 			the created monitor component
		*/	
		function f_cf_create_monitor_sip(in charstring p_name) runs on ImsTestCoordinator return SipInterfaceMonitor {
			var SipInterfaceMonitor v_monitor := SipInterfaceMonitor.create(p_name) alive;
			v_monitor.start(f_setInterfaceNameOnComponent(p_name));
			v_monitor.done;				 
			return v_monitor; 
		}
		/**
		* @desc 	creates a monitor component 
		* @param 	p_name	name of the monitor component 
		* @return 			the created monitor component
		*/	
		function f_cf_create_monitor_diameter(in charstring p_name) runs on ImsTestCoordinator return DiameterInterfaceMonitor {
			var DiameterInterfaceMonitor v_monitor := DiameterInterfaceMonitor.create(p_name) alive;
			v_monitor.start(f_setInterfaceNameOnComponent(p_name));
			v_monitor.done;				 
			return v_monitor; 
		}
		/**
		* @desc 	creates a monitor component 
		* @param 	p_name	name of the monitor component 
		* @return 			the created monitor component
		*/	
		function f_cf_create_monitor_naptr(in charstring p_name) runs on ImsTestCoordinator return NaptrInterfaceMonitor {
			var NaptrInterfaceMonitor v_monitor := NaptrInterfaceMonitor.create(p_name) alive;
			v_monitor.start(f_setInterfaceNameOnComponent(p_name));
			v_monitor.done;				 
			return v_monitor; 
		}
		/**
		* @desc 	creates a monitor component 
		* @param 	p_name	name of the monitor component 
		* @return 			the created monitor component
		*/	
		function f_cf_create_monitor_sgi(in charstring p_name) runs on ImsTestCoordinator return SgiInterfaceMonitor {
			var SgiInterfaceMonitor v_monitor := SgiInterfaceMonitor.create(p_name) alive;
			v_monitor.start(f_setInterfaceNameOnComponent(p_name));
			v_monitor.done;				 
			return v_monitor; 
		}
	}
	
	
@@ -1239,7 +1403,7 @@ module AtsImsIot_TestConfiguration {
	
	group g_release15 {
		
        function f_cf_epc_call_rel15_up ( in CF_ATT p_config ) runs on ImsTestCoordinator {
        function f_cf_epc_call_rel15_up_old ( in CF_ATT_old p_config ) runs on ImsTestCoordinator {
            // Initialize the Adapter (including the TrafficCapture process).
            timer tc_configureGuard;
            var StartTrafficCaptureRsp startResult;
@@ -1354,8 +1518,8 @@ module AtsImsIot_TestConfiguration {
            } 
        } // end of function f_cf_epc_call_rel15_up
    
        function f_cf_epc_call_rel15_down(
            inout CF_ATT p_config
        function f_cf_epc_call_rel15_down_old(
            inout CF_ATT_old p_config
        ) runs on ImsTestCoordinator {
            // Stop traffic capture processing.
            timer tc_configureGuard;
@@ -1387,6 +1551,157 @@ module AtsImsIot_TestConfiguration {
            f_cf_monitor_down(p_config.gmB);
        } // end of function f_cf_epc_call_rel15_down
        
		function f_cf_epc_call_rel15_up ( in CF_ATT p_config ) runs on ImsTestCoordinator {
			// Initialize the Adapter (including the TrafficCapture process).
			timer tc_configureGuard;
			var StartTrafficCaptureRsp startResult;
        
			activate(a_receiveIOTVerdict());
        
			tc_configureGuard.start(PX_MAX_MSG_WAIT);
			acPort.send(m_generalConfigurationReq_offline);
			alt {
				[] acPort.receive (m_generalConfigurationRsp_success) {
					log("General configuration succeed.");
					tc_configureGuard.stop;
				}
				[] acPort.receive (m_generalConfigurationRsp_timeout) {
					setverdict(fail);
					tc_configureGuard.stop;
					stop;
				}
				[] acPort.receive (m_generalConfigurationRsp_error) {
					setverdict(fail);
					tc_configureGuard.stop;
					stop;
				}
				[] acPort.receive {
					log("Unknown response.");
					tc_configureGuard.stop;
					setverdict (inconc);
					stop;
				}
				[] tc_configureGuard.timeout {
					log("Timeout.");
					setverdict (inconc);
					stop;
				}
			} 
        
			f_cf_monitor_up_sip(p_config.gmA);
			f_cf_monitor_up_diameter(p_config.rx);
			f_cf_monitor_up_diameter(p_config.s6a);
			f_cf_monitor_up_diameter(p_config.gx);
			f_cf_monitor_up_sip(p_config.mxA);
			f_cf_monitor_up_sip(p_config.mw);
			f_cf_monitor_up_sgi(p_config.sgi);
			if(isvalue(p_config.gmB)) {
				f_cf_monitor_up_sip(p_config.gmB);
			}

			p_config.gmA.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_sip,
					{f_getInterfaceInfo("Gm", PX_PRODUCTS[PX_EUT_A])}
				)
			)));
			p_config.gmA.done;
        
			p_config.rx.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_diameter,
					{f_getInterfaceInfo("Rx", PX_PRODUCTS[PX_EUT_A])}
				)
			)));
			p_config.rx.done;
        
			p_config.mxA.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_sip,
					{f_getInterfaceInfo("Mx", PX_PRODUCTS[PX_EUT_A])}
				)
			)));
			p_config.mxA.done;
        
			p_config.mw.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_sip,
					{f_getInterfaceInfo("Mw", PX_PRODUCTS[PX_EUT_A])}
				)
			)));
			p_config.mw.done;
        
			p_config.sgi.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_sip,
					{f_getInterfaceInfo("Sgi", PX_PRODUCTS[PX_EUT_A])}
				)
			)));
			p_config.sgi.done;

			p_config.gmB.start(f_cf_setFilter(
				valueof (m_SetFilterReq(
					e_sip, 
					{f_getInterfaceInfo("Gm", PX_PRODUCTS[PX_EUT_B])}
				)
			)));
			// Start traffic capture processing.
			tc_configureGuard.start(PX_MAX_MSG_WAIT);
			acPort.send(m_startTrafficCaptureReq);
			alt {
			[] acPort.receive (m_startTrafficCaptureRsp_any) -> value startResult {
				tc_configureGuard.stop;
						if (startResult.status.code != e_success)
						{
							log("**** StartTrafficCaptureReq unsuccessfull! ****");
							setverdict(fail);
							stop;
						}
					}
					[] tc_configureGuard.timeout {
						log("**** StartTrafficCaptureReq not answered. ****");
						setverdict (inconc);
						stop;
					}
			} 
		} // end of function f_cf_epc_call_rel15_up

		function f_cf_epc_call_rel15_down(
			inout CF_ATT p_config
		) runs on ImsTestCoordinator {
			// Stop traffic capture processing.
			timer tc_configureGuard;
			var StopTrafficCaptureRsp stopResult;
			tc_configureGuard.start(PX_MAX_MSG_WAIT);
			acPort.send(m_stopTrafficCaptureReq);
			alt {
				[] acPort.receive (m_stopTrafficCaptureRsp_any) -> value stopResult {
					tc_configureGuard.stop;
					if (stopResult.status.code != e_success)
					{
						log("**** TC_IMS_MESS_0001: StopTrafficCaptureReq unsuccessfull! ****");
						setverdict(fail);
					}
				}
				[] tc_configureGuard.timeout {
					log("**** TC_IMS_MESS_0001: StopTrafficCaptureReq not answered. ****");
					setverdict (inconc);
				}
			}
    
			f_cf_monitor_down_sip(p_config.gmA);
			f_cf_monitor_down_diameter(p_config.rx);
			f_cf_monitor_down_diameter(p_config.s6a);
			f_cf_monitor_down_diameter(p_config.gx);
			f_cf_monitor_down_sip(p_config.mxA);
			f_cf_monitor_down_sip(p_config.mw);
			f_cf_monitor_down_sgi(p_config.sgi);
			if(isvalue(p_config.gmB)) {
				f_cf_monitor_down_sip(p_config.gmB);
			}
			
		} // end of function f_cf_epc_call_rel15_down
		
	} // end group g_release15	
	
}
 No newline at end of file