Skip to content
LibItsDenm_TestSystem.ttcn 4.39 KiB
Newer Older
reinaortega's avatar
reinaortega committed
/**
tepelmann's avatar
tepelmann committed
 *    @author     ETSI / STF449
filatov's avatar
filatov committed
 *    @version     $URL$
 *                 $Id$
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;
    import from LibCommon_BasicTypesAndValues all;
reinaortega's avatar
reinaortega committed

    // LibIts
garciay's avatar
garciay committed
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;    
    import from ITS_Container language "ASN.1:1997" all;
    
    // LibItsCommon
reinaortega's avatar
reinaortega committed
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    
garciay's avatar
garciay committed
    // LibItsDenm
    import from LibItsDenm_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    
    group portDefinitions {
    
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
            out
                AcGnssPrimitive;
            in
                AcGnssResponse, AcGnssDistanceCovered;
        } // end AdapterControlPort
        
reinaortega's avatar
reinaortega committed
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
                UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym;
reinaortega's avatar
reinaortega committed
            in 
                UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult,
                UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd;
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;
            port AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
            
            // 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 AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
        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;
        
        var UtDenmEventIndList vc_utEvents := {};
        var UtDenmActionIDList vc_utActionIDs := {};
        
reinaortega's avatar
reinaortega committed
    } // End of component ItsDenm

    group facilityPrimitives {
            
        group fa1Primitives {
            
            /**
             * @desc FA1 DENM Indication Primitive 
             * 
             * @member denmMsg
             */
            type record DenmInd {
                DENM    msgIn,
                UInt8   gnNextHeader optional,
                UInt8   gnHeaderType optional,
                UInt8   gnHeaderSubtype optional,
                UInt32  gnLifetime optional,
                UInt8   gnTrafficClass optional,
                UInt16  btpDestinationPort optional,
                UInt16  btpInfo optional
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