From c5989d00081a7a37d5ef594135089f6bc9bcc2e4 Mon Sep 17 00:00:00 2001
From: garciay <yann.garcia@fscom.fr>
Date: Wed, 12 Mar 2025 18:53:02 +0100
Subject: [PATCH] Validate TC_VBS_MSGF_BV_15

---
 .../LibItsCommon_ASN1_NamedNumbers.ttcn       | 44 +++++++++++++++++++
 ttcn/Common/LibItsCommon_CddTemplates.ttcn    | 24 +++++++---
 ttcn/Common/LibItsCommon_TypesAndValues.ttcn  |  2 +
 3 files changed, 65 insertions(+), 5 deletions(-)

diff --git a/ttcn/Common/LibItsCommon_ASN1_NamedNumbers.ttcn b/ttcn/Common/LibItsCommon_ASN1_NamedNumbers.ttcn
index a30faccc..e1d38940 100644
--- a/ttcn/Common/LibItsCommon_ASN1_NamedNumbers.ttcn
+++ b/ttcn/Common/LibItsCommon_ASN1_NamedNumbers.ttcn
@@ -2,6 +2,10 @@
 
 module LibItsCommon_ASN1_NamedNumbers {
 
+  // LibCommon
+  import from LibCommon_BasicTypesAndValues all;
+  import from LibCommon_DataStrings all;
+
   import from ETSI_ITS_CDD language "ASN.1:2008" all;
 
   group commonConstants {
@@ -86,6 +90,9 @@ module LibItsCommon_ASN1_NamedNumbers {
     const StationType StationType_trailer_ := 9;
     const StationType StationType_specialVehicles_ := 10;
     const StationType StationType_tram_ := 11;
+    const StationType StationType_lightVruVehicle := 12;
+    const StationType StationType_animal := 13;
+    const StationType StationType_agricultura4 := 13;
     const StationType StationType_roadSideUnit_ := 15;
     
     const YawRateValue YawRateValue_straight_ := 0;
@@ -308,6 +315,43 @@ module LibItsCommon_ASN1_NamedNumbers {
       
     } // End of group subCauseCodes
       
+    group vru {
+
+      group vruProfile {
+
+        const UInt8 Vru_profile_pedestrian                  := 1;
+        const UInt8 Vru_profile_bicyclistAndLightVruVehicle := 2;
+        const UInt8 Vru_profile_motorcyclist                := 3;
+        const UInt8 Vru_profile_animal                      := 4;
+
+      } // End of group vruProfile
+
+      group vruClusterLeaveReason {
+        const integer Vru_clusterLeaveReason_notProvided               := 0; 
+        const integer Vru_clusterLeaveReason_clusterLeaderLost         := 1;    
+        const integer Vru_clusterLeaveReason_clusterDisbandedByLeader  := 2;    
+        const integer Vru_clusterLeaveReason_outOfClusterBoundingBox   := 3;    
+        const integer Vru_clusterLeaveReason_outOfClusterSpeedRange    := 4;
+        const integer Vru_clusterLeaveReason_joiningAnotherCluster     := 5;
+        const integer Vru_clusterLeaveReason_cancelledJoin             := 6;
+        const integer Vru_clusterLeaveReason_failedJoin                := 7;
+        const integer Vru_clusterLeaveReason_safetyCondition           := 8;    
+
+      } // End of group vruClusterLeaveReason
+
+      group vruClusterBreakupReason {
+
+        const integer Vru_ClusterBreakupReason_notProvided                        := 0;
+        const integer Vru_ClusterBreakupReason_clusteringPurposeCompleted         := 1;
+        const integer Vru_ClusterBreakupReason_leaderMovedOutOfClusterBoundingBox := 2;   
+        const integer Vru_ClusterBreakupReason_joiningAnotherCluster              := 3;
+        const integer Vru_ClusterBreakupReason_enteringLowRiskAreaBasedOnMaps     := 4;
+        const integer Vru_ClusterBreakupReason_receptionOfCpmContainingCluster    := 5;
+
+      } // End of group vruClusterBreakupReason
+
+    } // End of group vru
+
   } // End of group commonConstants
       
 } // End of module LibIts_ASN1_NamedNumbers 
diff --git a/ttcn/Common/LibItsCommon_CddTemplates.ttcn b/ttcn/Common/LibItsCommon_CddTemplates.ttcn
index 2a4fde5a..91837ba4 100644
--- a/ttcn/Common/LibItsCommon_CddTemplates.ttcn
+++ b/ttcn/Common/LibItsCommon_CddTemplates.ttcn
@@ -438,7 +438,7 @@ module LibItsCommon_CddTemplates {
 
   template (value) ClusterBreakupInfo m_cluster_breakup_info(
                                                              in template (value) ClusterBreakupReason p_cluster_breakup_reason,
-                                                             in template (value) DeltaTimeQuarterSecond p_breakup_time
+                                                             in template (value) DeltaTimeQuarterSecond p_breakup_time := 255
                                                              ) := {
     clusterBreakupReason := p_cluster_breakup_reason,
     breakupTime          := p_breakup_time
@@ -454,7 +454,7 @@ module LibItsCommon_CddTemplates {
 
   template (value) ClusterJoinInfo m_cluster_join_info(
                                                        in template (value) Identifier1B p_cluster_id,
-                                                       in template (value) DeltaTimeQuarterSecond p_join_time
+                                                       in template (value) DeltaTimeQuarterSecond p_join_time := 255
                                                        ) := {
     clusterId := p_cluster_id,
     joinTime  := p_join_time
@@ -470,7 +470,7 @@ module LibItsCommon_CddTemplates {
 
   template (value) ClusterLeaveInfo m_cluster_leave_info(
                                                          in template (value) Identifier1B p_cluster_id,
-                                                         in template (value) ClusterLeaveReason p_clusterLeaveReason
+                                                         in template (value) ClusterLeaveReason p_clusterLeaveReason := Vru_clusterLeaveReason_cancelledJoin
                                                          ) := {
     clusterId           := p_cluster_id,
     clusterLeaveReason  := p_clusterLeaveReason
@@ -968,7 +968,7 @@ module LibItsCommon_CddTemplates {
     lateralAccelerationConfidence := p_lateral_acceleration_confidence
   }
 
-  template (present) LateralAcceleration ms_lateral_acceleration(
+  template (present) LateralAcceleration mw_lateral_acceleration(
                                                                  template (present) LateralAccelerationValue p_lateral_acceleration_value := ?,
                                                                  template (present) AccelerationConfidence p_lateral_acceleration_confidence := ?
                                                                  ) := {
@@ -1727,6 +1727,20 @@ module LibItsCommon_CddTemplates {
     altitude                  := p_altitude
   }
 
+  template (value) ReferencePosition m_reference_position_from_reference_position_with_confidence(
+                                                                                                  in template (value) ReferencePositionWithConfidence p_reference_position
+                                                                                                  ) := {
+    latitude                  := p_reference_position.latitude,
+    longitude                 := p_reference_position.longitude,
+    positionConfidenceEllipse := {
+                                  semiMajorConfidence := p_reference_position.positionConfidenceEllipse.semiMajorAxisLength,
+                                  semiMinorConfidence := p_reference_position.positionConfidenceEllipse.semiMinorAxisLength,
+                                  semiMajorOrientation := p_reference_position.positionConfidenceEllipse.semiMajorAxisOrientation
+                                  },
+    altitude                  := p_reference_position.altitude
+  }
+
+
   template (present) ReferencePosition mw_reference_position(
                                                              template (present) Latitude p_latitude := ?,
                                                              template (present) Longitude p_longitude := ?,
@@ -2255,7 +2269,7 @@ module LibItsCommon_CddTemplates {
 
   template (present) VruClusterInformation mw_vru_cluster_information(
                                                                       template (present) CardinalNumber1B p_cluster_cardinality_size := ?,
-                                                                      template Identifier1B p_cluster_id := *,
+                                                                      template Identifier1B p_cluster_id := ?,
                                                                       template Shape p_cluster_bounding_box_shape := *,
                                                                       template VruClusterProfiles p_cluster_profiles := *
                                                                       ) := { 
diff --git a/ttcn/Common/LibItsCommon_TypesAndValues.ttcn b/ttcn/Common/LibItsCommon_TypesAndValues.ttcn
index aa0224ea..6acb995d 100644
--- a/ttcn/Common/LibItsCommon_TypesAndValues.ttcn
+++ b/ttcn/Common/LibItsCommon_TypesAndValues.ttcn
@@ -206,6 +206,8 @@ module LibItsCommon_TypesAndValues {
         const integer c_its_aid_CRL   := 622;  // ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
         const integer c_its_aid_SCR   := 623;  // Secured Certificate Request, https://standards.ieee.org/products-services/regauth/psid/public.html
         const integer c_its_aid_CPOC  := 624;  // ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
+        const integer c_its_aid_VAM   := 638;
+        const integer c_its_aid_CPM   := 639;
         const integer c_its_aid_MBR   := 1618; // ETSI TS 103 759 Misbehavior Reporting application
     }
 }
-- 
GitLab