Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
module test_LibItsCam_TypesAndValues /*language "TTCN-3:2009 Advanced Parameterization"*/ {
import from test_CommonCodec all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all
with {
encode "LibItsCam_asn1"
}
import from DENM_PDU_Descriptions language "ASN.1:1997" all
with {
encode "LibItsDenm_asn1"
}
import from LibItsCam_TestSystem all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Functions all;
import from LibItsCommon_Functions all;
group testUtEvent {
testcase tc_UtCamInitialize() runs on TCType system TCType {
test_PDU<UtInitialize>(m_camInitialize, false);
}
testcase tc_changeHeading() runs on TCType system TCType {
test_PDU<UtEvent>(m_changeHeading(5), false);
}
testcase tc_changePosition() runs on TCType system TCType {
test_PDU<UtEvent>(m_changePosition(6), false);
}
testcase tc_changeSpeed() runs on TCType system TCType {
test_PDU<UtEvent>(m_changeSpeed(2), false);
}
testcase tc_setCrashSignal() runs on TCType system TCType {
test_PDU<UtEvent>(m_setCrashSignal(c_activated), false);
}
testcase tc_setDangerousGoodsStatus() runs on TCType system TCType {
test_PDU<UtEvent>(m_setDangerousGoodsStatus(8191), false);
}
testcase tc_setLengthWidthPrecision() runs on TCType system TCType {
test_PDU<UtEvent>(m_setLengthWidthPrecision(c_precisely), false);
}
testcase tc_setDistanceToStopLine() runs on TCType system TCType {
test_PDU<UtEvent>(m_setDistanceToStopLine(65535), false);
}
testcase tc_setTurnAdvice() runs on TCType system TCType {
test_PDU<UtEvent>(m_setTurnAdvice({ f_bitPositionRandom(7), 65535 }), false);
}
testcase tc_changeCurvature() runs on TCType system TCType {
test_PDU<UtEvent>(m_changeCurvature(-1023), false);
}
testcase tc_setOccupancy() runs on TCType system TCType {
test_PDU<UtEvent>(m_setOccupancy(255), false);
}
testcase tc_setDoorStatus() runs on TCType system TCType {
test_PDU<UtEvent>(m_setDoorStatus(c_driverDoor), false);
}
testcase tc_setLightBarStatus() runs on TCType system TCType {
test_PDU<UtEvent>(m_setLightBarStatus(unavailable), false);
}
testcase tc_setSireneStatus() runs on TCType system TCType {
test_PDU<UtEvent>(m_setSireneStatus(engaged), false);
}
testcase tc_setTrafficLightPriority() runs on TCType system TCType {
test_PDU<UtEvent>(m_setTrafficLightPriority(7), false);
}
testcase tc_setScheduleDeviation() runs on TCType system TCType {
test_PDU<UtEvent>(m_setScheduleDeviation(-900), false);
}
testcase tc_setPtLineDescription() runs on TCType system TCType {
test_PDU<UtEvent>(m_setPtLineDescription(PTLineDescription:{"CourseOfJourney", "LineRef", "RouteRef"}), false);
}
testcase tc_setExteriorLightsStatus() runs on TCType system TCType {
test_PDU<UtEvent>(m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), false);
}
testcase tc_checkLdmBasic() runs on TCType system TCType {
test_PDU<UtEvent>(m_checkLdm(m_camMsg_irs (
28147497,
42949,
{ true, true, true },
{
longitude := {hemisphere := east, degree := 0},
latitude := {hemisphere := north, degree := 0},
elevation := 0,
heading := omit,
streetName := omit,
positionConfidence := omit,
elevationConfidence := omit,
roadSegmentID :=0
}
)), false);
}
testcase tc_checkLdmFull_BasicVehicle() runs on TCType system TCType {
test_PDU<UtEvent>(m_checkLdm(m_camMsg_valid_With_Parameters(
28147495,
42946,
{ true, true, true },
{
longitude := {hemisphere := east, degree := 0},
latitude := {hemisphere := north, degree := 0},
elevation := 1530,
heading := 95,
streetName := "Street name",
positionConfidence := 15,
elevationConfidence := 14,
roadSegmentID :=0
}, // End of ReferencePosition
{
vehicleType := 3,
stationLength := 1456,
stationLengthConfidence := 9,
stationWidth := 125,
stationWidthConfidence := 11,
vehicleSpeed := 55,
vehicleSpeedConfidence := 13,
longAcceleration := -500,
longAccelerationConfidence := 12,
accelerationControl := '001000'B,
yawRate := {
yawDirection := right,
yawRateValue := 16584
},
yawRateConfidence := 11,
exteriorLights := '00100000'B,
turnAdvice := {
direction := '00000100'B,
distance := 4556
},
distanceToStopLine := 150,
occupancy := 57,
doorOpen := '0001'B,
posConfidenceEllipse := {
semiMajorConfidence := 7,
semiMinorConfidence := 9,
semiMajorOrientation := 11
},
curvature := -156,
curvatureChange := 53,
curvatureConfidence := 10,
crashStatus := false,
headingConfidence := 9,
dangerousGoods := 799
}, // End of VehicleCommonParameters
m_profileParameters_BasicVehicle
)), false);
}
testcase tc_checkLdmFull_PublicVehicle() runs on TCType system TCType {
test_PDU<UtEvent>(m_checkLdm(m_camMsg_valid_With_Parameters(
1307531915453,
111111,
{ true, true, true },
{
longitude := {
hemisphere := east,
degree := 0
},
latitude := {
hemisphere := north,
degree := 0
},
elevation := 0,
heading := 0,
streetName := omit,
positionConfidence := omit,
elevationConfidence := omit,
roadSegmentID := omit
}, // End of ReferencePosition
{
vehicleType := 0,
stationLength := 0,
stationLengthConfidence := 0,
stationWidth := 0,
stationWidthConfidence := 0,
vehicleSpeed := 0,
vehicleSpeedConfidence := 0,
longAcceleration := 0,
longAccelerationConfidence := 0,
accelerationControl := '000000'B,
yawRate := {
yawDirection := right,
yawRateValue := 0
},
yawRateConfidence := 0,
exteriorLights := '00000000'B,
turnAdvice := omit,
distanceToStopLine := omit,
occupancy := omit,
doorOpen := omit,
posConfidenceEllipse := {
semiMajorConfidence := 0,
semiMinorConfidence := 0,
semiMajorOrientation := 0
},
curvature := 0,
curvatureChange := omit,
curvatureConfidence := 0,
crashStatus := omit,
headingConfidence := 0,
dangerousGoods := omit
}, // End of VehicleCommonParameters
m_profileParameters_BasicVehicle
)), false);
}
testcase tc_checkLdmFull_Paris() runs on TCType system TCType {
test_PDU<UtEvent>(m_checkLdm(m_camMsg_irs (
5434534,
5424,
{ true, false, true },
{
longitude := {hemisphere := east, degree := 200000000},
latitude := {hemisphere := north, degree := 480000000},
elevation := 910,
heading := 7200,
streetName := "Montmartre",
positionConfidence := 5,
elevationConfidence := 7,
roadSegmentID := 1234567
}
)), false);
}
testcase tc_checkLdmFull_LaPaz() runs on TCType system TCType {
test_PDU<UtEvent>(m_checkLdm(m_camMsg_irs (
6546424,
35445334,
{ false, false, false },
{
longitude := {hemisphere := west, degree := 220000000},
latitude := {hemisphere := south, degree := 270000000},
elevation := 36600,
heading := 21600,
streetName := "El Alto",
positionConfidence := omit,
elevationConfidence := omit,
roadSegmentID := 3546345
}
)), false);
}
template (value) CamPdu m_camMsg_valid_With_Parameters(
TimeStamp p_generationTime,
StationID p_stationId,
CoopAwareness.stationCharacteristics p_stationCharacteristics,
template (value) ReferencePosition p_referencePosition,
template (value) VehicleCommonParameters p_vehicleCommonParameters,
template (value) ProfileParameters p_profileDependent
) := {
header := {
protocolVersion := 0,
messageID := 0,
generationTime := p_generationTime
},
cam := {
stationID := p_stationId,
stationCharacteristics := p_stationCharacteristics,
referencePosition := p_referencePosition,
camParameters := {
vehicleCommonParameters := p_vehicleCommonParameters,
profileDependent := p_profileDependent
}
}
}
template (value) ProfileParameters m_profileParameters_BasicVehicle := {
basicVehicle := {
}
// emergencyVehicle := {
// lightBarInUse := 2,
// sireneInUse := 3,
// emergencyResponseType := 1
// }
// publicTransportVehicle := {
// publicVehicleType := 3,
// pTLineDescription := {
// courseOfJourney := "Course Of Journey",
// lineRef := 10,
// routeRef := "Route Ref"
// },
// ScheduleDeviation scheduleDeviation optional,
// TrafficLightPriority trafficLightPriority optional
// } // End of PublicTransportVehicle
} // End of template m_profileParameters_BasicVehicle
template (value) ProfileParameters m_profileParameters_EmergencyVehicle := {
emergencyVehicle := {
lightBarInUse := enabled,
sireneInUse := engaged,
emergencyResponseType := rightOfWay
}
} // End of template m_profileParameters_EmergencyVehicle
template (value) ProfileParameters m_profileParameters_PublicTransportVehicle := {
publicTransportVehicle := {
publicVehicleType := 3,
pTLineDescription := {
courseOfJourney := "Course Of Journey",
lineRef := "Line Ref",
routeRef := "Route Ref"
},
scheduleDeviation := -200,
trafficLightPriority := 7
}
} // End of template m_profileParameters_PublicTransportVehicle
} // End of group testUtEvent
group testCamPrimitiveMessages {
testcase tc_CamReq() runs on TCType system TCType {
test_PDU<CamReq>(
m_camReq(
m_camMsg_irs(
fx_getCurrentTime(),
f_getTsStationId(),
f_getTesterStationCharacteristics(),
m_tsPosition
)
),
false);
}
} // End of group testCamPrimitiveMessages
}