Skip to content
AtsImsIot_TestConfiguration.ttcn 57.6 KiB
Newer Older
Bostjan Pintar's avatar
Bostjan Pintar committed
/*
 *	@author 	STF 370
 *  @version    $Id $
 *	@desc		This module contains functions which implement the 
 *              configuration of the SUT adapter and mapping of test
 *              components for establishing and tearing down different 
 *              test configurations.
 */

module AtsImsIot_TestConfiguration {
	
	import from LibCommon_VerdictControl all;
Bostjan Pintar's avatar
Bostjan Pintar committed
    /*language "TTCN-3:2008 Amendment 1" - FSCOM/YGA*/
	import from LibIms_UpperTester all;
	import from LibIot_PIXITS all;
	import from LibIot_TypesAndValues all;
Bostjan Pintar's avatar
Bostjan Pintar committed
    /*language "TTCN-3:2008 Amendment 1" - FSCOM/YGA*/
    import from LibIot_Functions all;
	import from LibIot_TestConfiguration all;
	import from LibIot_TestInterface all;
	import from AtsImsIot_TestSystem all;
	import from LibIot_TestInterface all;
	import from AtsImsIot_Templates all;
	import from AtsImsIot_Functions all;
Bostjan Pintar's avatar
Bostjan Pintar committed
	
	group constantDefinitions {
		//* interface monitor name Gm A
		const charstring c_gm_A := "Gm A";
		//* interface monitor name Gm B
		const charstring c_gm_B := "Gm B";
		//* interface monitor name Mx A
        const charstring c_mx_A := "Mx A";
        //* interface monitor name Mx B
        const charstring c_mx_B := "Mx B";
		//* interface monitor name Ic
		const charstring c_ic := "Ici";
		//* interface monitor name Isc A
		const charstring c_isc_A := "Isc A";
		//* interface monitor name Isc B
		const charstring c_isc_B := "Isc B";
		//* interface monitor name NAPTR
		const charstring c_naptr := "NAPTR";
		//* eut trigger name User A
		const charstring c_trigger_A := "User A";
		//* eut trigger name User B
		const charstring c_trigger_B := "User B";
		//* eut trigger name User A
		const charstring c_userUE_A := "User A";
		const charstring c_userUE_A_emergency := "User A Emergency";
Bostjan Pintar's avatar
Bostjan Pintar committed
  		const charstring c_userUE_A2 := "User A2";
		//* eut trigger name User B
		const charstring c_userUE_B := "User B";
		const charstring c_userUE_B2 := "User B2";
        //* eut trigger name User C
        const charstring c_userUE_C := "User C";
		//* interface monitor name Gm C
		const charstring c_gm_C := "Gm C";
        //* eut trigger name User D
        const charstring c_userUE_D := "User D";
		//* interface monitor name Gm D
		const charstring c_gm_D := "Gm D";
        //* interface monitor name Rx
        const charstring c_rx := "Rx"; // See ETSI TS 103 029 V3.1.1 clause 5.4.2
        //* interface monitor name Mw
        const charstring c_mw := "Mw";
        //* interface monitor name Mx
        const charstring c_mx := "Mx";
		//* interface monitor name Sgi
		const charstring c_sgi := "Sgi";
		//* interface monitor name Rx
		const charstring c_s6a := "S6a";
		//* interface monitor name Rx
		const charstring c_gx := "Gx";
Yann Garcia's avatar
Yann Garcia committed
		//* interface monitor name Mm/Mx/Mw
		const charstring c_psap := "Psap";
Bostjan Pintar's avatar
Bostjan Pintar committed
	}
	
	group mappingFunctions {
	
			/**
			 * 
			 * @desc initialize the adapter port of MTC
			 */
			function f_cf_adapter_up() runs on ImsTestCoordinator {
				map(self:acPort, system:acPort);
			}
			
			/**
			 * 
			 * @desc uninitialize the adapter port of MTC
			 */
			function f_cf_adapter_down() runs on ImsTestCoordinator {
				unmap(self:acPort, system:acPort);
			}
			
			/**
			 * 
			 * @desc initialize trigger component ports
			 * @param p_driver trigger component
			 */
			function f_cf_user_up(in IotEquipmentUser p_driver) runs on ImsTestCoordinator {
				// connect sync ports
				connect(p_driver:syncPort, self:syncPort);
				// connect TSI ports 
				map(p_driver:eaPort, system:eaPort);
				// configure oracle
				f_cf_oracle_up(p_driver);
			}
			
			/**
			 * 
			 * @desc uninitialize trigger component ports
			 * @param p_driver trigger component
			 */
			function f_cf_user_down(in IotEquipmentUser p_driver) runs on ImsTestCoordinator {
				// disconnect sync ports
				disconnect(p_driver:syncPort, self:syncPort);
				// disconnect TSI ports 
				unmap(p_driver:eaPort, system:eaPort);
				// release oracle ports
				f_cf_oracle_down(p_driver);
			}
			
			/**
			* @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(in ImsInterfaceMonitor 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:dPort, system:dPort);
				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_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);
}
		
			/**
Loading full blame...