Commit c8bb06d4 authored by Mubeena Ishaq's avatar Mubeena Ishaq
Browse files

Implement SSP TPs for AtsDENM

parent 20591f1b
Loading
Loading
Loading
Loading
+975 −39

File changed.

Preview size limit exceeded, changes collapsed.

+27 −0
Original line number Diff line number Diff line
@@ -76,6 +76,33 @@ module ItsDenm_TestControl {
            if(PICS_IS_IUT_SECURED) {
                execute(TC_DEN_SSP_BV_01_01());
                execute(TC_DEN_SSP_BV_01_02());
                execute(TC_DEN_SSP_BV_01_03());
                execute(TC_DEN_SSP_BV_01_04());
                execute(TC_DEN_SSP_BV_01_05());
                execute(TC_DEN_SSP_BV_01_06());
                execute(TC_DEN_SSP_BV_01_07());
                execute(TC_DEN_SSP_BV_01_08());
                execute(TC_DEN_SSP_BV_01_09());
                execute(TC_DEN_SSP_BV_01_10());
                execute(TC_DEN_SSP_BV_01_11());
                execute(TC_DEN_SSP_BV_01_12());
                execute(TC_DEN_SSP_BV_01_13());
                execute(TC_DEN_SSP_BV_01_14());
                execute(TC_DEN_SSP_BV_01_15());
                execute(TC_DEN_SSP_BV_01_16());
                execute(TC_DEN_SSP_BV_01_17());
                execute(TC_DEN_SSP_BV_01_18());
                execute(TC_DEN_SSP_BV_01_19());
                execute(TC_DEN_SSP_BV_01_20());
                execute(TC_DEN_SSP_BV_01_21());
                execute(TC_DEN_SSP_BV_01_22());
                execute(TC_DEN_SSP_BV_01_23());
                execute(TC_DEN_SSP_BV_01_24());
                execute(TC_DEN_SSP_BV_02_01());
                execute(TC_DEN_SSP_BV_02_02());
                execute(TC_DEN_SSP_BV_02_03());
                execute(TC_DEN_SSP_BV_02_04());

            }
        }
        
