LibItsCam_Functions.ttcn 1.27 KB
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
     * @param	p_camPtc returned Facility component variable
     */    
    function f_cfCamUp(out ItsFa p_ptcCam) {
        
        // Create Facility component
        p_ptcCam := ItsFa.create("CAM Tester");
berge's avatar
berge committed
        map(p_ptcCam:camPort, system:camPort);
        
    } // end f_cfCamUp
    
    /**
     * @desc 	Wait for component to finish and unmap CAM ports
     * @param	p_camPtc Facility component variable
     */    
    function f_cfCamDown(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 {
             	log("*** f_cfCamDown: ERROR: Timeout while waiting for component ***");
             	setverdict(inconc);   
            }
        }
        unmap(p_ptcCam:camPort);
berge's avatar
berge committed
    } // end f_cfCamDown
} // end LibItsCam_Functions