Newer
Older
* @version $URL$
* $Id$
* @desc CAM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsCam_TpFunctions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time all;
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
filatov
committed
import from LibItsSecurity_Functions all;
// 5.2.1
group camMessageDissemination {
group camMessageFormat {
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_01
*/
function f_CAM_MSD_FMT_BV_01() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_01
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_02
*/
function f_CAM_MSD_FMT_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
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
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_02
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_03
*/
function f_CAM_MSD_FMT_BV_03() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.10;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithLF := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_changeSpeed(v_speedValues[v_cntSpeed]);
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including lowFrequencyContainer was received ***");
t_minTransInterval.start;
v_nextCamWithLF := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with LowFrequency container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithLF := false;
repeat;
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithLF == true) {
log("*** " & testcasename() & ": FAIL: No LowFrequency container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***");
tc_ac.start;
repeat;
}
[] t_minTransInterval.timeout {
v_nextCamWithLF := true;
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
log("*** " & testcasename() & ": INFO: Next CAM shall contain LowFrequency container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including lowFrequencyContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_03
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_04
*/
function f_CAM_MSD_FMT_BV_04() runs on ItsCam {
// Local variables
var VehicleRole v_vehicleRole := c_vehicleRole_roadWork;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not (PICS_PUBLICTRANS or PICS_SPECIALTRANS or PICS_DANGEROUSGOODS or PICS_ROADWORKS or PICS_RESCUE or PICS_EMERGENCY or PICS_SAFETY_CAR)) {
testcase.stop(testcasename() & ": (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETYCAR) needs to be set to true");
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
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_04
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_05
*/
function f_CAM_MSD_FMT_BV_05() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_specialVehicleGenerationTime * 1.10;
var VehicleRole v_vehicleRole := roadWork;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithSVC := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not (PICS_PUBLICTRANS or PICS_SPECIALTRANS or PICS_DANGEROUSGOODS or PICS_ROADWORKS or PICS_RESCUE or PICS_EMERGENCY or PICS_SAFETY_CAR)) {
testcase.stop(testcasename() & ": (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETY_CAR) needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_changeSpeed(v_speedValues[v_cntSpeed]);
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
402
403
404
405
406
407
408
409
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including specialVehicleContainer was received ***");
t_minTransInterval.start;
v_nextCamWithSVC := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with SpecialVehicle container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithSVC := false;
repeat;
}
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithSVC == true) {
log("*** " & testcasename() & ": FAIL: No SpecialVehicle container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission w/o SpecialVehicle container ***");
tc_ac.start;
repeat;
}
}
[] t_minTransInterval.timeout {
v_nextCamWithSVC := true;
log("*** " & testcasename() & ": INFO: Next CAM shall contain SpecialVehicle container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including SpecialVehicleContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_05
} // end group camMessageFormat
group camInformationAdaptation {
group camInVehicleData {
type record of UtCamTrigger UtCamTriggers;
type record of CAM CamPdus;
function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam {
// Local variables
var integer v_cnt;
log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***");
if (lengthof(p_utTriggers) != lengthof(p_camPdus)) {
log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
for (v_cnt:=0; v_cnt<lengthof(p_utTriggers); v_cnt:=v_cnt+1) {
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( p_camPdus[v_cnt] )){
tc_ac.stop;
if (v_cnt==lengthof(p_utTriggers)-1) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
}
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_01
*/
function f_CAM_MSD_INA_BV_01_01() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) CurvatureValue v_curVal := ?;
var boolean v_initialReceived := false;
const CurvatureValue c_curValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & "c required for executing the TC ***");
setverdict(inconc);
stop;
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
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Curvature value ***");
// change the curvature value to retrieve the current value
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_curvature(v_curVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the curvature value and set the expectation to the measured value
if (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue >= 0) {
v_curVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue + c_curValOffset) mod 30001;
v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue - c_curValOffset;
if (valueof(v_curVal) < -30000) {
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_01
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_02
*/
function f_CAM_MSD_INA_BV_01_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_brakePedalEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_03
*/
function f_CAM_MSD_INA_BV_01_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_brakePedalEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_brakePedalActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_04
*/
function f_CAM_MSD_INA_BV_01_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_gasPedalEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_05
*/
function f_CAM_MSD_INA_BV_01_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_gasPedalEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_gasPedalActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_06
*/
function f_CAM_MSD_INA_BV_01_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_emergencyBrakeEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_07
*/
function f_CAM_MSD_INA_BV_01_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_emergencyBrakeEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_emergencyBrakeActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_08
*/
function f_CAM_MSD_INA_BV_01_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_collisionWarningEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_08
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_09
*/
function f_CAM_MSD_INA_BV_01_09() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_collisionWarningEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_collisionWarningActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_09
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_10
*/
function f_CAM_MSD_INA_BV_01_10() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_accEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_10
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_11
*/
function f_CAM_MSD_INA_BV_01_11() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_accEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_accActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_11
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_12
*/
function f_CAM_MSD_INA_BV_01_12() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_cruiseControlEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_12
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_13
*/
function f_CAM_MSD_INA_BV_01_13() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_cruiseControlEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_cruiseControl_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_13
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_14
*/
function f_CAM_MSD_INA_BV_01_14() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_speedLimiterEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_14
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_15
*/
function f_CAM_MSD_INA_BV_01_15() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter control being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_speedLimiterEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl((omit, mw_speedLimiterActive_Off))) }
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_15
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_16
*/
function f_CAM_MSD_INA_BV_01_16() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_lowBeamHeadlightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_16
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_17
*/
function f_CAM_MSD_INA_BV_01_17() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_lowBeamHeadlightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_lowBeamLightsOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff /*ifpresent*/ )) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_17
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_18
*/
function f_CAM_MSD_INA_BV_01_18() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_highBeamHeadlightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_18
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_19
*/
function f_CAM_MSD_INA_BV_01_19() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_highBeamHeadlightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_highBeamLightsOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_19
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_20
*/
function f_CAM_MSD_INA_BV_01_20() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_leftTurnSignalOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_20
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_21
*/
function f_CAM_MSD_INA_BV_01_21() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_leftTurnSignalOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_leftTurnSignalOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_21
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_22
*/
function f_CAM_MSD_INA_BV_01_22() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_rightTurnSignalOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_22
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_23
*/
function f_CAM_MSD_INA_BV_01_23() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_rightTurnSignalOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_rightTurnSignalOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_23
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_24
*/
function f_CAM_MSD_INA_BV_01_24() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_daytimeRunningLightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_24
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_25
*/
function f_CAM_MSD_INA_BV_01_25() runs on ItsCam {
// Local variables
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_daytimeRunningLightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_daytimeRunningLightsOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_25
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_26
*/
function f_CAM_MSD_INA_BV_01_26() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverse light being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_reverseLightOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_26
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_27
*/
function f_CAM_MSD_INA_BV_01_27() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverese light being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_reverseLightOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_reverseLightOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_27
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_28
*/
function f_CAM_MSD_INA_BV_01_28() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_fogLightOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_28
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_29
*/
function f_CAM_MSD_INA_BV_01_29() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_fogLightOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_fogLightOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_29
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_30
*/
function f_CAM_MSD_INA_BV_01_30() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_parkingLightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_30
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_31
*/
function f_CAM_MSD_INA_BV_01_31() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_parkingLightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
//FIXME RGY omit has been disallowed in value lists (see $B.1.2.1 of the standad), ifpresent shall be used instead
// { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights((omit, mw_parkingLightsOff))) }
//FIXME DF: remove 'ifpresent', parameter must be a present template
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff /*ifpresent*/)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_31
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_32
*/
function f_CAM_MSD_INA_BV_01_32() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) HeadingValue v_headingVal := ?;
var boolean v_initialReceived := false;
const HeadingValue c_headingValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Heading value ***");
// change the heading value to retrieve the current value
f_changeHeading(c_headingValOffset);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the heading value and set the expectation to the measured value
v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601;
f_changeHeading(c_headingValOffset);
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_32
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_33
*/
function f_CAM_MSD_INA_BV_01_33() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) SpeedValue v_speedVal := ?;
var boolean v_initialReceived := false;
const SpeedValue c_speedValOffset := 100;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Speed value ***");
// change the speed value to retrieve the current value
f_changeSpeed(c_speedValOffset);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the speed value and set the expectation to the measured value
v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384;
f_changeSpeed(c_speedValOffset);
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_33
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_34
*/
function f_CAM_MSD_INA_BV_01_34() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var DriveDirection v_driveVal := backward;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Drive direction value ***");
// change the drive direction
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_driveVal==forward) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
//change again the drive direction and set the expectation to the measured value
v_driveVal := forward;
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_34
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_35
*/
function f_CAM_MSD_INA_BV_01_35() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) YawRateValue v_yawRateVal := ?;
var boolean v_initialReceived := false;
const YawRateValue c_yawRateValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***");
// change the yaw rate value to retrieve the current value
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the yaw rate value and set the expectation to the measured value
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue;
if (valueof(v_yawRateVal)>=32767) { // FIXME Yann/ifsttar: quid if we receive -32768
// FIXME if current value is 32760 and offset applied, we shall not expect posiive value
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
v_yawRateVal := -32766;
}
else {
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset;
}
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_35
} // end group camInVehicleData
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_02
*/
function f_CAM_MSD_INA_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_PUBLICTRANS) {
testcase.stop(testcasename() & ": PICS_PUBLICTRANS need to be set to true");
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport));
// Test Body
log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***");
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_03
*/
function f_CAM_MSD_INA_BV_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALTRANS) {
testcase.stop(testcasename() & ": PICS_SPECIALTRANS need to be set to true");
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_04
*/
function f_CAM_MSD_INA_BV_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_DANGEROUSGOODS) {
testcase.stop(testcasename() & ": PICS_DANGEROUSGOODS need to be set to true");
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_05
*/
function f_CAM_MSD_INA_BV_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_ROADWORKS) {
testcase.stop(testcasename() & ": PICS_ROADWORKS need to be set to true");
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_06
*/
function f_CAM_MSD_INA_BV_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_RESCUE) {
testcase.stop(testcasename() & ": PICS_RESCUE need to be set to true");
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_07
*/
function f_CAM_MSD_INA_BV_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_EMERGENCY) {
testcase.stop(testcasename() & ": PICS_EMERGENCY need to be set to true");
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_08
*/
function f_CAM_MSD_INA_BV_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SAFETY_CAR) {
testcase.stop(testcasename() & ": PICS_SAFETY_CAR need to be set to true");
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_08
} // end group camInformationAdaptation
group camGenerationFrequency {
group CAM_MSD_GFQ_TI_01 {
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_01
*/
function f_CAM_MSD_GFQ_TI_01() runs on ItsCam {
// Local variables
timer t_minTransInterval := PICS_T_GENCAMMIN * 0.90;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_TI_01_helper(t_minTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: CAM message received BEFORE expiry of the minimum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
t_minTransInterval.start;
}
f_changeSpeed(v_speedValues[v_cntSpeed]);
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
}
t_minTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_01
function f_CAM_MSD_GFQ_TI_01_helper(timer t_minTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
if (t_minTransInterval.running) {
return e_error;
}
}
[] t_minTransInterval.timeout {
repeat;
}
[] tc_ac.timeout {
t_minTransInterval.stop;
return e_timeout;
}
}
return e_success;
} // end function f_CAM_MSD_GFQ_TI_01
} // end group CAM_MSD_GFQ_TI_01
group CAM_MSD_GFQ_TI_02 {
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_02
*/
function f_CAM_MSD_GFQ_TI_02() runs on ItsCam {
// Local variables
timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.10;
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_maxTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_TI_02_helper(t_maxTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: No CAM message received BEFORE expiry of the maximum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
t_maxTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_02
function f_CAM_MSD_GFQ_TI_02_helper(timer t_maxTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
t_maxTransInterval.stop;
t_maxTransInterval.start;
}
[] t_maxTransInterval.timeout {
return e_error;
}
[] tc_ac.timeout {
t_maxTransInterval.stop;
return e_timeout;
}
}
return e_success
} // end function f_CAM_MSD_GFQ_TI_02
} //end group CAM_MSD_GFQ_TI_02
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_03
*/
function f_CAM_MSD_GFQ_TI_03() runs on ItsCam {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.90;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
timer t_interval_1_measure := PX_TWAIT;
timer t_interval_1_min;
timer t_interval_1_max;
var float v_interval_1_min;
var float v_interval_1_max;
var integer v_N_GenCam := 3;
var integer v_i;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
t_interval_1_measure.start;
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_interval_1_measure.read;
log("Elapsed time since last CAM: ", v_measured);
tc_ac.stop;
v_interval_1_min := v_measured * 0.8;
v_interval_1_max := v_measured * 1.2;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 1 CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 1 CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
for (v_i:=1; v_i <= v_N_GenCam; v_i:=v_i+1) {
t_interval_1_min.start(v_interval_1_min);
t_interval_1_max.start(v_interval_1_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_interval_1_min.running) {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
t_interval_1_max.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 2 CAM#", v_i, " message received ***");
}
[] t_interval_1_min.timeout {
repeat;
}
[] t_interval_1_max.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_maxTransInterval_min.start;
t_maxTransInterval_max.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_maxTransInterval_min.running) {
log("*** " & testcasename() & ": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_maxTransInterval_max.stop;
log("*** " & testcasename() & ": PASS: Next CAM message received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_maxTransInterval_min.timeout {
repeat;
}
[] t_maxTransInterval_max.timeout {
log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_03
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_04
*/
function f_CAM_MSD_GFQ_BV_04() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
var CamInd v_camPdu;
var HeadingValue v_headingValue;
var HeadingValue v_changeHeadingValue := 50; // 4° == 40
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_changeHeading(v_changeHeadingValue);
t_genCam_dcc.timeout;
t_genCam_min.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_04
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_05
*/
function f_CAM_MSD_GFQ_BV_05() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
var CamInd v_camPdu;
var ReferencePosition v_referencePosition, v_expectedReferencePosition;
var float v_changePosValue := 8.0; // 8 >> 4m
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu {
tc_ac.stop;
v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_expectedReferencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
f_utChangePosition ( valueof ( UtCamChangePosition: {
latitude := v_expectedReferencePosition.latitude - v_referencePosition.latitude,
longitude := v_expectedReferencePosition.longitude - v_referencePosition.longitude,
t_genCam_dcc.timeout;
t_genCam_dcc.start;
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_expectedReferencePosition ) )){
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_05
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_06
*/
function f_CAM_MSD_GFQ_BV_06() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
var CamInd v_camPdu;
var SpeedValue v_speedValue;
var SpeedValue v_changeSpeedValue := 60; // 0,5 m/s << 0,6 m/s == 60 cm/s
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_changeSpeed(v_changeSpeedValue);
t_genCam_dcc.timeout;
t_genCam_min.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_06
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_07
*/
function f_CAM_MSD_GFQ_TI_07() runs on ItsCam {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.90;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
timer t_genCam_measure := PX_TWAIT;
timer t_genCam_min;
timer t_genCam_max;
var float v_genCam_min;
var float v_genCam_max;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_genCam_measure.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_genCam_measure.read;
tc_ac.stop;
v_genCam_min := v_measured * 0.9;
v_genCam_max := v_measured * 1.1;
log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_min.start(v_genCam_min);
t_genCam_max.start(v_genCam_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_genCam_min.running) {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_genCam_max.stop;
log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
repeat;
}
[] t_genCam_max.timeout {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_07
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_08
*/
function f_CAM_MSD_GFQ_TI_08() runs on ItsCam {
// Local constants
const float c_minTime := 0.90;
const float c_maxTime := 1.10;
// Local variables
if (not PICS_CAM_GENERATION or not PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and PICS_RSU required for executing the TC ***");
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if ( ( tc_ac.read > c_minTime )) {
log("*** " & testcasename() & ": PASS: CAM message received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: CAM message not received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_08
} // end group camGenerationFrequency
group camLowerLayerParameters {
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_01
*/
function f_CAM_MSD_PAR_BV_01() runs on ItsCam {
// Local variables
const UInt8 c_gnNhBtpB := 2;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, c_gnNhBtpB)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsultated in BTP-B packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN NH information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_01
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_02
*/
function f_CAM_MSD_PAR_BV_02() runs on ItsCam {
// Local variables
const UInt8 c_gnHtTsb := 5;
const UInt8 c_GnHstSingleHop := 0;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, c_gnHtTsb, c_GnHstSingleHop)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsulated in SHB packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, omit, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in SHB packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_02
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_03
*/
function f_CAM_MSD_PAR_BV_03() runs on ItsCam {
// Local variables
var CamInd v_camInd;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any)) -> value v_camInd {
tc_ac.stop;
if(not ispresent(v_camInd.gnLifetime)) {
log("*** " & testcasename() & ": INCONC: no GN lifetime information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
if(v_camInd.gnLifetime <= 1000) {
log("*** " & testcasename() & ": PASS: Expected CAM message received encapsulted in GN packet with correct lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: Expected CAM message received encapsulted in GN packet with incorrect lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_03
} // end group camLowerLayerParameters
group camGenerationSSP{
function f_CAM_MSD_SSP_BO_XX(
filatov
committed
in charstring p_certName,
in template(value) UtCamTrigger p_utEvent,
in template(present) CAM pmw_CamMsg,
in template(present) Bit256 pmw_ssp := ?
) runs on ItsCam {
// Local variables
filatov
committed
var Oct8 v_certHashedId8;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
// initialize IUT with given certificate
filatov
committed
fx_readCertificateDigest(p_certName, v_certHashedId8);
if( '0000000000000000'O == v_certHashedId8) {
// Certificate not found
log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
setverdict(inconc);
stop;
}
filatov
committed
{ hashedId8 := v_certHashedId8 }
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// execute UT Command
f_utTriggerEvent(p_utEvent);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithSecurityParameters (
pmw_CamMsg,
pmw_ssp
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_SSP_BO_XX
function f_CAM_MSD_SSP_BO_01() runs on ItsCam {
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
} // end f_CAM_MSD_SSP_BO_01
function f_CAM_MSD_SSP_BO_02() runs on ItsCam {
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true");
}
filatov
committed
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_02,
m_setVehicleRole(c_vehicleRole_publicTransport),
mw_camMsg_SVC ( mw_publicTransport_any )
);
} // end f_CAM_MSD_SSP_BO_02
function f_CAM_MSD_SSP_BO_03() runs on ItsCam {
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_03,
m_setVehicleRole(c_vehicleRole_specialTransport),
mw_camMsg_SVC ( mw_specialTransport_any )
);
} // end f_CAM_MSD_SSP_BO_03
}
} // end group camSSP
group camMessageProcessing {
/**
* @desc TP Function for TC_CAM_MSP_BV_01
*/
function f_CAM_MSP_BV_01() runs on ItsCam {
// Local variables
var CamReq v_camReq;
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
m_camMsg_vehicle(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq.msgOut, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": PASS: CAM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
log("*** " & testcasename() & ": FAIL: CAM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSP_BV_01
group camProcessingSSP{
/**
* @desc TP Function for TC_CAM_MSP_SSP_BV_XX
* @param p_certName Certificate to be used to sign the CAM message
* @param p_camMsg CAM value template to be sent to IUT
*/
function f_CAM_MSP_SSP_BV_XX(
in charstring p_certName,
in template (value) CAM p_camMsg
) runs on ItsCam {
// Local variables
var CamReq v_camReq;
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
// Test component configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq.msgOut, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: CAM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: CAM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSP_SSP_BV_XX
function f_CAM_MSP_SSP_BV_01() runs on ItsCam {
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
} // end f_CAM_MSP_SSP_BV_01
function f_CAM_MSP_SSP_BV_02() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_BO_02_AT",
m_camMsg_publicTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
function f_CAM_MSP_SSP_BV_03() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_BO_03_AT",
m_camMsg_specialTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
}// end group camProcessingSSP
} // end group camMessageProcessing
} // end ItsCam_TpFunctions