Skip to main content

c_its_parser/standards/
cpm_1.rs

1#[allow(
2    non_camel_case_types,
3    non_snake_case,
4    non_upper_case_globals,
5    unused,
6    clippy::too_many_arguments
7)]
8pub mod cpm_pdu_descriptions {
9    extern crate alloc;
10    use core::borrow::Borrow;
11
12    use rasn::prelude::*;
13
14    use super::super::cam_1_4_1::cam_pdu_descriptions::GenerationDeltaTime;
15    use super::super::cdd_1_3_1_1::its_container::{
16        DriveDirection,
17        Heading,
18        ItsPduHeader,
19        LateralAcceleration,
20        LongitudinalAcceleration,
21        ReferencePosition,
22        Speed,
23        SpeedConfidence,
24        StationType,
25        VehicleLength,
26        VehicleWidth,
27        VerticalAcceleration,
28        YawRate,
29    };
30    use super::super::dsrc_2_2_1::etsi_its_dsrc::{
31        IntersectionReferenceID,
32        LaneID,
33        NodeOffsetPointXY,
34        OffsetB10,
35        OffsetB11,
36        OffsetB12,
37        OffsetB13,
38        OffsetB14,
39        OffsetB16,
40        RoadSegmentReferenceID,
41        VehicleHeight,
42    };
43    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
44    #[rasn(delegate, value("1..=127"))]
45    pub struct AngleConfidence(pub u8);
46    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
47    #[rasn(automatic_tags)]
48    pub struct AnimalSubclass {
49        #[rasn(default = "animal_subclass_r_type_default", identifier = "type")]
50        pub r_type: AnimalSubclassType,
51        #[rasn(default = "animal_subclass_confidence_default")]
52        pub confidence: ClassConfidence,
53    }
54    impl AnimalSubclass {
55        pub fn new(r_type: AnimalSubclassType, confidence: ClassConfidence) -> Self {
56            Self { r_type, confidence }
57        }
58    }
59    impl core::default::Default for AnimalSubclass {
60        fn default() -> Self {
61            Self {
62                r_type: animal_subclass_r_type_default(),
63                confidence: animal_subclass_confidence_default(),
64            }
65        }
66    }
67    fn animal_subclass_r_type_default() -> AnimalSubclassType {
68        AnimalSubclassType(0)
69    }
70    fn animal_subclass_confidence_default() -> ClassConfidence {
71        ClassConfidence(0)
72    }
73    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
74    #[rasn(delegate, value("0..=255"))]
75    pub struct AnimalSubclassType(pub u8);
76    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
77    #[rasn(automatic_tags)]
78    pub struct AreaCircular {
79        #[rasn(identifier = "nodeCenterPoint")]
80        pub node_center_point: Option<OffsetPoint>,
81        pub radius: Radius,
82    }
83    impl AreaCircular {
84        pub fn new(node_center_point: Option<OffsetPoint>, radius: Radius) -> Self {
85            Self {
86                node_center_point,
87                radius,
88            }
89        }
90    }
91    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
92    #[rasn(automatic_tags)]
93    pub struct AreaEllipse {
94        #[rasn(identifier = "nodeCenterPoint")]
95        pub node_center_point: Option<OffsetPoint>,
96        #[rasn(identifier = "semiMinorRangeLength")]
97        pub semi_minor_range_length: SemiRangeLength,
98        #[rasn(identifier = "semiMajorRangeLength")]
99        pub semi_major_range_length: SemiRangeLength,
100        #[rasn(identifier = "semiMajorRangeOrientation")]
101        pub semi_major_range_orientation: WGS84AngleValue,
102        #[rasn(identifier = "semiHeight")]
103        pub semi_height: Option<SemiRangeLength>,
104    }
105    impl AreaEllipse {
106        pub fn new(
107            node_center_point: Option<OffsetPoint>,
108            semi_minor_range_length: SemiRangeLength,
109            semi_major_range_length: SemiRangeLength,
110            semi_major_range_orientation: WGS84AngleValue,
111            semi_height: Option<SemiRangeLength>,
112        ) -> Self {
113            Self {
114                node_center_point,
115                semi_minor_range_length,
116                semi_major_range_length,
117                semi_major_range_orientation,
118                semi_height,
119            }
120        }
121    }
122    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
123    #[rasn(automatic_tags)]
124    pub struct AreaPolygon {
125        #[rasn(identifier = "polyPointList")]
126        pub poly_point_list: PolyPointList,
127    }
128    impl AreaPolygon {
129        pub fn new(poly_point_list: PolyPointList) -> Self {
130            Self { poly_point_list }
131        }
132    }
133    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
134    #[rasn(automatic_tags)]
135    #[non_exhaustive]
136    pub struct AreaRadial {
137        pub range: Range,
138        #[rasn(identifier = "stationaryHorizontalOpeningAngleStart")]
139        pub stationary_horizontal_opening_angle_start: WGS84AngleValue,
140        #[rasn(identifier = "stationaryHorizontalOpeningAngleEnd")]
141        pub stationary_horizontal_opening_angle_end: WGS84AngleValue,
142        #[rasn(identifier = "verticalOpeningAngleStart")]
143        pub vertical_opening_angle_start: Option<CartesianAngleValue>,
144        #[rasn(identifier = "verticalOpeningAngleEnd")]
145        pub vertical_opening_angle_end: Option<CartesianAngleValue>,
146        #[rasn(identifier = "sensorPositionOffset")]
147        pub sensor_position_offset: Option<OffsetPoint>,
148        #[rasn(identifier = "sensorHeight")]
149        pub sensor_height: Option<SensorHeight>,
150    }
151    impl AreaRadial {
152        pub fn new(
153            range: Range,
154            stationary_horizontal_opening_angle_start: WGS84AngleValue,
155            stationary_horizontal_opening_angle_end: WGS84AngleValue,
156            vertical_opening_angle_start: Option<CartesianAngleValue>,
157            vertical_opening_angle_end: Option<CartesianAngleValue>,
158            sensor_position_offset: Option<OffsetPoint>,
159            sensor_height: Option<SensorHeight>,
160        ) -> Self {
161            Self {
162                range,
163                stationary_horizontal_opening_angle_start,
164                stationary_horizontal_opening_angle_end,
165                vertical_opening_angle_start,
166                vertical_opening_angle_end,
167                sensor_position_offset,
168                sensor_height,
169            }
170        }
171    }
172    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
173    #[rasn(automatic_tags)]
174    pub struct AreaRectangle {
175        #[rasn(identifier = "nodeCenterPoint")]
176        pub node_center_point: Option<OffsetPoint>,
177        #[rasn(identifier = "semiMajorRangeLength")]
178        pub semi_major_range_length: SemiRangeLength,
179        #[rasn(identifier = "semiMinorRangeLength")]
180        pub semi_minor_range_length: SemiRangeLength,
181        #[rasn(identifier = "semiMajorRangeOrientation")]
182        pub semi_major_range_orientation: WGS84AngleValue,
183        #[rasn(identifier = "semiHeight")]
184        pub semi_height: Option<SemiRangeLength>,
185    }
186    impl AreaRectangle {
187        pub fn new(
188            node_center_point: Option<OffsetPoint>,
189            semi_major_range_length: SemiRangeLength,
190            semi_minor_range_length: SemiRangeLength,
191            semi_major_range_orientation: WGS84AngleValue,
192            semi_height: Option<SemiRangeLength>,
193        ) -> Self {
194            Self {
195                node_center_point,
196                semi_major_range_length,
197                semi_minor_range_length,
198                semi_major_range_orientation,
199                semi_height,
200            }
201        }
202    }
203    #[doc = " The root data frame for collective perception message"]
204    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
205    #[rasn(automatic_tags)]
206    pub struct CPM {
207        pub header: ItsPduHeader,
208        pub cpm: CollectivePerceptionMessage,
209    }
210    impl CPM {
211        pub fn new(header: ItsPduHeader, cpm: CollectivePerceptionMessage) -> Self {
212            Self { header, cpm }
213        }
214    }
215    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
216    #[rasn(automatic_tags)]
217    pub struct CartesianAngle {
218        pub value: CartesianAngleValue,
219        pub confidence: AngleConfidence,
220    }
221    impl CartesianAngle {
222        pub fn new(value: CartesianAngleValue, confidence: AngleConfidence) -> Self {
223            Self { value, confidence }
224        }
225    }
226    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
227    #[rasn(delegate, value("0..=3601"))]
228    pub struct CartesianAngleValue(pub u16);
229    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
230    #[rasn(delegate, value("0..=101"))]
231    pub struct ClassConfidence(pub u8);
232    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
233    #[rasn(automatic_tags)]
234    pub struct CollectivePerceptionMessage {
235        #[rasn(identifier = "generationDeltaTime")]
236        pub generation_delta_time: GenerationDeltaTime,
237        #[rasn(identifier = "cpmParameters")]
238        pub cpm_parameters: CpmParameters,
239    }
240    impl CollectivePerceptionMessage {
241        pub fn new(
242            generation_delta_time: GenerationDeltaTime,
243            cpm_parameters: CpmParameters,
244        ) -> Self {
245            Self {
246                generation_delta_time,
247                cpm_parameters,
248            }
249        }
250    }
251    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
252    #[rasn(automatic_tags)]
253    #[non_exhaustive]
254    pub struct CpmManagementContainer {
255        #[rasn(identifier = "stationType")]
256        pub station_type: StationType,
257        #[rasn(identifier = "perceivedObjectContainerSegmentInfo")]
258        pub perceived_object_container_segment_info: Option<PerceivedObjectContainerSegmentInfo>,
259        #[rasn(identifier = "referencePosition")]
260        pub reference_position: ReferencePosition,
261    }
262    impl CpmManagementContainer {
263        pub fn new(
264            station_type: StationType,
265            perceived_object_container_segment_info: Option<PerceivedObjectContainerSegmentInfo>,
266            reference_position: ReferencePosition,
267        ) -> Self {
268            Self {
269                station_type,
270                perceived_object_container_segment_info,
271                reference_position,
272            }
273        }
274    }
275    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
276    #[rasn(automatic_tags)]
277    #[non_exhaustive]
278    pub struct CpmParameters {
279        #[rasn(identifier = "managementContainer")]
280        pub management_container: CpmManagementContainer,
281        #[rasn(identifier = "stationDataContainer")]
282        pub station_data_container: Option<StationDataContainer>,
283        #[rasn(identifier = "sensorInformationContainer")]
284        pub sensor_information_container: Option<SensorInformationContainer>,
285        #[rasn(identifier = "perceivedObjectContainer")]
286        pub perceived_object_container: Option<PerceivedObjectContainer>,
287        #[rasn(identifier = "freeSpaceAddendumContainer")]
288        pub free_space_addendum_container: Option<FreeSpaceAddendumContainer>,
289        #[rasn(identifier = "numberOfPerceivedObjects")]
290        pub number_of_perceived_objects: NumberOfPerceivedObjects,
291    }
292    impl CpmParameters {
293        pub fn new(
294            management_container: CpmManagementContainer,
295            station_data_container: Option<StationDataContainer>,
296            sensor_information_container: Option<SensorInformationContainer>,
297            perceived_object_container: Option<PerceivedObjectContainer>,
298            free_space_addendum_container: Option<FreeSpaceAddendumContainer>,
299            number_of_perceived_objects: NumberOfPerceivedObjects,
300        ) -> Self {
301            Self {
302                management_container,
303                station_data_container,
304                sensor_information_container,
305                perceived_object_container,
306                free_space_addendum_container,
307                number_of_perceived_objects,
308            }
309        }
310    }
311    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
312    #[rasn(choice, automatic_tags)]
313    #[non_exhaustive]
314    pub enum DetectionArea {
315        vehicleSensor(VehicleSensor),
316        stationarySensorRadial(AreaRadial),
317        stationarySensorPolygon(AreaPolygon),
318        stationarySensorCircular(AreaCircular),
319        stationarySensorEllipse(AreaEllipse),
320        stationarySensorRectangle(AreaRectangle),
321    }
322    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
323    #[rasn(delegate, value("0..=102"))]
324    pub struct DistanceConfidence(pub u8);
325    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
326    #[rasn(delegate, value("-132768..=132767"))]
327    pub struct DistanceValue(pub i32);
328    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
329    #[rasn(delegate, value("0..=2"))]
330    pub struct DynamicStatus(pub u8);
331    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
332    #[rasn(automatic_tags)]
333    #[non_exhaustive]
334    pub struct FreeSpaceAddendum {
335        #[rasn(identifier = "freeSpaceConfidence")]
336        pub free_space_confidence: FreeSpaceConfidence,
337        #[rasn(identifier = "freeSpaceArea")]
338        pub free_space_area: FreeSpaceArea,
339        #[rasn(identifier = "sensorIDList")]
340        pub sensor_idlist: Option<SensorIdList>,
341        #[rasn(
342            default = "free_space_addendum_shadowing_applies_default",
343            identifier = "shadowingApplies"
344        )]
345        pub shadowing_applies: ShadowingApplies,
346    }
347    impl FreeSpaceAddendum {
348        pub fn new(
349            free_space_confidence: FreeSpaceConfidence,
350            free_space_area: FreeSpaceArea,
351            sensor_idlist: Option<SensorIdList>,
352            shadowing_applies: ShadowingApplies,
353        ) -> Self {
354            Self {
355                free_space_confidence,
356                free_space_area,
357                sensor_idlist,
358                shadowing_applies,
359            }
360        }
361    }
362    fn free_space_addendum_shadowing_applies_default() -> ShadowingApplies {
363        ShadowingApplies(true)
364    }
365    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
366    #[rasn(delegate, size("1..=128", extensible))]
367    pub struct FreeSpaceAddendumContainer(pub SequenceOf<FreeSpaceAddendum>);
368    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
369    #[rasn(choice, automatic_tags)]
370    #[non_exhaustive]
371    pub enum FreeSpaceArea {
372        freeSpacePolygon(AreaPolygon),
373        freeSpaceCircular(AreaCircular),
374        freeSpaceEllipse(AreaEllipse),
375        freeSpaceRectangle(AreaRectangle),
376    }
377    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
378    #[rasn(delegate, value("0..=101"))]
379    pub struct FreeSpaceConfidence(pub u8);
380    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
381    #[rasn(delegate, value("0..=50"))]
382    pub struct FrontOverhang(pub u8);
383    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
384    #[rasn(delegate, value("0..=100"))]
385    pub struct HitchPointOffset(pub u8);
386    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
387    #[rasn(delegate, value("0..=255"))]
388    pub struct Identifier(pub u8);
389    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
390    #[rasn(automatic_tags)]
391    pub struct LongitudinalLanePosition {
392        #[rasn(identifier = "longitudinalLanePositionValue")]
393        pub longitudinal_lane_position_value: LongitudinalLanePositionValue,
394        #[rasn(identifier = "longitudinalLanePositionConfidence")]
395        pub longitudinal_lane_position_confidence: LongitudinalLanePositionConfidence,
396    }
397    impl LongitudinalLanePosition {
398        pub fn new(
399            longitudinal_lane_position_value: LongitudinalLanePositionValue,
400            longitudinal_lane_position_confidence: LongitudinalLanePositionConfidence,
401        ) -> Self {
402            Self {
403                longitudinal_lane_position_value,
404                longitudinal_lane_position_confidence,
405            }
406        }
407    }
408    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
409    #[rasn(delegate, value("0..=102"))]
410    pub struct LongitudinalLanePositionConfidence(pub u8);
411    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
412    #[rasn(delegate, value("0..=32767"))]
413    pub struct LongitudinalLanePositionValue(pub u16);
414    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
415    #[rasn(automatic_tags)]
416    #[non_exhaustive]
417    pub struct MatchedPosition {
418        #[rasn(identifier = "laneID")]
419        pub lane_id: Option<LaneID>,
420        #[rasn(identifier = "longitudinalLanePosition")]
421        pub longitudinal_lane_position: Option<LongitudinalLanePosition>,
422    }
423    impl MatchedPosition {
424        pub fn new(
425            lane_id: Option<LaneID>,
426            longitudinal_lane_position: Option<LongitudinalLanePosition>,
427        ) -> Self {
428            Self {
429                lane_id,
430                longitudinal_lane_position,
431            }
432        }
433    }
434    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
435    #[rasn(choice, automatic_tags)]
436    pub enum NodeOffsetPointZ {
437        #[rasn(identifier = "node-Z1")]
438        node_Z1(OffsetB10),
439        #[rasn(identifier = "node-Z2")]
440        node_Z2(OffsetB11),
441        #[rasn(identifier = "node-Z3")]
442        node_Z3(OffsetB12),
443        #[rasn(identifier = "node-Z4")]
444        node_Z4(OffsetB13),
445        #[rasn(identifier = "node-Z5")]
446        node_Z5(OffsetB14),
447        #[rasn(identifier = "node-Z6")]
448        node_Z6(OffsetB16),
449    }
450    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
451    #[rasn(delegate, value("0..=255"))]
452    pub struct NumberOfPerceivedObjects(pub u8);
453    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
454    #[rasn(delegate, value("0..=1500"))]
455    pub struct ObjectAge(pub u16);
456    #[doc = " Inner type "]
457    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
458    #[rasn(choice, automatic_tags)]
459    pub enum ObjectClassClass {
460        vehicle(VehicleSubclass),
461        person(PersonSubclass),
462        animal(AnimalSubclass),
463        other(OtherSubclass),
464    }
465    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
466    #[rasn(automatic_tags)]
467    pub struct ObjectClass {
468        pub confidence: ClassConfidence,
469        pub class: ObjectClassClass,
470    }
471    impl ObjectClass {
472        pub fn new(confidence: ClassConfidence, class: ObjectClassClass) -> Self {
473            Self { confidence, class }
474        }
475    }
476    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
477    #[rasn(delegate, size("1..=8"))]
478    pub struct ObjectClassDescription(pub SequenceOf<ObjectClass>);
479    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
480    #[rasn(delegate, value("0..=101"))]
481    pub struct ObjectConfidence(pub u8);
482    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
483    #[rasn(automatic_tags)]
484    pub struct ObjectDimension {
485        pub value: ObjectDimensionValue,
486        pub confidence: ObjectDimensionConfidence,
487    }
488    impl ObjectDimension {
489        pub fn new(value: ObjectDimensionValue, confidence: ObjectDimensionConfidence) -> Self {
490            Self { value, confidence }
491        }
492    }
493    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
494    #[rasn(delegate, value("0..=102"))]
495    pub struct ObjectDimensionConfidence(pub u8);
496    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
497    #[rasn(delegate, value("0..=1023"))]
498    pub struct ObjectDimensionValue(pub u16);
499    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
500    #[rasn(automatic_tags)]
501    pub struct ObjectDistanceWithConfidence {
502        pub value: DistanceValue,
503        pub confidence: DistanceConfidence,
504    }
505    impl ObjectDistanceWithConfidence {
506        pub fn new(value: DistanceValue, confidence: DistanceConfidence) -> Self {
507            Self { value, confidence }
508        }
509    }
510    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
511    #[rasn(delegate, value("0..=8"))]
512    pub struct ObjectRefPoint(pub u8);
513    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
514    #[rasn(automatic_tags)]
515    pub struct OffsetPoint {
516        #[rasn(value("0.."), identifier = "nodeOffsetPointxy")]
517        pub node_offset_pointxy: NodeOffsetPointXY,
518        #[rasn(identifier = "nodeOffsetPointZ")]
519        pub node_offset_point_z: Option<NodeOffsetPointZ>,
520    }
521    impl OffsetPoint {
522        pub fn new(
523            node_offset_pointxy: NodeOffsetPointXY,
524            node_offset_point_z: Option<NodeOffsetPointZ>,
525        ) -> Self {
526            Self {
527                node_offset_pointxy,
528                node_offset_point_z,
529            }
530        }
531    }
532    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
533    #[rasn(choice, automatic_tags)]
534    #[non_exhaustive]
535    pub enum OriginatingRSUContainer {
536        intersectionReferenceId(IntersectionReferenceID),
537        roadSegmentReferenceId(RoadSegmentReferenceID),
538    }
539    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
540    #[rasn(automatic_tags)]
541    #[non_exhaustive]
542    pub struct OriginatingVehicleContainer {
543        pub heading: Heading,
544        pub speed: Speed,
545        #[rasn(identifier = "vehicleOrientationAngle")]
546        pub vehicle_orientation_angle: Option<WGS84Angle>,
547        #[rasn(
548            default = "originating_vehicle_container_drive_direction_default",
549            identifier = "driveDirection"
550        )]
551        pub drive_direction: DriveDirection,
552        #[rasn(identifier = "longitudinalAcceleration")]
553        pub longitudinal_acceleration: Option<LongitudinalAcceleration>,
554        #[rasn(identifier = "lateralAcceleration")]
555        pub lateral_acceleration: Option<LateralAcceleration>,
556        #[rasn(identifier = "verticalAcceleration")]
557        pub vertical_acceleration: Option<VerticalAcceleration>,
558        #[rasn(identifier = "yawRate")]
559        pub yaw_rate: Option<YawRate>,
560        #[rasn(identifier = "pitchAngle")]
561        pub pitch_angle: Option<CartesianAngle>,
562        #[rasn(identifier = "rollAngle")]
563        pub roll_angle: Option<CartesianAngle>,
564        #[rasn(identifier = "vehicleLength")]
565        pub vehicle_length: Option<VehicleLength>,
566        #[rasn(identifier = "vehicleWidth")]
567        pub vehicle_width: Option<VehicleWidth>,
568        #[rasn(identifier = "vehicleHeight")]
569        pub vehicle_height: Option<VehicleHeight>,
570        #[rasn(identifier = "trailerDataContainer")]
571        pub trailer_data_container: Option<TrailerDataContainer>,
572    }
573    impl OriginatingVehicleContainer {
574        pub fn new(
575            heading: Heading,
576            speed: Speed,
577            vehicle_orientation_angle: Option<WGS84Angle>,
578            drive_direction: DriveDirection,
579            longitudinal_acceleration: Option<LongitudinalAcceleration>,
580            lateral_acceleration: Option<LateralAcceleration>,
581            vertical_acceleration: Option<VerticalAcceleration>,
582            yaw_rate: Option<YawRate>,
583            pitch_angle: Option<CartesianAngle>,
584            roll_angle: Option<CartesianAngle>,
585            vehicle_length: Option<VehicleLength>,
586            vehicle_width: Option<VehicleWidth>,
587            vehicle_height: Option<VehicleHeight>,
588            trailer_data_container: Option<TrailerDataContainer>,
589        ) -> Self {
590            Self {
591                heading,
592                speed,
593                vehicle_orientation_angle,
594                drive_direction,
595                longitudinal_acceleration,
596                lateral_acceleration,
597                vertical_acceleration,
598                yaw_rate,
599                pitch_angle,
600                roll_angle,
601                vehicle_length,
602                vehicle_width,
603                vehicle_height,
604                trailer_data_container,
605            }
606        }
607    }
608    fn originating_vehicle_container_drive_direction_default() -> DriveDirection {
609        DriveDirection::forward
610    }
611    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
612    #[rasn(automatic_tags)]
613    pub struct OtherSubclass {
614        #[rasn(default = "other_subclass_r_type_default", identifier = "type")]
615        pub r_type: OtherSublassType,
616        #[rasn(default = "other_subclass_confidence_default")]
617        pub confidence: ClassConfidence,
618    }
619    impl OtherSubclass {
620        pub fn new(r_type: OtherSublassType, confidence: ClassConfidence) -> Self {
621            Self { r_type, confidence }
622        }
623    }
624    impl core::default::Default for OtherSubclass {
625        fn default() -> Self {
626            Self {
627                r_type: other_subclass_r_type_default(),
628                confidence: other_subclass_confidence_default(),
629            }
630        }
631    }
632    fn other_subclass_r_type_default() -> OtherSublassType {
633        OtherSublassType(0)
634    }
635    fn other_subclass_confidence_default() -> ClassConfidence {
636        ClassConfidence(0)
637    }
638    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
639    #[rasn(delegate, value("0..=255"))]
640    pub struct OtherSublassType(pub u8);
641    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
642    #[rasn(automatic_tags)]
643    #[non_exhaustive]
644    pub struct PerceivedObject {
645        #[rasn(identifier = "objectID")]
646        pub object_id: Identifier,
647        #[rasn(identifier = "sensorIDList")]
648        pub sensor_idlist: Option<SensorIdList>,
649        #[rasn(identifier = "timeOfMeasurement")]
650        pub time_of_measurement: TimeOfMeasurement,
651        #[rasn(identifier = "objectAge")]
652        pub object_age: Option<ObjectAge>,
653        #[rasn(
654            default = "perceived_object_object_confidence_default",
655            identifier = "objectConfidence"
656        )]
657        pub object_confidence: ObjectConfidence,
658        #[rasn(identifier = "xDistance")]
659        pub x_distance: ObjectDistanceWithConfidence,
660        #[rasn(identifier = "yDistance")]
661        pub y_distance: ObjectDistanceWithConfidence,
662        #[rasn(identifier = "zDistance")]
663        pub z_distance: Option<ObjectDistanceWithConfidence>,
664        #[rasn(identifier = "xSpeed")]
665        pub x_speed: SpeedExtended,
666        #[rasn(identifier = "ySpeed")]
667        pub y_speed: SpeedExtended,
668        #[rasn(identifier = "zSpeed")]
669        pub z_speed: Option<SpeedExtended>,
670        #[rasn(identifier = "xAcceleration")]
671        pub x_acceleration: Option<LongitudinalAcceleration>,
672        #[rasn(identifier = "yAcceleration")]
673        pub y_acceleration: Option<LateralAcceleration>,
674        #[rasn(identifier = "zAcceleration")]
675        pub z_acceleration: Option<VerticalAcceleration>,
676        #[rasn(identifier = "yawAngle")]
677        pub yaw_angle: Option<CartesianAngle>,
678        #[rasn(identifier = "planarObjectDimension1")]
679        pub planar_object_dimension1: Option<ObjectDimension>,
680        #[rasn(identifier = "planarObjectDimension2")]
681        pub planar_object_dimension2: Option<ObjectDimension>,
682        #[rasn(identifier = "verticalObjectDimension")]
683        pub vertical_object_dimension: Option<ObjectDimension>,
684        #[rasn(
685            default = "perceived_object_object_ref_point_default",
686            identifier = "objectRefPoint"
687        )]
688        pub object_ref_point: ObjectRefPoint,
689        #[rasn(identifier = "dynamicStatus")]
690        pub dynamic_status: Option<DynamicStatus>,
691        pub classification: Option<ObjectClassDescription>,
692        #[rasn(identifier = "matchedPosition")]
693        pub matched_position: Option<MatchedPosition>,
694    }
695    impl PerceivedObject {
696        pub fn new(
697            object_id: Identifier,
698            sensor_idlist: Option<SensorIdList>,
699            time_of_measurement: TimeOfMeasurement,
700            object_age: Option<ObjectAge>,
701            object_confidence: ObjectConfidence,
702            x_distance: ObjectDistanceWithConfidence,
703            y_distance: ObjectDistanceWithConfidence,
704            z_distance: Option<ObjectDistanceWithConfidence>,
705            x_speed: SpeedExtended,
706            y_speed: SpeedExtended,
707            z_speed: Option<SpeedExtended>,
708            x_acceleration: Option<LongitudinalAcceleration>,
709            y_acceleration: Option<LateralAcceleration>,
710            z_acceleration: Option<VerticalAcceleration>,
711            yaw_angle: Option<CartesianAngle>,
712            planar_object_dimension1: Option<ObjectDimension>,
713            planar_object_dimension2: Option<ObjectDimension>,
714            vertical_object_dimension: Option<ObjectDimension>,
715            object_ref_point: ObjectRefPoint,
716            dynamic_status: Option<DynamicStatus>,
717            classification: Option<ObjectClassDescription>,
718            matched_position: Option<MatchedPosition>,
719        ) -> Self {
720            Self {
721                object_id,
722                sensor_idlist,
723                time_of_measurement,
724                object_age,
725                object_confidence,
726                x_distance,
727                y_distance,
728                z_distance,
729                x_speed,
730                y_speed,
731                z_speed,
732                x_acceleration,
733                y_acceleration,
734                z_acceleration,
735                yaw_angle,
736                planar_object_dimension1,
737                planar_object_dimension2,
738                vertical_object_dimension,
739                object_ref_point,
740                dynamic_status,
741                classification,
742                matched_position,
743            }
744        }
745    }
746    fn perceived_object_object_confidence_default() -> ObjectConfidence {
747        ObjectConfidence(0)
748    }
749    fn perceived_object_object_ref_point_default() -> ObjectRefPoint {
750        ObjectRefPoint(0)
751    }
752    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
753    #[rasn(delegate, size("1..=128", extensible))]
754    pub struct PerceivedObjectContainer(pub SequenceOf<PerceivedObject>);
755    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
756    #[rasn(automatic_tags)]
757    pub struct PerceivedObjectContainerSegmentInfo {
758        #[rasn(identifier = "totalMsgSegments")]
759        pub total_msg_segments: SegmentCount,
760        #[rasn(identifier = "thisSegmentNum")]
761        pub this_segment_num: SegmentCount,
762    }
763    impl PerceivedObjectContainerSegmentInfo {
764        pub fn new(total_msg_segments: SegmentCount, this_segment_num: SegmentCount) -> Self {
765            Self {
766                total_msg_segments,
767                this_segment_num,
768            }
769        }
770    }
771    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
772    #[rasn(automatic_tags)]
773    pub struct PersonSubclass {
774        #[rasn(default = "person_subclass_r_type_default", identifier = "type")]
775        pub r_type: PersonSubclassType,
776        #[rasn(default = "person_subclass_confidence_default")]
777        pub confidence: ClassConfidence,
778    }
779    impl PersonSubclass {
780        pub fn new(r_type: PersonSubclassType, confidence: ClassConfidence) -> Self {
781            Self { r_type, confidence }
782        }
783    }
784    impl core::default::Default for PersonSubclass {
785        fn default() -> Self {
786            Self {
787                r_type: person_subclass_r_type_default(),
788                confidence: person_subclass_confidence_default(),
789            }
790        }
791    }
792    fn person_subclass_r_type_default() -> PersonSubclassType {
793        PersonSubclassType(0)
794    }
795    fn person_subclass_confidence_default() -> ClassConfidence {
796        ClassConfidence(0)
797    }
798    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
799    #[rasn(delegate, value("0..=255"))]
800    pub struct PersonSubclassType(pub u8);
801    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
802    #[rasn(delegate, size("3..=16", extensible))]
803    pub struct PolyPointList(pub SequenceOf<OffsetPoint>);
804    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
805    #[rasn(delegate, value("0..=10000"))]
806    pub struct Radius(pub u16);
807    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
808    #[rasn(delegate, value("0..=10000"))]
809    pub struct Range(pub u16);
810    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
811    #[rasn(delegate, value("0..=150"))]
812    pub struct RearOverhang(pub u8);
813    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
814    #[rasn(delegate, value("0..=255"))]
815    pub struct RefPointId(pub u8);
816    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
817    #[rasn(delegate, value("1..=127"))]
818    pub struct SegmentCount(pub u8);
819    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
820    #[rasn(delegate, value("0..=10000"))]
821    pub struct SemiRangeLength(pub u16);
822    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
823    #[rasn(delegate, value("-5000..=5000"))]
824    pub struct SensorHeight(pub i16);
825    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
826    #[rasn(delegate, size("1..=128", extensible))]
827    pub struct SensorIdList(pub SequenceOf<Identifier>);
828    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
829    #[rasn(automatic_tags)]
830    #[non_exhaustive]
831    pub struct SensorInformation {
832        #[rasn(identifier = "sensorID")]
833        pub sensor_id: Identifier,
834        #[rasn(identifier = "type")]
835        pub r_type: SensorType,
836        #[rasn(identifier = "detectionArea")]
837        pub detection_area: DetectionArea,
838        #[rasn(identifier = "freeSpaceConfidence")]
839        pub free_space_confidence: Option<FreeSpaceConfidence>,
840    }
841    impl SensorInformation {
842        pub fn new(
843            sensor_id: Identifier,
844            r_type: SensorType,
845            detection_area: DetectionArea,
846            free_space_confidence: Option<FreeSpaceConfidence>,
847        ) -> Self {
848            Self {
849                sensor_id,
850                r_type,
851                detection_area,
852                free_space_confidence,
853            }
854        }
855    }
856    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
857    #[rasn(delegate, size("1..=128", extensible))]
858    pub struct SensorInformationContainer(pub SequenceOf<SensorInformation>);
859    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
860    #[rasn(delegate, value("0..=15"))]
861    pub struct SensorType(pub u8);
862    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash, Copy)]
863    #[rasn(delegate)]
864    pub struct ShadowingApplies(pub bool);
865    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
866    #[rasn(automatic_tags)]
867    pub struct SpeedExtended {
868        pub value: SpeedValueExtended,
869        pub confidence: SpeedConfidence,
870    }
871    impl SpeedExtended {
872        pub fn new(value: SpeedValueExtended, confidence: SpeedConfidence) -> Self {
873            Self { value, confidence }
874        }
875    }
876    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
877    #[rasn(delegate, value("-16383..=16383"))]
878    pub struct SpeedValueExtended(pub i16);
879    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
880    #[rasn(choice, automatic_tags)]
881    #[non_exhaustive]
882    pub enum StationDataContainer {
883        originatingVehicleContainer(OriginatingVehicleContainer),
884        originatingRSUContainer(OriginatingRSUContainer),
885    }
886    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
887    #[rasn(delegate, value("-1500..=1500"))]
888    pub struct TimeOfMeasurement(pub i16);
889    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
890    #[rasn(automatic_tags)]
891    #[non_exhaustive]
892    pub struct TrailerData {
893        #[rasn(identifier = "refPointId")]
894        pub ref_point_id: RefPointId,
895        #[rasn(identifier = "hitchPointOffset")]
896        pub hitch_point_offset: HitchPointOffset,
897        #[rasn(identifier = "frontOverhang")]
898        pub front_overhang: FrontOverhang,
899        #[rasn(identifier = "rearOverhang")]
900        pub rear_overhang: RearOverhang,
901        #[rasn(identifier = "trailerWidth")]
902        pub trailer_width: Option<VehicleWidth>,
903        #[rasn(identifier = "hitchAngle")]
904        pub hitch_angle: Option<CartesianAngle>,
905    }
906    impl TrailerData {
907        pub fn new(
908            ref_point_id: RefPointId,
909            hitch_point_offset: HitchPointOffset,
910            front_overhang: FrontOverhang,
911            rear_overhang: RearOverhang,
912            trailer_width: Option<VehicleWidth>,
913            hitch_angle: Option<CartesianAngle>,
914        ) -> Self {
915            Self {
916                ref_point_id,
917                hitch_point_offset,
918                front_overhang,
919                rear_overhang,
920                trailer_width,
921                hitch_angle,
922            }
923        }
924    }
925    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
926    #[rasn(delegate, size("1..=2"))]
927    pub struct TrailerDataContainer(pub SequenceOf<TrailerData>);
928    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
929    #[rasn(automatic_tags)]
930    #[non_exhaustive]
931    pub struct VehicleSensor {
932        #[rasn(
933            default = "vehicle_sensor_ref_point_id_default",
934            identifier = "refPointId"
935        )]
936        pub ref_point_id: RefPointId,
937        #[rasn(identifier = "xSensorOffset")]
938        pub x_sensor_offset: XSensorOffset,
939        #[rasn(identifier = "ySensorOffset")]
940        pub y_sensor_offset: YSensorOffset,
941        #[rasn(identifier = "zSensorOffset")]
942        pub z_sensor_offset: Option<ZSensorOffset>,
943        #[rasn(identifier = "vehicleSensorPropertyList")]
944        pub vehicle_sensor_property_list: VehicleSensorPropertyList,
945    }
946    impl VehicleSensor {
947        pub fn new(
948            ref_point_id: RefPointId,
949            x_sensor_offset: XSensorOffset,
950            y_sensor_offset: YSensorOffset,
951            z_sensor_offset: Option<ZSensorOffset>,
952            vehicle_sensor_property_list: VehicleSensorPropertyList,
953        ) -> Self {
954            Self {
955                ref_point_id,
956                x_sensor_offset,
957                y_sensor_offset,
958                z_sensor_offset,
959                vehicle_sensor_property_list,
960            }
961        }
962    }
963    fn vehicle_sensor_ref_point_id_default() -> RefPointId {
964        RefPointId(0)
965    }
966    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
967    #[rasn(automatic_tags)]
968    #[non_exhaustive]
969    pub struct VehicleSensorProperties {
970        pub range: Range,
971        #[rasn(identifier = "horizontalOpeningAngleStart")]
972        pub horizontal_opening_angle_start: CartesianAngleValue,
973        #[rasn(identifier = "horizontalOpeningAngleEnd")]
974        pub horizontal_opening_angle_end: CartesianAngleValue,
975        #[rasn(identifier = "verticalOpeningAngleStart")]
976        pub vertical_opening_angle_start: Option<CartesianAngleValue>,
977        #[rasn(identifier = "verticalOpeningAngleEnd")]
978        pub vertical_opening_angle_end: Option<CartesianAngleValue>,
979    }
980    impl VehicleSensorProperties {
981        pub fn new(
982            range: Range,
983            horizontal_opening_angle_start: CartesianAngleValue,
984            horizontal_opening_angle_end: CartesianAngleValue,
985            vertical_opening_angle_start: Option<CartesianAngleValue>,
986            vertical_opening_angle_end: Option<CartesianAngleValue>,
987        ) -> Self {
988            Self {
989                range,
990                horizontal_opening_angle_start,
991                horizontal_opening_angle_end,
992                vertical_opening_angle_start,
993                vertical_opening_angle_end,
994            }
995        }
996    }
997    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
998    #[rasn(delegate, size("1..=10"))]
999    pub struct VehicleSensorPropertyList(pub SequenceOf<VehicleSensorProperties>);
1000    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1001    #[rasn(automatic_tags)]
1002    pub struct VehicleSubclass {
1003        #[rasn(default = "vehicle_subclass_r_type_default", identifier = "type")]
1004        pub r_type: VehicleSubclassType,
1005        #[rasn(default = "vehicle_subclass_confidence_default")]
1006        pub confidence: ClassConfidence,
1007    }
1008    impl VehicleSubclass {
1009        pub fn new(r_type: VehicleSubclassType, confidence: ClassConfidence) -> Self {
1010            Self { r_type, confidence }
1011        }
1012    }
1013    impl core::default::Default for VehicleSubclass {
1014        fn default() -> Self {
1015            Self {
1016                r_type: vehicle_subclass_r_type_default(),
1017                confidence: vehicle_subclass_confidence_default(),
1018            }
1019        }
1020    }
1021    fn vehicle_subclass_r_type_default() -> VehicleSubclassType {
1022        VehicleSubclassType(0)
1023    }
1024    fn vehicle_subclass_confidence_default() -> ClassConfidence {
1025        ClassConfidence(0)
1026    }
1027    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1028    #[rasn(delegate, value("0..=255"))]
1029    pub struct VehicleSubclassType(pub u8);
1030    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1031    #[rasn(automatic_tags)]
1032    pub struct WGS84Angle {
1033        pub value: WGS84AngleValue,
1034        pub confidence: AngleConfidence,
1035    }
1036    impl WGS84Angle {
1037        pub fn new(value: WGS84AngleValue, confidence: AngleConfidence) -> Self {
1038            Self { value, confidence }
1039        }
1040    }
1041    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1042    #[rasn(delegate, value("0..=3601"))]
1043    pub struct WGS84AngleValue(pub u16);
1044    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1045    #[rasn(delegate, value("-5000..=0"))]
1046    pub struct XSensorOffset(pub i16);
1047    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1048    #[rasn(delegate, value("-1000..=1000"))]
1049    pub struct YSensorOffset(pub i16);
1050    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1051    #[rasn(delegate, value("0..=1000"))]
1052    pub struct ZSensorOffset(pub u16);
1053}