pax_global_header 0000666 0000000 0000000 00000000064 14165526247 0014526 g ustar 00root root 0000000 0000000 52 comment=dfc2a5f7279a9795c9f3d22f24ee97a4bae15774
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/ 0000775 0000000 0000000 00000000000 14165526247 0021610 5 ustar 00root root 0000000 0000000 ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/.gitmodules 0000664 0000000 0000000 00000000000 14165526247 0023753 0 ustar 00root root 0000000 0000000 ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/ItsCam_TestCases.ttcn 0000664 0000000 0000000 00000320627 14165526247 0025652 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsCAM/ItsCam_TestCases.ttcn $
* $Id: ItsCam_TestCases.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Testcases for CA Protocol
* @reference ETSI EN 302 637-2 v1.4.1
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*/
module ItsCam_TestCases {
// LibItsCam
import from LibItsCam_TestSystem all;
// Ats Its
import from ItsCam_TpFunctions all;
// 5.2.1
group camMessageDissemination {
group camMessageFormat {
/**
* @desc Check that protocolVersion is set to 2 and messageID is
* set to 2.
*
* Pics Selection: PICS_CAM_GENERATION
* 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 2
* and containing messageID
* indicating value 2
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/FMT/BV-01
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.1
*/
testcase TC_CAM_MSD_FMT_BV_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_FMT_BV_01();
} // 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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/FMT/BV-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_FMT_BV_02();
} // 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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/FMT/BV-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_FMT_BV_03();
} // 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_CAM_GENERATION AND NOT PIC_RSU AND (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETYCAR)
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/FMT/BV-04
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_04() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_FMT_BV_04();
} // 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_CAM_GENERATION AND NOT PIC_RSU AND (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETYCAR)
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/FMT/BV-05
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_05() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_FMT_BV_05();
} // end TC_CAM_MSD_FMT_BV_05
} // end group camMessageFormat
group camInformationAdaptation {
group camInVehicleData {
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_01();
} // end TC_CAM_MSD_INA_BV_01_01
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_02();
} // end TC_CAM_MSD_INA_BV_01_02
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_03();
} // end TC_CAM_MSD_INA_BV_01_03
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-04
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_04() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_04();
} // end TC_CAM_MSD_INA_BV_01_04
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-05
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_05() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_05();
} // end TC_CAM_MSD_INA_BV_01_05
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-06
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_06() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_06();
} // end TC_CAM_MSD_INA_BV_01_06
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-07
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_07() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_07();
} // end TC_CAM_MSD_INA_BV_01_07
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-08
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_08() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_08();
} // end TC_CAM_MSD_INA_BV_01_08
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-09
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_09() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_09();
} // end TC_CAM_MSD_INA_BV_01_09
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-10
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_10() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_10();
} // end TC_CAM_MSD_INA_BV_01_10
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-11
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_11() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_11();
} // end TC_CAM_MSD_INA_BV_01_11
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-12
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_12() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_12();
} // end TC_CAM_MSD_INA_BV_01_12
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-13
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_13() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_13();
} // end TC_CAM_MSD_INA_BV_01_13
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-14
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_14() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_14();
} // end TC_CAM_MSD_INA_BV_01_14
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-15
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_15() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_15();
} // end TC_CAM_MSD_INA_BV_01_15
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-16
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_16() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_16();
} // end TC_CAM_MSD_INA_BV_01_16
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-17
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_17() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_17();
} // end TC_CAM_MSD_INA_BV_01_17
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-18
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_18() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_18();
} // end TC_CAM_MSD_INA_BV_01_18
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-19
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_19() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_19();
} // end TC_CAM_MSD_INA_BV_01_19
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-20
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_20() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_20();
} // end TC_CAM_MSD_INA_BV_01_20
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-21
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_21() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_21();
} // end TC_CAM_MSD_INA_BV_01_21
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-22
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_22() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_22();
} // end TC_CAM_MSD_INA_BV_01_22
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-23
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_23() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_23();
} // end TC_CAM_MSD_INA_BV_01_23
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-24
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_24() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_24();
} // end TC_CAM_MSD_INA_BV_01_24
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-25
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_25() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_25();
} // end TC_CAM_MSD_INA_BV_01_25
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-26
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_26() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_26();
} // end TC_CAM_MSD_INA_BV_01_26
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-27
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_27() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_27();
} // end TC_CAM_MSD_INA_BV_01_27
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-28
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_28() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_28();
} // end TC_CAM_MSD_INA_BV_01_28
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-29
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_29() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_29();
} // end TC_CAM_MSD_INA_BV_01_29
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-30
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_30() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_30();
} // end TC_CAM_MSD_INA_BV_01_30
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-31
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_31() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_31();
} // end TC_CAM_MSD_INA_BV_01_31
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-32
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_32() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_32();
} // end TC_CAM_MSD_INA_BV_01_32
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-33
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_33() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_33();
} // end TC_CAM_MSD_INA_BV_01_33
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-34
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_34() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_34();
} // end TC_CAM_MSD_INA_BV_01_34
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-01-35
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_35() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_01_35();
} // 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_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-02
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.11
*/
testcase TC_CAM_MSD_INA_BV_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_02();
} // end TC_CAM_MSD_INA_BV_02
/**
* @desc Check that specialTransportContainer is included if
* vehicleRole is set to specialTransport(2).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-03
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.12
*/
testcase TC_CAM_MSD_INA_BV_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_03();
} // end TC_CAM_MSD_INA_BV_03
/**
* @desc Check that dangerousGoodsContainer is included if
* vehicleRole is set to dangerousGoods(3).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-04
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.13
*/
testcase TC_CAM_MSD_INA_BV_04() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_04();
} // end TC_CAM_MSD_INA_BV_04
/**
* @desc Check that roadWorksContainerBasic is included if
* vehicleRole is set to roadWork(4).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-05
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.14
*/
testcase TC_CAM_MSD_INA_BV_05() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_05();
} // end TC_CAM_MSD_INA_BV_05
/**
* @desc Check that rescueContainer is included if vehicleRole is
* set to rescue(5).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-06
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.15
*/
testcase TC_CAM_MSD_INA_BV_06() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_06();
} // end TC_CAM_MSD_INA_BV_06
/**
* @desc Check that emergencyContainer is included if vehicleRole
* is set to emergency(6).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-07
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.16
*/
testcase TC_CAM_MSD_INA_BV_07() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_07();
} // end TC_CAM_MSD_INA_BV_07
/**
* @desc Check that safetyCarContainer is included if vehicleRole
* is set to safetyCar(7).
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/INA/BV-08
* @reference ETSI EN 302 637-2 v1.4.1, Annex B.17
*/
testcase TC_CAM_MSD_INA_BV_08() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_INA_BV_08();
} // end TC_CAM_MSD_INA_BV_08
} // end group camInformationAdaptation
group camGenerationFrequency {
/**
* @desc Check that CAMs are not generated more frequently than
* T_GenCamMin.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_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 any CAM before expiry of T_GenCamMin
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/TI-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_TI_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_TI_01();
} // end TC_CAM_MSD_GFQ_TI_01
/**
* @desc Check that CAMs are not generated less frequently than
* T_GenCamMax.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/TI-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_TI_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_TI_02();
} // end TC_CAM_MSD_GFQ_TI_02
/**
* @desc Check that TGenCam is set to T_GenCamMax after generating
* N_GenCam due to condition 2.
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/TI-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_TI_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_TI_03();
} // end TC_CAM_MSD_GFQ_TI_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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/BV-04
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_04() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_BV_04();
} // 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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/BV-05
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_05() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_BV_05();
} // 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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/BV-06
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_06() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_BV_06();
} // 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_CAM_GENERATION AND NOT PIC_RSU
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/TI-07
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_TI_07() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_TI_07();
} // end TC_CAM_MSD_GFQ_TI_07
/**
* @desc Check that maximum CAM generation frequency for RSU ITS-S is 1Hz
*
*
* Pics Selection: PICS_CAM_GENERATION AND 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/GFQ/TI-08
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.1.4
*/
testcase TC_CAM_MSD_GFQ_TI_08() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_GFQ_TI_08();
} // end TC_CAM_MSD_GFQ_TI_08
} // end group camGenerationFrequency
group camLowerLayerParameters {
/**
* @desc Check that CAM is encapsulated in BTP type B packet
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a BTP-B packet
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/PAR/BV-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_PAR_BV_01();
} // end TC_CAM_MSD_PAR_BV_01
/**
* @desc Check that CAM is encapsulated in SHB packet
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a SHB packet
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/PAR/BV-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_PAR_BV_02();
} // end TC_CAM_MSD_PAR_BV_02
/**
* @desc Check that CAM is encapsulated in GN packet with lifetime lower than 1s
*
* Pics Selection: PICS_CAM_GENERATION AND NOT PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a GN packet
* containing Basic Header
* containing Lifetime field
* indicating value lower than 1s
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/PAR/BV-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_PAR_BV_03();
} // end TC_CAM_MSD_PAR_BV_03
} // end group camLowerLayerParameters
group camGenerationSSP {
/**
* @desc Check that the IUT does not send a CAM
* when its content is not permitted by signing certificate
*
* Pics Selection: PICS_CAM_GENERATION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* the IUT is authorized to sign CAMs with the certificate
* containing CAM SSP
* indicating bit at position '1' set to 0
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a CAM
* containing CenDsrcTollingZone
* }
* then {
* the IUT does not send this CAM
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/SSP/BO-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSD_SSP_BO_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_SSP_BO_01();
} // end TC_CAM_MSD_SSP_BO_01
/**
* @desc Check that the IUT does not send a CAM
* when its content is not permitted by signing certificate
*
* Pics Selection: PICS_CAM_GENERATION AND PICS_IS_IUT_SECURED
* AND PICS_SPECIALVEHICLECONTAINER AND PICS_PUBLICTRANS
* Initial conditions:
* with {
* the IUT being in the "initial state"
* the IUT is authorized to sign CAMs with the certificate
* containing CAM SSP
* indicating bit at position '2' set to 0
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a CAM
* containing publicTransportContainer
* }
* then {
* the IUT does not send this CAM
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/SSP/BO-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSD_SSP_BO_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_SSP_BO_02();
} // end TC_CAM_MSD_SSP_BO_02
/**
* @desc Check that the IUT does not send a CAM
* when its content is not permitted by signing certificate
*
* Pics Selection: PICS_CAM_GENERATION AND PICS_IS_IUT_SECURED
* AND PICS_SPECIALVEHICLECONTAINER AND PICS_SPECIALTRANS
* Initial conditions:
* with {
* the IUT being in the "initial state"
* the IUT is authorized to sign CAMs with the certificate
* containing CAM SSP
* indicating bit at position '3' set to 0
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a CAM
* containing specialTransportContainer
* }
* then {
* the IUT does not send this CAM
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSD/SSP/BO-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSD_SSP_BO_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_SSP_BO_03();
} // end TC_CAM_MSD_SSP_BO_03
} // end group camGenerationSSP
} // end group camMessageDissemination
group camMessageProcessing {
/**
* @desc Check that content of received CAM is transmitted to
* applications and other facilities.
*
* Pics Selection: PICS_CAM_RECEPTION
* 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
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSP/BV-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 4.2.2
*/
testcase TC_CAM_MSP_BV_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSP_BV_01();
} // end TC_CAM_MSP_BV_01
group camProcessingSSP {
/**
* @desc Check that IUT discards CAM if SSP value of the signing certificate
* is not consistent with the provided containers.
*
* Pics Selection: PICS_CAM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured CAM
* containing CenDsrcTollingZone/ProtectedCommunicationZonesRSU
* signed with certificate
* containing CAM SSP bit at position 0
* indicating 0
* }
* then {
* the IUT discards the CAM
* and the IUT does not forward the CAM content to upper layers
* and the IUT does not forward the CAM content to other facilities
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSP/SSP/BV-01-01
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSP_SSP_BV_01() runs on ItsCam system ItsCamSystem {
f_CAM_MSP_SSP_BV_01();
} // end TC_CAM_MSP_BV_01
/**
* @desc Check that IUT discards CAM if SSP value of the signing certificate
* is not consistent with the provided containers.
*
* Pics Selection: PICS_CAM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured CAM
* containing publicTransportContainer
* and signed with certificate
* containing CAM SSP bit at position 1
* indicating 0
* }
* then {
* the IUT discards the CAM
* and the IUT does not forward the CAM content to upper layers
* and the IUT does not forward the CAM content to other facilities
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSP/SSP/BV-01-02
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSP_SSP_BV_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSP_SSP_BV_02();
} // end TC_CAM_MSP_BV_02
/**
* @desc Check that IUT discards CAM if SSP value of the signing certificate
* is not consistent with the provided containers.
*
* Pics Selection: PICS_CAM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured CAM
* containing specialTransportContainer
* and signed with certificate
* containing CAM SSP bit at position 2
* indicating 0
* }
* then {
* the IUT discards the CAM
* and the IUT does not forward the CAM content to upper layers
* and the IUT does not forward the CAM content to other facilities
* }
* }
*
*
* @see ETSI TS 102 868-2 v1.4.3 TP/CAM/MSP/SSP/BV-01-03
* @reference ETSI EN 302 637-2 v1.4.1, clause 6.2.2.1
*/
testcase TC_CAM_MSP_SSP_BV_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSP_SSP_BV_03();
} // end TC_CAM_MSP_BV_03
}// end group camProcessingSSP
} // end group camMessageProcessing
} // end ItsCam_TestCases
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/ItsCam_TestControl.ttcn 0000664 0000000 0000000 00000011447 14165526247 0026231 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsCAM/ItsCam_TestControl.ttcn $
* $Id: ItsCam_TestControl.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Test Control file for CAM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsCam_TestControl {
// ATS CAM
import from ItsCam_TestCases all;
// LibIts
import from LibItsCam_Pics all;
// Test Execution
control {
if(PICS_CAM_GENERATION) {
execute(TC_CAM_MSD_FMT_BV_01());
if (not PICS_RSU) {
execute(TC_CAM_MSD_FMT_BV_02());
execute(TC_CAM_MSD_FMT_BV_03());
execute(TC_CAM_MSD_FMT_BV_04());
execute(TC_CAM_MSD_FMT_BV_05());
execute(TC_CAM_MSD_INA_BV_01_01());
execute(TC_CAM_MSD_INA_BV_01_02());
execute(TC_CAM_MSD_INA_BV_01_03());
execute(TC_CAM_MSD_INA_BV_01_04());
execute(TC_CAM_MSD_INA_BV_01_05());
execute(TC_CAM_MSD_INA_BV_01_06());
execute(TC_CAM_MSD_INA_BV_01_07());
execute(TC_CAM_MSD_INA_BV_01_08());
execute(TC_CAM_MSD_INA_BV_01_09());
execute(TC_CAM_MSD_INA_BV_01_10());
execute(TC_CAM_MSD_INA_BV_01_11());
execute(TC_CAM_MSD_INA_BV_01_12());
execute(TC_CAM_MSD_INA_BV_01_13());
execute(TC_CAM_MSD_INA_BV_01_14());
execute(TC_CAM_MSD_INA_BV_01_15());
execute(TC_CAM_MSD_INA_BV_01_16());
execute(TC_CAM_MSD_INA_BV_01_17());
execute(TC_CAM_MSD_INA_BV_01_18());
execute(TC_CAM_MSD_INA_BV_01_19());
execute(TC_CAM_MSD_INA_BV_01_20());
execute(TC_CAM_MSD_INA_BV_01_21());
execute(TC_CAM_MSD_INA_BV_01_22());
execute(TC_CAM_MSD_INA_BV_01_23());
execute(TC_CAM_MSD_INA_BV_01_24());
execute(TC_CAM_MSD_INA_BV_01_25());
execute(TC_CAM_MSD_INA_BV_01_26());
execute(TC_CAM_MSD_INA_BV_01_27());
execute(TC_CAM_MSD_INA_BV_01_28());
execute(TC_CAM_MSD_INA_BV_01_29());
execute(TC_CAM_MSD_INA_BV_01_30());
execute(TC_CAM_MSD_INA_BV_01_31());
execute(TC_CAM_MSD_INA_BV_01_32());
execute(TC_CAM_MSD_INA_BV_01_33());
execute(TC_CAM_MSD_INA_BV_01_34());
execute(TC_CAM_MSD_INA_BV_01_35());
}
if (PICS_PUBLICTRANS) {
execute(TC_CAM_MSD_INA_BV_02());
}
if (PICS_SPECIALTRANS) {
execute(TC_CAM_MSD_INA_BV_03());
}
if (PICS_DANGEROUSGOODS) {
execute(TC_CAM_MSD_INA_BV_04());
}
if (PICS_ROADWORKS) {
execute(TC_CAM_MSD_INA_BV_05());
}
if (PICS_RESCUE) {
execute(TC_CAM_MSD_INA_BV_06());
}
if (PICS_EMERGENCY) {
execute(TC_CAM_MSD_INA_BV_07());
}
if (PICS_SAFETY_CAR) {
execute(TC_CAM_MSD_INA_BV_08());
}
execute(TC_CAM_MSD_GFQ_TI_01());
execute(TC_CAM_MSD_GFQ_TI_02());
execute(TC_CAM_MSD_GFQ_TI_03());
execute(TC_CAM_MSD_GFQ_BV_04());
execute(TC_CAM_MSD_GFQ_BV_05());
execute(TC_CAM_MSD_GFQ_BV_06());
execute(TC_CAM_MSD_GFQ_TI_07());
execute(TC_CAM_MSD_GFQ_TI_08());
execute(TC_CAM_MSD_PAR_BV_01());
execute(TC_CAM_MSD_PAR_BV_02());
execute(TC_CAM_MSD_PAR_BV_03());
if (PICS_IS_IUT_SECURED) {
if (PICS_PUBLICTRANS and PICS_SPECIALVEHICLECONTAINER) {
execute(TC_CAM_MSD_SSP_BO_02());
}
if (PICS_SPECIALTRANS and PICS_SPECIALVEHICLECONTAINER) {
execute(TC_CAM_MSD_SSP_BO_03());
}
}
}
if(PICS_CAM_RECEPTION) {
execute(TC_CAM_MSP_BV_01());
if (PICS_IS_IUT_SECURED) {
execute(TC_CAM_MSP_SSP_BV_02());
execute(TC_CAM_MSP_SSP_BV_03());
}
}
}
} // end ItsCam_TestControl ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/ItsCam_TpFunctions.ttcn 0000664 0000000 0000000 00000451670 14165526247 0026233 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsCAM/ItsCam_TpFunctions.ttcn $
* $Id: ItsCam_TpFunctions.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc CAM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsCam_TpFunctions {
import from LibItsCommon_Pixits all;
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time all;
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibItsCam
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics all;
import from LibItsSecurity_Functions all;
// 5.2.1
group camMessageDissemination {
group camMessageFormat {
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_01
*/
function f_CAM_MSD_FMT_BV_01() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_01
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_02
*/
function f_CAM_MSD_FMT_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_02
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_03
*/
function f_CAM_MSD_FMT_BV_03() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.10;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithLF := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition1500m);
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 f_CAM_MSD_FMT_BV_03
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_04
*/
function f_CAM_MSD_FMT_BV_04() runs on ItsCam {
// Local variables
var VehicleRole v_vehicleRole := c_vehicleRole_roadWork;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not (PICS_PUBLICTRANS or PICS_SPECIALTRANS or PICS_DANGEROUSGOODS or PICS_ROADWORKS or PICS_RESCUE or PICS_EMERGENCY or PICS_SAFETY_CAR)) {
testcase.stop(testcasename() & ": (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETYCAR) needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_04
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_05
*/
function f_CAM_MSD_FMT_BV_05() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_specialVehicleGenerationTime * 1.10;
var VehicleRole v_vehicleRole := roadWork;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithSVC := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not (PICS_PUBLICTRANS or PICS_SPECIALTRANS or PICS_DANGEROUSGOODS or PICS_ROADWORKS or PICS_RESCUE or PICS_EMERGENCY or PICS_SAFETY_CAR)) {
testcase.stop(testcasename() & ": (PICS_PUBLICTRANS OR PICS_SPECIALTRANS OR PICS_DANGEROUSGOODS OR PICS_ROADWORKS OR PICS_RESCUE OR PICS_EMERGENCY OR PICS_SAFETY_CAR) needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition1500m);
// 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 f_CAM_MSD_FMT_BV_05
} // end group camMessageFormat
group camInformationAdaptation {
group camInVehicleData {
type record of UtCamTrigger UtCamTriggers;
type record of CAM CamPdus;
function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam {
// Local variables
var integer v_cnt;
log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***");
if (lengthof(p_utTriggers) != lengthof(p_camPdus)) {
log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
for (v_cnt:=0; v_cnt value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the curvature value and set the expectation to the measured value
if (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue >= 0) {
v_curVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue + c_curValOffset) mod 1023;
} else {
v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue - c_curValOffset;
if (valueof(v_curVal) < -1023) {
v_curVal := 0;
}
}
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_01
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_02
*/
function f_CAM_MSD_INA_BV_01_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_brakePedalEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_03
*/
function f_CAM_MSD_INA_BV_01_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_brakePedalEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_04
*/
function f_CAM_MSD_INA_BV_01_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_gasPedalEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_05
*/
function f_CAM_MSD_INA_BV_01_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_gasPedalEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_06
*/
function f_CAM_MSD_INA_BV_01_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_emergencyBrakeEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_07
*/
function f_CAM_MSD_INA_BV_01_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_emergencyBrakeEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_08
*/
function f_CAM_MSD_INA_BV_01_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_collisionWarningEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_08
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_09
*/
function f_CAM_MSD_INA_BV_01_09() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_collisionWarningEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_09
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_10
*/
function f_CAM_MSD_INA_BV_01_10() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_accEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_10
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_11
*/
function f_CAM_MSD_INA_BV_01_11() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_accEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_11
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_12
*/
function f_CAM_MSD_INA_BV_01_12() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_cruiseControlEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_12
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_13
*/
function f_CAM_MSD_INA_BV_01_13() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_cruiseControlEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_13
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_14
*/
function f_CAM_MSD_INA_BV_01_14() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter being activated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_speedLimiterEngaged_) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_14
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_15
*/
function f_CAM_MSD_INA_BV_01_15() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter control being deactivated",
{ m_setAccelerationControlStatus(LibItsCommon_ASN1_NamedNumbers.AccelerationControl_speedLimiterEngaged_), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off ifpresent)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_15
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_16
*/
function f_CAM_MSD_INA_BV_01_16() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_lowBeamHeadlightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_16
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_17
*/
function f_CAM_MSD_INA_BV_01_17() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_lowBeamHeadlightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_17
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_18
*/
function f_CAM_MSD_INA_BV_01_18() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_highBeamHeadlightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_18
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_19
*/
function f_CAM_MSD_INA_BV_01_19() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_highBeamHeadlightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_19
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_20
*/
function f_CAM_MSD_INA_BV_01_20() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_leftTurnSignalOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_20
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_21
*/
function f_CAM_MSD_INA_BV_01_21() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_leftTurnSignalOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_21
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_22
*/
function f_CAM_MSD_INA_BV_01_22() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_rightTurnSignalOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_22
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_23
*/
function f_CAM_MSD_INA_BV_01_23() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_rightTurnSignalOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_23
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_24
*/
function f_CAM_MSD_INA_BV_01_24() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_daytimeRunningLightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_24
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_25
*/
function f_CAM_MSD_INA_BV_01_25() runs on ItsCam {
// Local variables
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_daytimeRunningLightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_25
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_26
*/
function f_CAM_MSD_INA_BV_01_26() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverse light being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_reverseLightOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_26
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_27
*/
function f_CAM_MSD_INA_BV_01_27() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverese light being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_reverseLightOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_27
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_28
*/
function f_CAM_MSD_INA_BV_01_28() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_fogLightOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_28
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_29
*/
function f_CAM_MSD_INA_BV_01_29() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_fogLightOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_29
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_30
*/
function f_CAM_MSD_INA_BV_01_30() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being activated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_parkingLightsOn_) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_30
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_31
*/
function f_CAM_MSD_INA_BV_01_31() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being deactivated",
{ m_setExteriorLightsStatus(LibItsCommon_ASN1_NamedNumbers.ExteriorLights_parkingLightsOn_), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ 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 f_CAM_MSD_INA_BV_01_31
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_32
*/
function f_CAM_MSD_INA_BV_01_32() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) HeadingValue v_headingVal := ?;
var boolean v_initialReceived := false;
const HeadingValue c_headingValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Heading value ***");
// change the heading value to retrieve the current value
f_changeHeading(c_headingValOffset);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the heading value and set the expectation to the measured value
v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601;
f_changeHeading(c_headingValOffset);
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_32
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_33
*/
function f_CAM_MSD_INA_BV_01_33() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) SpeedValue v_speedVal := ?;
var boolean v_initialReceived := false;
const SpeedValue c_speedValOffset := 100;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Speed value ***");
// change the speed value to retrieve the current value
f_changeSpeed(c_speedValOffset);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the speed value and set the expectation to the measured value
v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384;
f_changeSpeed(c_speedValOffset);
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_33
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_34
*/
function f_CAM_MSD_INA_BV_01_34() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var DriveDirection v_driveVal := backward;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Drive direction value ***");
// change the drive direction
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_driveVal==forward) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
//change again the drive direction and set the expectation to the measured value
v_driveVal := forward;
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_34
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_35
*/
function f_CAM_MSD_INA_BV_01_35() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) YawRateValue v_yawRateVal := ?;
var boolean v_initialReceived := false;
const YawRateValue c_yawRateValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION AND NOT PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***");
// change the yaw rate value to retrieve the current value
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the yaw rate value and set the expectation to the measured value
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue;
if (valueof(v_yawRateVal)>=32767) { // FIXME Yann/ifsttar: quid if we receive -32768
// FIXME if current value is 32760 and offset applied, we shall not expect posiive value
v_yawRateVal := -32766;
}
else {
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset;
}
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_35
} // end group camInVehicleData
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_02
*/
function f_CAM_MSD_INA_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_PUBLICTRANS) {
testcase.stop(testcasename() & ": PICS_PUBLICTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport));
// Test Body
log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***");
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_03
*/
function f_CAM_MSD_INA_BV_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALTRANS) {
testcase.stop(testcasename() & ": PICS_SPECIALTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_04
*/
function f_CAM_MSD_INA_BV_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_DANGEROUSGOODS) {
testcase.stop(testcasename() & ": PICS_DANGEROUSGOODS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_05
*/
function f_CAM_MSD_INA_BV_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_ROADWORKS) {
testcase.stop(testcasename() & ": PICS_ROADWORKS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_06
*/
function f_CAM_MSD_INA_BV_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_RESCUE) {
testcase.stop(testcasename() & ": PICS_RESCUE need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_07
*/
function f_CAM_MSD_INA_BV_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_EMERGENCY) {
testcase.stop(testcasename() & ": PICS_EMERGENCY need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_08
*/
function f_CAM_MSD_INA_BV_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SAFETY_CAR) {
testcase.stop(testcasename() & ": PICS_SAFETY_CAR need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_08
} // end group camInformationAdaptation
group camGenerationFrequency {
group CAM_MSD_GFQ_TI_01 {
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_01
*/
function f_CAM_MSD_GFQ_TI_01() runs on ItsCam {
// Local variables
timer t_minTransInterval := PICS_T_GENCAMMIN * 0.90;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU or (PICS_RADIO_COMM == e_lte_cv2x)) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU and ITS-G5 comm. required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition1500m);
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 value v_camInd {
v_receiveTime := int2float(v_camInd.recvTime) / 1000.0;
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
log("*** " & testcasename() & ": DEBUG: v_receiveTime=" , v_receiveTime, " ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_changeSpeed(1000);
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
v_interval_1_measured := int2float(v_camInd.recvTime) / 1000.0 - v_receiveTime;
v_receiveTime := int2float(v_camInd.recvTime) / 1000.0;
log("*** " & testcasename() & ": DEBUG: Elapsed time since last CAM: v_interval_1_measured=", v_interval_1_measured, " ***");
log("*** " & testcasename() & ": DEBUG: Elapsed time since last CAM: new v_receiveTime = ", v_receiveTime, " ***");
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) {
var float v_measured;
tc_ac.start(v_interval_1_measured*2.0);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
v_measured := int2float(v_camInd.recvTime) / 1000.0 - v_receiveTime;
v_receiveTime := int2float(v_camInd.recvTime) / 1000.0;
log("*** " & testcasename() & ": DEBUG: In loop, v_measured=", v_measured, " compared to ", v_interval_1_measured * 0.9, " ***");
log("*** " & testcasename() & ": DEBUG: In loop, new v_receiveTime = ", v_receiveTime, " ***");
if (v_measured < v_interval_1_measured * 0.9) {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
else if (v_measured>v_interval_1_measured * 1.10) {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received in time ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
else {
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 2 CAM#", v_i, " message received ***");
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received in time ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start(PICS_T_GENCAMMAX * 2.0);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
var float v_measured := int2float(v_camInd.recvTime) / 1000.0 - v_receiveTime;
log("*** " & testcasename() & ": DEBUG: v_measured=", v_measured, " ***");
if (v_measuredPICS_T_GENCAMMAX * 1.10) {
log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: Next CAM message received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_03
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_04
*/
function f_CAM_MSD_GFQ_BV_04() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
var CamInd v_camPdu;
var HeadingValue v_headingValue;
var HeadingValue v_changeHeadingValue := 50; // 4° == 40
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU or (PICS_RADIO_COMM == e_lte_cv2x)) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU and not ITS-G5 comm. required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_changeHeading(v_changeHeadingValue);
t_genCam_dcc.timeout;
t_genCam_min.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_04
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_05
*/
function f_CAM_MSD_GFQ_BV_05() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
var CamInd v_camPdu;
var ReferencePosition v_referencePosition, v_expectedReferencePosition;
var float v_changePosValue := 8.0; // 8 >> 4m
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU or (PICS_RADIO_COMM == e_lte_cv2x)) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU and ITS-G5 comm. required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition200m);
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu {
tc_ac.stop;
v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_expectedReferencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
if (PX_GNSS_SCENARIO_SUPPORT == false) {
f_utChangePosition ( valueof ( UtCamChangePosition: {
latitude := v_expectedReferencePosition.latitude - v_referencePosition.latitude,
longitude := v_expectedReferencePosition.longitude - v_referencePosition.longitude,
elevation := 0 } ) );
}
t_genCam_dcc.timeout;
t_genCam_dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_expectedReferencePosition ) )){
t_genCam_dcc.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 f_CAM_MSD_GFQ_BV_05
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_06
*/
function f_CAM_MSD_GFQ_BV_06() runs on ItsCam {
// Local variables
timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
var CamInd v_camPdu;
var SpeedValue v_speedValue;
var SpeedValue v_changeSpeedValue := 60; // 0,5 m/s << 0,6 m/s == 60 cm/s
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU or PICS_RADIO_COMM == e_lte_cv2x) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU and ITS-G5 comm. required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition1500m);
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue;
t_genCam_dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_changeSpeed(v_changeSpeedValue);
t_genCam_dcc.timeout;
t_genCam_min.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_06
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_07
*/
function f_CAM_MSD_GFQ_TI_07() runs on ItsCam {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.90;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
timer t_genCam_measure := PX_TWAIT;
timer t_genCam_min;
timer t_genCam_max;
var float v_genCam_min;
var float v_genCam_max;
// Test control
if (not PICS_CAM_GENERATION or PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState(e_dynamicPosition1500m);
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_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 f_CAM_MSD_GFQ_TI_07
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_08
*/
function f_CAM_MSD_GFQ_TI_08() runs on ItsCam {
// Local constants
const float c_minTime := 0.90;
const float c_maxTime := 1.10;
// Local variables
if (not PICS_CAM_GENERATION or not PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and PICS_RSU required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if ( ( tc_ac.read > c_minTime )) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: CAM message not received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_08
} // end group camGenerationFrequency
group camLowerLayerParameters {
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_01
*/
function f_CAM_MSD_PAR_BV_01() runs on ItsCam {
// Local variables
const UInt8 c_gnNhBtpB := 2;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, c_gnNhBtpB)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsultated in BTP-B packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN NH information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_01
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_02
*/
function f_CAM_MSD_PAR_BV_02() runs on ItsCam {
// Local variables
const UInt8 c_gnHtTsb := 5;
const UInt8 c_GnHstSingleHop := 0;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, c_gnHtTsb, c_GnHstSingleHop)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsulated in SHB packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, omit, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in SHB packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_02
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_03
*/
function f_CAM_MSD_PAR_BV_03() runs on ItsCam {
// Local variables
var CamInd v_camInd;
// Test control
if (not PICS_CAM_GENERATION or PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION and not PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any)) -> value v_camInd {
tc_ac.stop;
if(not ispresent(v_camInd.gnLifetime)) {
log("*** " & testcasename() & ": INCONC: no GN lifetime information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
if(v_camInd.gnLifetime <= 1000) {
log("*** " & testcasename() & ": PASS: Expected CAM message received encapsulted in GN packet with correct lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: Expected CAM message received encapsulted in GN packet with incorrect lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_03
} // end group camLowerLayerParameters
group camGenerationSSP {
function f_CAM_MSD_SSP_BO_XX(
in charstring p_certName,
in template(value) UtCamTrigger p_utEvent,
in template(present) CAM pmw_CamMsg,
in template(present) Bit256 pmw_ssp := ?
) runs on ItsCam {
// Local variables
var Oct8 v_certHashedId8;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
// initialize IUT with given certificate
fx_readCertificateDigest(p_certName, v_certHashedId8);
if( '0000000000000000'O == v_certHashedId8) {
// Certificate not found
log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
setverdict(inconc);
stop;
}
f_prInitialState(
e_staticPosition,
true,
{ hashedId8 := v_certHashedId8 }
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// execute UT Command
f_utTriggerEvent(p_utEvent);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithSecurityParameters (
pmw_CamMsg,
pmw_ssp
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_SSP_BO_XX
function f_CAM_MSD_SSP_BO_01() runs on ItsCam {
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
} // end f_CAM_MSD_SSP_BO_01
function f_CAM_MSD_SSP_BO_02() runs on ItsCam {
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true");
}
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_02,
m_setVehicleRole(c_vehicleRole_publicTransport),
mw_camMsg_SVC ( mw_publicTransport_any )
);
} // end f_CAM_MSD_SSP_BO_02
function f_CAM_MSD_SSP_BO_03() runs on ItsCam {
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_03,
m_setVehicleRole(c_vehicleRole_specialTransport),
mw_camMsg_SVC ( mw_specialTransport_any )
);
} // end f_CAM_MSD_SSP_BO_03
}
} // end group camSSP
group camMessageProcessing {
/**
* @desc TP Function for TC_CAM_MSP_BV_01
*/
function f_CAM_MSP_BV_01() runs on ItsCam {
// Local variables
var CamReq v_camReq;
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
m_camMsg_vehicle(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq.msgOut, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": PASS: CAM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: CAM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSP_BV_01
group camProcessingSSP{
/**
* @desc TP Function for TC_CAM_MSP_SSP_BV_XX
* @param p_certName Certificate to be used to sign the CAM message
* @param p_camMsg CAM value template to be sent to IUT
*/
function f_CAM_MSP_SSP_BV_XX(
in charstring p_certName,
in template (value) CAM p_camMsg
) runs on ItsCam {
// Local variables
var CamReq v_camReq;
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp(p_certName);
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
p_camMsg
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq.msgOut, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: CAM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: CAM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSP_SSP_BV_XX
function f_CAM_MSP_SSP_BV_01() runs on ItsCam {
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
} // end f_CAM_MSP_SSP_BV_01
function f_CAM_MSP_SSP_BV_02() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_BO_02_AT",
m_camMsg_publicTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
function f_CAM_MSP_SSP_BV_03() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_BO_03_AT",
m_camMsg_specialTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
}// end group camProcessingSSP
} // end group camMessageProcessing
} // end ItsCam_TpFunctions
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/README.md 0000664 0000000 0000000 00000000102 14165526247 0023060 0 ustar 00root root 0000000 0000000 # CAM TS 102 868-3
The ATS for CAM described in ETSI TS 102 868-3 ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/ 0000775 0000000 0000000 00000000000 14165526247 0022356 5 ustar 00root root 0000000 0000000 ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/LibItsCam_EncdecDeclarations.ttcn 0000664 0000000 0000000 00000003377 14165526247 0030663 0 ustar 00root root 0000000 0000000 module LibItsCam_EncdecDeclarations {
// LibIts
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCam
import from LibItsCam_TypesAndValues all;
external function fx_enc_CamReq (CamReq p) return bitstring
with {extension "prototype(convert) encode(LibIts_Interface)"}
external function fx_dec_CamReq (inout bitstring b, out CamReq p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_dec_CamInd (inout bitstring b, out CamInd p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_enc_CAM (CAM p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_CAM (inout bitstring b, out CAM p) return integer
with {extension "prototype(sliding) decode(PER)"}
external function fx_enc_UtCamInitialize (UtCamInitialize p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtCamChangePosition (UtCamChangePosition p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtCamTrigger (UtCamTrigger p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_dec_UtCamResults (inout bitstring b, out UtCamResults p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
external function fx_dec_UtCamEventInd (inout bitstring b, out UtCamEventInd p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
} // End of module LibItsCam_EncdecDeclarations
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/LibItsCam_Pics.ttcn 0000664 0000000 0000000 00000010250 14165526247 0026033 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Pics.ttcn $
* $Id: LibItsCam_Pics.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc CAM PICS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_Pics {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
group camPics {
/**
* @desc Is the IUT RSU?
* @see ETSI TS 102 868-1 Table A.1
*/
modulepar boolean PICS_RSU := false;
/**
* @desc Is the IUT running in secured mode?
* @see ETSI TS 102 868-1 Table A.1
*/
modulepar boolean PICS_IS_IUT_SECURED := false;
/**
* @desc Is IUT a public transport vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_PUBLICTRANS := false;
/**
* @desc Is IUT a special transport vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SPECIALTRANS := false;
/**
* @desc Is IUT a dangerous goods vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_DANGEROUSGOODS := false;
/**
* @desc Is IUT a road works vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_ROADWORKS := false;
/**
* @desc Is IUT a rescue vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_RESCUE := false;
/**
* @desc Is IUT an emergency vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_EMERGENCY := false;
/**
* @desc Is IUT a safety car vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SAFETY_CAR := false;
/**
* @desc Does IUT support 'specialVehicleContainer' in CamParameters?
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SPECIALVEHICLECONTAINER := true;
/**
* @desc Maximum time interval between CAM generations (in seconds).
* Default value, as per base standard: 1.0s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMMAX := 1.000;
/**
* @desc Minimum time interval between CAM generations (in seconds).
* Default value, as per base standard: 0.1s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMMIN := 0.100;
/**
* @desc Minimum time interval between CAM generations (in seconds)
* according to the requirements of the
* Decentralized Congestion Control(DCC).
* Default value, as per base standard: 0.1s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMDCC := 0.100;
/**
* @desc Support for CAM generation
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar boolean PICS_CAM_GENERATION := true;
/**
* @desc Support for CAM reception
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar boolean PICS_CAM_RECEPTION := true;
} // end camPics
group radioComm {
type enumerated RadioAccess {
e_its_g5,
e_lte_cv2x
}
/**
* @desc Does radio communication use ITS-G5 or LTE-V2X?
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar RadioAccess PICS_RADIO_COMM := e_its_g5;
} // End of group radioComm
} // end LibItsCam_Pics
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/LibItsCam_Pixits.ttcn 0000664 0000000 0000000 00000001534 14165526247 0026422 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Pixits.ttcn $
* $Id: LibItsCam_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing Pixits for CAM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_Pixits {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
} // End of module LibItsSecurity_Pixits ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/LibItsCam_Templates.ttcn 0000664 0000000 0000000 00000103721 14165526247 0027101 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Templates.ttcn $
* $Id: LibItsCam_Templates.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing base template definitions for CAM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_Templates {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibItsCam
import from LibItsCam_TypesAndValues all;
group camPrimitives {
/**
* @desc Receive template for CAM Message (CamPort Primitive)
* @param p_camMsg Expected CAM Message
*/
template CamInd mw_camInd (
in template (present) CAM p_camMsg
) := {
msgIn := p_camMsg,
recvTime := ?,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
};
/**
* @desc Receive template for CAM Message (CamPort Primitive)
* @param p_camMsg Expected CAM Message
* @param p_gnNextHeader GN next header value
* @param p_gnHeaderType GN header type value
* @param p_gnHeaderSubtype GN header subtype value
* @param p_gnLifetime GN packet lifetime value (ms)
* @param p_gnTrafficClass GN traffic class value
*/
template CamInd mw_camIndWithGnParameters (
in template (present) CAM p_camMsg,
in template UInt8 p_gnNextHeader := *,
in template UInt8 p_gnHeaderType := *,
in template UInt8 p_gnHeaderSubtype := *,
in template UInt32 p_gnLifetime := *,
in template UInt8 p_gnTrafficClass := *
) modifies mw_camInd := {
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnHeaderSubtype := p_gnHeaderSubtype,
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
};
/**
* @desc Receive template for CA Message (DenmPort Primitive)
* @param p_caMsg The expected CA Message
* @param p_ssp SSP security parameter
* @param p_its_aid ITS-AID value
*/
template CamInd mw_camIndWithSecurityParameters(
template (present) CAM p_camMsg,
template Bit256 p_ssp := *,
template UInt32 p_its_aid := c_its_aid_CAM
) modifies mw_camInd := {
ssp := p_ssp,
its_aid := p_its_aid
};
/**
* @desc Receive template for CAM Message (CamPort Primitive)
* @param p_camMsg Expected CAM Message
* @param p_btpDestinationPort BTP destination port value
* @param p_btpInfo BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
*/
template CamInd mw_camIndWithBtpParameters (
in template (present) CAM p_camMsg,
in template UInt16 p_btpDestinationPort := *,
in template UInt16 p_btpInfo := *
) modifies mw_camInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
};
/**
* @desc Send template for CAM Message (CamPort Primitive)
* @param p_camMsg CAM Message to be received
*/
template (value) CamReq m_camReq (
in template (value) CAM p_camMsg
) := {
msgOut := p_camMsg
};
group camUtPrimitives {
/**
* @desc Initializes the CAM IUT.
*/
template (value) UtCamInitialize m_camInitialize := {
hashedId8 := '0000000000000000'O
}
/**
* @desc Change the curvature
* @param p_offset The curvature value offset
*/
template (value) UtCamTrigger m_changeCurvature(CurvatureValue p_changeCurvature) := {
changeCurvature := p_changeCurvature
}
/**
* @desc Change the speed
* @param p_offset The speed value offset
*/
template (value) UtCamTrigger m_changeSpeed(Int16 p_changeSpeed) := {
changeSpeed := p_changeSpeed
}
/**
* @desc Set the acceleration control status
* @param p_status The status to set
*/
template (value) UtCamTrigger m_setAccelerationControlStatus(AccelerationControl p_status) := {
setAccelerationControlStatus := p_status
}
/**
* @desc Set the exterior lights status
* @param p_status The status to set
*/
template (value) UtCamTrigger m_setExteriorLightsStatus(ExteriorLights p_status) := {
setExteriorLightsStatus := p_status
}
/**
* @desc Change the heading
* @param p_offset The heading value offset
*/
template (value) UtCamTrigger m_changeHeading(HeadingValue p_changeHeading) := {
changeHeading := p_changeHeading
}
/**
* @desc Set the drive direction
* @param p_driveDirection The drive direction
*/
template (value) UtCamTrigger m_setDriveDirection(DriveDirection p_driveDirection) := {
setDriveDirection := p_driveDirection
}
/**
* @desc Change the yaw rate
* @param p_offset The yaw rate value offset
*/
template (value) UtCamTrigger m_changeYawRate(YawRateValue p_changeYawRate) := {
changeYawRate := p_changeYawRate
}
/**
* @desc Set the vehicle role
* @param p_vehicleRole The vehicle role
*/
template (value) UtCamTrigger m_setVehicleRole(VehicleRole p_vehicleRole) := {
setVehicleRole := p_vehicleRole
}
/**
* @desc Set the dangerous good description
* @param p_dangerousGoods The dangerous good description
*/
template (value) UtCamTrigger m_setDangerousGoods(DangerousGoodsBasic p_dangerousGoods) := {
setDangerousGoods := p_dangerousGoods
}
} // end utPrimitives
} // end group Primitives
group positionTemplates {
/**
* @desc The test system reference position.
*/
template (value) ReferencePosition m_tsPosition := {
latitude := f_integer2Latitude(f_getTsLatitude()),
longitude := f_integer2Longitude(f_getTsLongitude()),
positionConfidenceEllipse := {
semiMajorConfidence := LibItsCommon_ASN1_NamedNumbers.SemiAxisLength_oneCentimeter_,
semiMinorConfidence := LibItsCommon_ASN1_NamedNumbers.SemiAxisLength_oneCentimeter_,
semiMajorOrientation := LibItsCommon_ASN1_NamedNumbers.HeadingValue_wgs84North_
},
altitude := {
altitudeValue := LibItsCommon_ASN1_NamedNumbers.AltitudeValue_referenceEllipsoidSurface_,
altitudeConfidence := unavailable
}
}
/**
* @desc Reference position for given latitude and longitude.
*/
template (present) ReferencePosition mw_refPositionWithDelta(
in ReferencePosition p_origRefPos,
in integer p_jitter := 100
) := {
latitude := (p_origRefPos.latitude - p_jitter..p_origRefPos.latitude + p_jitter),
longitude := (p_origRefPos.longitude - p_jitter..p_origRefPos.longitude + p_jitter),
positionConfidenceEllipse := p_origRefPos.positionConfidenceEllipse,
altitude := p_origRefPos.altitude
}
} // end positionTemplates
/**
* @desc Default Receive template for CAM PDU
*/
template (present) CAM mw_camMsg_any := {
header := {
protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_cam_,
stationID := ?
},
cam := {
generationDeltaTime := ?,
camParameters := ?
}
}
group camBasicContainer {
/**
* @desc
* Receive template for CAM PDU including basic container with
* given reference position
* @param p_referencePosition The reference position
*/
template (present) CAM mw_camMsg_BC_refPos(
in template(present) ReferencePosition p_referencePosition
) modifies mw_camMsg_any := {
cam := {
camParameters := {
basicContainer := {
stationType := ?,
referencePosition := p_referencePosition
},
highFrequencyContainer := ?,
lowFrequencyContainer := *,
specialVehicleContainer := *
}
}
}
} // end group camBasicContainer
group camHighFrequencyContainer {
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_basicVehicleContainer The including basic vehicle container
*/
template (present) CAM mw_camMsg_HF_BV(
in template(present) BasicVehicleContainerHighFrequency p_basicVehicleContainer
) modifies mw_camMsg_any := {
cam := {
camParameters := {
basicContainer := ?,
highFrequencyContainer := {
basicVehicleContainerHighFrequency := p_basicVehicleContainer
},
lowFrequencyContainer := *,
specialVehicleContainer := *
}
}
}
/**
* @desc Default Receive template for basic vehicle container in
* the high frequency container
*/
template (present) BasicVehicleContainerHighFrequency mw_HF_BV_any := {
heading := ?,
speed := ?,
driveDirection := ?,
vehicleLength := ?,
vehicleWidth := ?,
longitudinalAcceleration := ?,
curvature := ?,
curvatureCalculationMode := ?,
yawRate := ?,
accelerationControl := *,
lanePosition := *,
steeringWheelAngle := *,
lateralAcceleration := *,
verticalAcceleration := *,
performanceClass := *,
cenDsrcTollingZone := *
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_curvatureValue The curvature
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_curvature(
in template(present) CurvatureValue p_curvatureValue
) modifies mw_HF_BV_any :=
{
curvature := {
curvatureValue := p_curvatureValue,
curvatureConfidence := ?
}
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_accCtrl The acceleration control
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_accCtrl(
in template AccelerationControl p_accCtrl
) modifies mw_HF_BV_any :=
{
accelerationControl := p_accCtrl
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_headingValue The heading
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_heading(
in template(present) HeadingValue p_headingValue
) modifies mw_HF_BV_any :=
{
heading := {
headingValue := p_headingValue,
headingConfidence := ?
}
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_speedValue The speed
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_speed(
in template(present) SpeedValue p_speedValue
) modifies mw_HF_BV_any :=
{
speed := {
speedValue := p_speedValue,
speedConfidence := ?
}
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_driveDirection The drive direction
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_driveDirection(
in template(present) DriveDirection p_driveDirection
) modifies mw_HF_BV_any :=
{
driveDirection := p_driveDirection
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_yawRateValue The yaw rate
*/
template(present) BasicVehicleContainerHighFrequency mw_HF_BV_yawRate(
in template(present) YawRateValue p_yawRateValue
) modifies mw_HF_BV_any :=
{
yawRate := {
yawRateValue := p_yawRateValue,
yawRateConfidence := ?
}
}
} // end group camHighFrequencyContainer
group camLowFrequencyContainer {
/**
* @desc Default Receive template for CAM PDU including
* optional lowFrequencyContainer
*/
template (present) CAM mw_camMsg_LF_any modifies mw_camMsg_any := {
cam := {
camParameters := {
basicContainer := ?,
highFrequencyContainer := ?,
lowFrequencyContainer := ?,
specialVehicleContainer := *
}
}
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_basicVehicleContainer The including basic vehicle container
*/
template (present) CAM mw_camMsg_LF_BV(
in template(present) BasicVehicleContainerLowFrequency p_basicVehicleContainer := ?
) modifies mw_camMsg_any := {
cam := {
camParameters := {
basicContainer := ?,
highFrequencyContainer := ?,
lowFrequencyContainer := {
basicVehicleContainerLowFrequency := p_basicVehicleContainer
},
specialVehicleContainer := *
}
}
}
/**
* @desc Default Receive template for basic vehicle container in
* the low frequency container
*/
template (present) BasicVehicleContainerLowFrequency mw_LF_BV_any := {
vehicleRole := ?,
exteriorLights := ?,
pathHistory := ?
}
/**
* @desc
* Receive template for CAM PDU including specific basic vehicle container
* @param p_extLights The exterior lights
*/
template(present) BasicVehicleContainerLowFrequency mw_LF_BV_extLights(
in template (present) ExteriorLights p_extLights
) modifies mw_LF_BV_any :=
{
exteriorLights := p_extLights
}
} // end group camLowFrequencyContainer
group camSpecialVehicleContainer {
/**
* @desc Default Receive template for CAM PDU including
* optional specialVehicleContainer
*/
template (present) CAM mw_camMsg_SVC_any modifies mw_camMsg_any := {
cam := {
camParameters := {
basicContainer := ?,
highFrequencyContainer := ?,
lowFrequencyContainer := *,
specialVehicleContainer := ?
}
}
}
/**
* @desc Receive template for CAM PDU including optional specialVehicleContainer
* @param p_specialVehicleContainer The expected specialVehicleContainer
*/
template (present) CAM mw_camMsg_SVC(
in template (present) SpecialVehicleContainer p_specialVehicleContainer
) modifies mw_camMsg_SVC_any := {
cam := {
camParameters := {
specialVehicleContainer := p_specialVehicleContainer
}
}
}
/**
* @desc Receive template for specialVehicleContainer public transport
*/
template (present) SpecialVehicleContainer mw_publicTransport_any := {
publicTransportContainer := ?
}
/**
* @desc Receive template for specialVehicleContainer special transport
*/
template (present) SpecialVehicleContainer mw_specialTransport_any := {
specialTransportContainer := ?
}
/**
* @desc Receive template for specialVehicleContainer dangerous goods
*/
template (present) SpecialVehicleContainer mw_dangerousGoods_any := {
dangerousGoodsContainer := ?
}
/**
* @desc Receive template for specialVehicleContainer road works
*/
template (present) SpecialVehicleContainer mw_roadWorks_any := {
roadWorksContainerBasic := ?
}
/**
* @desc Receive template for specialVehicleContainer rescue
*/
template (present) SpecialVehicleContainer mw_rescue_any := {
rescueContainer := ?
}
/**
* @desc Receive template for specialVehicleContainer emergency
*/
template (present) SpecialVehicleContainer mw_emergency_any := {
emergencyContainer := ?
}
/**
* @desc Receive template for specialVehicleContainer safety car
*/
template (present) SpecialVehicleContainer mw_safetyCar_any := {
safetyCarContainer := ?
}
} //end group camSpecialVehicleContainer
group camAnyVehicle {
/**
* @desc Send template for Vehicle CAM PDU
* @param p_stationId Station ID of the source
* @param p_generationTime Timestamp of the generated message
* @param p_referencePosition Position of the sending station
*/
template (value) CAM m_camMsg_vehicle_HF_BV(
StationID p_stationId,
GenerationDeltaTime p_generationTime,
template (value) ReferencePosition p_referencePosition
) := {
header := {
protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_cam_,
stationID := p_stationId
},
cam := {
generationDeltaTime := p_generationTime,
camParameters := {
basicContainer := {
stationType := LibItsCommon_ASN1_NamedNumbers.StationType_passengerCar_,
referencePosition := p_referencePosition
},
highFrequencyContainer := {
basicVehicleContainerHighFrequency := {
heading := {
headingValue := LibItsCommon_ASN1_NamedNumbers.HeadingValue_wgs84North_, //0
headingConfidence := 10
},
speed := {
speedValue := 45,
speedConfidence := 5
},
driveDirection := forward,
vehicleLength := {
vehicleLengthValue := 50,
vehicleLengthConfidenceIndication := noTrailerPresent
},
vehicleWidth := 21,
longitudinalAcceleration := {
longitudinalAccelerationValue := LibItsCommon_ASN1_NamedNumbers.LongitudinalAccelerationValue_unavailable_,
longitudinalAccelerationConfidence := LibItsCommon_ASN1_NamedNumbers.AccelerationConfidence_unavailable_
},
curvature := {
curvatureValue := LibItsCommon_ASN1_NamedNumbers.CurvatureValue_straight_,
curvatureConfidence := unavailable
},
curvatureCalculationMode := yawRateUsed,
yawRate := {
yawRateValue := LibItsCommon_ASN1_NamedNumbers.YawRateValue_straight_,
yawRateConfidence := unavailable
},
accelerationControl := omit,
lanePosition := omit,
steeringWheelAngle := omit,
lateralAcceleration := omit,
verticalAcceleration := omit,
performanceClass := omit,
cenDsrcTollingZone := omit
}
},
lowFrequencyContainer := omit,
specialVehicleContainer := omit
}
}
}; // End of template m_camMsg_vehicle_HF_BV
/**
* @desc Send template for Vehicle CAM PDU
* @param p_stationId Station ID of the source
* @param p_generationTime Timestamp of the generated message
* @param p_referencePosition Position of the sending station
*/
template (value) CAM m_camMsg_vehicle(
StationID p_stationId,
GenerationDeltaTime p_generationTime,
template (value) ReferencePosition p_referencePosition
) modifies m_camMsg_vehicle_HF_BV := {
cam := {
camParameters := {
lowFrequencyContainer := {
basicVehicleContainerLowFrequency := {
vehicleRole := default_,
exteriorLights := LibItsCommon_ASN1_NamedNumbers.ExteriorLights_daytimeRunningLightsOn_,
pathHistory := {}
}
}
}
}
};
template (value) CAM m_camMsg_publicTransport(
StationID p_stationId,
GenerationDeltaTime p_generationTime,
template (value) ReferencePosition p_referencePosition
) modifies m_camMsg_vehicle := {
cam := {
camParameters := {
lowFrequencyContainer := {
basicVehicleContainerLowFrequency := {
vehicleRole := publicTransport
}
},
specialVehicleContainer := {
publicTransportContainer := {
embarkationStatus := true,
ptActivation := omit
}
}
}
}
};
template (value) CAM m_camMsg_specialTransport(
StationID p_stationId,
GenerationDeltaTime p_generationTime,
template (value) ReferencePosition p_referencePosition
) modifies m_camMsg_vehicle := {
cam := {
camParameters := {
lowFrequencyContainer := {
basicVehicleContainerLowFrequency := {
vehicleRole := specialTransport
}
},
specialVehicleContainer := {
specialTransportContainer := {
specialTransportType := '1000'B/* length(4)*/, // heavyLoad
lightBarSirenInUse := '11'B/* length(2)*/ // siren and lightBar
}
}
}
}
};
} // end camAnyVehicle
group camAccelerationControlTemplates {
/**
* @desc Receive template for acceleration control with brake padel active on
*/
template AccelerationControl mw_brakePedalActive_On := '1*'B length(7);
/**
* @desc Receive template for acceleration control with brake padel active off
*/
template AccelerationControl mw_brakePedalActive_Off := '0*'B length(7);
/**
* @desc Receive template for acceleration control with gas padel active on
*/
template AccelerationControl mw_gasPedalActive_On := '?1*'B length(7);
/**
* @desc Receive template for acceleration control with gas padel active off
*/
template AccelerationControl mw_gasPedalActive_Off := '?0*'B length(7);
/**
* @desc Receive template for acceleration control with emergency brake active on
*/
template AccelerationControl mw_emergencyBrakeActive_On := '??1*'B length(7);
/**
* @desc Receive template for acceleration control with emergency brake active off
*/
template AccelerationControl mw_emergencyBrakeActive_Off := '??0*'B length(7);
/**
* @desc Receive template for acceleration control with collision warning active on
*/
template AccelerationControl mw_collisionWarningActive_On := '???1*'B length(7);
/**
* @desc Receive template for acceleration control with collision warning active off
*/
template AccelerationControl mw_collisionWarningActive_Off := '???0*'B length(7);
/**
* @desc Receive template for acceleration control with adaptive cruise control active on
*/
template AccelerationControl mw_accActive_On := '????1*'B length(7);
/**
* @desc Receive template for acceleration control with adaptive cruise control active off
*/
template AccelerationControl mw_accActive_Off := '????0*'B length(7);
/**
* @desc Receive template for acceleration control with cruise control active on
*/
template AccelerationControl mw_cruiseControl_On := '?????1*'B length(7);
/**
* @desc Receive template for acceleration control with cruise control active off
*/
template AccelerationControl mw_cruiseControl_Off := '?????0*'B length(7);
/**
* @desc Receive template for acceleration control with speed limiter active on
*/
template AccelerationControl mw_speedLimiterActive_On := '*1'B length(7);
/**
* @desc Receive template for acceleration control with speed limiter active off
*/
template AccelerationControl mw_speedLimiterActive_Off := '*0'B length(7);
} // end group camAccelerationControlTemplates
group camExteriorLightsTemplates {
/**
* @desc Receive template for exterior lights with low beam lights off
*/
template ExteriorLights mw_lowBeamLightsOff := '0*'B length (8);
/**
* @desc Receive template for exterior lights with low beam lights on
*/
template ExteriorLights mw_lowBeamLightsOn := '1*'B length(8);
/**
* @desc Receive template for exterior lights with high beam lights off
*/
template ExteriorLights mw_highBeamLightsOff := '?0*'B length(8);
/**
* @desc Receive template for exterior lights with high beam lights on
*/
template ExteriorLights mw_highBeamLightsOn := '?1*'B length(8);
/**
* @desc Receive template for exterior lights with left turn signal off
*/
template ExteriorLights mw_leftTurnSignalOff := '??0*'B length(8);
/**
* @desc Receive template for exterior lights with left turn signal on
*/
template ExteriorLights mw_leftTurnSignalOn := '??1*'B length(8);
/**
* @desc Receive template for exterior lights with right turn signal off
*/
template ExteriorLights mw_rightTurnSignalOff := '???0*'B length(8);
/**
* @desc Receive template for exterior lights with right turn signal on
*/
template ExteriorLights mw_rightTurnSignalOn := '???1*'B length(8);
/**
* @desc Receive template for exterior lights with day time running lights off
*/
template ExteriorLights mw_daytimeRunningLightsOff := '????0*'B length(8);
/**
* @desc Receive template for exterior lights with day time running lights on
*/
template ExteriorLights mw_daytimeRunningLightsOn := '????1*'B length(8);
/**
* @desc Receive template for exterior lights with reverse light off
*/
template ExteriorLights mw_reverseLightOff := '?????0*'B length(8);
/**
* @desc Receive template for exterior lights with reverse light on
*/
template ExteriorLights mw_reverseLightOn := '?????1*'B length(8);
/**
* @desc Receive template for exterior lights with fog light off
*/
template ExteriorLights mw_fogLightOff := '??????0*'B length(8);
/**
* @desc Receive template for exterior lights with fog light on
*/
template ExteriorLights mw_fogLightOn := '??????1*'B length(8);
/**
* @desc Receive template for exterior lights with parking lights off
*/
template ExteriorLights mw_parkingLightsOff := '*0'B length(8);
/**
* @desc Receive template for exterior lights with parking lights on
*/
template ExteriorLights mw_parkingLightsOn := '*1'B length(8);
/**
* @desc Receive template for exterior lights with hazard lights on
*/
template ExteriorLights mw_hazardConditionOn := '??11*'B length(8);
} // end group exteriorLights
group camTemplateFunctions {
/**
* @desc Converts an integer to Longitude
* @param p_longitude The integer value
* @return The longitude value
*/
function f_integer2Longitude(in integer p_longitude) return Longitude {
var Longitude v_longitude := f_abs(p_longitude);
return v_longitude;
}
/**
* @desc Converts an integer to Latitude
* @param p_latitude The integer value
* @return The latitude value
*/
function f_integer2Latitude(in integer p_latitude) return Latitude {
var Latitude v_latitude := f_abs(p_latitude);
return v_latitude;
}
} // end camTemplateFunctions
} // end LibItsCam_Templates
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/LibItsCam_TypesAndValues.ttcn 0000664 0000000 0000000 00000021175 14165526247 0030054 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_TypesAndValues.ttcn $
* $Id: LibItsCam_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing types and values for CAM Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_TypesAndValues {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
group camValues {
const float c_lowFrequencyGenerationTime := 0.5; //500 ms
const float c_specialVehicleGenerationTime := 0.5; //500 ms
const AccelerationControl c_accCtrlIdle := '0000000'B;
const ExteriorLights c_elAllLightsOff := '00000000'B;
const VehicleRole c_vehicleRole_publicTransport := publicTransport;
const VehicleRole c_vehicleRole_specialTransport := specialTransport;
const VehicleRole c_vehicleRole_dangerousGoods := dangerousGoods;
const VehicleRole c_vehicleRole_roadWork := roadWork;
const VehicleRole c_vehicleRole_rescue := rescue;
const VehicleRole c_vehicleRole_emergency := emergency;
const VehicleRole c_vehicleRole_safetyCar := safetyCar;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives1 := explosives1;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives2 := explosives2;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives3 := explosives3;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives4 := explosives4;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives5 := explosives5;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives6 := explosives6;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableGases := flammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_nonFlammableGases := nonFlammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicGases := toxicGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableLiquids := flammableLiquids;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableSolids := flammableSolids;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesLiableToSpontaneousCombustion := substancesLiableToSpontaneousCombustion;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesEmittingFlammableGasesUponContactWithWater := substancesEmittingFlammableGasesUponContactWithWater;
const DangerousGoodsBasic c_dangerousGoodsBasic_oxidizingSubstances := oxidizingSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_organicPeroxides := organicPeroxides;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicSubstances := toxicSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_infectiousSubstances := infectiousSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_radioactiveMaterial := radioactiveMaterial;
const DangerousGoodsBasic c_dangerousGoodsBasic_corrosiveSubstances := corrosiveSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_miscellaneousDangerousSubstances := miscellaneousDangerousSubstances;
} // end group camValues
group certificates {
const charstring PX_CERT_IUT_CAM_02 := "CERT_IUT_CAM_BO_02_AT";
const charstring PX_CERT_IUT_CAM_03 := "CERT_IUT_CAM_BO_03_AT";
}
group utPrimitives {
/**
* @desc Upper Tester message to initialize IUT
* @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
*/
type record UtCamInitialize {
Oct8 hashedId8
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester results message of the CAM IUT
* @member utCamInitialize -
* @member utCamTriggerResult -
* @member utCamChangePositionResult -
* @member utActivatePositionTimeResult -
* @member utDeactivatePositionTimeResult -
*/
type union UtCamResults {
boolean utCamInitializeResult,
boolean utCamTriggerResult,
boolean utCamChangePositionResult,
boolean utActivatePositionTimeResult,
boolean utDeactivatePositionTimeResult
} with {
variant ""
} // End of type UtCamResults
/**
* @desc Upper Tester message to change the position of IUT. Values a relatives
*/
type record UtCamChangePosition {
Int32 latitude,
Int32 longitude,
Int32 elevation
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc
* @member changeCurvature Changes the curvature.
* @member changeSpeed Changes the speed in cm/s.
* @member setAccelerationControlStatus Sets the acceleration control status.
* @member setExteriorLightsStatus Sets the exterior lights status.
* @member changeHeading Changes the heading.
* @member setDriveDirection Sets the drive direction.
* @member setStationType
* @member setVehicleRole
* @member setEmbarkationStatus
* @member setPtActivation
* @member setDangerousGoods
* @member setLightBarSireneStatus
* @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second.
*/
type union UtCamTrigger {
CurvatureValue changeCurvature,
Int16 changeSpeed,
AccelerationControl setAccelerationControlStatus,
ExteriorLights setExteriorLightsStatus,
HeadingValue changeHeading,
DriveDirection setDriveDirection,
YawRateValue changeYawRate,
StationType setStationType,
VehicleRole setVehicleRole,
EmbarkationStatus setEmbarkationStatus,
PtActivation setPtActivation,
DangerousGoodsBasic setDangerousGoods,
LightBarSirenInUse setLightBarSirene
} with {
variant ""
}
/**
* @desc Upper Tester result message of request of triggering of an event at IUT
*/
type record UtActivatePositionTime {
// empty on purpose
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to deactivate position and/or time
*/
type record UtDeactivatePositionTime {
// empty on purpose
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to check event/status on CAM IUT
*/
type record UtCamEventInd {
CAM camMsg // TODO Rename into caMsg to be compliant with UtDenmEventInd
} with {
encode (camMsg) "LibItsCam_asn1"
}
/**
* @desc List of Upper Tester messages to check event/status on CAM IUT
*/
type record of UtCamEventInd UtCamEventIndList;
} with {
encode "UpperTester"
variant ""
} // end utPrimitives
group facilityPrimitives {
group fa1Primitives {
/**
* @desc FA1 CAM Indication Primitive
*/
type record CamInd {
CAM msgIn,
UInt64 recvTime,
UInt8 gnNextHeader optional,
UInt8 gnHeaderType optional,
UInt8 gnHeaderSubtype optional,
UInt32 gnLifetime optional,
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Bit256 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "PER"
}
/**
* @desc FA1 CAM Request Primitive
*/
type record CamReq {
CAM msgOut
}
with {
encode (msgOut) "PER"
}
} // end fa1Primitives
} // End of group facilityPrimitives
with {
variant ""
encode "LibIts_Interface"
} // end interfacePrimitives
}
with {
encode "LibItsCam"
}
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib/module.mk 0000664 0000000 0000000 00000000456 14165526247 0024201 0 ustar 00root root 0000000 0000000 sources := \
LibItsCam_EncdecDeclarations.ttcn \
LibItsCam_Pics.ttcn \
LibItsCam_Pixits.ttcn \
LibItsCam_Templates.ttcn \
LibItsCam_TypesAndValues.ttcn \
asn1/CAM_PDU_Descriptions.asn
ifeq (,$(ITS_CONTAINER))
ITS_CONTAINER := defined
sources += asn1/cdd/ITS_Container.asn
endif
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib_system/ 0000775 0000000 0000000 00000000000 14165526247 0023762 5 ustar 00root root 0000000 0000000 ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib_system/LibItsCam_Functions.ttcn 0000664 0000000 0000000 00000056637 14165526247 0030534 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Functions.ttcn $
* $Id: LibItsCam_Functions.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing common functions for ITS CAM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_Functions {
// LibCommon
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Pixits all;
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
// LibItsCam
import from LibItsCam_TestSystem all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics all;
import from LibItsCam_Pixits all;
group utFuntions {
/**
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtCamInitialize p_init) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
[] utPort.receive(UtCamResults: { utCamInitializeResult := true }) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT could not be initialized ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
/**
* @desc Triggers event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(template (value) UtCamTrigger p_event) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
[] utPort.receive(UtCamResults: { utCamTriggerResult := true }) {
tc_wait.stop;
}
[] utPort.receive {
tc_wait.stop;
}
[] tc_wait.timeout {
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
/**
* @desc Changes the position of the IUT
* @param p_position
*/
function f_utChangePosition(template (value) UtCamChangePosition p_position) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_position);
alt {
[] utPort.receive(UtCamResults: { utCamChangePositionResult := true}) {
tc_wait.stop;
}
[] utPort.receive(UtCamResults: { utCamChangePositionResult := ? }) {
tc_wait.stop;
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
} // End of group utFunctions
group adapterControl {
/**
* @desc Initialise secure mode if required
*/
function f_initialiseSecuredMode(
in charstring p_certificateId := PX_CERT_FOR_TS
) runs on ItsCam {
if (PICS_IS_IUT_SECURED == true) {
if(e_success != f_acTriggerSecEvent(m_acEnableSecurity(p_certificateId))) {
log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***");
stop;
}
}
} // End of function f_initialiseSecuredMode()
function f_uninitialiseSecuredMode() runs on ItsCam {
if (PICS_IS_IUT_SECURED == true) {
f_acTriggerSecEvent(m_acDisableSecurity);
}
} // End of function f_initialiseSecuredMode()
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerSecEvent(template (value) AcSecPrimitive p_event) runs on ItsCam return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acSecResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerGnssEvent(template (value) AcGnssPrimitive p_event) runs on ItsCam return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acGnssResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssResponseError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Loads the given scenario
*
* @param p_scenario The scenario to load.
*/
function f_acLoadScenario(in Scenario p_scenario) runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_loadScenario(p_scenario));
}
} // End of function f_acLoadScenario
/**
* @desc Starts a loaded scenario
*/
function f_acStartScenario() runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_startScenario);
vc_scenarioStarted := true;
}
} // End of function f_acStartScenario
/**
* @desc Stops a loaded scenario
*/
function f_acStopScenario() runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_stopScenario);
vc_scenarioStarted := false;
}
} // End of function f_acStopScenario
function f_acAwaitDistanceCovered(float p_distanceToCover) runs on ItsCam return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_distanceToCover(p_distanceToCover));
tc_ac.start(PX_T_GNSS_AWAIT_DISTANCE_COVERED);
alt {
[] acPort.receive(m_acGnssDistanceCoveredSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssDistanceCoveredError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for covered distance indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
return v_ret;
} // End of function f_acAwaitDistanceCovered
function f_acAwaitSpeed(
float p_speed,
SpeedTrend p_speedTrend := e_accelerate,
boolean p_stopCamPort := true,
boolean p_deactivateCamDefault := false
) runs on ItsCam system ItsCamSystem return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
if (p_stopCamPort) {
unmap(self:camPort, system:camPort);
}
if (p_deactivateCamDefault) {
vc_camDefaultActive := false;
}
f_acTriggerGnssEvent(m_awaitSpeed(p_speed, p_speedTrend));
tc_ac.start(PX_T_GNSS_AWAIT_SPEED_REACHED);
alt {
[] acPort.receive(m_acGnssSpeedReachedSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssSpeedReachedError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for covered distance indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
if (p_stopCamPort) {
map(self:camPort, system:camPort);
}
if (p_deactivateCamDefault) {
vc_camDefaultActive := true;
}
}
return v_ret;
} // End of function f_acAwaitSpeed
function f_acChangeSpeed(SpeedValue p_deltaSpeedValue) runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
// f_acTriggerGnssEvent(m_changeScenarioSpeed(p_deltaSpeedValue));
}
} // End of function f_acChangeSpeed
function f_acChangeHeading(HeadingValue p_deltaHeadingValue) runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_changeScenarioHeading(p_deltaHeadingValue));
}
} // End of function f_acChangeHeading
function f_acAwaitTimeInRunningScenario(
integer p_time,
boolean p_stopOnCamMessage := true
) runs on ItsCam return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_timeInRunningScenario(p_time));
tc_ac.start(int2float(p_time)*1.1);
alt {
[p_stopOnCamMessage] camPort.check(receive(mw_camInd ( mw_camMsg_any ))) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssTimeReachedSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssTimeReachedError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
return v_ret;
} // end f_acAwaitTimeInRunningScenario
} // End of group adapterControl
group camConfigurationFunctions {
/**
* @desc Setups default configuration
* @param p_certificateId The certificate identifier the TA shall use in case of secured IUT
*/
function f_cfUp(
in charstring p_certificateId := PX_CERT_FOR_TS
) runs on ItsCam system ItsCamSystem {
map(self:utPort, system:utPort);
map(self:acPort, system:acPort);
map(self:camPort, system:camPort);
f_connect4SelfOrClientSync();
// Initialise secured mode
f_initialiseSecuredMode(p_certificateId);
} // End of function f_cfUp
/**
* @desc Deletes default configuration
*/
function f_cfDown() runs on ItsCam system ItsCamSystem {
// Initialise secured mode
f_uninitialiseSecuredMode();
unmap(self:camPort, system:camPort);
f_acStopScenario();
unmap(self:utPort, system:utPort);
unmap(self:acPort, system:acPort);
f_disconnect4SelfOrClientSync();
} // End of function f_cfDown
} // End of camConfigurationFunctions
group defaults {
/**
* @desc basic default behaviour handling
*/
altstep a_default() runs on ItsCam {
[vc_camDefaultActive] camPort.receive(mw_camInd ( mw_camMsg_any )){
log("*** a_default: INFO: CAM message received in default ***");
vc_camReceived := true;
repeat;
}
[vc_camDefaultActive] camPort.receive {
log("*** a_default: ERROR: event received on CAM port in default ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] acPort.receive(AdapterControlResults: { acGnssTimeReached := ? }) {
log("*** a_default: INFO: TimeReached event received on AC port in default ***");
repeat;
}
[] acPort.receive(AdapterControlResults: { acGnssSpeedReached := ? }) {
log("*** a_default: INFO: SpeedReached event received on AC port in default ***");
repeat;
}
[] acPort.receive(AdapterControlResults: { acGnssDistanceCovered := ? }) {
log("*** a_default: INFO: DistanceCovered event received on AC port in default ***");
repeat;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] any timer.timeout {
log("*** a_default: INCONC: a timer expired in default ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_shutdown() {
f_poDefault();
f_cfDown();
log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}//end altstep a_basicDefault
/**
* @desc The default for handling upper tester messages.
*/
altstep a_utDefault() runs on ItsCam {
var UtCamEventInd v_event;
[] utPort.receive(UtCamEventInd:?) -> value v_event {
//store every upper tester indication received
vc_utEvents[lengthof(vc_utEvents)] := v_event;
repeat;
}
[] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unhandled/unknown UT message from IUT ***");
repeat;
}
}
} // End of defaults
group preambles {
/**
* @desc The default preamble.
*/
function f_prDefault() runs on ItsCam {
vc_default := activate(a_default());
activate(a_utDefault());
}
/**
* @desc Initialize the IUT
* @remark No specific actions specified in the base standard
*/
function f_prInitialState(
in Scenario p_scenario := e_staticPosition,
in boolean p_awaitInitialCAM := true,
in template (value) UtCamInitialize p_camInitialize := m_camInitialize,
in boolean p_awaitTimeInRunningScenario := true
) runs on ItsCam {
f_utInitializeIut(p_camInitialize);
f_prDefault();
f_acLoadScenario(p_scenario);
//Allow burst mode at the beginning
f_sleep(1.0);
camPort.clear;
f_acStartScenario();
if (p_awaitTimeInRunningScenario) {
f_acAwaitTimeInRunningScenario(f_getTimeForGpsFix());
}
if (p_awaitInitialCAM) {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Received initial CAM ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial CAM not received ***");
f_selfOrClientSyncAndVerdictPreamble("error", e_timeout);
}
} // End of 'alt' statement
}
} // End of function f_prInitialState
} // End of preambles
group postambles {
/**
* @desc The default postamble.
*/
function f_poDefault() runs on ItsCam {
}
} // End of group postambles
group camPositionFunctions {
/**
* @desc Compute a position using a reference position, a distance
* and an orientation
*
* @param p_referencePosition The base reference position.
* @param p_offSet Distance to the reference position (in meter).
*
* @return The new reference position.
*/
function f_computePositionUsingDistance(in ReferencePosition p_referencePosition, in float p_offSet) return ReferencePosition {
var ReferencePosition v_referencePosition := p_referencePosition;
log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***");
fx_computePositionUsingDistance(
p_referencePosition.latitude,
p_referencePosition.longitude,
p_offSet,
p_referencePosition.positionConfidenceEllipse.semiMajorOrientation,
v_referencePosition.latitude,
v_referencePosition.longitude
);
return v_referencePosition;
}
/**
* @desc Compute distance between two points
* @param p_pointA First point
* @param p_pointB Second point
* @return Computed distance in meters
* @see fx_computeDistance
*/
function f_distance(
in ReferencePosition p_pointA,
in ReferencePosition p_pointB
) return float {
return fx_computeDistance(p_pointA.latitude, p_pointA.longitude, p_pointB.latitude, p_pointB.longitude);
}
} // end group camPositionFunctions
group camAuxilaryFunctions {
function f_changeSpeed(SpeedValue p_deltaSpeedValue) runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT == false) {
f_utTriggerEvent(m_changeSpeed(p_deltaSpeedValue));
}
else {
f_acChangeSpeed(p_deltaSpeedValue);
}
}
function f_changeHeading(HeadingValue p_deltaHeadingValue) runs on ItsCam {
if (PX_GNSS_SCENARIO_SUPPORT == false) {
f_utTriggerEvent(m_changeHeading(p_deltaHeadingValue));
}
else {
f_acChangeHeading(p_deltaHeadingValue);
}
}
} // End group camAuxilaryFunctions
group camGenerators {
function f_generateDefaultCam()
return octetstring {
return bit2oct(
encvalue(
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
)
)
)
);
}
} // End of group camGenerators
} // End of LibItsCam_Functions
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib_system/LibItsCam_TestSystem.ttcn 0000664 0000000 0000000 00000007142 14165526247 0030673 0 ustar 00root root 0000000 0000000 /**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_TestSystem.ttcn $
* $Id: LibItsCam_TestSystem.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Test System module for ITS CAM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsCam_TestSystem language "TTCN-3:2010 Real Time and Performance Testing" {
// LibCommon
// import from LibCommon_Time {modulepar all};
// import from LibCommon_Sync all;
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TestSystem all;
import from LibItsCommon_TypesAndValues all;
// LibItsCam
import from LibItsCam_TypesAndValues all;
group portDefinitions {
/**
* @desc Adapter control port
*/
type port AdapterControlPort message {
out
AcGnssPrimitive, AcSecPrimitive;
in
AdapterControlResults;
} // end AdapterControlPort
/**
* @desc Upper Tester port
*/
type port UpperTesterPort message {
out
UtCamInitialize, UtCamTrigger, UtCamChangePosition, UtActivatePositionTime, UtDeactivatePositionTime;
in
UtCamResults, UtCamEventInd;
} // end UpperTesterPort
} // end portDefinitions
group interfacePorts {
group facilityPorts {
group fa1Ports {
/**
* @desc FA1 CAM Port (CAM/BTP/GeoNet/RadioNetwork)
*/
type port CamPort message {
in CamInd;
out CamReq;
} // End of port CamPort
} // end fa1Ports
} // End of group facilityPorts
} // End of group interfacePorts
group componentDefinitions {
/**
* @desc ITS System Adapter
*/
type component ItsCamSystem {
port UpperTesterPort utPort;
port AdapterControlPort acPort;
// FA1 ports
port CamPort camPort;
} // end component ItsAdapter
} // End of group componentDefinitions
/**
* @desc Test component for ITS Facility layer
*/
type component ItsCam extends ItsBaseComponent {
port UpperTesterPort utPort;
port AdapterControlPort acPort;
// FA1 ports
port CamPort camPort;
//timers
//component variables
var CamInd vc_camMsg;
//default
var default vc_default := null;
//global variables
var boolean vc_camReceived := false;
var UtCamEventIndList vc_utEvents := {};
var boolean vc_utDefaultActive := true;
var boolean vc_camDefaultActive := true;
} // End of component ItsCam
} // End of module LibItsCam_TestSystem
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/lib_system/module.mk 0000664 0000000 0000000 00000000076 14165526247 0025603 0 ustar 00root root 0000000 0000000 sources := LibItsCam_Functions.ttcn LibItsCam_TestSystem.ttcn
ats_cam_ts102868-3-dfc2a5f7279a9795c9f3d22f24ee97a4bae15774/module.mk 0000664 0000000 0000000 00000002332 14165526247 0023426 0 ustar 00root root 0000000 0000000 suite := AtsCAM
sources := ItsCam_TestCases.ttcn \
ItsCam_TestControl.ttcn \
ItsCam_TpFunctions.ttcn \
modules := \
lib \
lib_system \
../LibCommon \
../LibIts \
../AtsGeoNetworking/lib \
../AtsGeoNetworking/lib_system \
../AtsIPv6OverGeoNetworking/lib \
../AtsIPv6OverGeoNetworking/lib_system \
../AtsSecurity/lib \
../AtsSecurity/lib_system \
../AtsBTP/lib \
../AtsBTP/lib_system \
/ccsrc/Ports/LibIts_ports \
/ccsrc/Ports/LibIts_ports/CAM_ports \
/ccsrc/Ports/LibIts_ports/GN_ports \
/ccsrc/Ports/LibIts_ports/IPv6oGN_ports \
/ccsrc/Ports/LibIts_ports/BTP_ports \
/ccsrc/EncDec \
/ccsrc/Framework \
/ccsrc/Externals \
/ccsrc/loggers \
/ccsrc/geospacial \
/ccsrc/Asn1c \
/ccsrc/Protocols/CAM \
/ccsrc/Protocols/GeoNetworking \
/ccsrc/Protocols/BTP \
/ccsrc/Protocols/ETH \
/ccsrc/Protocols/Pcap \
/ccsrc/Protocols/UpperTester \
/ccsrc/Protocols/Security