Commit 47c56141 authored by Yann Garcia's avatar Yann Garcia
Browse files

Implementing fisrt 18 TPs

parent 74eac227
Loading
Loading
Loading
Loading
+565 −17
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ module ItsCps_TestCases {
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP/CPS/MSGF/BV-01
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_01
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.2
     */
    testcase TC_CPS_MSGF_BV_01() runs on ItsCps system ItsCpsSystem {
@@ -53,6 +53,554 @@ module ItsCps_TestCases {

    } // End of TC_CPS_MSGF_BV_01

    /**
     * @desc Check that one OriginatingVehicleContainer is present if a CPM is generated by a vehicle ITS-S
     * <pre>
     * Pics Selection: PICS_VEHICLE and PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingVehicleContainer
     *                      and not containing OriginatingRsuContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_02
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_02() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_02();

    } // End of TC_CPS_MSGF_BV_02

    /**
     * @desc Check that one OriginatingRsuContainer is present if a CPM is generated by an RSU
     * <pre>
     * Pics Selection: PICS_ROADSIDE_UNIT and PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingRsuContainer
     *                      and not containing OriginatingVehicleContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_03
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_03() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_03();

    } // End of TC_CPS_MSGF_BV_03

    /**
     * @desc Check that one SensorInformationContainer is included in the first generated CPM
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         the IUT has not sent any CPM yet
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing not more than one SensorInformationContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_04
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_04() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_04();

    } // End of TC_CPS_MSGF_BV_04

    /**
     * @desc Check that one SensorInformationContainer is included when T_AddSensorInformation is exceeded
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         and a CPM has been sent at time t1
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *          and T_AddSensorInformation has passed since t1
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing SensorInformationContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_04
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_05() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_05();

    } // End of TC_CPS_MSGF_BV_05

    /**
     * @desc TODO
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *          and T_AddSensorInformation has passed since t1
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing SensorInformationContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_06
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_06() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_06();

    } // End of TC_CPS_MSGF_BV_06

    /**
     * @desc Check that one PerceivedObjectContainer is present when perceived objects are present
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         and perceived objects are present
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one PerceivedObjectContainer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_07
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_07() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_07();

    } // End of TC_CPS_MSGF_BV_07

    /**
     * @desc Check that at least one of PerceivedRegionContainer or PerceivedObjectContainer is present
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one PerceivedRegionContainer
     *                      or containing one PerceivedObjectContainer 
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_08
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.1
     */
    testcase TC_CPS_MSGF_BV_08() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_08();

    } // End of TC_CPS_MSGF_BV_08

    /**
     * @desc Check that the reference position aligns with the CAM reference position
     * <pre>
     * Pics Selection: PICS_VEHICLE and PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         a CAM being sent
     *             containing cam
     *                 containing camParameters
     *                     containing basicContainer
     *                         containing referencePosition
     *                             indicating value P 
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing managementContainer
     *                      containing referencePosition
     *                          indicating value P 
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_09
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.3
     */
    testcase TC_CPS_MSGF_BV_09() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_09();

    } // End of TC_CPS_MSGF_BV_09

    /**
     * @desc Check that the management container contains messageSegmentInfo if more than one CPM is assembled
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_CPM_SEGMENTATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a segmented CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing managementContainer
     *                      containing segmentationInfo
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_10
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.3
     */
    testcase TC_CPS_MSGF_BV_10() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_10();

    } // End of TC_CPS_MSGF_BV_10

    /**
     * @desc Check that the Originating Vehicle Container includes trailerData if there are CPS-contributing sensors mounted on a trailer
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_VEHICLE_TRAILER and PICS_CPS_VEHICLE
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         data-providing sensors are mounted on a trailer
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingVehicleContainer
     *                          containing trailerDataSet
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_11
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.4
     */
    testcase TC_CPS_MSGF_BV_11() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_11();

    } // End of TC_CPS_MSGF_BV_11

    /**
     * @desc Check that the Originating Vehicle Container includes one instance of TrailerData per data-providing trailer
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_VEHICLE_MULTIPLE_TRAILERS and PICS_CPS_VEHICLE
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         data-providing sensors are mounted on a trailer
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingVehicleContainer
     *                          containing trailerDataSet
     *                              containing one TrailerData per data-providing trailer
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_12
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.4
     */
    testcase TC_CPS_MSGF_BV_12() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_12();

    } // End of TC_CPS_MSGF_BV_12

    /**
     * @desc Check that TrailerData does not include frontOverhang, rearOverhang, trailerWidth
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_VEHICLE_MULTIPLE_TRAILERS and PICS_CPS_VEHICLE
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         data-providing sensors are mounted on a trailer
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingVehicleContainer
     *                          containing trailerDataSet
     *                              containing one TrailerData per data-providing trailer
     *                                  containingTrailerData 
     *                                      not containing frontOverhang and
     *                                      ot containing rearOverhang and
     *                                      not containing trailerWidth
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_13
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.4
     */
    testcase TC_CPS_MSGF_BV_13() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_13();

    } // End of TC_CPS_MSGF_BV_13

    /**
     * @desc Check that mapReference is used if a corresponding MAPEM is being transmitted to ITS-S that recieve the CPM
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_ROADSIDE_UNIT and PICS_MAPEM
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         a MAPEM has been received
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing one OriginatingRsuContainer
     *                          containing mapReference
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_14
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.5
     */
    testcase TC_CPS_MSGF_BV_14() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_14();

    } // End of TC_CPS_MSGF_BV_14

    /**
     * @desc Check that the SensorInformation includes perceptionRegionShape if the sensor type is not undefined (0), localAggregation (12), itssAggregation (13)
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state" and
     *         the IUT has not sent any CPM yet
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *          CPM is sent
     *              containing payload
     *                  containing cpmContainers
     *                      containing SensorInformationContainer
     *                          containing SensorInformation
     *                              containing sensorType
     *                                  indicating value other than 0, 12 or 13
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_15
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.6
     */
    testcase TC_CPS_MSGF_BV_15() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_15();

    } // End of TC_CPS_MSGF_BV_15

    /**
     * @desc Check that the sensor perception region shape is expressed in the body-fixed coordinate system of the vehicle
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_VEHICLE
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_16
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.6
     */
    testcase TC_CPS_MSGF_BV_16() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_16();

    } // End of TC_CPS_MSGF_BV_16

    /**
     * @desc Check that perceptionRegionConfidence represents the homogeneous perception region confidence for the sensor
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_17
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.6
     */
    testcase TC_CPS_MSGF_BV_17() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_17();

    } // End of TC_CPS_MSGF_BV_17

    /**
     * @desc Check that perceptionRegionShape defines a geographical area or volume with respect to the reference position
     * <pre>
     * Pics Selection: PICS_CPM_GENERATION and PICS_VEHICLE
     * Initial conditions:
     *     with {
     *         the IUT being in the "initial state"
     *     }
     * Expected behaviour:
     *  ensure that {
     *      when {
     *          a CPM is generated
     *      }
     *      then {
     *      }
     *  }
     * </pre>
     *
     * @see       ETSI TS 104 018-2 V2.0.2 (2024-11) TP_CPS_MSGF_BV_17
     * @reference ETSI TS 103 324 (V2.2.1), clause 7.1.7
     */
    testcase TC_CPS_MSGF_BV_18() runs on ItsCps system ItsCpsSystem {

      f_TC_CPS_MSGF_BV_18();

    } // End of TC_CPS_MSGF_BV_18

  } // End of group message_format