+208 −60
Original line number Diff line number Diff line
@@ -597,66 +597,6 @@ module ItsDenm_TpFunctions {
             
          } // end TC_DEN_EVGN_BV_07
          
          /**
           * @desc    TP Function for TC_DEN_EVGN_BV_10
           */
          function f_DEN_EVGN_BV_10() runs on ItsDenm {
              
              // Local variables
              var template (value) SituationContainer v_situation := m_situation(CauseCodeChoice: { vehicleBreakdown91 := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_ });
              var StationId v_stationId;
              var DenmInd v_denmInd;
              
              // Test control
              if (not PICS_DENM_GENERATION) {
                  log("*** " & testcasename() & ": PICS_DENM_GENERATION 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_stationId := f_getIutStationId ( );
              f_utChangePseudonym ( m_utDenmChangePseudonym );
              f_utTriggerEvent ( m_utTriggerEvent ( v_situation) );
              
              tc_ac.start;
              alt {
                  [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd {
                      tc_ac.stop;
                      if ( v_denmInd.msgIn.denm.management.actionId.originatingStationId != v_stationId ) {
                          log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
                          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                      }
                      else {
                          log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
                          f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                      }
                  }
                  [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
                      tc_ac.stop;
                      log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
                      f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                  }
                  [] tc_ac.timeout {
                      log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
                      f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                  }
              }
              
              // Postamble
              f_cfDown();
             
          } // end TC_DEN_EVGN_BV_10
          
      } // end denEventGeneration
      
      // 5.2.1.3
@@ -2419,6 +2359,214 @@ module ItsDenm_TpFunctions {
            );
        }

        function f_DEN_SSP_BV_01_03( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_03,
                m_situation(CauseCodeChoice: { roadworks3 := LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_  }),
                mw_sspNoRoadworks
            );
        }
        
        function f_DEN_SSP_BV_01_04( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_04,
                m_situation(CauseCodeChoice: { adhesion6 := LibItsCommon_ASN1_NamedNumbers.AdverseWeatherCondition_AdhesionSubCauseCode_snowOnRoad_  }),
                mw_sspNoAdhesion
            );
        }

        function f_DEN_SSP_BV_01_05( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_05,
                m_situation(CauseCodeChoice: { surfaceCondition9 := LibItsCommon_ASN1_NamedNumbers.HazardousLocation_SurfaceConditionSubCauseCode_rockfalls_  }),
                mw_sspNoSurfaceCondition
            );
        }

        function f_DEN_SSP_BV_01_06( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_06,
                m_situation(CauseCodeChoice: { obstacleOnTheRoad10 := LibItsCommon_ASN1_NamedNumbers.HazardousLocation_ObstacleOnTheRoadSubCauseCode_waitingVehicles_  }),
                mw_sspNoObstacleOnTheRoad
            );
        }

        function f_DEN_SSP_BV_01_07( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_07,
                m_situation(CauseCodeChoice: { animalOnTheRoad11 := LibItsCommon_ASN1_NamedNumbers.HazardousLocation_AnimalOnTheRoadSubCauseCode_unavailable_  }),
                mw_sspNoAnimalOnTheRoad
            );
        }

        function f_DEN_SSP_BV_01_08( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_08,
                m_situation(CauseCodeChoice: { humanPresenceOnTheRoad12 := LibItsCommon_ASN1_NamedNumbers.HumanPresenceOnTheRoadSubCauseCode_childrenOnRoadway_  }),
                mw_sspNoHumanPresenceOnTheRoad
            );
        }

        function f_DEN_SSP_BV_01_09( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_09,
                m_situation(CauseCodeChoice: { wrongWayDriving14 := LibItsCommon_ASN1_NamedNumbers.WrongWayDrivingSubCauseCode_wrongLane_  }),
                mw_sspNoWrongWayDriving
            );
        }

        function f_DEN_SSP_BV_01_10( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_10,
                m_situation(CauseCodeChoice: { rescueAndRecoveryWorkInProgress15 := LibItsCommon_ASN1_NamedNumbers.RescueAndRecoveryWorkInProgressSubCauseCode_emergencyVehicles_  }),
                mw_sspNoRescueAndRecoveryWorkInProgress
            );
        }

        function f_DEN_SSP_BV_01_11( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_11,
                m_situation(CauseCodeChoice: { extremeWeatherCondition17 := LibItsCommon_ASN1_NamedNumbers.AdverseWeatherCondition_ExtremeWeatherConditionSubCauseCode_thunderstorm_  }),
                mw_sspNoExtremeWeatherCondition
            );
        }

        function f_DEN_SSP_BV_01_12( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_12,
                m_situation(CauseCodeChoice: { visibility18 := LibItsCommon_ASN1_NamedNumbers.AdverseWeatherCondition_VisibilitySubCauseCode_heavyRain_  }),
                mw_sspNoVisibility
            );
        }

        function f_DEN_SSP_BV_01_13( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_13,
                m_situation(CauseCodeChoice: { precipitation19 := LibItsCommon_ASN1_NamedNumbers.AdverseWeatherCondition_PrecipitationSubCauseCode_unavailable_  }),
                mw_sspNoPrecipitation
            );
        }

        function f_DEN_SSP_BV_01_14( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_14,
                m_situation(CauseCodeChoice: { slowVehicle26 := LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_  }),
                mw_sspNoSlowVehicle
            );
        }

        function f_DEN_SSP_BV_01_15( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_15,
                m_situation(CauseCodeChoice: { dangerousEndOfQueue27 := LibItsCommon_ASN1_NamedNumbers.DangerousEndOfQueueSubCauseCode_unavailable_  }),
                mw_sspNoDangerousEndOfQueue
            );
        }

        function f_DEN_SSP_BV_01_16( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_16,
                m_situation(CauseCodeChoice: { vehicleBreakdown91 := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineCoolingProblem_ }),
                mw_sspNoVehicleBreakdown
            );
        }

        function f_DEN_SSP_BV_01_17( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_17,
                m_situation(CauseCodeChoice: { postCrash92 := LibItsCommon_ASN1_NamedNumbers.PostCrashSubCauseCode_unavailable_  }),
                mw_sspNoPostCrash
            );
        }

        function f_DEN_SSP_BV_01_18( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_18,
                m_situation(CauseCodeChoice: { humanProblem93 := LibItsCommon_ASN1_NamedNumbers.HumanProblemSubCauseCode_unavailable_  }),
                mw_sspNoHumanProblem
            );
        }

        function f_DEN_SSP_BV_01_19( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_19,
                m_situation(CauseCodeChoice: { stationaryVehicle94 := LibItsCommon_ASN1_NamedNumbers.StationaryVehicleSubCauseCode_vehicleBreakdown_  }),
                mw_sspNoStationaryVehicle
            );
        }

        function f_DEN_SSP_BV_01_20( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_20,
                m_situation(CauseCodeChoice: { emergencyVehicleApproaching95 := LibItsCommon_ASN1_NamedNumbers.EmergencyVehicleApproachingSubCauseCode_unavailable_  }),
                mw_sspNoEmergencyVehicleApproaching
            );
        }

        function f_DEN_SSP_BV_01_21( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_21,
                m_situation(CauseCodeChoice: { dangerousCurve96 := LibItsCommon_ASN1_NamedNumbers.HazardousLocation_DangerousCurveSubCauseCode_unavailable_  }),
                mw_sspNoDangerousCurve
            );
        }

        function f_DEN_SSP_BV_01_22( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_22,
                m_situation(CauseCodeChoice: { collisionRisk97 := LibItsCommon_ASN1_NamedNumbers.CollisionRiskSubCauseCode_vulnerableRoadUser_  }),
                mw_sspNoCollisionRisk
            );
        }

        function f_DEN_SSP_BV_01_23( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_23,
                m_situation(CauseCodeChoice: { signalViolation98 := LibItsCommon_ASN1_NamedNumbers.SignalViolationSubCauseCode_stopSignViolation_  }),
                mw_sspNoSignalViolation
            );
        }

        function f_DEN_SSP_BV_01_24( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_24,
                m_situation(CauseCodeChoice: { dangerousSituation99 := LibItsCommon_ASN1_NamedNumbers.DangerousSituationSubCauseCode_unavailable_  }),
                mw_sspNoDangerousSituation
            );
        }

        function f_DEN_SSP_BV_02_01( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_25,
                m_situation(CauseCodeChoice: { impassability5 := LibItsCommon_ASN1_NamedNumbers.ImpassabilitySubCauseCode_rockfalls_  }),
                mw_sspNoImpassability
            );
        }

        function f_DEN_SSP_BV_02_02( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_26,
                m_situation(CauseCodeChoice: { aquaplaning7 := LibItsCommon_ASN1_NamedNumbers.AquaplaningSubCauseCode_unavailable_  }),
                mw_sspNoAquaplaning
            );
        }

        function f_DEN_SSP_BV_02_03( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_27,
                m_situation(CauseCodeChoice: { publicTransportVehicleApproaching28 := LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_  }),
                mw_sspNoPublicTransportVehicleApproaching
            );
        }

        function f_DEN_SSP_BV_02_04( ) runs on ItsDenm {
            f_DEN_SSP_BV_XX (
                PX_CERT_IUT_DENM_28,
                m_situation(CauseCodeChoice: { railwayLevelCrossing100 := LibItsCommon_ASN1_NamedNumbers.RailwayLevelCrossingSubCauseCode_closed_  }),
                mw_sspNoRailwayLevelCrossing
            );
        }
        
      } // end group denMessageSSP
      
    } // end denMessageTransmission
