LibItsDenm_TestSystem.ttcn 3.58 KB
Newer Older
reinaortega's avatar
reinaortega committed
/**
tepelmann's avatar
tepelmann committed
 *    @author     ETSI / STF449
 *    @version     $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $
 *                 $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $
reinaortega's avatar
reinaortega committed
 *    @desc        Test System module for ITS DENM
 *
 */
module LibItsDenm_TestSystem {
    
    // LibCommon
    import from LibCommon_Time {modulepar all};
    import from LibCommon_Sync all;

    // LibIts
    import from LibItsCommon_TestSystem all;
    import from LibItsDenm_TypesAndValues all;
    
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;    
tepelmann's avatar
tepelmann committed
    import from ITS_Container language "ASN.1:1997" all;
reinaortega's avatar
reinaortega committed
    
    group portDefinitions {
    
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
berge's avatar
berge committed
                UtInitialize, UtTrigger, UtUpdate, UtTermination, UtChangePosition;
reinaortega's avatar
reinaortega committed
            in 
berge's avatar
berge committed
                UtInitializeResult, UtTriggerResult, UtUpdateResult, UtTerminationResult, UtChangePositionResult, UtEventInd;
reinaortega's avatar
reinaortega committed
        } // end UpperTesterPort
        
    } // end portDefinitions
    group interfacePorts {
        
        group facilityPorts {
            
            group fa1Ports {
    
                /**
                 * @desc FA1 DENM Port (DENM/BTP/GeoNet/G5) 
                 */
                type port DenmPort message {
                    in DenmInd;
                    out DenmReq;
                } // End of port DenmPort
                
            } // End of group fa1Ports
            
        } // End of group facilityPorts
    
    } // End of group interfacePorts
        
    group componentDefinitions {

        /**
         * @desc ITS System Adapter
         */
        type component ItsDenmSystem {
            
            port UpperTesterPort utPort;
            
            // FA1 ports
            port DenmPort denmPort;
            
        } // end component ItsAdapter
        
    } // End of group componentDefinitions
    
    /**
     * @desc Test component for ITS Facility layer 
     */
    type component ItsDenm extends ItsBaseComponent {

        port UpperTesterPort utPort;

        // FA1 ports
        port DenmPort denmPort;
        
        //timers
        
        //component variables
        
        //default
        var default vc_default := null;
        
        //global variables
tepelmann's avatar
tepelmann committed
        var SequenceNumber vc_sequenceNo := 0;
reinaortega's avatar
reinaortega committed
        var boolean vc_denmReceived := false;
        
tepelmann's avatar
tepelmann committed
        var UtEventIndList vc_utEvents := {};
        
reinaortega's avatar
reinaortega committed
    } // End of component ItsDenm

    group facilityPrimitives {
            
        group fa1Primitives {
            
            /**
             * @desc FA1 DENM Indication Primitive 
             * 
             * @member denmMsg
             */
            type record DenmInd {
tepelmann's avatar
tepelmann committed
                DENM msgIn,
                TimestampIts receptionTime
reinaortega's avatar
reinaortega committed
            }
            with {
                encode (msgIn) "LibItsDenm_asn1"
            }
            
            /**
             * @desc FA1 DENM Request Primitive 
             * 
             * @member denmMsg
             */
            type record DenmReq {
tepelmann's avatar
tepelmann committed
                DENM msgOut
reinaortega's avatar
reinaortega committed
            }
            with {
                encode (msgOut) "LibItsDenm_asn1"
            }
            
        } // End of group fa1Primitives
        
    } // End of group facilityPrimitives
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
         
} // End of module LibItsDenm_TestSystem