LibItsDenm_Functions.ttcn 1.28 KB
Newer Older
/**
 *	@author 	ETSI / STF405
berge's avatar
berge committed
 *  @version 	$URL$
 *				$Id$
 *	@desc		Module containing functions for DENM
 *
 */
module LibItsDenm_Functions {
berge's avatar
berge committed
    // LibIts
    import from LibIts_TestSystem all;
    import from LibIts_Interface all; 
    
    /**
     * @desc 	Create Facility component and connects DENM port
     * @param	p_ptcDenm returned Facility component variable
     */    
    function f_cfDenmUp(out PtcFa p_ptcDenm) {
        
        // Create Facility component
        p_ptcDenm := PtcFa.create("DENM Tester");
        
        // map ports
        map(p_ptcDenm:denmPort, system:denmPort);
        
berge's avatar
berge committed
    } // end f_cfDenmUp       
berge's avatar
berge committed
    
    /**
     * @desc 	Wait for component to finish and unmap DENM ports
     * @param	p_camPtc Facility component variable
     */    
    function f_cfDenmDown(in PtcFa p_ptcDenm) runs on ItsMtc {    
    	tc_guard.start;
        alt {
        	[] p_ptcDenm.done {
            	tc_guard.stop;
            }
            
            [] tc_guard.timeout {
berge's avatar
berge committed
             	log("*** f_cfDenmDown: ERROR: Timeout while waiting for component ***");
berge's avatar
berge committed
             	setverdict(inconc);   
            }
        }
berge's avatar
berge committed
        unmap(p_ptcDenm:denmPort);
berge's avatar
berge committed
    } // end f_cfDenmDown
} // end LibItsDenm_Functions