LibItsCam_TestSystem.ttcn 3.67 KB
Newer Older
reinaortega's avatar
reinaortega committed
/**
 *    @author   ETSI / STF405 / STF449
filatov's avatar
filatov committed
 *    @version  $URL$
 *              $Id$
 *    @desc     Test System module for ITS CAM
reinaortega's avatar
reinaortega committed
 *
 */
module LibItsCam_TestSystem {
    
    // LibCommon
    import from LibCommon_Time {modulepar all};
    import from LibCommon_Sync all;
    import from LibCommon_BasicTypesAndValues all;
reinaortega's avatar
reinaortega committed
    
garciay's avatar
garciay committed
    // LibIts
reinaortega's avatar
reinaortega committed
    import from CAM_PDU_Descriptions language "ASN.1:1997" all;
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;
    
garciay's avatar
garciay committed
    // LibItsCommon
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TypesAndValues all;    
garciay's avatar
garciay committed
    
    // LibItsCam
    import from LibItsCam_TypesAndValues all;
    
reinaortega's avatar
reinaortega committed
    group portDefinitions {
    
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
                UtInitialize, UtCamTrigger, UtChangePosition;
reinaortega's avatar
reinaortega committed
            in 
                UtInitializeResult, UtCamTriggerResult, UtChangePositionResult, UtCamEventInd;
reinaortega's avatar
reinaortega committed
        } // end UpperTesterPort
        
    } // end portDefinitions

    group interfacePorts {

        group facilityPorts {
            
            group fa1Ports {
    
                /**
                 * @desc FA1 CAM Port (CAM/BTP/GeoNet/G5) 
                 */
                type port CamPort message {
                    in CamInd;
                    out CamReq;
                } // End of port CamPort
                
            } // end fa1Ports
                
        } // End of group facilityPorts
    
    } // End of group interfacePorts
        
    group componentDefinitions {

        /**
         * @desc ITS System Adapter
         */
        type component ItsCamSystem {
            
            port UpperTesterPort utPort;
            
            // FA1 ports
            port CamPort camPort;

        } // end component ItsAdapter
        
    } // End of group componentDefinitions
    
    /**
     * @desc Test component for ITS Facility layer 
     */
    type component ItsCam extends ItsBaseComponent {

        port UpperTesterPort utPort;
        
        // FA1 ports
        port CamPort camPort;
        //timers
        
        //component variables
garciay's avatar
garciay committed
        var CamInd vc_camMsg;
        
reinaortega's avatar
reinaortega committed
        //default
        var default vc_default := null;
        
        //global variables
        var boolean vc_camReceived := false;

        var UtCamEventIndList vc_utEvents := {};
reinaortega's avatar
reinaortega committed
        
    } // End of component ItsCam
    
    group facilityPrimitives {
            
        group fa1Primitives {
            
            /**
             * @desc FA1 CAM Indication Primitive 
             */
            type record CamInd {
                CAM     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) "LibItsCam_asn1"
            }
                
            /**
             * @desc FA1 CAM Request Primitive 
             */
            type record CamReq {
reinaortega's avatar
reinaortega committed
            }
            with {
                encode (msgOut) "LibItsCam_asn1"
            }
            
        } // end fa1Primitives
            
    } // End of group facilityPrimitives
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
     
} // End of module LibIts_TestSystem