ItsRSUsSimulator_TestSystem.ttcn 5.34 KB
Newer Older
garciay's avatar
garciay committed
1
2
module ItsRSUsSimulator_TestSystem {
    
3
4
5
  // LibIts
  import from ITS_Container language "ASN.1:1997" all;
  import from DSRC language "ASN.1:1997" all;
vagrant's avatar
vagrant committed
6
7
  import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
  import from IEEE1609dot2 language "ASN.1:1997" all;
garciay's avatar
garciay committed
8
    
9
10
11
  // LibItsGeoNetworking
  import from LibItsGeoNetworking_TestSystem all;
  import from LibItsGeoNetworking_TypesAndValues all;
garciay's avatar
garciay committed
12
    
13
14
15
16
17
18
19
20
  // LibItsCam
  import from LibItsCam_TestSystem all;
  import from LibItsCam_TypesAndValues all;
    
  // LibItsDenm
  import from LibItsDenm_TestSystem all;
  import from LibItsDenm_TypesAndValues all;
    
Yann Garcia's avatar
Yann Garcia committed
21
22
23
24
25
  // LibItsHttp
  import from LibItsHttp_TestSystem all;
  import from LibItsHttp_TypesAndValues all;
  
  // LibItsPki
vagrant's avatar
vagrant committed
26
  import from LibItsPki_TestSystem all;
Yann Garcia's avatar
Yann Garcia committed
27
28
  import from LibItsPki_TypesAndValues all;
  
29
30
31
32
  // AtsRSUsSimulator
  import from ItsRSUsSimulator_TypesAndValues all;
  import from ItsRSUsSimulator_Pics all;
  import from ItsRSUsSimulator_Pixits all;
garciay's avatar
garciay committed
33
    
34
35
36
  /**
   * @desc Test component for ITS Network and Transport layer
   */
vagrant's avatar
vagrant committed
37
  type component ItsRSUsSimulator extends ItsGeoNetworking, ItsPkiHttp {
garciay's avatar
garciay committed
38
    /**
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
     * @desc RSUsimulator configuration port
     */
    port ConfigRsuSimulatorPort cfPort; 
    /**
     * @desc RSU position
     */
    var LongPosVector vc_longPosVectorRsu;
    /**
     * @desc RSU Geonetworking area
     */
    var GeoArea vc_geoArea;
    /**
     * @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
     */
    var integer vc_denmEventCounter := 0;
    /**
     * @desc DENM sequence number index
     */
    var SequenceNumber vc_sequenceNumber := 0;
    /**
     * @desc TODO
     */
    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 
    /**
     * @desc Current SPATEM state
     */
    var integer vc_spatemStatesId := 0;
    /**
     * @desc TimeMark of the begining of a new SPATEM phase
     */
    var TimeMark vc_currentPhaseStartTime := 36001;
    /**
     * @desc Estimated TimeMark of the end of the current SPATEM phase
     */
    var TimeMark vc_endPhaseStartTime := 0;
    /**
     * @desc Repetition duration times of SPATEM phases
     */
    /* TODO To be removed
     * var SpatemRepetionDuration vc_repitition_duration := { 
     PICS_SPATEM_REPITITION_DURATION_STATE_1, 
     PICS_SPATEM_REPITITION_DURATION_STATE_2, 
     PICS_SPATEM_REPITITION_DURATION_STATE_3 
     };
    */
    var integer vc_spatemStatesNum := 3; // Two states
102
        
103
104
105
106
107
108
    var boolean vc_beacon := PICS_GENERATE_BEACON;
    var boolean vc_cam    := PICS_GENERATE_CAM;
    var boolean vc_denm   := PICS_GENERATE_DENM;
    var boolean vc_ivim   := PICS_GENERATE_IVIM;
    var boolean vc_mapem  := PICS_GENERATE_MAPEM;
    var boolean vc_spatem := PICS_GENERATE_SPATEM;
vagrant's avatar
vagrant committed
109
    var boolean vc_pki    := PICS_PKI_SUPPORT;
110
    //var boolean vc_evcsn := PICS_GENERATE_EVCSN;
111
    var float vc_cam_timer_value  := PICS_CAM_FREQUENCY;
112
113
114
115
116
117
118
    timer tc_beacon := PICS_BEACON_FREQUENCY;
    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;
    //timer tc_evcsn   := PICS_EVCSN_FREQUENCY;
vagrant's avatar
vagrant committed
119
120
121

    var boolean vc_reenrolment := false;
    var integer vc_ec_certificates_counter := 0;
122
    var SequenceOfCertificate vc_ec_certificates := {};
vagrant's avatar
vagrant committed
123
    var integer vc_at_certificates_counter := 0;
124
    var SequenceOfCertificate vc_at_certificates := {};
125
  } // End of component ItsRSUsSimulator
garciay's avatar
garciay committed
126
    
127
128
129
    /**
     * @desc Test system component for ITS Network and Transport layer
     */
vagrant's avatar
vagrant committed
130
131
  type component ItsRSUsSimulatorSystem extends ItsGeoNetworkingSystem, HttpTestAdapter {
    port ConfigRsuSimulatorPort cfPort;
132
  }
133
    
134
135
136
137
138
  type record of record {
    boolean          detected,
    ItsRSUsSimulator component_,
    integer          stationId,
    integer          detectionCounter
garciay's avatar
garciay committed
139
    } VehiclesSimulator;
garciay's avatar
garciay committed
140
    
141
  group configRsuSimulatorTypes {
142
        
143
    type record CfInitialize {
144
      integer i
145
146
147
    } with {
      variant "FIELDORDER(msb)"
      }
148
        
149
    type charstring CfEvent;
150
        
151
    type boolean CfResult;
152
        
153
154
155
    type union CfEventInd {
      anytype empty
    }
156
                
157
158
159
  } with {
    variant ""
  } // End of group configRsuSimulatorTypes 
160
    
161
  group configRsuSimulatorPort {
162
        
163
164
165
166
167
    /**
     * @desc Configuration RSUsimulator port
     */
    type port ConfigRsuSimulatorPort message {
      out 
Yann Garcia's avatar
Yann Garcia committed
168
      CfInitialize, CfResult, UtGnResults, UtCamResults, UtDenmResults, UtCamEventInd, UtPkiResults;
169
      in 
Yann Garcia's avatar
Yann Garcia committed
170
      CfEvent, CfEventInd, UtGnInitialize, UtCamInitialize, UtDenmInitialize, UtGnTrigger, UtCamTrigger, UtPkiInitialize, UtPkiTrigger
171
      } // End of ConfigRsuSimulatorPort
172
        
173
  } // End of group configRsuSimulatorPort 
174
    
175
} // End of module ItsRSUsSimulator_TestSystem