ItsRSUsSimulator_TestSystem.ttcn 4.1 KB
Newer Older
garciay's avatar
garciay committed
1
2
module ItsRSUsSimulator_TestSystem {
    
garciay's avatar
garciay committed
3
4
5
6
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    
garciay's avatar
garciay committed
7
8
9
10
11
12
13
    // LibItsGeoNetworking
    import from LibItsGeoNetworking_TestSystem all;
    import from LibItsGeoNetworking_TypesAndValues all;
    
    // AtsRSUsSimulator
    import from ItsRSUsSimulator_TypesAndValues all;
    import from ItsRSUsSimulator_Pics all;
14
    import from ItsRSUsSimulator_Pixits all;
garciay's avatar
garciay committed
15
16
17
18
19
    
    /**
     * @desc Test component for ITS Network and Transport layer
     */
    type component ItsRSUsSimulator extends ItsGeoNetworking {
20
21
22
23
        /**
         * @desc RSUsimulator configuration port
         */
        port ConfigRsuSimulatorPort cfPort; 
24
        /**
25
         * @desc RSU position
26
         */
27
        var LongPosVector vc_longPosVectorRsu;
28
        /**
29
         * @desc RSU Geonetworking area
30
         */
31
        var GeoArea vc_geoArea;
32
        /**
33
         * @desc Supported sent messages templates: one or more from CAM, DENM, MAPEM, SPATEM, IVIM, SSEM
34
35
         * @see PICS_GENERATE_xxx
         */
36
        var template (value) RsuMessagesValueList vc_rsuMessagesValueList := {};
37
38
39
40
        /**
         * @desc Current RSU identifier
         */
        var integer vc_rsu_id := PX_RSU_ID - 1;
41
        /**
42
         * @desc DENM event counter: one RSU can send one or mode different DENM
43
         */
garciay's avatar
garciay committed
44
        var integer vc_denmEventCounter := 0;
45
        /**
46
         * @desc DENM sequence number index
47
         */
garciay's avatar
garciay committed
48
        var SequenceNumber vc_sequenceNumber := 0;
garciay's avatar
garciay committed
49
50
51
        /**
         * @desc TODO
         */
garciay's avatar
garciay committed
52
        var MsgCount vc_msgIssueRevision := 0;
53
        /**
54
         * @desc List of MovementState per intersection and per RSU 
55
56
         */
        var template (value) MovementListPerIntersectionRsu vc_states;
57
58
59
60
        /**
         * @desc The SPATEM message to use in SignalGroupParmList
         */
        var integer vc_signalGroupParmId := 0; // TODO Use a PIXIT 
61
        /**
62
         * @desc Current SPATEM state
63
64
         */
        var integer vc_spatemStatesId := 0;
garciay's avatar
garciay committed
65
        /**
66
         * @desc TimeMark of the begining of a new SPATEM phase
garciay's avatar
garciay committed
67
         */
68
        var TimeMark vc_currentPhaseStartTime := 36001;
garciay's avatar
garciay committed
69
        /**
70
71
72
73
74
         * @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
75
76
77
78
79
80
         */
        var SpatemRepetionDuration vc_repitition_duration := { 
            PICS_SPATEM_REPITITION_DURATION_STATE_1, 
            PICS_SPATEM_REPITITION_DURATION_STATE_2, 
            PICS_SPATEM_REPITITION_DURATION_STATE_3 
        };
81
82
83
84
        /**
         * @desc Number of SPATEM phases
         */
        var integer vc_spatemStatesNum := lengthof(vc_repitition_duration);
garciay's avatar
garciay committed
85
        
86
        timer tc_beacon := PICS_BEACON_FREQUENCY;
garciay's avatar
garciay committed
87
88
89
90
91
        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
92
93
94
        
    } // End of component ItsRSUsSimulator
    
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
    /**
     * @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
133
} // End of module ItsRSUsSimulator_TestSystem