Newer
Older
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
import from LibItsCommon_TestSystem all;
// LibItsGeoNetworking
import from LibItsGeoNetworking_TypesAndValues all;
import from LibItsGeoNetworking_Templates all;
import from LibItsGeoNetworking_Pics all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Templates all;
import from LibItsSecurity_Functions all;
import from LibItsSecurity_Pixits all;
import from ItsAutoInterop_TypesAndValues all;
import from ItsAutoInterop_Templates all;
import from ItsAutoInterop_TestSystem all;
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
group utFunctions {
/**
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsAutoInteropGeonetworking {
//deactivate autoInteropPort default alts
vc_autoInteropDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtInitializeResult:true) {
[] utPort.receive(UtCommonResults:{utInitializeResult:=true}) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT could not be initialized ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate autoInteropPort default alts
vc_autoInteropDefaultActive := true;
}
/**
* @desc Triggers event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(template (value) UtAutoInteropTrigger p_event) runs on ItsAutoInteropGeonetworking {
//deactivate autoInteropPort default alts
vc_autoInteropDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] utPort.receive(UtAutoInteropTriggerResult:true) {
[] utPort.receive(UpperTesterAutoInteropResults:{utInitializeResult:=true}) {
tc_wait.stop;
}
[] utPort.receive {
tc_wait.stop;
}
[] tc_wait.timeout {
}
}
//activate autoInteropPort default alts
vc_autoInteropDefaultActive := true;
}
} // End of group utFunctions
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
group hmiFunctions {
/**
* @desc Requests to bring the HMI in an initial state
* @param p_init The initialisation to trigger.
*/
function f_hmiInitializeIut(template (value) HmiInitialize p_init) runs on ItsAutoInteropGeonetworking {
//deactivate autoInteropPort default alts
vc_autoInteropDefaultActive := false;
hmiPort.send(p_init);
tc_wait.start;
alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
// [] hmiPort.receive(HmiInitializeResult:true) {
[] hmiPort.receive(HmiAutoInteropResults:{hmiInitializeResult:=true}) {
tc_wait.stop;
log("*** f_hmiInitializeIhmi: INFO: EUT's HMI initialized ***");
}
[] hmiPort.receive {
tc_wait.stop;
log("*** f_hmiInitializeIhmi: INFO: EUT's HMI could not be initialized ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_hmiInitializeIhmi: INFO: EUT's HMI could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate autoInteropPort default alts
vc_autoInteropDefaultActive := true;
}
} // End of group hmiFunctions
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
group preambles {
/**
* @desc Set up an EUT component
* @param p_eut The component reference
* @param p_scenario The GNSS scenario. Default: e_staticPosition
*/
function f_cfPtcUp(
in ItsAutoInteropGeonetworking p_eut,
in Scenario p_scenario := e_staticPosition // TODO Not used
) runs on ItsAutoInteropGeonetworking /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// EUT
//map(p_eut:acPort, system:acPort); Not used
//map(p_eut:utPort, system:utPort); Not used
map(p_eut:hmiPort, system:hmiPort);
map(p_eut:geoNetworkingPort, system:geoNetworkingPort);
connect(p_eut:syncPort, self:syncPort);
//activate(a_cfPtcDown()); // FIXME To be done
//Initialze the IUT
f_initialiseSecuredMode();
// MTC intializes IUT
f_initialState(p_scenario);
} // End of function f_cfPtcUp
/**
* @desc Set up MTC for configuration #1
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @param p_eut3 The component reference for EUT3
* @param p_eut4 The component reference for EUT4
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-02) Clause 5.3.1 CF-01: Verify complete forwarding message scenario
*/
function f_mtcCf01Up(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3,
inout ItsAutoInteropGeonetworking p_eut4
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Create components
p_eut1 := ItsAutoInteropGeonetworking.create(c_compNodeB);
p_eut2 := ItsAutoInteropGeonetworking.create(c_compNodeC);
p_eut3 := ItsAutoInteropGeonetworking.create(c_compNodeD);
p_eut4 := ItsAutoInteropGeonetworking.create(c_compNodeE);
// Map & Connect
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
connect(self:syncPort, mtc:syncPort);
// EUT1/EUT2/EUT3/EUT4
disconnect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort); // EUT1 & EUT2 are on-link
disconnect(p_eut1:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort); // EUT1 & EUT3 are on-link
disconnect(p_eut2:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort); // EUT2 & EUT3 are on-link
disconnect(p_eut2:eutGeoNetworkingPort, p_eut4:eutGeoNetworkingPort); // EUT2 & EUT4 are on-link
disconnect(p_eut3:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort); // EUT3 & EUT4 are on-link
// EUT1 & EUT4 are of-link
activate(a_mtcCf01Down(p_eut1, p_eut2, p_eut3, p_eut4));
} // End of function f_mtcCf01Up
/**
* @desc Set up MTC for configuration #2
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-02) Clause 5.3.2 CF-02: Road Works Warning configuration
*/
function f_mtcCf02Up(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Create components
p_eut1 := ItsAutoInteropGeonetworking.create(c_compNodeB);
p_eut2 := ItsAutoInteropGeonetworking.create(c_compNodeC);
// Map & Connect
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
connect(self:syncPort, mtc:syncPort);
// EUT1/EUT2
connect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort);
activate(a_mtcCf02Down(p_eut1, p_eut2));
} // End of function f_mtcCf02Up
/**
* @desc Set up MTC for configuration #3
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @param p_eut3 The component reference for EUT3
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-02) Clause 5.3.3 CF-03: CA messages
*/
function f_mtcCf03Up(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Create components
p_eut1 := ItsAutoInteropGeonetworking.create(c_compNodeB);
p_eut2 := ItsAutoInteropGeonetworking.create(c_compNodeC);
p_eut3 := ItsAutoInteropGeonetworking.create(c_compNodeD);
// Map & Connect
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
connect(self:syncPort, mtc:syncPort);
// EUT1/EUT2/EUT3
connect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort);
connect(p_eut1:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
connect(p_eut2:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
activate(a_mtcCf03Down(p_eut1, p_eut2, p_eut3));
} // End of function f_mtcCf03Up
/**
* @desc The default preamble.
*/
function f_prDefault() runs on ItsAutoInteropGeonetworking {
activate(a_default());
activate(a_utDefault());
activate(a_hmiDefault());
}
} // End of group preambles
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
group postambles {
/**
* @desc Shutdown an EUT component
* @param p_eut The component reference
*/
function f_cfPtcDown(
inout ItsAutoInteropGeonetworking p_eut
) runs on ItsAutoInteropGeonetworking /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Wait components done
p_eut.done;
deactivate;
// EUT
unmap(p_eut:acPort, system:acPort);
unmap(p_eut:utPort, system:utPort);
unmap(p_eut:hmiPort, system:hmiPort);
unmap(p_eut:geoNetworkingPort, system:geoNetworkingPort);
disconnect(p_eut:syncPort, self:syncPort);
} // End of function f_cfPtcDown
/**
* @desc Shutdown MTC for configuration #1
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @param p_eut3 The component reference for EUT3
* @param p_eut4 The component reference for EUT4
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-02) Clause 5.3.1 CF-01: Verify complete forwarding message scenario
*/
function f_mtcCf01Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3,
inout ItsAutoInteropGeonetworking p_eut4
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Wait components done
p_eut1.done;
p_eut2.done;
p_eut3.done;
p_eut4.done;
deactivate;
// Unmap & disconnect
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
// EUT1/EUT2/EUT3/EUT4
disconnect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort);
disconnect(p_eut1:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
disconnect(p_eut2:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
disconnect(p_eut2:eutGeoNetworkingPort, p_eut4:eutGeoNetworkingPort);
disconnect(p_eut3:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
} // End of function f_mtcCf01Down
/**
* @desc Shutdown MTC for configuration #2
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-02) Clause 5.3.2 CF-02: Road Works Warning configuration
*/
function f_mtcCf02Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Wait components done
p_eut1.done;
p_eut2.done;
deactivate;
// Unmap & disconnect
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // End of function f_mtcCf02Down
/**
* @desc Shutdown MTC with three components
* @param p_eut1 The component reference for EUT1
* @param p_eut2 The component reference for EUT2
* @param p_eut3 The component reference for EUT3
*/
function f_mtcCf03Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Wait components done
p_eut1.done;
p_eut2.done;
p_eut3.done;
deactivate;
// Unmap & disconnect
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
// EUT1/EUT2/EUT3
disconnect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort);
disconnect(p_eut1:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
disconnect(p_eut3:eutGeoNetworkingPort, p_eut3:eutGeoNetworkingPort);
} // End of function f_mtcCf03Down
/**
* @desc The default postamble.
*/
function f_poDefault() runs on ItsAutoInteropGeonetworking {
deactivate;
// deactivate(a_default());
// deactivate(a_utDefault());
// deactivate(a_hmiDefault());
// TODO f_acStopScenario();
}
} // End of group postambles
group autoInteropPosition {
/**
* @desc Compute distance between two points
* @param p_pointA First point
* @param p_pointB Second point
* @return Computed distance in meters
* @see fx_computeDistance
*/
function f_distance(
in LongPosVector p_pointA,
in LongPosVector p_pointB
) return float {
// log("*** f_distance: INFO: calling fx_computeDistance() ***");
return fx_computeDistance(p_pointA.latitude, p_pointA.longitude, p_pointB.latitude, p_pointB.longitude);
}
} // End of group autoInteropPosition
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
group autoInteropConfiguration {
/**
* @desc Brings the IUT into an initial state.
* @remark Component variable vc_hashedId8ToBeUsed shall be set with the IUT certificate to be used
*/
function f_initialState(Scenario p_scenario := e_staticPosition) runs on ItsAutoInteropGeonetworking {
if (PICS_GN_SECURITY) {
var Oct8 v_hashedId8ToBeUsed := f_setupIutCertificate(vc_hashedId8ToBeUsed);
if (oct2int(v_hashedId8ToBeUsed) == 0) {
v_hashedId8ToBeUsed := 'FFFFFFFFFFFFFFFF'O; // Reset to unknown value, the IUT will use its own certificates
}
f_utInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed));
// TODO f_hmiInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed));
} // else, default behavior
else {
f_utInitializeIut(m_gnInitialize);
f_hmiInitializeIut(m_hmiInitialize);
}
// TODO f_acLoadScenario(p_scenario);
// TODO f_acStartScenario();
}
/**
* @desc Initialise secure mode if required
*/
function f_initialiseSecuredMode() runs on ItsAutoInteropGeonetworking {
if ((PICS_GN_SECURITY == true) or (PICS_IS_IUT_SECURED == true)) {
if(e_success != f_acEnableSecurity()){
log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***");
stop;
}
}
} // End of function f_initialiseSecuredMode()
function f_uninitialiseSecuredMode() runs on ItsAutoInteropGeonetworking {
if ((PICS_GN_SECURITY == true) or (PICS_IS_IUT_SECURED == true)) {
f_acDisableSecurity();
}
} // End of function f_initialiseSecuredMode()
/**
* @desc Triggers test adapter to enable security support
* @return FncRetCode
*/
function f_acEnableSecurity() runs on ItsAutoInteropGeonetworking return FncRetCode {
// Local variables
// Load certificates
if (PICS_GN_SECURITY) {
if( not f_loadCertificates(PX_IUT_SEC_CONFIG_NAME) ) {
return e_error;
}
// FIXME Useless???
// // Initialize vc_location
// f_setGenerationLocation(
// f_getTsLatitude(),
// f_getTsLongitude()
// );
return f_acTriggerSecEvent(m_acEnableSecurity(cc_taCert_A));
}
return f_acTriggerSecEvent(m_acEnableSecurity(PX_CERT_FOR_TS));
}
/**
* @desc Triggers test adapter to disable security support
* @return FncRetCode
*/
function f_acDisableSecurity() runs on ItsAutoInteropGeonetworking return FncRetCode {
f_unloadCertificates();
return f_acTriggerSecEvent(m_acDisableSecurity);
}
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerSecEvent(
in template (value) AcSecPrimitive p_event
) runs on ItsAutoInteropGeonetworking return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acSecResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
} // End of group autoInteropConfiguration
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
group adapterControl {
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerGnssEvent(template (value) AcGnssPrimitive p_event) runs on ItsAutoInteropGeonetworking return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acGnssResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** f_acTriggerEvent: ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** f_acTriggerEvent: ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Loads the given scenario
* @param p_scenario The scenario to load.
*/
function f_acLoadScenario(Scenario p_scenario) runs on ItsAutoInteropGeonetworking {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_loadScenario(p_scenario));
}
} // end f_acLoadScenario
/**
* @desc Starts a loaded scenario
*/
function f_acStartScenario() runs on ItsAutoInteropGeonetworking {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_startScenario);
vc_scenarioStarted := true;
}
} // end f_acStartScenario
/**
* @desc Stops a loaded scenario
*/
function f_acStopScenario() runs on ItsAutoInteropGeonetworking {
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_stopScenario);
vc_scenarioStarted := false;
}
} // end f_acStopScenario
} // End of group adapterControl
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
group autoInteropAltsteps {
/**
* @desc The base default.
*/
altstep a_default() runs on ItsAutoInteropGeonetworking {
[vc_autoInteropDefaultActive] geoNetworkingPort.receive( // Filtering LSRequest
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwLsRequestPacket(
?,
?
)))) {
// Nothing to do
repeat;
}
[vc_autoInteropDefaultActive] geoNetworkingPort.receive( // Filtering LSReply
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwLsReplyPacket(
?,
?
)))) {
// Nothing to do
repeat;
}
[vc_autoInteropDefaultActive] geoNetworkingPort.receive( // Filtering Secured CA messages
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage_CAMs,
?
))) {
// Skip CAM messages
log("*** a_default: WARNING: Skip secured CAM messages ***");
repeat;
}
[vc_autoInteropDefaultActive] geoNetworkingPort.receive( // Filtering Secured DEN messages
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage_DENMs,
?
))) {
// Skip DENM messages
log("*** a_default: WARNING: Skip secured DENM messages ***");
repeat;
}
[vc_autoInteropDefaultActive] geoNetworkingPort.receive { // Unexpected GeoNetworking message ==> require refine filtering above
log("*** a_default: ERROR: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[vc_autoInteropDefaultActive] eutGeoNetworkingPort.receive { // Unexpected EutGeoNetworking message ==> require refine filtering above
log("*** a_default: ERROR: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] tc_wait.timeout {
log("*** a_default: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] tc_ac.timeout {
log("*** a_default: ERROR: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_shutdown() {
log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
/**
* @desc The default for handling upper tester messages.
*/
altstep a_utDefault() runs on ItsAutoInteropGeonetworking {
var UtGnEventInd v_ind;
[vc_utDefaultActive] utPort.receive(UtGnEventInd:?) -> value v_ind {
//store every upper tester indication received
vc_utInds[lengthof(vc_utInds)] := v_ind;
repeat;
}
[vc_utDefaultActive] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***");
repeat;
}
}
/**
* @desc The default for handling HMI messages.
*/
altstep a_hmiDefault() runs on ItsAutoInteropGeonetworking {
var HmiNeighborEventInds v_hmiNeighborEventInds;
var HmiSignageEventInd v_hmiSignageEventInd;
[vc_hmiDefaultActive] hmiPort.receive(HmiNeighborEventInds:?) -> value v_hmiNeighborEventInds {
//store every upper tester indication received
vc_hmiNeighborEventIndsList[lengthof(vc_hmiNeighborEventIndsList)] := v_hmiNeighborEventInds;
repeat;
}
[vc_hmiDefaultActive] hmiPort.receive {
log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***");
repeat;
}
[vc_hmiDefaultActive] hmiPort.receive(HmiSignageEventInd:?) -> value v_hmiSignageEventInd {
//store every upper tester indication received
vc_hmiSignageEventIndList[lengthof(vc_hmiSignageEventIndList)] := v_hmiSignageEventInd;
repeat;
}
[vc_hmiDefaultActive] hmiPort.receive {
log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***");
repeat;
}
}
/**
* @desc Default handling cf01 de-initialisation.
*/
altstep a_mtcCf01Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3,
inout ItsAutoInteropGeonetworking p_eut4
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
[] a_shutdown() {
f_mtcCf01Down(p_eut1, p_eut2, p_eut3, p_eut4);
log("*** a_mtcCf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
/**
* @desc Default handling cf02 de-initialisation.
*/
altstep a_mtcCf02Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
[] a_shutdown() {
f_mtcCf02Down(p_eut1, p_eut2);
log("*** a_mtcCf02Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
/**
* @desc Default handling cf03 de-initialisation.
*/
altstep a_mtcCf03Down(
inout ItsAutoInteropGeonetworking p_eut1,
inout ItsAutoInteropGeonetworking p_eut2,
inout ItsAutoInteropGeonetworking p_eut3
) runs on ItsAutoInteropGeoNetworkingMtc /* TITAN TODO: mtc ItsAutoInteropGeoNetworkingMtc system ItsAutoInteropGeoNetworkingSystem */ {
[] a_shutdown() {
f_mtcCf03Down(p_eut1, p_eut2, p_eut3);
log("*** a_mtcCf03Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
} // End of group autoInteropAltsteps
} // End of module ItsAutoInterop_Functions