Skip to content
LibItsCam_Functions.ttcn 1.37 KiB
Newer Older
/**
 *	@author 	ETSI / STF405
berge's avatar
berge committed
 *  @version 	$URL$
 *				$Id$
berge's avatar
berge committed
 *	@desc		Module containing common functions for ITS
module LibItsCam_Functions {
    // LibIts
    import from LibIts_TestSystem all;
    import from LibIts_Interface all; 
berge's avatar
berge committed
      
berge's avatar
berge committed
     * @desc 	Create Facility component and map CAM port
berge's avatar
berge committed
     * @remark	Only used when ItsFa is a PTC
     * @param	p_camPtc returned Facility component variable
     */    
berge's avatar
berge committed
    function f_ptcCamUp(out ItsFa p_ptcCam) {
        
        // Create Facility component
        p_ptcCam := ItsFa.create("CAM Tester");
berge's avatar
berge committed
        map(p_ptcCam:camPort, system:camPort);
        
berge's avatar
berge committed
    } // end f_ptcCamUp
berge's avatar
berge committed
    
    /**
     * @desc 	Wait for component to finish and unmap CAM ports
berge's avatar
berge committed
     * @remark	Only used when ItsFa is a PTC
berge's avatar
berge committed
     * @param	p_camPtc Facility component variable
     */    
berge's avatar
berge committed
    function f_ptcCamDown(in ItsFa p_ptcCam) runs on ItsMtc {
berge's avatar
berge committed
            
    	tc_guard.start;
        alt {
        	[] p_ptcCam.done {
            	tc_guard.stop;
            }
            
            [] tc_guard.timeout {
berge's avatar
berge committed
             	log("*** f_ptcCamDown: ERROR: Timeout while waiting for component ***");
berge's avatar
berge committed
             	setverdict(inconc);   
            }
        }
        unmap(p_ptcCam:camPort);
berge's avatar
berge committed
    } // end f_ptcCamDown
} // end LibItsCam_Functions