ItsRSUsSimulator_TestSystem.ttcn 4.1 KB
Newer Older
garciay's avatar
garciay committed
module ItsRSUsSimulator_TestSystem {
    
garciay's avatar
garciay committed
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    
garciay's avatar
garciay committed
    // LibItsGeoNetworking
    import from LibItsGeoNetworking_TestSystem all;
    import from LibItsGeoNetworking_TypesAndValues all;
    
    // AtsRSUsSimulator
    import from ItsRSUsSimulator_TypesAndValues all;
    import from ItsRSUsSimulator_Pics all;
    import from ItsRSUsSimulator_Pixits all;
garciay's avatar
garciay committed
    
    /**
     * @desc Test component for ITS Network and Transport layer
     */
    type component ItsRSUsSimulator extends ItsGeoNetworking {
        /**
         * @desc RSUsimulator configuration port
         */
        port ConfigRsuSimulatorPort cfPort; 
         * @desc Supported sent messages templates: one or more from CAM, DENM, MAPEM, SPATEM, IVIM, SSEM
         * @see PICS_GENERATE_xxx
         */
        var template (value) RsuMessagesValueList vc_rsuMessagesValueList := {};
        /**
         * @desc Current RSU identifier
         */
        var integer vc_rsu_id := PX_RSU_ID - 1;
         * @desc DENM event counter: one RSU can send one or mode different DENM
garciay's avatar
garciay committed
        var integer vc_denmEventCounter := 0;
garciay's avatar
garciay committed
        var SequenceNumber vc_sequenceNumber := 0;
garciay's avatar
garciay committed
        /**
         * @desc TODO
         */
garciay's avatar
garciay committed
        var MsgCount vc_msgIssueRevision := 0;
         * @desc List of MovementState per intersection and per RSU 
         */
        var template (value) MovementListPerIntersectionRsu vc_states;
        /**
         * @desc The SPATEM message to use in SignalGroupParmList
         */
        var integer vc_signalGroupParmId := 0; // TODO Use a PIXIT 
         */
        var integer vc_spatemStatesId := 0;
garciay's avatar
garciay committed
        /**
         * @desc TimeMark of the begining of a new SPATEM phase
garciay's avatar
garciay committed
         */
        var TimeMark vc_currentPhaseStartTime := 36001;
garciay's avatar
garciay committed
        /**
         * @desc Estimated TimeMark of the end of the current SPATEM phase
         */
        var TimeMark vc_endPhaseStartTime := 0;
        /**
         * @desc Repetition duration times of SPATEM phases
garciay's avatar
garciay committed
         */
        var SpatemRepetionDuration vc_repitition_duration := { 
            PICS_SPATEM_REPITITION_DURATION_STATE_1, 
            PICS_SPATEM_REPITITION_DURATION_STATE_2, 
            PICS_SPATEM_REPITITION_DURATION_STATE_3 
        };
        /**
         * @desc Number of SPATEM phases
         */
        var integer vc_spatemStatesNum := lengthof(vc_repitition_duration);
        timer tc_beacon := PICS_BEACON_FREQUENCY;
garciay's avatar
garciay committed
        timer tc_cam    := PICS_CAM_FREQUENCY;
        timer tc_denm   := PICS_DENM_FREQUENCY;
        timer tc_mapem  := PICS_MAPEM_FREQUENCY;
        timer tc_spatem := PICS_SPATEM_FREQUENCY;
        timer tc_ivim   := PICS_IVIM_FREQUENCY;
garciay's avatar
garciay committed
        
    } // End of component ItsRSUsSimulator
    
    /**
     * @desc Test system component for ITS Network and Transport layer
     */
    type component ItsRSUsSimulatorSystem extends ItsGeoNetworkingSystem {
        port ConfigRsuSimulatorPort cfPort; 
    }
    
    group configRsuSimulatorTypes {
        
        type record CfInitialize { };
        
        type charstring CfEvent;
        
        type boolean CfResult;
        
        type union CfEventInd {
            anytype empty
        }
                
    } with {
        encode "ConfigTester"
    }// End of group configRsuSimulatorTypes 
    
    group configRsuSimulatorPort {
        
        
        /**
         * @desc Configuration RSUsimulator port
         */
        type port ConfigRsuSimulatorPort message {
            out 
                CfInitialize, CfResult; 
            in 
                CfEvent, CfEventInd
        } // End of ConfigRsuSimulatorPort
        
    } // End of group configRsuSimulatorPort 
    
garciay's avatar
garciay committed
} // End of module ItsRSUsSimulator_TestSystem