+29 −3
Original line number Diff line number Diff line
@@ -723,9 +723,35 @@ module LibItsDenm_Templates {
    
    group sspTemplates {
        
        template (present) bitstring mw_sspNoTrafficCondition        := '*0'B;
        template (present) bitstring mw_sspNoAccident                := '*0?'B;
        template (present) bitstring mw_sspNoRoadworks               := '*0??'B;
        template (present) bitstring mw_sspNoTrafficCondition                       := '0*'B;
        template (present) bitstring mw_sspNoAccident                               := '?0*'B;
        template (present) bitstring mw_sspNoRoadworks                              := '??0*'B;
        template (present) bitstring mw_sspNoAdhesion                               := '???0*'B;
        template (present) bitstring mw_sspNoSurfaceCondition                       := '????0*'B;
        template (present) bitstring mw_sspNoObstacleOnTheRoad                      := '?????0*'B;
        template (present) bitstring mw_sspNoAnimalOnTheRoad                        := '??????0*'B;
        template (present) bitstring mw_sspNoHumanPresenceOnTheRoad                 := '???????0*'B;
        template (present) bitstring mw_sspNoWrongWayDriving                        := '????????0*'B;
        template (present) bitstring mw_sspNoRescueAndRecoveryWorkInProgress        := '?????????0*'B;
        template (present) bitstring mw_sspNoExtremeWeatherCondition                := '??????????0*'B;
        template (present) bitstring mw_sspNoVisibility                             := '???????????0*'B;
        template (present) bitstring mw_sspNoPrecipitation                          := '????????????0*'B;
        template (present) bitstring mw_sspNoSlowVehicle                            := '?????????????0*'B;
        template (present) bitstring mw_sspNoDangerousEndOfQueue                    := '??????????????0*'B;
        template (present) bitstring mw_sspNoVehicleBreakdown                       := '???????????????0*'B;
        template (present) bitstring mw_sspNoPostCrash                              := '????????????????0*'B;
        template (present) bitstring mw_sspNoHumanProblem                           := '?????????????????0*'B;
        template (present) bitstring mw_sspNoStationaryVehicle                      := '??????????????????0*'B;
        template (present) bitstring mw_sspNoEmergencyVehicleApproaching            := '???????????????????0*'B;
        template (present) bitstring mw_sspNoDangerousCurve                         := '????????????????????0*'B;
        template (present) bitstring mw_sspNoCollisionRisk                          := '?????????????????????0*'B;
        template (present) bitstring mw_sspNoSignalViolation                        := '??????????????????????0*'B;
        template (present) bitstring mw_sspNoDangerousSituation                     := '???????????????????????0*'B;
        template (present) bitstring mw_sspNoImpassability                          := '????????????????????????0*'B;
        template (present) bitstring mw_sspNoAquaplaning                            := '?????????????????????????0*'B;
        template (present) bitstring mw_sspNoPublicTransportVehicleApproaching      := '??????????????????????????0*'B;
        template (present) bitstring mw_sspNoRailwayLevelCrossing                   := '???????????????????????????0*'B;

    } // end sspTemplates
    
} // end LibItsDenmTemplates
+22 −0
Original line number Diff line number Diff line
@@ -54,6 +54,28 @@ module LibItsDenm_TypesAndValues {

    const charstring PX_CERT_IUT_DENM_01 := "CERT_IUT_DENM_BO_01_AT";
    const charstring PX_CERT_IUT_DENM_02 := "CERT_IUT_DENM_BO_02_AT";
    const charstring PX_CERT_IUT_DENM_03 := "CERT_IUT_DENM_BO_03_AT";
    const charstring PX_CERT_IUT_DENM_04 := "CERT_IUT_DENM_BO_04_AT";
    const charstring PX_CERT_IUT_DENM_05 := "CERT_IUT_DENM_BO_05_AT";
    const charstring PX_CERT_IUT_DENM_06 := "CERT_IUT_DENM_BO_06_AT";
    const charstring PX_CERT_IUT_DENM_07 := "CERT_IUT_DENM_BO_07_AT";
    const charstring PX_CERT_IUT_DENM_08 := "CERT_IUT_DENM_BO_08_AT";
    const charstring PX_CERT_IUT_DENM_09 := "CERT_IUT_DENM_BO_09_AT";
    const charstring PX_CERT_IUT_DENM_10 := "CERT_IUT_DENM_BO_10_AT";
    const charstring PX_CERT_IUT_DENM_11 := "CERT_IUT_DENM_BO_11_AT";
    const charstring PX_CERT_IUT_DENM_12 := "CERT_IUT_DENM_BO_12_AT";
    const charstring PX_CERT_IUT_DENM_13 := "CERT_IUT_DENM_BO_13_AT";
    const charstring PX_CERT_IUT_DENM_14 := "CERT_IUT_DENM_BO_14_AT";
    const charstring PX_CERT_IUT_DENM_15 := "CERT_IUT_DENM_BO_15_AT";
    const charstring PX_CERT_IUT_DENM_16 := "CERT_IUT_DENM_BO_16_AT";
    const charstring PX_CERT_IUT_DENM_17 := "CERT_IUT_DENM_BO_17_AT";
    const charstring PX_CERT_IUT_DENM_18 := "CERT_IUT_DENM_BO_18_AT";
    const charstring PX_CERT_IUT_DENM_19 := "CERT_IUT_DENM_BO_19_AT";
    const charstring PX_CERT_IUT_DENM_20 := "CERT_IUT_DENM_BO_20_AT";
    const charstring PX_CERT_IUT_DENM_21 := "CERT_IUT_DENM_BO_21_AT";
    const charstring PX_CERT_IUT_DENM_22 := "CERT_IUT_DENM_BO_22_AT";
    const charstring PX_CERT_IUT_DENM_23 := "CERT_IUT_DENM_BO_23_AT";
    const charstring PX_CERT_IUT_DENM_24 := "CERT_IUT_DENM_BO_24_AT";

  }