c-its-parser 2.2.0

Tools for encoding and decoding ETSI messages (GN + Transport + CAM/DENM/IVIM/SSEM/SREM/MAPEM/SPATEM)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
#[allow(
    non_camel_case_types,
    non_snake_case,
    non_upper_case_globals,
    unused,
    clippy::too_many_arguments
)]
pub mod denm_pdu_description {
    extern crate alloc;
    use core::borrow::Borrow;

    use rasn::prelude::*;

    use super::super::cdd_2_2_1::etsi_its_cdd::{
        ActionId,
        ActionIdList,
        CauseCodeV2,
        ClosedLanes,
        DangerousGoodsExtended,
        DeltaReferencePosition,
        DeltaTimeMilliSecondPositive,
        DeltaTimeSecond,
        EnergyStorageType,
        EventZone,
        GeneralizedLanePositions,
        HeightLonCarr,
        InformationQuality,
        ItineraryPath,
        ItsPduHeader,
        IvimReferences,
        LanePosition,
        LightBarSirenInUse,
        MapReferences,
        MetaInformation,
        NumberOfOccupants,
        ObjectFace,
        OccupiedLanesWithConfidence,
        PathPredictedList,
        PerceivedObject,
        PosCentMass,
        PosFrontAx,
        PosLonCarr,
        Position1d,
        PositionOfOccupants,
        PositionOfPillars,
        PositioningSolutionType,
        ReferencePosition,
        RequestResponseIndication,
        RestrictedTypes,
        RoadConfigurationSectionList,
        RoadType,
        Speed,
        SpeedLimit,
        StandardLength3b,
        StandardLength12b,
        StationId,
        StationType,
        StationarySince,
        Temperature,
        TimestampIts,
        Traces,
        TracesExtended,
        TrafficDirection,
        TrafficRule,
        TurningRadius,
        VehicleIdentification,
        VehicleMass,
        Wgs84Angle,
        WheelBaseVehicle,
    };
    #[doc = " Inner type "]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct AlacarteContainerExtGroupRoadConfiguration {
        #[rasn(identifier = "roadConfiguration")]
        pub road_configuration: Option<RoadConfigurationContainer>,
        #[rasn(identifier = "preCrash")]
        pub pre_crash: Option<PreCrashContainer>,
    }
    impl AlacarteContainerExtGroupRoadConfiguration {
        pub fn new(
            road_configuration: Option<RoadConfigurationContainer>,
            pre_crash: Option<PreCrashContainer>,
        ) -> Self {
            Self {
                road_configuration,
                pre_crash,
            }
        }
    }

    #[doc = "This type represents the A La Carte Container."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field lanePosition: the optional lane position of the event."]
    #[doc = ""]
    #[doc = "- @field impactReduction: optional vehicle data for collision mitigation."]
    #[doc = ""]
    #[doc = "- @field externalTemperature: optional the ambient temperature at the event position."]
    #[doc = ""]
    #[doc = "- @field roadWorks: optional information of the roadwork zone."]
    #[doc = ""]
    #[doc = "- @field positioningSolution: optionally indicates the technical solution being used by the originating ITS-S to estimate the event position."]
    #[doc = ""]
    #[doc = "- @field stationaryVehicle: optional information about a stationary vehicle."]
    #[doc = ""]
    #[doc = "- @field roadConfiguration: optional information about the configuration of the road."]
    #[doc = ""]
    #[doc = "- @field precrash: the optional information about perceived objects that represent hazards and/or could be subject of collisions. "]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct AlacarteContainer {
        #[rasn(identifier = "lanePosition")]
        pub lane_position: Option<LanePosition>,
        #[rasn(identifier = "impactReduction")]
        pub impact_reduction: Option<ImpactReductionContainer>,
        #[rasn(identifier = "externalTemperature")]
        pub external_temperature: Option<Temperature>,
        #[rasn(identifier = "roadWorks")]
        pub road_works: Option<RoadWorksContainerExtended>,
        #[rasn(identifier = "positioningSolution")]
        pub positioning_solution: Option<PositioningSolutionType>,
        #[rasn(identifier = "stationaryVehicle")]
        pub stationary_vehicle: Option<StationaryVehicleContainer>,
        #[rasn(extension_addition_group, identifier = "SEQUENCE")]
        pub ext_group_road_configuration: Option<AlacarteContainerExtGroupRoadConfiguration>,
    }
    impl AlacarteContainer {
        pub fn new(
            lane_position: Option<LanePosition>,
            impact_reduction: Option<ImpactReductionContainer>,
            external_temperature: Option<Temperature>,
            road_works: Option<RoadWorksContainerExtended>,
            positioning_solution: Option<PositioningSolutionType>,
            stationary_vehicle: Option<StationaryVehicleContainer>,
            ext_group_road_configuration: Option<AlacarteContainerExtGroupRoadConfiguration>,
        ) -> Self {
            Self {
                lane_position,
                impact_reduction,
                external_temperature,
                road_works,
                positioning_solution,
                stationary_vehicle,
                ext_group_road_configuration,
            }
        }
    }

    #[doc = "This type represents the DENM PDU."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field header: the header of the DENM PDU."]
    #[doc = ""]
    #[doc = "- @field denm: the payload of the DENM PDU."]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct DENM {
        #[rasn(value("0.."))]
        pub header: ItsPduHeader,
        pub denm: DenmPayload,
    }
    impl DENM {
        pub fn new(header: ItsPduHeader, denm: DenmPayload) -> Self {
            Self { header, denm }
        }
    }

    #[doc = "This type represents the DENM payload."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field management: the Management Container."]
    #[doc = ""]
    #[doc = "- @field situation: the optional Situation Container."]
    #[doc = ""]
    #[doc = "- @field location: the optional Location Container."]
    #[doc = ""]
    #[doc = "- @field alacarte: the optional ALaCarte Container ."]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct DenmPayload {
        pub management: ManagementContainer,
        pub situation: Option<SituationContainer>,
        pub location: Option<LocationContainer>,
        pub alacarte: Option<AlacarteContainer>,
    }
    impl DenmPayload {
        pub fn new(
            management: ManagementContainer,
            situation: Option<SituationContainer>,
            location: Option<LocationContainer>,
            alacarte: Option<AlacarteContainer>,
        ) -> Self {
            Self {
                management,
                situation,
                location,
                alacarte,
            }
        }
    }

    #[doc = "This type contains detailed information about the vehicle in which the originating ITS-S is mounted, for mitigating the consequences "]
    #[doc = "of a collision."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field heightLonCarrLeft: the height of the left longitudinal carrier of the vehicle from base to top."]
    #[doc = ""]
    #[doc = "- @field heightLonCarrRight: the height of the right longitudinal carrier of the vehicle from base to top."]
    #[doc = ""]
    #[doc = "- @field posLonCarrLeft: the position of the left longitudinal carrier of vehicle."]
    #[doc = ""]
    #[doc = "- @field posLonCarrRight: the position of the right longitudinal carrier of vehicle."]
    #[doc = ""]
    #[doc = "- @field positionOfPillars: information about the vertical support of the vehicle in which the originating ITS-S is mounted. It shall be "]
    #[doc = "included for passenger vehicles only."]
    #[doc = ""]
    #[doc = "- @field posCentMass: the position of the centre of mass of the vehicle."]
    #[doc = ""]
    #[doc = "- @field wheelBaseVehicle: the wheel base of the vehicle."]
    #[doc = ""]
    #[doc = "- @field turningRadius: the turning radius of the vehicle."]
    #[doc = ""]
    #[doc = "- @field posFrontAx: the position of the front axle of the vehicle."]
    #[doc = ""]
    #[doc = "- @field positionOfOccupants: indicates whether an in-vehicle seat is occupied at the moment of generation of the message."]
    #[doc = ""]
    #[doc = "- @field vehicleMass: the mass of the unloaded vehicle"]
    #[doc = ""]
    #[doc = "- @field requestResponseIndication: indicates whether the originating ITS-S transmitting the impactReduction component is requesting "]
    #[doc = "the receiving ITS-S to provide also its impactReduction component."]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct ImpactReductionContainer {
        #[rasn(identifier = "heightLonCarrLeft")]
        pub height_lon_carr_left: HeightLonCarr,
        #[rasn(identifier = "heightLonCarrRight")]
        pub height_lon_carr_right: HeightLonCarr,
        #[rasn(identifier = "posLonCarrLeft")]
        pub pos_lon_carr_left: PosLonCarr,
        #[rasn(identifier = "posLonCarrRight")]
        pub pos_lon_carr_right: PosLonCarr,
        #[rasn(identifier = "positionOfPillars")]
        pub position_of_pillars: PositionOfPillars,
        #[rasn(identifier = "posCentMass")]
        pub pos_cent_mass: PosCentMass,
        #[rasn(identifier = "wheelBaseVehicle")]
        pub wheel_base_vehicle: WheelBaseVehicle,
        #[rasn(identifier = "turningRadius")]
        pub turning_radius: TurningRadius,
        #[rasn(identifier = "posFrontAx")]
        pub pos_front_ax: PosFrontAx,
        #[rasn(identifier = "positionOfOccupants")]
        pub position_of_occupants: PositionOfOccupants,
        #[rasn(identifier = "vehicleMass")]
        pub vehicle_mass: VehicleMass,
        #[rasn(identifier = "requestResponseIndication")]
        pub request_response_indication: RequestResponseIndication,
    }
    impl ImpactReductionContainer {
        pub fn new(
            height_lon_carr_left: HeightLonCarr,
            height_lon_carr_right: HeightLonCarr,
            pos_lon_carr_left: PosLonCarr,
            pos_lon_carr_right: PosLonCarr,
            position_of_pillars: PositionOfPillars,
            pos_cent_mass: PosCentMass,
            wheel_base_vehicle: WheelBaseVehicle,
            turning_radius: TurningRadius,
            pos_front_ax: PosFrontAx,
            position_of_occupants: PositionOfOccupants,
            vehicle_mass: VehicleMass,
            request_response_indication: RequestResponseIndication,
        ) -> Self {
            Self {
                height_lon_carr_left,
                height_lon_carr_right,
                pos_lon_carr_left,
                pos_lon_carr_right,
                position_of_pillars,
                pos_cent_mass,
                wheel_base_vehicle,
                turning_radius,
                pos_front_ax,
                position_of_occupants,
                vehicle_mass,
                request_response_indication,
            }
        }
    }
    #[doc = " Inner type "]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct LocationContainerExtGroupLanePositions {
        #[rasn(identifier = "lanePositions")]
        pub lane_positions: Option<GeneralizedLanePositions>,
        #[rasn(identifier = "occupiedLanes")]
        pub occupied_lanes: Option<OccupiedLanesWithConfidence>,
        #[rasn(identifier = "linkedIvims")]
        pub linked_ivims: Option<IvimReferences>,
        #[rasn(identifier = "linkedMapems")]
        pub linked_mapems: Option<MapReferences>,
        #[rasn(identifier = "detectionZonesToSpecifiedEventPoint")]
        pub detection_zones_to_specified_event_point: Option<TracesExtended>,
        #[rasn(identifier = "predictedPaths")]
        pub predicted_paths: Option<PathPredictedList>,
    }
    impl LocationContainerExtGroupLanePositions {
        pub fn new(
            lane_positions: Option<GeneralizedLanePositions>,
            occupied_lanes: Option<OccupiedLanesWithConfidence>,
            linked_ivims: Option<IvimReferences>,
            linked_mapems: Option<MapReferences>,
            detection_zones_to_specified_event_point: Option<TracesExtended>,
            predicted_paths: Option<PathPredictedList>,
        ) -> Self {
            Self {
                lane_positions,
                occupied_lanes,
                linked_ivims,
                linked_mapems,
                detection_zones_to_specified_event_point,
                predicted_paths,
            }
        }
    }

    #[doc = "This type represents the Location Container."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field eventSpeed: optional speed of a detected dynamic event and the confidence of the speed information. "]
    #[doc = ""]
    #[doc = "- @field eventPositionHeading: the optional heading of a dynamic event and the confidence of the heading information."]
    #[doc = ""]
    #[doc = "- @field detectionZonesToEventPosition: the detection zone information approaching the event position, see clause 6.1.3.3."]
    #[doc = ""]
    #[doc = "- @field roadType: the optional road type information at the event position. "]
    #[doc = ""]
    #[doc = "- @field lanePositions: the optional lane(s) where the event is located, at the position indicated by the component eventPosition "]
    #[doc = "of the Management container and for a given reference direction."]
    #[doc = ""]
    #[doc = "- @field occupiedLanes: the optional lane(s) that are fully or partially occupied by the event, at the position indicated by the "]
    #[doc = "component eventPosition of the Management container and for a given reference direction."]
    #[doc = ""]
    #[doc = "- @field linkedIvims: the optional list of DF IvimReference, pointing to IVIMs that are semantically connected because providing information "]
    #[doc = "applying to the road segment(s) covered by the components detectionZonesToEventPosition, detectionZonesToSpecifiedEventPoint and "]
    #[doc = "the SituationContainer component eventZone."]
    #[doc = ""]
    #[doc = "- @field linkedMapem: the optional list of DF Mapreference, pointing to MAPEMs that are semantically connected because providing information "]
    #[doc = "applying to the road segment(s) covered by the component detectionZonesToEventPosition, detectionZonesToSpecifiedEventPoint and "]
    #[doc = "the SituationContainer component eventZone."]
    #[doc = ""]
    #[doc = "- @field detectionZonesToSpecifiedEventPoint: the optional detection zone information approaching towards a "]
    #[doc = "specified event point, see clause 6.1.3.3. "]
    #[doc = ""]
    #[doc = "- @field predictedPaths: the optional list of future paths or trajectories that the event may move along or zones that the event may occupy. "]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct LocationContainer {
        #[rasn(identifier = "eventSpeed")]
        pub event_speed: Option<Speed>,
        #[rasn(identifier = "eventPositionHeading")]
        pub event_position_heading: Option<Wgs84Angle>,
        #[rasn(identifier = "detectionZonesToEventPosition")]
        pub detection_zones_to_event_position: Traces,
        #[rasn(identifier = "roadType")]
        pub road_type: Option<RoadType>,
        #[rasn(extension_addition_group, identifier = "SEQUENCE")]
        pub ext_group_lane_positions: Option<LocationContainerExtGroupLanePositions>,
    }
    impl LocationContainer {
        pub fn new(
            event_speed: Option<Speed>,
            event_position_heading: Option<Wgs84Angle>,
            detection_zones_to_event_position: Traces,
            road_type: Option<RoadType>,
            ext_group_lane_positions: Option<LocationContainerExtGroupLanePositions>,
        ) -> Self {
            Self {
                event_speed,
                event_position_heading,
                detection_zones_to_event_position,
                road_type,
                ext_group_lane_positions,
            }
        }
    }

    #[doc = "This type represents the Management Container."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field actionId: the identifier of the DENM."]
    #[doc = ""]
    #[doc = "- @field detectionTime: the time at which the event is detected."]
    #[doc = ""]
    #[doc = "- @field referenceTime: the time at which a new DENM, an update DENM or a cancellation DENM is generated"]
    #[doc = ""]
    #[doc = "- @field termination: the optional termination type of the DENM."]
    #[doc = ""]
    #[doc = "- @field eventPosition: the geographical position used in the definition of the awareness area / relevance zone, see clause 6.1.3."]
    #[doc = ""]
    #[doc = "- @field awarenessDistance: the optional radius of the circular awareness area, with centre at the event position or at any of the "]
    #[doc = "event history points as defined in clause 6.1.3.1."]
    #[doc = ""]
    #[doc = "- @field trafficDirection: the optional traffic direction along which the receiving ITS-S may encounter the event, "]
    #[doc = "as defined in clause 6.1.3."]
    #[doc = ""]
    #[doc = "- @field validityDuration: the validity duration of a DENM. This component represents a time offset in the unit of second since detectionTime."]
    #[doc = ""]
    #[doc = "- @field transmissionInterval: the optional time interval for DENM transmission as defined by the originating ITS-S. "]
    #[doc = "If the component is not present in DENM, a default value defaultValidity is assumed."]
    #[doc = ""]
    #[doc = "- @field stationType: the station type information of the originating ITS-S."]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct ManagementContainer {
        #[rasn(identifier = "actionId")]
        pub action_id: ActionId,
        #[rasn(identifier = "detectionTime")]
        pub detection_time: TimestampIts,
        #[rasn(identifier = "referenceTime")]
        pub reference_time: TimestampIts,
        pub termination: Option<Termination>,
        #[rasn(identifier = "eventPosition")]
        pub event_position: ReferencePosition,
        #[rasn(identifier = "awarenessDistance")]
        pub awareness_distance: Option<StandardLength3b>,
        #[rasn(identifier = "trafficDirection")]
        pub traffic_direction: Option<TrafficDirection>,
        #[rasn(
            default = "management_container_validity_duration_default",
            identifier = "validityDuration"
        )]
        pub validity_duration: DeltaTimeSecond,
        #[rasn(identifier = "transmissionInterval")]
        pub transmission_interval: Option<DeltaTimeMilliSecondPositive>,
        #[rasn(identifier = "stationType")]
        pub station_type: StationType,
    }
    impl ManagementContainer {
        pub fn new(
            action_id: ActionId,
            detection_time: TimestampIts,
            reference_time: TimestampIts,
            termination: Option<Termination>,
            event_position: ReferencePosition,
            awareness_distance: Option<StandardLength3b>,
            traffic_direction: Option<TrafficDirection>,
            validity_duration: DeltaTimeSecond,
            transmission_interval: Option<DeltaTimeMilliSecondPositive>,
            station_type: StationType,
        ) -> Self {
            Self {
                action_id,
                detection_time,
                reference_time,
                termination,
                event_position,
                awareness_distance,
                traffic_direction,
                validity_duration,
                transmission_interval,
                station_type,
            }
        }
    }
    fn management_container_validity_duration_default() -> DeltaTimeSecond {
        DEFAULT_VALIDITY.clone()
    }

    #[doc = "This type contains detailed information about an object with which a vehicle and/or the traffic is likely to collide."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field perceivedPreCrashObject: information about a perceived object in the East, North, Up reference frame."]
    #[doc = ""]
    #[doc = "- @field objectStationId: the optional station Id of the object for which the information is provided."]
    #[doc = ""]
    #[doc = "- @field timeToCollision: the optional estimated time to collision of a vehicle with the object. "]
    #[doc = ""]
    #[doc = "- @field impactSection: indication of the object's section where the impact will most likely occur. "]
    #[doc = "When the target object is likely to be a vehicle, then this component should be present, otherwise it should not be provided.  "]
    #[doc = ""]
    #[doc = "- @field estimatedBrakingDistance: the optional estimated distance in which the vehicle would need to come to a complete hold, "]
    #[doc = "if no obstruction was in the way. "]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct PreCrashContainer {
        #[rasn(identifier = "perceivedPreCrashObject")]
        pub perceived_pre_crash_object: PerceivedObject,
        #[rasn(identifier = "objectStationId")]
        pub object_station_id: Option<StationId>,
        #[rasn(identifier = "timeToCollision")]
        pub time_to_collision: Option<DeltaTimeMilliSecondPositive>,
        #[rasn(identifier = "impactSection")]
        pub impact_section: Option<ObjectFace>,
        #[rasn(identifier = "estimatedBrakingDistance")]
        pub estimated_braking_distance: Option<StandardLength12b>,
    }
    impl PreCrashContainer {
        pub fn new(
            perceived_pre_crash_object: PerceivedObject,
            object_station_id: Option<StationId>,
            time_to_collision: Option<DeltaTimeMilliSecondPositive>,
            impact_section: Option<ObjectFace>,
            estimated_braking_distance: Option<StandardLength12b>,
        ) -> Self {
            Self {
                perceived_pre_crash_object,
                object_station_id,
                time_to_collision,
                impact_section,
                estimated_braking_distance,
            }
        }
    }

    #[doc = "This type contains detailed information about the configuration of road section(s) that are geographically related to the event."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field roadConfigurationConfidence: information about the source of the road configuration and the confidence in the information."]
    #[doc = ""]
    #[doc = "- @field roadConfigurationSectionList: a list of road configuration information per applicable road section. "]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct RoadConfigurationContainer {
        #[rasn(identifier = "roadConfigurationConfidence")]
        pub road_configuration_confidence: MetaInformation,
        #[rasn(identifier = "roadConfigurationSectionList")]
        pub road_configuration_section_list: RoadConfigurationSectionList,
    }
    impl RoadConfigurationContainer {
        pub fn new(
            road_configuration_confidence: MetaInformation,
            road_configuration_section_list: RoadConfigurationSectionList,
        ) -> Self {
            Self {
                road_configuration_confidence,
                road_configuration_section_list,
            }
        }
    }

    #[doc = "This type contains detailed information of a roadwork zone and specific access conditions."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field lightBarSirenInUse: optionally indicates whether a roadwork vehicle has switched on the light bar or siren. "]
    #[doc = "It is used when the roadwork involves a specific roadwork vehicle"]
    #[doc = ""]
    #[doc = "- @field closedLanes: optionally indicates whether the roadwork has caused the closure of one or several driving lanes. "]
    #[doc = "Optionally, it may indicate whether a hard shoulder lane is closed to traffic or can be used for specific usage (e.g. for stopping)."]
    #[doc = ""]
    #[doc = "- @field restriction: the optional type(s) of vehicles that are restricted to access the road work zone. "]
    #[doc = "More than one vehicle types may be provided by this component if the restriction apply to multiple vehicle types. "]
    #[doc = ""]
    #[doc = "- @field speedLimit: the optional speed limitation applied to the roadwork zone."]
    #[doc = ""]
    #[doc = "- @field incidentIndication: the optional incident related to the roadworks to provide additional information of the roadworks zone."]
    #[doc = ""]
    #[doc = "- @field recommendedPath: the optional recommended itinerary in order to contour the roadworks zone. If present, a recommended path "]
    #[doc = "shall be a list of path points in the order from the starting point closest to the roadworks zone to the end point of the recommended path. "]
    #[doc = ""]
    #[doc = "- @field startingPointSpeedLimit: the optional effective starting position of a speed limit being applied to the roadwork zone, "]
    #[doc = "with respect to the component eventPosition on the Management Container."]
    #[doc = "This component shall be present if the speed limit is applied at a certain distance prior to the roadwork zone starting position."]
    #[doc = ""]
    #[doc = "- @field trafficFlowRule: optionally indicates the side of the road to which the traffic should flow around a roadwork."]
    #[doc = ""]
    #[doc = "- @field referenceDenms: an optional sequence of actionIds for different DENMs that describe the same event. "]
    #[doc = "If it is available, it indicates the actionIds of all other DENMs describing this event."]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct RoadWorksContainerExtended {
        #[rasn(identifier = "lightBarSirenInUse")]
        pub light_bar_siren_in_use: Option<LightBarSirenInUse>,
        #[rasn(identifier = "closedLanes")]
        pub closed_lanes: Option<ClosedLanes>,
        pub restriction: Option<RestrictedTypes>,
        #[rasn(identifier = "speedLimit")]
        pub speed_limit: Option<SpeedLimit>,
        #[rasn(identifier = "incidentIndication")]
        pub incident_indication: Option<CauseCodeV2>,
        #[rasn(identifier = "recommendedPath")]
        pub recommended_path: Option<ItineraryPath>,
        #[rasn(identifier = "startingPointSpeedLimit")]
        pub starting_point_speed_limit: Option<DeltaReferencePosition>,
        #[rasn(identifier = "trafficFlowRule")]
        pub traffic_flow_rule: Option<TrafficRule>,
        #[rasn(identifier = "referenceDenms")]
        pub reference_denms: Option<ActionIdList>,
    }
    impl RoadWorksContainerExtended {
        pub fn new(
            light_bar_siren_in_use: Option<LightBarSirenInUse>,
            closed_lanes: Option<ClosedLanes>,
            restriction: Option<RestrictedTypes>,
            speed_limit: Option<SpeedLimit>,
            incident_indication: Option<CauseCodeV2>,
            recommended_path: Option<ItineraryPath>,
            starting_point_speed_limit: Option<DeltaReferencePosition>,
            traffic_flow_rule: Option<TrafficRule>,
            reference_denms: Option<ActionIdList>,
        ) -> Self {
            Self {
                light_bar_siren_in_use,
                closed_lanes,
                restriction,
                speed_limit,
                incident_indication,
                recommended_path,
                starting_point_speed_limit,
                traffic_flow_rule,
                reference_denms,
            }
        }
    }
    #[doc = " Inner type "]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct SituationContainerExtGroupLinkedDenms {
        #[rasn(identifier = "linkedDenms")]
        pub linked_denms: Option<ActionIdList>,
        #[rasn(identifier = "eventEnd")]
        pub event_end: Option<Position1d>,
    }
    impl SituationContainerExtGroupLinkedDenms {
        pub fn new(linked_denms: Option<ActionIdList>, event_end: Option<Position1d>) -> Self {
            Self {
                linked_denms,
                event_end,
            }
        }
    }

    #[doc = "This type represents the situation container."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field informationQuality: the quality level of the information provided by the ITS-S application of the originating ITS-S. "]
    #[doc = "It indicates the probability of the detected event being truly existent at the event position."]
    #[doc = ""]
    #[doc = "- @field eventType: the event type, including direct cause and sub cause."]
    #[doc = ""]
    #[doc = "- @field linkedCause: the optional type of a linked event co-existing at the same time and the same place (same event zone), "]
    #[doc = "including direct cause and sub cause of the linked event, for which no other DENM is sent out."]
    #[doc = ""]
    #[doc = "- @field eventZone: an optional list of EventPoint, using the position indicated in the component eventPosition of the Management container "]
    #[doc = "as the reference position for the first EventPoint."]
    #[doc = ""]
    #[doc = "- @field linkedDenms: the optional list of DF ActionId, pointing to DENMs that are semantically connected because applying to consecutive "]
    #[doc = "event zones at the same time."]
    #[doc = ""]
    #[doc = "- @field eventEnd: the end position of the event along the road that is affected by the event w.r.t. the component eventPosition of the "]
    #[doc = "Management container. This end position is represented by the length of the event along the road. "]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    #[non_exhaustive]
    pub struct SituationContainer {
        #[rasn(identifier = "informationQuality")]
        pub information_quality: InformationQuality,
        #[rasn(identifier = "eventType")]
        pub event_type: CauseCodeV2,
        #[rasn(identifier = "linkedCause")]
        pub linked_cause: Option<CauseCodeV2>,
        #[rasn(identifier = "eventZone")]
        pub event_zone: Option<EventZone>,
        #[rasn(extension_addition_group, identifier = "SEQUENCE")]
        pub ext_group_linked_denms: Option<SituationContainerExtGroupLinkedDenms>,
    }
    impl SituationContainer {
        pub fn new(
            information_quality: InformationQuality,
            event_type: CauseCodeV2,
            linked_cause: Option<CauseCodeV2>,
            event_zone: Option<EventZone>,
            ext_group_linked_denms: Option<SituationContainerExtGroupLinkedDenms>,
        ) -> Self {
            Self {
                information_quality,
                event_type,
                linked_cause,
                event_zone,
                ext_group_linked_denms,
            }
        }
    }

    #[doc = "This type contains detailed information about a stationary vehicle."]
    #[doc = ""]
    #[doc = "It shall include the following components: "]
    #[doc = ""]
    #[doc = "- @field stationarySince: the optional time duration of the stationary vehicle being stationary."]
    #[doc = ""]
    #[doc = "- @field stationaryCause: optional additional information to describe causes of the stationary vehicle event such as human problem."]
    #[doc = ""]
    #[doc = "- @field carryingDangerousGoods: optional information on the type of dangerous goods, the required emergency action and other information."]
    #[doc = ""]
    #[doc = "- @field numberOfOccupants: the optional estimated number of occupants involved in the stationary vehicle event."]
    #[doc = ""]
    #[doc = "- @field vehicleIdentification: the optional identification of the stationary vehicle."]
    #[doc = ""]
    #[doc = "- @field energyStorageType: the optional vehicle energy storage type information of the stationary vehicle, such as electric, diesel, etc."]
    #[doc = ""]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
    #[rasn(automatic_tags)]
    pub struct StationaryVehicleContainer {
        #[rasn(identifier = "stationarySince")]
        pub stationary_since: Option<StationarySince>,
        #[rasn(identifier = "stationaryCause")]
        pub stationary_cause: Option<CauseCodeV2>,
        #[rasn(identifier = "carryingDangerousGoods")]
        pub carrying_dangerous_goods: Option<DangerousGoodsExtended>,
        #[rasn(identifier = "numberOfOccupants")]
        pub number_of_occupants: Option<NumberOfOccupants>,
        #[rasn(identifier = "vehicleIdentification")]
        pub vehicle_identification: Option<VehicleIdentification>,
        #[rasn(identifier = "energyStorageType")]
        pub energy_storage_type: Option<EnergyStorageType>,
    }
    impl StationaryVehicleContainer {
        pub fn new(
            stationary_since: Option<StationarySince>,
            stationary_cause: Option<CauseCodeV2>,
            carrying_dangerous_goods: Option<DangerousGoodsExtended>,
            number_of_occupants: Option<NumberOfOccupants>,
            vehicle_identification: Option<VehicleIdentification>,
            energy_storage_type: Option<EnergyStorageType>,
        ) -> Self {
            Self {
                stationary_since,
                stationary_cause,
                carrying_dangerous_goods,
                number_of_occupants,
                vehicle_identification,
                energy_storage_type,
            }
        }
    }

    #[doc = "  * This indicates the termination type of generated DENM, i.e. if it is a cancellation DENM or a negation DENM"]
    #[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash, Copy)]
    #[rasn(enumerated)]
    pub enum Termination {
        isCancellation = 0,
        isNegation = 1,
    }

    #[doc = "This type specifies the default value for DENM validity duration used for DENM protocol operation."]

    pub static DEFAULT_VALIDITY: DeltaTimeSecond = DeltaTimeSecond(600);
}