+38 −4
Original line number Diff line number Diff line
@@ -12,6 +12,40 @@ module ItsCps_TestControl {
    if (PICS_CPS_GENERATION) {
      execute(TC_CPS_MSGF_BV_01());

      if (PICS_VEHICLE) {
        execute(TC_CPS_MSGF_BV_02());
      }

      execute(TC_CPS_MSGF_BV_04());
      execute(TC_CPS_MSGF_BV_05());
      execute(TC_CPS_MSGF_BV_06());
      execute(TC_CPS_MSGF_BV_07());
      execute(TC_CPS_MSGF_BV_08());
      execute(TC_CPS_MSGF_BV_09());

      if (PICS_CPS_SEGMENTATION) {
        execute(TC_CPS_MSGF_BV_10());
      }

      if (PICS_ROADSIDE_UNIT) {
        execute(TC_CPS_MSGF_BV_03());
        execute(TC_CPS_MSGF_BV_14());
      }

      if (PICS_VEHICLE_TRAILER) {
        execute(TC_CPS_MSGF_BV_11());
        execute(TC_CPS_MSGF_BV_13());
      }
      
      if (PICS_VEHICLE_MULTIPLE_TRAILERS) {
        execute(TC_CPS_MSGF_BV_12());
      }

      execute(TC_CPS_MSGF_BV_15());
      execute(TC_CPS_MSGF_BV_16());
      execute(TC_CPS_MSGF_BV_17());
      execute(TC_CPS_MSGF_BV_18());
      
      execute(TC_CPS_MSD_PAR_BV_01());
      execute(TC_CPS_MSD_PAR_BV_02());
      execute(TC_CPS_MSD_PAR_BV_03());
+997 −83

File changed.

Preview size limit exceeded, changes collapsed.

+34 −6
Original line number Diff line number Diff line
@@ -4,21 +4,49 @@ module LibItsCps_Pics {
  import from LibCommon_BasicTypesAndValues all;

  /**
    * @desc Is the IUT running in secured mode?
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.1
    */
  modulepar boolean PICS_IS_IUT_SECURED := false;
  modulepar boolean PICS_CPS_GENERATION := true;

  /**
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.3
    * @desc Is the IUT running in secured mode?
    * @see  ETSI TS 104 019-1 Table A.4
    */
  modulepar boolean PICS_CPS_GENERATION := true;
  modulepar boolean PICS_IS_IUT_SECURED := false;
  
  /**
    * @desc Support for CPS reception
    * @see  ETSI TS 104 019-1 Table A.3
    * @see  ETSI TS 104 019-1 Table A.5
    */
  modulepar boolean PICS_CPS_RECEPTION := true;

  /**
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.2/1
    */
  modulepar boolean PICS_VEHICLE := true;

  /**
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.2/2
    */
  modulepar boolean PICS_ROADSIDE_UNIT := true;

  /**
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.2/3
    */
  modulepar boolean PICS_VEHICLE_TRAILER := false;

  /**
    * @desc Support for CPS generation
    * @see  ETSI TS 104 019-1 Table A.2/4
    */
  modulepar boolean PICS_VEHICLE_MULTIPLE_TRAILERS := false;

  modulepar boolean PICS_CPS_SEGMENTATION := false;

  modulepar boolean PICS_MAPEM := false;

} // End of module LibItsCps_Pics
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
module LibItsCps_Pixits {

  /**
   * @desc Multiply timer value by this control factor to increase it 
   */
  modulepar float PX_INC_TIMER_CONTROL_FACTOR := 1.10;

  /**
   * @desc Multiply timer value by this control factor to decrease it 
   */
  modulepar float PX_DEC_TIMER_CONTROL_FACTOR := 0.9;

} // End of module LibItsCps_Pixits
 No newline at end of file
Loading