/** * @author ETSI / STF405 / STF449 * @version $URL$ * $Id$ * @desc CAM Testcases (TP version: 0.0.1) * */ module ItsCam_TestCases { // LibCommon import from LibCommon_Sync all; import from LibCommon_VerdictControl all; import from LibCommon_Time all; // LibIts import from LibItsCommon_Functions all; import from LibItsCommon_TypesAndValues { type UtChangePosition }; import from LibItsCam_TestSystem all; import from LibItsCam_Functions all; import from LibItsCam_Templates all; import from LibItsCam_TypesAndValues all; import from LibItsCam_Pics {modulepar all}; import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; // 5.2.1 group camMessageDissemination { group camMessageFormat { /** * @desc Check that protocolVersion is set to 1 and messageID is * set to 2. *
             * Pics Selection: PICS_CAMHEADER
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated 
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing ITS PDU header
             *                     containing protocolVersion
             *                         indicating value 1
             *                     and containing messageID
             *                         indicating value 2
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-01 * @reference ETSI EN 302 637-2 , Annex B.1 */ testcase TC_CAM_MSD_FMT_BV_01() runs on ItsCam system ItsCamSystem { // Local variables // Test control // 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 TC_CAM_MSD_FMT_BV_01 /** * @desc Check that LF container is included in 1st CAM since CA * basic service activation. *
             * Pics Selection: PICS_LOWFREQUENCYCONTAINER
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         and the IUT has not sent any CAM yet
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated 
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing lowFrequencyContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-02 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_02() runs on ItsCam system ItsCamSystem { // Local variables // Test control // 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 TC_CAM_MSD_FMT_BV_02 /** * @desc Check that LF container is included if time elapsed since * the generation of the last CAM with the low frequency * container generation is equal or larger than 500 ms. *
             * Pics Selection: PICS_LOWFREQUENCYCONTAINER
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         and the IUT has sent a CAM
             *             containing cam
             *                 containing camParameters
             *                     containing lowFrequencyContainer at time TIME_1
             *         and the IUT has not sent CAM
             *             containing cam
             *                 containing camParameters
             *                     containing lowFrequencyContainer after TIME_1
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated at time TIME_2 >= (TIME_1 + 500ms)
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing lowFrequencyContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-03 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_03() runs on ItsCam system ItsCamSystem { // Local variables timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.05; 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 // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); 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 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); } else { log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***"); tc_ac.start; repeat; } } [] t_minTransInterval.timeout { v_nextCamWithLF := true; 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 TC_CAM_MSD_FMT_BV_03 /** * @desc Check that specialVehicle container is included in 1st CAM * since CA basic service activation. *
             * Pics Selection: PICS_SPECIALVEHICLECONTAINER
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         and the IUT is configured to advertise itself as a special vehicle
             *         and the IUT has not sent any CAM yet
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-04 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_04() runs on ItsCam system ItsCamSystem { // Local variables var VehicleRole v_vehicleRole := c_vehicleRole_roadWork; // Test control if (not PICS_SPECIALVEHICLECONTAINER) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); } // 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 TC_CAM_MSD_FMT_BV_04 /** * @desc Check that specialVehicle container is included if time * elapsed since the generation of the last CAM with the * special vehicle container generation is equal or larger * than 500 ms. *
             * Pics Selection: PICS_SPECIALVEHICLECONTAINER
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         and the IUT has sent a CAM
             *             containing cam
             *                 containing camParameters
             *                     containing specialVehicleContainer at time TIME_1
             *         and the IUT has not sent CAM
             *             containing cam
             *                 containing camParameters
             *                     containing specialVehicleContainer after TIME_1
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated at time TIME_2 >= (TIME_1 + 500ms)
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-05 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_05() runs on ItsCam system ItsCamSystem { // Local variables timer t_minTransInterval := c_specialVehicleGenerationTime * 1.05; 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_SPECIALVEHICLECONTAINER) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); } // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); // 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 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 TC_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 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER * Initial conditions: * with { * the IUT being in the "initial state * } * INFO: Curvature value * FIELD: highFrequencyContainer * .basicVehicleContainerHighFrequency * .curvature * VALUE: measured value * * Expected behaviour: * ensure that { * when { * the IUT is alerted about INFO * } * then { * the IUT sends a valid CAM * containing cam * containing camParameters * containing FIELD set to VALUE * } * } * * * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_01() runs on ItsCam system ItsCamSystem { // Local variables var CamInd v_camInd; var template (present) CurvatureValue v_curVal := ?; var boolean v_initialReceived := false; const CurvatureValue c_curValOffset := 1; // Test control // 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 v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue+c_curValOffset; 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 TC_CAM_MSD_INA_BV_01_01 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO:  Brake pedal being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .brakePedalActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-02 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_02() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Brake pedal being activated", { m_setAccelerationControlStatus(c_brakePedalEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_02 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO:  Brake pedal being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .brakePedalActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-03 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_03() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Brake pedal being deactivated", { m_setAccelerationControlStatus(c_brakePedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_03 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Gas pedal being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .gasPedalActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-04 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_04() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Gas pedal being activated", { m_setAccelerationControlStatus(c_gasPedalEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_04 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Gas pedal being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .gasPedalActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-05 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_05() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Gas pedal being deactivated", { m_setAccelerationControlStatus(c_gasPedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_05 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Emergency brake being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .emergencyBrakeActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-06 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_06() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Emergency brake being activated", { m_setAccelerationControlStatus(c_emergencyBrakeEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_06 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Emergency brake being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .emergencyBrakeActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-07 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_07() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Emergency brake being deactivated", { m_setAccelerationControlStatus(c_emergencyBrakeEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_07 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Collision warning being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .collisionWarningActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-08 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_08() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Collision warning being activated", { m_setAccelerationControlStatus(c_collisionWarningEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_08 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Collision warning being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .collisionWarningActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-09 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_09() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Collision warning being deactivated", { m_setAccelerationControlStatus(c_collisionWarningEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_09 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: ACC being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .accActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-10 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_10() runs on ItsCam system ItsCamSystem { // Local variables // 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( "ACC being activated", { m_setAccelerationControlStatus(c_accEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_10 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: ACC being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .accActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-11 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_11() runs on ItsCam system ItsCamSystem { // Local variables // 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( "ACC being deactivated", { m_setAccelerationControlStatus(c_accEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_11 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Cruise control being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .cruiseControl
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-12 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_12() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Cruise control being activated", { m_setAccelerationControlStatus(c_cruiseControlEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_12 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Cruise control being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .cruiseControl
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-13 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_13() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Cruise control being deactivated", { m_setAccelerationControlStatus(c_cruiseControlEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_13 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Speed limiter being activated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .speedLimiterActive
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-14 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_14() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Speed limiter being activated", { m_setAccelerationControlStatus(c_speedLimiterEngaged) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_14 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Speed limiter control being deactivated
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .accelerationControl
                 *                .speedLimiterActive
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-15 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_15() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Speed limiter control being deactivated", { m_setAccelerationControlStatus(c_speedLimiterEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_15 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Low beam headlights being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .lowBeamHeadlightsOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-16 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_16() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Low beam headlights being activated", { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_16 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Low beam headlights being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .lowBeamHeadlightsOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-17 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_17() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Low beam headlights being deactivated", { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_17 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: High beam headlights being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .highBeamHeadlightsOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-18 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_18() runs on ItsCam system ItsCamSystem { // Local variables // 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( "High beam headlights being activated", { m_setExteriorLightsStatus(c_highBeamHeadlightsOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_18 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: High beam headlights being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .highBeamHeadlightsOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-19 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_19() runs on ItsCam system ItsCamSystem { // Local variables // 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( "High beam headlights being deactivated", { m_setExteriorLightsStatus(c_highBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_19 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Left turn signal being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .leftTurnSignalOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-20 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_20() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Left turn signal being activated", { m_setExteriorLightsStatus(c_leftTurnSignalOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_20 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Left turn signal being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .leftTurnSignalOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-21 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_21() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Left turn signal being deactivated", { m_setExteriorLightsStatus(c_leftTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_21 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Right turn signal being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .rightTurnSignalOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-22 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_22() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Right turn signal being activated", { m_setExteriorLightsStatus(c_rightTurnSignalOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_22 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Right turn signal being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .rightTurnSignalOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-23 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_23() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Right turn signal being deactivated", { m_setExteriorLightsStatus(c_rightTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_23 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Daytime running lights being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .daytimeRunningLightsOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-24 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_24() runs on ItsCam system ItsCamSystem { // Local variables // 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 activated", { m_setExteriorLightsStatus(c_daytimeRunningLightsOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_24 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Daytime running lights being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .daytimeRunningLightsOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-25 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_25() runs on ItsCam system ItsCamSystem { // Local variables // 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(c_daytimeRunningLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_25 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Reverse light being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .reverseLightOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-26 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_26() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Reverse light being activated", { m_setExteriorLightsStatus(c_reverseLightOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_26 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Reverse light being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .reverseLightOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-27 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_27() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Reverese light being deactivated", { m_setExteriorLightsStatus(c_reverseLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_27 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Fog lights being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .fogLightOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-28 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_28() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Fog lights being activated", { m_setExteriorLightsStatus(c_fogLightOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_28 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Fog lights being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .fogLightOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-29 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_29() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Fog lights being deactivated", { m_setExteriorLightsStatus(c_fogLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_29 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Parking lights being activated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .parkingLightsOn
                 *     VALUE: 1
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-30 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_30() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Parking lights being activated", { m_setExteriorLightsStatus(c_parkingLightsOn) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_30 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Parking lights being deactivated
                 *     FIELD: lowFrequencyContainer
                 *                .basicVehicleContainerLowFrequency
                 *                .exteriorLights
                 *                .parkingLightsOn
                 *     VALUE: 0
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-31 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_31() runs on ItsCam system ItsCamSystem { // Local variables // 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( "Parking lights being deactivated", { m_setExteriorLightsStatus(c_parkingLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff)) } ); // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_INA_BV_01_31 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Heading value
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .heading
                 *     VALUE: measured value
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-32 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_32() runs on ItsCam system ItsCamSystem { // Local variables var CamInd v_camInd; var template (present) HeadingValue v_headingVal := ?; var boolean v_initialReceived := false; const HeadingValue c_headingValOffset := 1; // Test control // 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_utTriggerEvent(m_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_utTriggerEvent(m_changeHeading(c_headingValOffset)); 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 TC_CAM_MSD_INA_BV_01_32 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Speed value
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .speed
                 *     VALUE: measured value
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-33 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_33() runs on ItsCam system ItsCamSystem { // Local variables var CamInd v_camInd; var template (present) SpeedValue v_speedVal := ?; var boolean v_initialReceived := false; const SpeedValue c_speedValOffset := 1; // Test control // 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_utTriggerEvent(m_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_utTriggerEvent(m_changeSpeed(c_speedValOffset)); 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 TC_CAM_MSD_INA_BV_01_33 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Drive direction value
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .driveDirection
                 *     VALUE: measured value
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-34 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_34() runs on ItsCam system ItsCamSystem { // Local variables var CamInd v_camInd; var DriveDirection v_driveVal := backward; // Test control // 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 TC_CAM_MSD_INA_BV_01_34 /** * @desc Check that latest value of in-vehicle data is included * in CAM. *
                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state
                 *     }
                 *     INFO: Yaw rate value
                 *     FIELD: highFrequencyContainer
                 *                .basicVehicleContainerHighFrequency
                 *                .yawRate
                 *     VALUE: measured value
                 * 
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             the IUT is alerted about INFO
                 *         }
                 *         then {
                 *             the IUT sends a valid CAM
                 *                 containing cam
                 *                     containing camParameters
                 *                         containing FIELD set to VALUE
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-35 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_35() runs on ItsCam system ItsCamSystem { // Local variables var CamInd v_camInd; var template (present) YawRateValue v_yawRateVal := ?; var boolean v_initialReceived := false; const YawRateValue c_yawRateValOffset := 1; // Test control // 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) { 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 TC_CAM_MSD_INA_BV_01_35 } // end group camInVehicleData /** * @desc Check that publicTransportContainer is included if * vehicleRole is set to publicTransport(1). *
             * Pics Selection: PICS_PUBLICTRANS
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to publicTransport(1)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing publicTransportContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-02 * @reference ETSI EN 302 637-2 , Annex B.11 */ testcase TC_CAM_MSD_INA_BV_02() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_02 /** * @desc Check that specialTransportContainer is included if * vehicleRole is set to specialTransport(2). *
             * Pics Selection: PICS_SPECIALTRANS
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to specialTransport(2)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing specialTransportContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-03 * @reference ETSI EN 302 637-2 , Annex B.12 */ testcase TC_CAM_MSD_INA_BV_03() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_03 /** * @desc Check that dangerousGoodsContainer is included if * vehicleRole is set to dangerousGoods(3). *
             * Pics Selection: PICS_DANGEROUSGOODS
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to dangerousGoods(3)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing dangerousGoodsContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-04 * @reference ETSI EN 302 637-2 , Annex B.13 */ testcase TC_CAM_MSD_INA_BV_04() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_DANGEROUSGOODS) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_DANGEROUSGOODS need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_04 /** * @desc Check that roadWorksContainerBasic is included if * vehicleRole is set to roadWork(4). *
             * Pics Selection: PICS_ROADWORKS
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to roadWork(4)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing roadWorksContainerBasic
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-05 * @reference ETSI EN 302 637-2 , Annex B.14 */ testcase TC_CAM_MSD_INA_BV_05() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_ROADWORKS) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_ROADWORKS need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_05 /** * @desc Check that rescueContainer is included if vehicleRole is * set to rescue(5). *
             * Pics Selection: PICS_RESCUE
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to rescue(5)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing rescueContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-06 * @reference ETSI EN 302 637-2 , Annex B.15 */ testcase TC_CAM_MSD_INA_BV_06() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_RESCUE) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_RESCUE need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_06 /** * @desc Check that emergencyContainer is included if vehicleRole * is set to emergency(6). *
             * Pics Selection: PICS_EMERGENCY
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to emergency(6)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing emergencyContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-07 * @reference ETSI EN 302 637-2 , Annex B.16 */ testcase TC_CAM_MSD_INA_BV_07() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_EMERGENCY) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_EMERGENCY need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_07 /** * @desc Check that safetyCarContainer is included if vehicleRole * is set to safetyCar(7). *
             * Pics Selection: PICS_SAFETY_CAR
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT’s vehicle role being set to safetyCar(7)
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             a CAM is generated
             *         }
             *         then {
             *             the IUT sends a valid CAM
             *                 containing cam
             *                     containing camParameters
             *                         containing specialVehicleContainer
             *                             containing safetyCarContainer
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-08 * @reference ETSI EN 302 637-2 , Annex B.17 */ testcase TC_CAM_MSD_INA_BV_08() runs on ItsCam system ItsCamSystem { // Local variables // Test control if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SAFETY_CAR) { testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER and PICS_SAFETY_CAR need to be set to true"); } // 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 TC_CAM_MSD_INA_BV_08 } // end group camInformationAdaptation group camGenerationFrequency { group CAM_MSD_GFQ_BV_01 { /** * @desc Check that CAMs are not generated more frequently than * T_GenCamMin. *
                 * Pics Selection: PICS_T_GENCAMMIN
                 * Initial conditions: 
                 *     with {
                 *         the IUT being in the "initial state"
                 *     }
                 * Expected behaviour:
                 *     ensure that {
                 *         when {
                 *             IUT sends a CAM
                 *         }
                 *         then {
                 *             the IUT does not send any CAM before expiry of T_GenCamMin
                 *         }
                 *     }
                 * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-01 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_01() runs on ItsCam system ItsCamSystem { // Local variables timer t_minTransInterval := PICS_T_GENCAMMIN * 0.95; var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s var integer v_cntSpeed, v_cntTime; var FncRetCode v_ret; // Test control // 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_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 * Pics Selection: PICS_T_GENCAMMAX * Initial conditions: * with { * the IUT being in the "initial state" * } * Expected behaviour: * ensure that { * when { * IUT sends a CAM * } * then { * the IUT sends another CAM before expiry of T_GenCamMax * } * } * * * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-02 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_02() runs on ItsCam system ItsCamSystem { // Local variables timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.05; var integer v_cntSpeed, v_cntTime; var FncRetCode v_ret; // Test control // 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_BV_02(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 TC_CAM_MSD_GFQ_BV_02 function f_CAM_MSD_GFQ_BV_02(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_BV_01 } //end group CAM_MSD_GFQ_BV_02 /** * @desc Check that TGenCam is set to T_GenCamMax after generating * N_GenCam due to condition 2. *
             * Pics Selection: PICS_T_GENCAMMAX
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT having sent a CAM at time TIME_1
             *         the IUT having sent an anticipated CAM due to condition 2 at time (TIME_1 + INTERVAL_1)
             *         the IUT having sent (N_GenCam - 1) subsequent CAMs every INTERVAL_1
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             the IUT sends CAM
             *         }
             *         then {
             *             the IUT sends another CAM after expiry of T_GenCamMax
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-03 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_03() runs on ItsCam system ItsCamSystem { // Local variables timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95; timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05; 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 // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); 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); } } f_utTriggerEvent(m_changeSpeed(1000)); 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 TC_CAM_MSD_GFQ_BV_03 /** * @desc Check that CAM is generated immediately when the time * elapsed since the last CAM generation is equal or larger * than T_GenCam_Dcc and the absolute difference between * current direction of the originating ITS-S (towards North) * and direction included in previous CAM exceeds 4°. *
             * Pics Selection: PICS_T_GENCAMDCC
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT having sent a CAM at time TIME_1
             *             containing cam
             *                 containing camParameters
             *                     containing highFrequencyContainer
             *                         containing basicVehicleContainerHighFrequency
             *                             containing heading set to HEADING_1
             *         the IUT not having sent any CAM since T_GenCam_Dcc
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             T_GenCam_Dcc expires
             *             and the IUT is alerted that abs(CurrentHeading – HEADING_1) > 4°
             *         }
             *         then {
             *             the IUT sends a CAM immediately
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-04 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_04() runs on ItsCam system ItsCamSystem { // Local variables timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; var CamInd v_camPdu; var HeadingValue v_headingValue; var HeadingValue v_changeHeadingValue := 50; // 4° == 40 // Test control // 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 t_genCam_Dcc.timeout; f_utTriggerEvent(m_changeHeading(v_changeHeadingValue)); t_genCam_Dcc.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_Dcc.timeout { log("*** " & testcasename() & ": FAIL: CAM message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_GFQ_BV_04 /** * @desc Check that CAM is generated immediately when the time * elapsed since the last CAM generation is equal or larger * than T_GenCam_Dcc and the current position and position * included in previous CAM exceeds 4 m. *
             * Pics Selection: PICS_T_GENCAMDCC
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT having sent a CAM at time TIME_1
             *             containing cam
             *                 containing camParameters
             *                     containing basicContainer 
             *                         containing referencePosition set to POSITION_1
             *         the IUT not having sent any CAM since T_GenCam_Dcc
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             T_GenCam_Dcc expires
             *             and the IUT is alerted that distance(CurrentPosition – POSITION_1) > 4 m
             *         }
             *         then {
             *             the IUT sends a CAM immediately
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-05 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_05() runs on ItsCam system ItsCamSystem { // Local variables timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; var CamInd v_camPdu; var ReferencePosition v_referencePosition; var integer v_changePosValue := 4; // 4m // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); 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 t_genCam_Dcc.timeout; v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue); f_utChangePosition ( valueof ( UtChangePosition: { latitude := v_referencePosition.latitude, longitude := v_referencePosition.longitude, elevation := 0 } ) ); t_genCam_Dcc.start; alt { [] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){ tc_ac.stop; 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 TC_CAM_MSD_GFQ_BV_05 /** * @desc Check that CAM is generated immediately when the time * elapsed since the last CAM generation is equal or larger * than T_GenCam_Dcc and the absolute difference between * current speed and speed included in previous CAM * exceeds 0,5 m/s. *
             * Pics Selection: PICS_T_GENCAMDCC
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT having sent a CAM at time TIME_1
             *             containing cam
             *                 containing camParameters
             *                     containing highFrequencyContainer
             *                         containing basicVehicleContainerHighFrequency
             *                             containing speed set to SPEED_1
             *         the IUT not having sent any CAM since T_GenCam_Dcc
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *            T_GenCam_Dcc expires
             *            and the IUT is alerted that abs(CurrentSpeed – SPEED_1) > 0,5 m/s
             *         }
             *         then {
             *             the IUT sends a CAM immediately
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-06 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_06() runs on ItsCam system ItsCamSystem { // Local variables timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; var CamInd v_camPdu; var SpeedValue v_speedValue; var SpeedValue v_changeSpeedValue := 50; // 0,5 m/s == 50 cm/s // Test control // 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_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 t_genCam_Dcc.timeout; f_utTriggerEvent(m_changeSpeed(v_changeSpeedValue)); t_genCam_Dcc.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_Dcc.timeout { log("*** " & testcasename() & ": FAIL: CAM message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_GFQ_BV_06 /** * @desc Check that CAM is generated immediately when the time * elapsed since the last CAM generation is equal or larger * than T_GenCam and equal or larger than T_GenCam_Dcc. *
             * Pics Selection: PICS_T_GENCAM AND PICS_T_GENCAMDCC
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *         the IUT having sent a CAM
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             T_GenCam expires
             *             and T_GenCam_Dcc expires
             *         }
             *         then {
             *             the IUT sends another CAM
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-07 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_07() runs on ItsCam system ItsCamSystem { // Local variables timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95; timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05; 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 // 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_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); } } f_utTriggerEvent(m_changeSpeed(1000)); 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 TC_CAM_MSD_GFQ_BV_07 /** * @desc Check that maximum CAM generation frequency for RSU ITS-S is 1Hz * *
             * Pics Selection: PICS_RSU
             * Initial conditions: 
             *     with {
             *         the IUT being in the "initial state"
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             IUT sends a CAM
             *         }
             *         then {
             *             the IUT does not send another CAM afterbefore 1s
             *         }
             *     }
             * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-08 * @reference ETSI EN 302 637-2 , clause 6.1.4 */ testcase TC_CAM_MSD_GFQ_BV_08() runs on ItsCam system ItsCamSystem { // Local constants const float c_minTime := 0.95; const float c_maxTime := 1.05; // Local variables // 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*1000.0 > c_minTime ) and ( tc_ac.read*1000.0 < c_maxTime )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: CAM message received in time***"); f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success); } else { tc_ac.stop; log("*** " & testcasename() & ": FAIL: CAM message not received in time***"); f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error); } } [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: CAM message not received ***"); f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); } } // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSD_GFQ_BV_08 } // end group camGenerationFrequency } // end group camMessageDissemination group camMessageProcessing { /** * @desc Check that content of received CAM is transmitted to * applications and other facilities. *
         * Pics Selection: PICS_CANRECEPTION
         * Initial conditions: 
         *     with {
         *         the IUT being in the "initial state"
         *     }
         * Expected behaviour:
         *     ensure that {
         *         when {
         *             the IUT receives a valid CAM
         *         }
         *         then {
         *             the IUT forwards the CAM content to upper layers
         *             and the IUT forwards the CAM content to other facilities
         *         }
         *     }
         * 
* * @version 0.0.2 * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSP/BV-01 * @reference ETSI EN 302 637-2 , clause 4.2.2 */ testcase TC_CAM_MSP_BV_01() runs on ItsCam system ItsCamSystem { // Local variables var CamReq v_camReq; var integer i; // Test control // 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, vc_utEvents[i].camMsg); i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": FAIL: CAM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: CAM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } // Postamble f_poDefault(); f_cfDown(); } // end TC_CAM_MSP_BV_01 } // end group camMessageProcessing } // end ItsCam_TestCases