1#[repr(u8)]
8#[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
9#[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
10#[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
11pub enum ItsMessageId {
17 Denm = 1,
18 Cam = 2,
19 Poi = 3,
20 Spatem = 4,
21 Mapem = 5,
22 Ivim = 6,
23 EvRsr = 7,
24 Tistpgtransaction = 8,
25 Srem = 9,
26 Ssem = 10,
27 Evcsn = 11,
28 Saem = 12,
29 Rtcmem = 13,
30 Cpm = 14,
31 Imzm = 15,
32 Vam = 16,
33 Dsm = 17,
34 Pcim = 18,
35 Pcvm = 19,
36 Mcm = 20,
37 Pam = 21,
38}
39
40impl ItsMessageId {
41 pub fn as_u8(self) -> u8 {
42 self as u8
43 }
44}
45
46impl TryInto<crate::standards::extensions::ItsMessageId> for u8 {
47 type Error = alloc::string::String;
48
49 fn try_into(self) -> Result<crate::standards::extensions::ItsMessageId, Self::Error> {
50 match self {
51 1 => Ok(crate::standards::extensions::ItsMessageId::Denm),
52 2 => Ok(crate::standards::extensions::ItsMessageId::Cam),
53 3 => Ok(crate::standards::extensions::ItsMessageId::Poi),
54 4 => Ok(crate::standards::extensions::ItsMessageId::Spatem),
55 5 => Ok(crate::standards::extensions::ItsMessageId::Mapem),
56 6 => Ok(crate::standards::extensions::ItsMessageId::Ivim),
57 7 => Ok(crate::standards::extensions::ItsMessageId::EvRsr),
58 8 => Ok(crate::standards::extensions::ItsMessageId::Tistpgtransaction),
59 9 => Ok(crate::standards::extensions::ItsMessageId::Srem),
60 10 => Ok(crate::standards::extensions::ItsMessageId::Ssem),
61 11 => Ok(crate::standards::extensions::ItsMessageId::Evcsn),
62 12 => Ok(crate::standards::extensions::ItsMessageId::Saem),
63 13 => Ok(crate::standards::extensions::ItsMessageId::Rtcmem),
64 14 => Ok(crate::standards::extensions::ItsMessageId::Cpm),
65 15 => Ok(crate::standards::extensions::ItsMessageId::Imzm),
66 16 => Ok(crate::standards::extensions::ItsMessageId::Vam),
67 17 => Ok(crate::standards::extensions::ItsMessageId::Dsm),
68 18 => Ok(crate::standards::extensions::ItsMessageId::Pcim),
69 19 => Ok(crate::standards::extensions::ItsMessageId::Pcvm),
70 20 => Ok(crate::standards::extensions::ItsMessageId::Mcm),
71 21 => Ok(crate::standards::extensions::ItsMessageId::Pam),
72 _ => Err(alloc::format!("MessageId {} not a known value", self)),
73 }
74 }
75}
76
77#[cfg(feature = "_cdd_2_2_1")]
78macro_rules! itsmessageid_conv {
79 ($t:ty) => {
80 impl From<crate::standards::extensions::ItsMessageId> for $t {
81 fn from(value: crate::standards::extensions::ItsMessageId) -> Self {
82 Self(value as u8)
83 }
84 }
85
86 impl TryInto<crate::standards::extensions::ItsMessageId> for $t {
87 type Error = alloc::string::String;
88
89 fn try_into(self) -> Result<crate::standards::extensions::ItsMessageId, Self::Error> {
90 self.0.try_into()
91 }
92 }
93 };
94}
95
96#[repr(u8)]
97#[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
98#[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
99#[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
100pub enum ItsStationType {
106 Unknown = 0,
107 Pedestrian = 1,
108 Cyclist = 2,
109 Moped = 3,
110 Motorcycle = 4,
111 Passengercar = 5,
112 Bus = 6,
113 Lighttruck = 7,
114 Heavytruck = 8,
115 Trailer = 9,
116 Specialvehicles = 10,
117 Tram = 11,
118 LightVruVehicle = 12,
119 Animal = 13,
120 Roadsideunit = 15,
121}
122
123impl ItsStationType {
124 pub fn as_u8(self) -> u8 {
125 self as u8
126 }
127}
128
129#[cfg(any(feature = "_cdd_1_3_1_1", feature = "_cdd_2_2_1"))]
130macro_rules! itsstationtype_conv {
131 ($t:ty) => {
132 impl From<crate::standards::extensions::ItsStationType> for $t {
133 fn from(value: crate::standards::extensions::ItsStationType) -> Self {
134 Self(value as u8)
135 }
136 }
137
138 impl TryInto<crate::standards::extensions::ItsStationType> for $t {
139 type Error = alloc::string::String;
140
141 fn try_into(self) -> Result<crate::standards::extensions::ItsStationType, Self::Error> {
142 match self.0 {
143 0 => Ok(crate::standards::extensions::ItsStationType::Unknown),
144 1 => Ok(crate::standards::extensions::ItsStationType::Pedestrian),
145 2 => Ok(crate::standards::extensions::ItsStationType::Cyclist),
146 3 => Ok(crate::standards::extensions::ItsStationType::Moped),
147 4 => Ok(crate::standards::extensions::ItsStationType::Motorcycle),
148 5 => Ok(crate::standards::extensions::ItsStationType::Passengercar),
149 6 => Ok(crate::standards::extensions::ItsStationType::Bus),
150 7 => Ok(crate::standards::extensions::ItsStationType::Lighttruck),
151 8 => Ok(crate::standards::extensions::ItsStationType::Heavytruck),
152 9 => Ok(crate::standards::extensions::ItsStationType::Trailer),
153 10 => Ok(crate::standards::extensions::ItsStationType::Specialvehicles),
154 11 => Ok(crate::standards::extensions::ItsStationType::Tram),
155 12 => Ok(crate::standards::extensions::ItsStationType::LightVruVehicle),
156 13 => Ok(crate::standards::extensions::ItsStationType::Animal),
157 15 => Ok(crate::standards::extensions::ItsStationType::Roadsideunit),
158 _ => Err(alloc::format!("StationType {} not a known value", self.0)),
159 }
160 }
161 }
162 };
163}
164
165pub mod its_scc {
167 macro_rules! scc_conv_part {
169 ($t:ty, $etsi:ty) => {
170 impl $t {
171 pub fn as_u8(self) -> u8 {
172 self as u8
173 }
174 }
175
176 impl From<$t> for $etsi {
177 fn from(value: $t) -> Self {
178 Self(value as u8)
179 }
180 }
181 };
182 }
183
184 #[repr(u8)]
186 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
187 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
188 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
189 pub enum TrafficCondition {
190 Unavailable = 0,
191 IncreasedVolumeOfTraffic = 1,
192 TrafficJamSlowlyIncreasing = 2,
193 TrafficJamIncreasing = 3,
194 TrafficJamStronglyIncreasing = 4,
195 TrafficStationary = 5,
196 TrafficJamSlightlyDecreasing = 6,
197 TrafficJamDecreasing = 7,
198 TrafficJamStronglyDecreasing = 8,
199 }
200 scc_conv_part!(
201 TrafficCondition,
202 crate::standards::cdd_2_2_1::etsi_its_cdd::TrafficConditionSubCauseCode
203 );
204 impl TryInto<TrafficCondition>
205 for crate::standards::cdd_2_2_1::etsi_its_cdd::TrafficConditionSubCauseCode
206 {
207 type Error = alloc::string::String;
208
209 fn try_into(self) -> Result<TrafficCondition, Self::Error> {
210 match self.0 {
211 0 => Ok(TrafficCondition::Unavailable),
212 1 => Ok(TrafficCondition::IncreasedVolumeOfTraffic),
213 2 => Ok(TrafficCondition::TrafficJamSlowlyIncreasing),
214 3 => Ok(TrafficCondition::TrafficJamIncreasing),
215 4 => Ok(TrafficCondition::TrafficJamStronglyIncreasing),
216 5 => Ok(TrafficCondition::TrafficStationary),
217 6 => Ok(TrafficCondition::TrafficJamSlightlyDecreasing),
218 7 => Ok(TrafficCondition::TrafficJamDecreasing),
219 8 => Ok(TrafficCondition::TrafficJamStronglyDecreasing),
220 _ => Err(alloc::format!(
221 "TrafficConditionSubCauseCode {} not a known value",
222 self.0
223 )),
224 }
225 }
226 }
227
228 #[repr(u8)]
230 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
231 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
232 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
233 pub enum Accident {
234 Unavailable = 0,
235 MultiVehicleAccident = 1,
236 HeavyAccident = 2,
237 AccidentInvolvingLorry = 3,
238 AccidentInvolvingBus = 4,
239 AccidentInvolvingHazardousMaterials = 5,
240 AccidentOnOppositeLane = 6,
241 UnsecuredAccident = 7,
242 AssistanceRequested = 8,
243 }
244 scc_conv_part!(
245 Accident,
246 crate::standards::cdd_2_2_1::etsi_its_cdd::AccidentSubCauseCode
247 );
248 impl TryInto<Accident> for crate::standards::cdd_2_2_1::etsi_its_cdd::AccidentSubCauseCode {
249 type Error = alloc::string::String;
250
251 fn try_into(self) -> Result<Accident, Self::Error> {
252 match self.0 {
253 0 => Ok(Accident::Unavailable),
254 1 => Ok(Accident::MultiVehicleAccident),
255 2 => Ok(Accident::HeavyAccident),
256 3 => Ok(Accident::AccidentInvolvingLorry),
257 4 => Ok(Accident::AccidentInvolvingBus),
258 5 => Ok(Accident::AccidentInvolvingHazardousMaterials),
259 6 => Ok(Accident::AccidentOnOppositeLane),
260 7 => Ok(Accident::UnsecuredAccident),
261 8 => Ok(Accident::AssistanceRequested),
262 _ => Err(alloc::format!(
263 "AccidentSubCauseCode {} not a known value",
264 self.0
265 )),
266 }
267 }
268 }
269
270 #[repr(u8)]
272 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
273 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
274 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
275 pub enum Roadworks {
276 Unavailable = 0,
277 MajorRoadworks = 1,
278 RoadMarkingWork = 2,
279 SlowMovingRoadMaintenance = 3,
280 ShortTermStationaryRoadworks = 4,
281 StreetCleaning = 5,
282 WinterService = 6,
283 }
284 scc_conv_part!(
285 Roadworks,
286 crate::standards::cdd_2_2_1::etsi_its_cdd::RoadworksSubCauseCode
287 );
288 impl TryInto<Roadworks> for crate::standards::cdd_2_2_1::etsi_its_cdd::RoadworksSubCauseCode {
289 type Error = alloc::string::String;
290
291 fn try_into(self) -> Result<Roadworks, Self::Error> {
292 match self.0 {
293 0 => Ok(Roadworks::Unavailable),
294 1 => Ok(Roadworks::MajorRoadworks),
295 2 => Ok(Roadworks::RoadMarkingWork),
296 3 => Ok(Roadworks::SlowMovingRoadMaintenance),
297 4 => Ok(Roadworks::ShortTermStationaryRoadworks),
298 5 => Ok(Roadworks::StreetCleaning),
299 6 => Ok(Roadworks::WinterService),
300 _ => Err(alloc::format!(
301 "RoadworksSubCauseCode {} not a known value",
302 self.0
303 )),
304 }
305 }
306 }
307
308 #[repr(u8)]
310 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
311 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
312 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
313 pub enum HumanPresenceOnTheRoad {
314 Unavailable = 0,
315 ChildrenOnRoadway = 1,
316 CyclistOnRoadway = 2,
317 MotorcyclistOnRoadway = 3,
318 }
319 scc_conv_part!(
320 HumanPresenceOnTheRoad,
321 crate::standards::cdd_2_2_1::etsi_its_cdd::HumanPresenceOnTheRoadSubCauseCode
322 );
323 impl TryInto<HumanPresenceOnTheRoad>
324 for crate::standards::cdd_2_2_1::etsi_its_cdd::HumanPresenceOnTheRoadSubCauseCode
325 {
326 type Error = alloc::string::String;
327
328 fn try_into(self) -> Result<HumanPresenceOnTheRoad, Self::Error> {
329 match self.0 {
330 0 => Ok(HumanPresenceOnTheRoad::Unavailable),
331 1 => Ok(HumanPresenceOnTheRoad::ChildrenOnRoadway),
332 2 => Ok(HumanPresenceOnTheRoad::CyclistOnRoadway),
333 3 => Ok(HumanPresenceOnTheRoad::MotorcyclistOnRoadway),
334 _ => Err(alloc::format!(
335 "HumanPresenceOnTheRoadSubCauseCode {} not a known value",
336 self.0
337 )),
338 }
339 }
340 }
341
342 #[repr(u8)]
344 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
345 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
346 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
347 pub enum WrongWayDriving {
348 Unavailable = 0,
349 WrongLane = 1,
350 WrongDirection = 2,
351 }
352 scc_conv_part!(
353 WrongWayDriving,
354 crate::standards::cdd_2_2_1::etsi_its_cdd::WrongWayDrivingSubCauseCode
355 );
356 impl TryInto<WrongWayDriving>
357 for crate::standards::cdd_2_2_1::etsi_its_cdd::WrongWayDrivingSubCauseCode
358 {
359 type Error = alloc::string::String;
360
361 fn try_into(self) -> Result<WrongWayDriving, Self::Error> {
362 match self.0 {
363 0 => Ok(WrongWayDriving::Unavailable),
364 1 => Ok(WrongWayDriving::WrongLane),
365 2 => Ok(WrongWayDriving::WrongDirection),
366 _ => Err(alloc::format!(
367 "WrongWayDrivingSubCauseCode {} not a known value",
368 self.0
369 )),
370 }
371 }
372 }
373
374 #[repr(u8)]
376 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
377 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
378 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
379 pub enum AdverseWeatherConditionExtremeWeatherCondition {
380 Unavailable = 0,
381 StrongWinds = 1,
382 DamagingHail = 2,
383 Hurricane = 3,
384 Thunderstorm = 4,
385 Tornado = 5,
386 Blizzard = 6,
387 }
388 scc_conv_part!(
389 AdverseWeatherConditionExtremeWeatherCondition,
390 crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionExtremeWeatherConditionSubCauseCode
391 );
392 impl TryInto<AdverseWeatherConditionExtremeWeatherCondition>
393 for crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionExtremeWeatherConditionSubCauseCode
394 {
395 type Error = alloc::string::String;
396
397 fn try_into(self) -> Result<AdverseWeatherConditionExtremeWeatherCondition, Self::Error> {
398 match self.0 {
399 0 => Ok(AdverseWeatherConditionExtremeWeatherCondition::Unavailable),
400 1 => Ok(AdverseWeatherConditionExtremeWeatherCondition::StrongWinds),
401 2 => Ok(AdverseWeatherConditionExtremeWeatherCondition::DamagingHail),
402 3 => Ok(AdverseWeatherConditionExtremeWeatherCondition::Hurricane),
403 4 => Ok(AdverseWeatherConditionExtremeWeatherCondition::Thunderstorm),
404 5 => Ok(AdverseWeatherConditionExtremeWeatherCondition::Tornado),
405 6 => Ok(AdverseWeatherConditionExtremeWeatherCondition::Blizzard),
406 _ => Err(alloc::format!("ExtremeWeatherConditionSubCauseCode {} not a known value", self.0)),
407 }
408 }
409 }
410
411 #[repr(u8)]
413 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
414 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
415 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
416 pub enum AdverseWeatherConditionAdhesion {
417 Unavailable = 0,
418 HeavyFrostOnRoad = 1,
419 FuelOnRoad = 2,
420 MudOnRoad = 3,
421 SnowOnRoad = 4,
422 IceOnRoad = 5,
423 BlackIceOnRoad = 6,
424 OilOnRoad = 7,
425 LooseChippings = 8,
426 InstantBlackIce = 9,
427 RoadsSalted = 10,
428 }
429 scc_conv_part!(
430 AdverseWeatherConditionAdhesion,
431 crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionAdhesionSubCauseCode
432 );
433 impl TryInto<AdverseWeatherConditionAdhesion>
434 for crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionAdhesionSubCauseCode
435 {
436 type Error = alloc::string::String;
437
438 fn try_into(self) -> Result<AdverseWeatherConditionAdhesion, Self::Error> {
439 match self.0 {
440 0 => Ok(AdverseWeatherConditionAdhesion::Unavailable),
441 1 => Ok(AdverseWeatherConditionAdhesion::HeavyFrostOnRoad),
442 2 => Ok(AdverseWeatherConditionAdhesion::FuelOnRoad),
443 3 => Ok(AdverseWeatherConditionAdhesion::MudOnRoad),
444 4 => Ok(AdverseWeatherConditionAdhesion::SnowOnRoad),
445 5 => Ok(AdverseWeatherConditionAdhesion::IceOnRoad),
446 6 => Ok(AdverseWeatherConditionAdhesion::BlackIceOnRoad),
447 7 => Ok(AdverseWeatherConditionAdhesion::OilOnRoad),
448 8 => Ok(AdverseWeatherConditionAdhesion::LooseChippings),
449 9 => Ok(AdverseWeatherConditionAdhesion::InstantBlackIce),
450 10 => Ok(AdverseWeatherConditionAdhesion::RoadsSalted),
451 _ => Err(alloc::format!(
452 "AdhesionSubCauseCode {} not a known value",
453 self.0
454 )),
455 }
456 }
457 }
458
459 #[repr(u8)]
461 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
462 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
463 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
464 pub enum AdverseWeatherConditionVisibility {
465 Unavailable = 0,
466 Fog = 1,
467 Smoke = 2,
468 HeavySnowfall = 3,
469 HeavyRain = 4,
470 HeavyHail = 5,
471 LowSunGlare = 6,
472 Sandstorms = 7,
473 SwarmsOfInsects = 8,
474 }
475 scc_conv_part!(
476 AdverseWeatherConditionVisibility,
477 crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionVisibilitySubCauseCode
478 );
479 impl TryInto<AdverseWeatherConditionVisibility>
480 for crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionVisibilitySubCauseCode
481 {
482 type Error = alloc::string::String;
483
484 fn try_into(self) -> Result<AdverseWeatherConditionVisibility, Self::Error> {
485 match self.0 {
486 0 => Ok(AdverseWeatherConditionVisibility::Unavailable),
487 1 => Ok(AdverseWeatherConditionVisibility::Fog),
488 2 => Ok(AdverseWeatherConditionVisibility::Smoke),
489 3 => Ok(AdverseWeatherConditionVisibility::HeavySnowfall),
490 4 => Ok(AdverseWeatherConditionVisibility::HeavyRain),
491 5 => Ok(AdverseWeatherConditionVisibility::HeavyHail),
492 6 => Ok(AdverseWeatherConditionVisibility::LowSunGlare),
493 7 => Ok(AdverseWeatherConditionVisibility::Sandstorms),
494 8 => Ok(AdverseWeatherConditionVisibility::SwarmsOfInsects),
495 _ => Err(alloc::format!(
496 "VisibilitySubCauseCode {} not a known value",
497 self.0
498 )),
499 }
500 }
501 }
502
503 #[repr(u8)]
505 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
506 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
507 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
508 pub enum AdverseWeatherConditionPrecipitation {
509 Unavailable = 0,
510 HeavyRain = 1,
511 HeavySnowfall = 2,
512 SoftHail = 3,
513 }
514 scc_conv_part!(
515 AdverseWeatherConditionPrecipitation,
516 crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionPrecipitationSubCauseCode
517 );
518 impl TryInto<AdverseWeatherConditionPrecipitation>
519 for crate::standards::cdd_2_2_1::etsi_its_cdd::AdverseWeatherConditionPrecipitationSubCauseCode
520 {
521 type Error = alloc::string::String;
522
523 fn try_into(self) -> Result<AdverseWeatherConditionPrecipitation, Self::Error> {
524 match self.0 {
525 0 => Ok(AdverseWeatherConditionPrecipitation::Unavailable),
526 1 => Ok(AdverseWeatherConditionPrecipitation::HeavyRain),
527 2 => Ok(AdverseWeatherConditionPrecipitation::HeavySnowfall),
528 3 => Ok(AdverseWeatherConditionPrecipitation::SoftHail),
529 _ => Err(alloc::format!("PrecipitationSubCauseCode {} not a known value", self.0)),
530 }
531 }
532 }
533
534 #[repr(u8)]
536 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
537 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
538 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
539 pub enum SlowVehicle {
540 Unavailable = 0,
541 MaintenanceVehicle = 1,
542 VehiclesSlowingToLookAtAccident = 2,
543 AbnormalLoad = 3,
544 AbnormalWideLoad = 4,
545 Convoy = 5,
546 Snowplough = 6,
547 Deicing = 7,
548 SaltingVehicles = 8,
549 }
550 scc_conv_part!(
551 SlowVehicle,
552 crate::standards::cdd_2_2_1::etsi_its_cdd::SlowVehicleSubCauseCode
553 );
554 impl TryInto<SlowVehicle> for crate::standards::cdd_2_2_1::etsi_its_cdd::SlowVehicleSubCauseCode {
555 type Error = alloc::string::String;
556
557 fn try_into(self) -> Result<SlowVehicle, Self::Error> {
558 match self.0 {
559 0 => Ok(SlowVehicle::Unavailable),
560 1 => Ok(SlowVehicle::MaintenanceVehicle),
561 2 => Ok(SlowVehicle::VehiclesSlowingToLookAtAccident),
562 3 => Ok(SlowVehicle::AbnormalLoad),
563 4 => Ok(SlowVehicle::AbnormalWideLoad),
564 5 => Ok(SlowVehicle::Convoy),
565 6 => Ok(SlowVehicle::Snowplough),
566 7 => Ok(SlowVehicle::Deicing),
567 8 => Ok(SlowVehicle::SaltingVehicles),
568 _ => Err(alloc::format!(
569 "SlowVehicleSubCauseCode {} not a known value",
570 self.0
571 )),
572 }
573 }
574 }
575
576 #[repr(u8)]
578 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
579 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
580 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
581 pub enum StationaryVehicle {
582 Unavailable = 0,
583 HumanProblem = 1,
584 VehicleBreakdown = 2,
585 PostCrash = 3,
586 PublicTransportStop = 4,
587 CarryingDangerousGoods = 5,
588 }
589 scc_conv_part!(
590 StationaryVehicle,
591 crate::standards::cdd_2_2_1::etsi_its_cdd::StationaryVehicleSubCauseCode
592 );
593 impl TryInto<StationaryVehicle>
594 for crate::standards::cdd_2_2_1::etsi_its_cdd::StationaryVehicleSubCauseCode
595 {
596 type Error = alloc::string::String;
597
598 fn try_into(self) -> Result<StationaryVehicle, Self::Error> {
599 match self.0 {
600 0 => Ok(StationaryVehicle::Unavailable),
601 1 => Ok(StationaryVehicle::HumanProblem),
602 2 => Ok(StationaryVehicle::VehicleBreakdown),
603 3 => Ok(StationaryVehicle::PostCrash),
604 4 => Ok(StationaryVehicle::PublicTransportStop),
605 5 => Ok(StationaryVehicle::CarryingDangerousGoods),
606 _ => Err(alloc::format!(
607 "StationaryVehicleSubCauseCode {} not a known value",
608 self.0
609 )),
610 }
611 }
612 }
613
614 #[repr(u8)]
616 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
617 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
618 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
619 pub enum HumanProblem {
620 Unavailable = 0,
621 GlycemiaProblem = 1,
622 HeartProblem = 2,
623 }
624 scc_conv_part!(
625 HumanProblem,
626 crate::standards::cdd_2_2_1::etsi_its_cdd::HumanProblemSubCauseCode
627 );
628 impl TryInto<HumanProblem> for crate::standards::cdd_2_2_1::etsi_its_cdd::HumanProblemSubCauseCode {
629 type Error = alloc::string::String;
630
631 fn try_into(self) -> Result<HumanProblem, Self::Error> {
632 match self.0 {
633 0 => Ok(HumanProblem::Unavailable),
634 1 => Ok(HumanProblem::GlycemiaProblem),
635 2 => Ok(HumanProblem::HeartProblem),
636 _ => Err(alloc::format!(
637 "HumanProblemSubCauseCode {} not a known value",
638 self.0
639 )),
640 }
641 }
642 }
643
644 #[repr(u8)]
646 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
647 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
648 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
649 pub enum EmergencyVehicleApproaching {
650 Unavailable = 0,
651 EmergencyVehicleApproaching = 1,
652 PrioritizedVehicleApproaching = 2,
653 }
654 scc_conv_part!(
655 EmergencyVehicleApproaching,
656 crate::standards::cdd_2_2_1::etsi_its_cdd::EmergencyVehicleApproachingSubCauseCode
657 );
658 impl TryInto<EmergencyVehicleApproaching>
659 for crate::standards::cdd_2_2_1::etsi_its_cdd::EmergencyVehicleApproachingSubCauseCode
660 {
661 type Error = alloc::string::String;
662
663 fn try_into(self) -> Result<EmergencyVehicleApproaching, Self::Error> {
664 match self.0 {
665 0 => Ok(EmergencyVehicleApproaching::Unavailable),
666 1 => Ok(EmergencyVehicleApproaching::EmergencyVehicleApproaching),
667 2 => Ok(EmergencyVehicleApproaching::PrioritizedVehicleApproaching),
668 _ => Err(alloc::format!(
669 "EmergencyVehicleApproachingSubCauseCode {} not a known value",
670 self.0
671 )),
672 }
673 }
674 }
675
676 #[repr(u8)]
678 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
679 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
680 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
681 pub enum HazardousLocationDangerousCurve {
682 Unavailable = 0,
683 DangerousLeftTurnCurve = 1,
684 DangerousRightTurnCurve = 2,
685 MultipleCurvesStartingWithUnknownTurningDirection = 3,
686 MultipleCurvesStartingWithLeftTurn = 4,
687 MultipleCurvesStartingWithRightTurn = 5,
688 }
689 scc_conv_part!(
690 HazardousLocationDangerousCurve,
691 crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationDangerousCurveSubCauseCode
692 );
693 impl TryInto<HazardousLocationDangerousCurve>
694 for crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationDangerousCurveSubCauseCode
695 {
696 type Error = alloc::string::String;
697
698 fn try_into(self) -> Result<HazardousLocationDangerousCurve, Self::Error> {
699 match self.0 {
700 0 => Ok(HazardousLocationDangerousCurve::Unavailable),
701 1 => Ok(HazardousLocationDangerousCurve::DangerousLeftTurnCurve),
702 2 => Ok(HazardousLocationDangerousCurve::DangerousRightTurnCurve),
703 3 => Ok(HazardousLocationDangerousCurve::MultipleCurvesStartingWithUnknownTurningDirection),
704 4 => Ok(HazardousLocationDangerousCurve::MultipleCurvesStartingWithLeftTurn),
705 5 => Ok(HazardousLocationDangerousCurve::MultipleCurvesStartingWithRightTurn),
706 _ => Err(alloc::format!("DangerousCurveSubCauseCode {} not a known value", self.0)),
707 }
708 }
709 }
710
711 #[repr(u8)]
713 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
714 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
715 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
716 pub enum HazardousLocationSurfaceCondition {
717 Unavailable = 0,
718 Rockfalls = 1,
719 EarthquakeDamage = 2,
720 SewerCollapse = 3,
721 Subsidence = 4,
722 SnowDrifts = 5,
723 StormDamage = 6,
724 BurstPipe = 7,
725 VolcanoEruption = 8,
726 FallingIce = 9,
727 }
728 scc_conv_part!(
729 HazardousLocationSurfaceCondition,
730 crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationSurfaceConditionSubCauseCode
731 );
732 impl TryInto<HazardousLocationSurfaceCondition>
733 for crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationSurfaceConditionSubCauseCode
734 {
735 type Error = alloc::string::String;
736
737 fn try_into(self) -> Result<HazardousLocationSurfaceCondition, Self::Error> {
738 match self.0 {
739 0 => Ok(HazardousLocationSurfaceCondition::Unavailable),
740 1 => Ok(HazardousLocationSurfaceCondition::Rockfalls),
741 2 => Ok(HazardousLocationSurfaceCondition::EarthquakeDamage),
742 3 => Ok(HazardousLocationSurfaceCondition::SewerCollapse),
743 4 => Ok(HazardousLocationSurfaceCondition::Subsidence),
744 5 => Ok(HazardousLocationSurfaceCondition::SnowDrifts),
745 6 => Ok(HazardousLocationSurfaceCondition::StormDamage),
746 7 => Ok(HazardousLocationSurfaceCondition::BurstPipe),
747 8 => Ok(HazardousLocationSurfaceCondition::VolcanoEruption),
748 9 => Ok(HazardousLocationSurfaceCondition::FallingIce),
749 _ => Err(alloc::format!(
750 "SurfaceConditionSubCauseCode {} not a known value",
751 self.0
752 )),
753 }
754 }
755 }
756
757 #[repr(u8)]
759 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
760 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
761 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
762 pub enum HazardousLocationObstacleOnTheRoad {
763 Unavailable = 0,
764 ShedLoad = 1,
765 PartsOfVehicles = 2,
766 PartsOfTyres = 3,
767 BigObjects = 4,
768 FallenTrees = 5,
769 HubCaps = 6,
770 WaitingVehicles = 7,
771 }
772 scc_conv_part!(
773 HazardousLocationObstacleOnTheRoad,
774 crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationObstacleOnTheRoadSubCauseCode
775 );
776 impl TryInto<HazardousLocationObstacleOnTheRoad>
777 for crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationObstacleOnTheRoadSubCauseCode
778 {
779 type Error = alloc::string::String;
780
781 fn try_into(self) -> Result<HazardousLocationObstacleOnTheRoad, Self::Error> {
782 match self.0 {
783 0 => Ok(HazardousLocationObstacleOnTheRoad::Unavailable),
784 1 => Ok(HazardousLocationObstacleOnTheRoad::ShedLoad),
785 2 => Ok(HazardousLocationObstacleOnTheRoad::PartsOfVehicles),
786 3 => Ok(HazardousLocationObstacleOnTheRoad::PartsOfTyres),
787 4 => Ok(HazardousLocationObstacleOnTheRoad::BigObjects),
788 5 => Ok(HazardousLocationObstacleOnTheRoad::FallenTrees),
789 6 => Ok(HazardousLocationObstacleOnTheRoad::HubCaps),
790 7 => Ok(HazardousLocationObstacleOnTheRoad::WaitingVehicles),
791 _ => Err(alloc::format!("ObstacleOnTheRoadSubCauseCode {} not a known value", self.0)),
792 }
793 }
794 }
795
796 #[repr(u8)]
798 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
799 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
800 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
801 pub enum HazardousLocationAnimalOnTheRoad {
802 Unavailable = 0,
803 WildAnimals = 1,
804 HerdOfAnimals = 2,
805 SmallAnimals = 3,
806 LargeAnimals = 4,
807 }
808 scc_conv_part!(
809 HazardousLocationAnimalOnTheRoad,
810 crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationAnimalOnTheRoadSubCauseCode
811 );
812 impl TryInto<HazardousLocationAnimalOnTheRoad>
813 for crate::standards::cdd_2_2_1::etsi_its_cdd::HazardousLocationAnimalOnTheRoadSubCauseCode
814 {
815 type Error = alloc::string::String;
816
817 fn try_into(self) -> Result<HazardousLocationAnimalOnTheRoad, Self::Error> {
818 match self.0 {
819 0 => Ok(HazardousLocationAnimalOnTheRoad::Unavailable),
820 1 => Ok(HazardousLocationAnimalOnTheRoad::WildAnimals),
821 2 => Ok(HazardousLocationAnimalOnTheRoad::HerdOfAnimals),
822 3 => Ok(HazardousLocationAnimalOnTheRoad::SmallAnimals),
823 4 => Ok(HazardousLocationAnimalOnTheRoad::LargeAnimals),
824 _ => Err(alloc::format!(
825 "AnimalOnTheRoadSubCauseCode {} not a known value",
826 self.0
827 )),
828 }
829 }
830 }
831
832 #[repr(u8)]
834 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
835 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
836 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
837 pub enum CollisionRisk {
838 Unavailable = 0,
839 LongitudinalCollisionRisk = 1,
840 CrossingCollisionRisk = 2,
841 LateralCollisionRisk = 3,
842 VulnerableRoadUser = 4,
843 }
844 scc_conv_part!(
845 CollisionRisk,
846 crate::standards::cdd_2_2_1::etsi_its_cdd::CollisionRiskSubCauseCode
847 );
848 impl TryInto<CollisionRisk>
849 for crate::standards::cdd_2_2_1::etsi_its_cdd::CollisionRiskSubCauseCode
850 {
851 type Error = alloc::string::String;
852
853 fn try_into(self) -> Result<CollisionRisk, Self::Error> {
854 match self.0 {
855 0 => Ok(CollisionRisk::Unavailable),
856 1 => Ok(CollisionRisk::LongitudinalCollisionRisk),
857 2 => Ok(CollisionRisk::CrossingCollisionRisk),
858 3 => Ok(CollisionRisk::LateralCollisionRisk),
859 4 => Ok(CollisionRisk::VulnerableRoadUser),
860 _ => Err(alloc::format!(
861 "CollisionRiskSubCauseCode {} not a known value",
862 self.0
863 )),
864 }
865 }
866 }
867
868 #[repr(u8)]
870 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
871 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
872 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
873 pub enum SignalViolation {
874 Unavailable = 0,
875 StopSignViolation = 1,
876 TrafficLightViolation = 2,
877 TurningRegulationViolation = 3,
878 }
879 scc_conv_part!(
880 SignalViolation,
881 crate::standards::cdd_2_2_1::etsi_its_cdd::SignalViolationSubCauseCode
882 );
883 impl TryInto<SignalViolation>
884 for crate::standards::cdd_2_2_1::etsi_its_cdd::SignalViolationSubCauseCode
885 {
886 type Error = alloc::string::String;
887
888 fn try_into(self) -> Result<SignalViolation, Self::Error> {
889 match self.0 {
890 0 => Ok(SignalViolation::Unavailable),
891 1 => Ok(SignalViolation::StopSignViolation),
892 2 => Ok(SignalViolation::TrafficLightViolation),
893 3 => Ok(SignalViolation::TurningRegulationViolation),
894 _ => Err(alloc::format!(
895 "SignalViolationSubCauseCode {} not a known value",
896 self.0
897 )),
898 }
899 }
900 }
901
902 #[repr(u8)]
904 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
905 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
906 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
907 pub enum RescueAndRecoveryWorkInProgress {
908 Unavailable = 0,
909 EmergencyVehicles = 1,
910 RescueHelicopterLanding = 2,
911 PoliceActivityOngoing = 3,
912 MedicalEmergencyOngoing = 4,
913 ChildAbductionInProgress = 5,
914 }
915 scc_conv_part!(
916 RescueAndRecoveryWorkInProgress,
917 crate::standards::cdd_2_2_1::etsi_its_cdd::RescueAndRecoveryWorkInProgressSubCauseCode
918 );
919 impl TryInto<RescueAndRecoveryWorkInProgress>
920 for crate::standards::cdd_2_2_1::etsi_its_cdd::RescueAndRecoveryWorkInProgressSubCauseCode
921 {
922 type Error = alloc::string::String;
923
924 fn try_into(self) -> Result<RescueAndRecoveryWorkInProgress, Self::Error> {
925 match self.0 {
926 0 => Ok(RescueAndRecoveryWorkInProgress::Unavailable),
927 1 => Ok(RescueAndRecoveryWorkInProgress::EmergencyVehicles),
928 2 => Ok(RescueAndRecoveryWorkInProgress::RescueHelicopterLanding),
929 3 => Ok(RescueAndRecoveryWorkInProgress::PoliceActivityOngoing),
930 4 => Ok(RescueAndRecoveryWorkInProgress::MedicalEmergencyOngoing),
931 5 => Ok(RescueAndRecoveryWorkInProgress::ChildAbductionInProgress),
932 _ => Err(alloc::format!(
933 "RescueAndRecoveryWorkInProgressSubCauseCode {} not a known value",
934 self.0
935 )),
936 }
937 }
938 }
939
940 #[repr(u8)]
942 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
943 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
944 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
945 pub enum DangerousEndOfQueue {
946 Unavailable = 0,
947 SuddenEndOfQueue = 1,
948 QueueOverHill = 2,
949 QueueAroundBend = 3,
950 QueueInTunnel = 4,
951 }
952 scc_conv_part!(
953 DangerousEndOfQueue,
954 crate::standards::cdd_2_2_1::etsi_its_cdd::DangerousEndOfQueueSubCauseCode
955 );
956 impl TryInto<DangerousEndOfQueue>
957 for crate::standards::cdd_2_2_1::etsi_its_cdd::DangerousEndOfQueueSubCauseCode
958 {
959 type Error = alloc::string::String;
960
961 fn try_into(self) -> Result<DangerousEndOfQueue, Self::Error> {
962 match self.0 {
963 0 => Ok(DangerousEndOfQueue::Unavailable),
964 1 => Ok(DangerousEndOfQueue::SuddenEndOfQueue),
965 2 => Ok(DangerousEndOfQueue::QueueOverHill),
966 3 => Ok(DangerousEndOfQueue::QueueAroundBend),
967 4 => Ok(DangerousEndOfQueue::QueueInTunnel),
968 _ => Err(alloc::format!(
969 "DangerousEndOfQueueSubCauseCode {} not a known value",
970 self.0
971 )),
972 }
973 }
974 }
975
976 #[repr(u8)]
978 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
979 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
980 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
981 pub enum DangerousSituation {
982 Unavailable = 0,
983 EmergencyElectronicBrakeEngaged = 1,
984 PreCrashSystemEngaged = 2,
985 EspEngaged = 3,
986 AbsEngaged = 4,
987 AebEngaged = 5,
988 BrakeWarningEngaged = 6,
989 CollisionRiskWarningEngaged = 7,
990 }
991 scc_conv_part!(
992 DangerousSituation,
993 crate::standards::cdd_2_2_1::etsi_its_cdd::DangerousSituationSubCauseCode
994 );
995 impl TryInto<DangerousSituation>
996 for crate::standards::cdd_2_2_1::etsi_its_cdd::DangerousSituationSubCauseCode
997 {
998 type Error = alloc::string::String;
999
1000 fn try_into(self) -> Result<DangerousSituation, Self::Error> {
1001 match self.0 {
1002 0 => Ok(DangerousSituation::Unavailable),
1003 1 => Ok(DangerousSituation::EmergencyElectronicBrakeEngaged),
1004 2 => Ok(DangerousSituation::PreCrashSystemEngaged),
1005 3 => Ok(DangerousSituation::EspEngaged),
1006 4 => Ok(DangerousSituation::AbsEngaged),
1007 5 => Ok(DangerousSituation::AebEngaged),
1008 6 => Ok(DangerousSituation::BrakeWarningEngaged),
1009 7 => Ok(DangerousSituation::CollisionRiskWarningEngaged),
1010 _ => Err(alloc::format!(
1011 "DangerousSituationSubCauseCode {} not a known value",
1012 self.0
1013 )),
1014 }
1015 }
1016 }
1017
1018 #[repr(u8)]
1020 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
1021 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
1022 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
1023 pub enum VehicleBreakdown {
1024 Unavailable = 0,
1025 LackOfFuel = 1,
1026 LackOfBatteryPower = 2,
1027 EngineProblem = 3,
1028 TransmissionProblem = 4,
1029 EngineCoolingProblem = 5,
1030 BrakingSystemProblem = 6,
1031 SteeringProblem = 7,
1032 TyrePuncture = 8,
1033 TyrePressureProblem = 9,
1034 }
1035 scc_conv_part!(
1036 VehicleBreakdown,
1037 crate::standards::cdd_2_2_1::etsi_its_cdd::VehicleBreakdownSubCauseCode
1038 );
1039 impl TryInto<VehicleBreakdown>
1040 for crate::standards::cdd_2_2_1::etsi_its_cdd::VehicleBreakdownSubCauseCode
1041 {
1042 type Error = alloc::string::String;
1043
1044 fn try_into(self) -> Result<VehicleBreakdown, Self::Error> {
1045 match self.0 {
1046 0 => Ok(VehicleBreakdown::Unavailable),
1047 1 => Ok(VehicleBreakdown::LackOfFuel),
1048 2 => Ok(VehicleBreakdown::LackOfBatteryPower),
1049 3 => Ok(VehicleBreakdown::EngineProblem),
1050 4 => Ok(VehicleBreakdown::TransmissionProblem),
1051 5 => Ok(VehicleBreakdown::EngineCoolingProblem),
1052 6 => Ok(VehicleBreakdown::BrakingSystemProblem),
1053 7 => Ok(VehicleBreakdown::SteeringProblem),
1054 8 => Ok(VehicleBreakdown::TyrePuncture),
1055 9 => Ok(VehicleBreakdown::TyrePressureProblem),
1056 _ => Err(alloc::format!(
1057 "VehicleBreakdownSubCauseCode {} not a known value",
1058 self.0
1059 )),
1060 }
1061 }
1062 }
1063
1064 #[repr(u8)]
1066 #[derive(Debug, PartialEq, Clone, Copy, Eq, Hash)]
1067 #[cfg_attr(feature = "json", derive(serde::Serialize, serde::Deserialize))]
1068 #[cfg_attr(feature = "json", serde(rename_all = "lowercase"))]
1069 pub enum PostCrash {
1070 Unavailable = 0,
1071 AccidentWithoutECallTriggered = 1,
1072 AccidentWithECallManuallyTriggered = 2,
1073 AccidentWithECallAutomaticallyTriggered = 3,
1074 AccidentWithECallTriggeredWithoutAccessToCellularNetwork = 4,
1075 }
1076 scc_conv_part!(
1077 PostCrash,
1078 crate::standards::cdd_2_2_1::etsi_its_cdd::PostCrashSubCauseCode
1079 );
1080 impl TryInto<PostCrash> for crate::standards::cdd_2_2_1::etsi_its_cdd::PostCrashSubCauseCode {
1081 type Error = alloc::string::String;
1082
1083 fn try_into(self) -> Result<PostCrash, Self::Error> {
1084 match self.0 {
1085 0 => Ok(PostCrash::Unavailable),
1086 1 => Ok(PostCrash::AccidentWithoutECallTriggered),
1087 2 => Ok(PostCrash::AccidentWithECallManuallyTriggered),
1088 3 => Ok(PostCrash::AccidentWithECallAutomaticallyTriggered),
1089 4 => Ok(PostCrash::AccidentWithECallTriggeredWithoutAccessToCellularNetwork),
1090 _ => Err(alloc::format!(
1091 "PostCrashSubCauseCode {} not a known value",
1092 self.0
1093 )),
1094 }
1095 }
1096 }
1097}
1098
1099#[cfg(feature = "_cdd_1_3_1_1")]
1100pub mod cdd_1_3_1_1 {
1110 use crate::standards::cdd_1_3_1_1::its_container::{
1111 AccelerationControl,
1112 EmergencyPriority,
1113 ExteriorLights,
1114 LightBarSirenInUse,
1115 SpecialTransportType,
1116 };
1117
1118 impl Default for AccelerationControl {
1120 fn default() -> Self {
1121 Self(Default::default())
1122 }
1123 }
1124 impl AccelerationControl {
1125 pub fn get_brake_pedal_engaged(&self) -> bool {
1126 self.0[0]
1127 }
1128 pub fn get_gas_pedal_engaged(&self) -> bool {
1129 self.0[1]
1130 }
1131 pub fn get_emergency_brake_engaged(&self) -> bool {
1132 self.0[2]
1133 }
1134 pub fn get_collision_warning_engaged(&self) -> bool {
1135 self.0[3]
1136 }
1137 pub fn get_acc_engaged(&self) -> bool {
1138 self.0[4]
1139 }
1140 pub fn get_cruise_control_engaged(&self) -> bool {
1141 self.0[5]
1142 }
1143 pub fn get_speed_limiter_engaged(&self) -> bool {
1144 self.0[6]
1145 }
1146
1147 pub fn set_brake_pedal_engaged(&mut self, value: bool) {
1148 self.0.set(0, value)
1149 }
1150 pub fn set_gas_pedal_engaged(&mut self, value: bool) {
1151 self.0.set(1, value)
1152 }
1153 pub fn set_emergency_brake_engaged(&mut self, value: bool) {
1154 self.0.set(2, value)
1155 }
1156 pub fn set_collision_warning_engaged(&mut self, value: bool) {
1157 self.0.set(3, value)
1158 }
1159 pub fn set_acc_engaged(&mut self, value: bool) {
1160 self.0.set(4, value)
1161 }
1162 pub fn set_cruise_control_engaged(&mut self, value: bool) {
1163 self.0.set(5, value)
1164 }
1165 pub fn set_speed_limiter_engaged(&mut self, value: bool) {
1166 self.0.set(6, value)
1167 }
1168 }
1169 impl core::fmt::Display for AccelerationControl {
1170 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1171 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1172
1173 if self.get_brake_pedal_engaged() {
1174 items.push("brakePedalEngaged: 1".into());
1175 }
1176 if self.get_gas_pedal_engaged() {
1177 items.push("gasPedalEngaged: 1".into());
1178 }
1179 if self.get_emergency_brake_engaged() {
1180 items.push("emergencyBrakeEngaged: 1".into());
1181 }
1182 if self.get_collision_warning_engaged() {
1183 items.push("collisionWarningEngaged: 1".into());
1184 }
1185 if self.get_acc_engaged() {
1186 items.push("accEngaged: 1".into());
1187 }
1188 if self.get_cruise_control_engaged() {
1189 items.push("cruiseControlEngaged: 1".into());
1190 }
1191 if self.get_speed_limiter_engaged() {
1192 items.push("speedLimiterEngaged: 1".into());
1193 }
1194
1195 write!(f, "{}", items.join(", "))
1196 }
1197 }
1198
1199 impl Default for ExteriorLights {
1201 fn default() -> Self {
1202 Self(Default::default())
1203 }
1204 }
1205 impl ExteriorLights {
1206 pub fn get_low_beam_headlights_on(&self) -> bool {
1207 self.0[0]
1208 }
1209 pub fn get_high_beam_headlights_on(&self) -> bool {
1210 self.0[1]
1211 }
1212 pub fn get_left_turn_signal_on(&self) -> bool {
1213 self.0[2]
1214 }
1215 pub fn get_right_turn_signal_on(&self) -> bool {
1216 self.0[3]
1217 }
1218 pub fn get_daytime_running_lights_on(&self) -> bool {
1219 self.0[4]
1220 }
1221 pub fn get_reverse_light_on(&self) -> bool {
1222 self.0[5]
1223 }
1224 pub fn get_fog_light_on(&self) -> bool {
1225 self.0[6]
1226 }
1227 pub fn get_parking_lights_on(&self) -> bool {
1228 self.0[7]
1229 }
1230
1231 pub fn set_low_beam_headlights_on(&mut self, value: bool) {
1232 self.0.set(0, value)
1233 }
1234 pub fn set_high_beam_headlights_on(&mut self, value: bool) {
1235 self.0.set(1, value)
1236 }
1237 pub fn set_left_turn_signal_on(&mut self, value: bool) {
1238 self.0.set(2, value)
1239 }
1240 pub fn set_right_turn_signal_on(&mut self, value: bool) {
1241 self.0.set(3, value)
1242 }
1243 pub fn set_daytime_running_lights_on(&mut self, value: bool) {
1244 self.0.set(4, value)
1245 }
1246 pub fn set_reverse_light_on(&mut self, value: bool) {
1247 self.0.set(5, value)
1248 }
1249 pub fn set_fog_light_on(&mut self, value: bool) {
1250 self.0.set(6, value)
1251 }
1252 pub fn set_parking_lights_on(&mut self, value: bool) {
1253 self.0.set(7, value)
1254 }
1255 }
1256 impl core::fmt::Display for ExteriorLights {
1257 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1258 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1259
1260 if self.get_low_beam_headlights_on() {
1261 items.push("lowBeamHeadlightsOn: 1".into());
1262 }
1263 if self.get_high_beam_headlights_on() {
1264 items.push("highBeamHeadlightsOn: 1".into());
1265 }
1266 if self.get_left_turn_signal_on() {
1267 items.push("leftTurnSignalOn: 1".into());
1268 }
1269 if self.get_right_turn_signal_on() {
1270 items.push("rightTurnSignalOn: 1".into());
1271 }
1272 if self.get_daytime_running_lights_on() {
1273 items.push("daytimeRunningLightsOn: 1".into());
1274 }
1275 if self.get_reverse_light_on() {
1276 items.push("reverseLightOn: 1".into());
1277 }
1278 if self.get_fog_light_on() {
1279 items.push("fogLightOn: 1".into());
1280 }
1281 if self.get_parking_lights_on() {
1282 items.push("parkingLightsOn: 1".into());
1283 }
1284
1285 write!(f, "{}", items.join(", "))
1286 }
1287 }
1288
1289 impl Default for EmergencyPriority {
1291 fn default() -> Self {
1292 Self(Default::default())
1293 }
1294 }
1295 impl EmergencyPriority {
1296 pub fn get_request_for_right_of_way(&self) -> bool {
1297 self.0[0]
1298 }
1299 pub fn get_request_for_free_crossing_at_atraffic_light(&self) -> bool {
1300 self.0[1]
1301 }
1302
1303 pub fn set_request_for_right_of_way(&mut self, value: bool) {
1304 self.0.set(0, value)
1305 }
1306 pub fn set_request_for_free_crossing_at_atraffic_light(&mut self, value: bool) {
1307 self.0.set(1, value)
1308 }
1309 }
1310 impl core::fmt::Display for EmergencyPriority {
1311 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1312 write!(
1313 f,
1314 "requestForRightOfWay: {}, requestForFreeCrossingAtATrafficLight: {}",
1315 self.get_request_for_right_of_way(),
1316 self.get_request_for_free_crossing_at_atraffic_light()
1317 )
1318 }
1319 }
1320
1321 impl Default for LightBarSirenInUse {
1323 fn default() -> Self {
1324 Self(Default::default())
1325 }
1326 }
1327 impl LightBarSirenInUse {
1328 pub fn get_light_bar_activated(&self) -> bool {
1329 self.0[0]
1330 }
1331 pub fn get_siren_activated(&self) -> bool {
1332 self.0[1]
1333 }
1334
1335 pub fn set_light_bar_activated(&mut self, value: bool) {
1336 self.0.set(0, value)
1337 }
1338 pub fn set_siren_activated(&mut self, value: bool) {
1339 self.0.set(1, value)
1340 }
1341 }
1342 impl core::fmt::Display for LightBarSirenInUse {
1343 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1344 write!(
1345 f,
1346 "lightBarActivated: {}, sirenActivated: {}",
1347 self.get_light_bar_activated(),
1348 self.get_siren_activated()
1349 )
1350 }
1351 }
1352
1353 impl Default for SpecialTransportType {
1355 fn default() -> Self {
1356 Self(Default::default())
1357 }
1358 }
1359 impl SpecialTransportType {
1360 pub fn get_heavy_load(&self) -> bool {
1361 self.0[0]
1362 }
1363 pub fn get_excess_width(&self) -> bool {
1364 self.0[1]
1365 }
1366 pub fn get_excess_length(&self) -> bool {
1367 self.0[2]
1368 }
1369 pub fn get_excess_height(&self) -> bool {
1370 self.0[3]
1371 }
1372
1373 pub fn set_heavy_load(&mut self, value: bool) {
1374 self.0.set(0, value)
1375 }
1376 pub fn set_excess_width(&mut self, value: bool) {
1377 self.0.set(1, value)
1378 }
1379 pub fn set_excess_length(&mut self, value: bool) {
1380 self.0.set(2, value)
1381 }
1382 pub fn set_excess_height(&mut self, value: bool) {
1383 self.0.set(3, value)
1384 }
1385 }
1386 impl core::fmt::Display for SpecialTransportType {
1387 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1388 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1389
1390 if self.get_heavy_load() {
1391 items.push("heavyLoad: 1".into());
1392 }
1393 if self.get_excess_width() {
1394 items.push("excessWidth: 1".into());
1395 }
1396 if self.get_excess_length() {
1397 items.push("excessLength: 1".into());
1398 }
1399 if self.get_excess_height() {
1400 items.push("excessHeight: 1".into());
1401 }
1402
1403 write!(f, "{}", items.join(", "))
1404 }
1405 }
1406
1407 itsstationtype_conv!(crate::standards::cdd_1_3_1_1::its_container::StationType);
1408}
1409
1410#[cfg(feature = "_cdd_2_2_1")]
1411pub mod cdd_2_2_1 {
1417 use crate::standards::cdd_2_2_1::etsi_its_cdd::EnergyStorageType;
1418
1419 impl Default for EnergyStorageType {
1420 fn default() -> Self {
1421 Self(Default::default())
1422 }
1423 }
1424 impl EnergyStorageType {
1425 pub fn get_hydrogen_storage(&self) -> bool {
1426 self.0[0]
1427 }
1428 pub fn get_electric_energy_storage(&self) -> bool {
1429 self.0[1]
1430 }
1431 pub fn get_liquid_propane_gas(&self) -> bool {
1432 self.0[2]
1433 }
1434 pub fn get_compressed_natural_gas(&self) -> bool {
1435 self.0[3]
1436 }
1437 pub fn get_diesel(&self) -> bool {
1438 self.0[4]
1439 }
1440 pub fn get_gasoline(&self) -> bool {
1441 self.0[5]
1442 }
1443 pub fn get_ammonia(&self) -> bool {
1444 self.0[6]
1445 }
1446
1447 pub fn set_hydrogen_storage(&mut self, value: bool) {
1448 self.0.set(0, value)
1449 }
1450 pub fn set_electric_energy_storage(&mut self, value: bool) {
1451 self.0.set(1, value)
1452 }
1453 pub fn set_liquid_propane_gas(&mut self, value: bool) {
1454 self.0.set(2, value)
1455 }
1456 pub fn set_compressed_natural_gas(&mut self, value: bool) {
1457 self.0.set(3, value)
1458 }
1459 pub fn set_diesel(&mut self, value: bool) {
1460 self.0.set(4, value)
1461 }
1462 pub fn set_gasoline(&mut self, value: bool) {
1463 self.0.set(5, value)
1464 }
1465 pub fn set_ammonia(&mut self, value: bool) {
1466 self.0.set(6, value)
1467 }
1468 }
1469 impl core::fmt::Display for EnergyStorageType {
1470 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1471 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1472
1473 if self.get_hydrogen_storage() {
1474 items.push("hydrogenStorage: 1".into());
1475 }
1476 if self.get_electric_energy_storage() {
1477 items.push("electricEnergyStorage: 1".into());
1478 }
1479 if self.get_liquid_propane_gas() {
1480 items.push("liquidPropaneGas: 1".into());
1481 }
1482 if self.get_compressed_natural_gas() {
1483 items.push("compressedNaturalGas: 1".into());
1484 }
1485 if self.get_diesel() {
1486 items.push("diesel: 1".into());
1487 }
1488 if self.get_gasoline() {
1489 items.push("gasoline: 1".into());
1490 }
1491 if self.get_ammonia() {
1492 items.push("ammonia: 1".into());
1493 }
1494
1495 write!(f, "{}", items.join(", "))
1496 }
1497 }
1498
1499 itsmessageid_conv!(crate::standards::cdd_2_2_1::etsi_its_cdd::MessageId);
1500
1501 itsstationtype_conv!(crate::standards::cdd_2_2_1::etsi_its_cdd::StationType);
1502}
1503
1504#[cfg(feature = "_dsrc_2_2_1")]
1505pub mod dsrc_2_2_1 {
1526 use rasn::types::Ia5String;
1527
1528 use crate::standards::dsrc_2_2_1::etsi_its_dsrc::{
1529 AllowedManeuvers,
1530 IntersectionStatusObject,
1531 LaneAttributes,
1532 LaneAttributesBarrier,
1533 LaneAttributesBike,
1534 LaneAttributesCrosswalk,
1535 LaneAttributesParking,
1536 LaneAttributesSidewalk,
1537 LaneAttributesStriping,
1538 LaneAttributesTrackedVehicle,
1539 LaneAttributesVehicle,
1540 LaneDirection,
1541 LaneSharing,
1542 LaneTypeAttributes,
1543 OcitRequestorDescriptionContainer,
1544 TransitVehicleStatus,
1545 };
1546
1547 impl core::fmt::Display for LaneAttributes {
1550 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1551 write!(
1552 f,
1553 "LaneTypeAttributes{{{}}}, LaneDirection{{{}}}, LaneSharing{{{}}}",
1554 self.lane_type, self.directional_use, self.shared_with
1555 )
1556 }
1558 }
1559
1560 impl core::fmt::Display for LaneTypeAttributes {
1561 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1562 match self {
1563 LaneTypeAttributes::vehicle(attrs) => write!(f, "vehicle({attrs})"),
1564 LaneTypeAttributes::crosswalk(attrs) => write!(f, "crosswalk({attrs})"),
1565 LaneTypeAttributes::bikeLane(attrs) => write!(f, "bikeLane({attrs})"),
1566 LaneTypeAttributes::sidewalk(attrs) => write!(f, "sidewalk({attrs})"),
1567 LaneTypeAttributes::median(attrs) => write!(f, "median({attrs})"),
1568 LaneTypeAttributes::striping(attrs) => write!(f, "striping({attrs})"),
1569 LaneTypeAttributes::trackedVehicle(attrs) => write!(f, "trackedVehicle({attrs})"),
1570 LaneTypeAttributes::parking(attrs) => write!(f, "parking({attrs})"),
1571 }
1572 }
1573 }
1574
1575 impl Default for LaneSharing {
1576 fn default() -> Self {
1577 Self(Default::default())
1578 }
1579 }
1580 impl LaneSharing {
1581 pub fn get_overlapping_lane_description_provided(&self) -> bool {
1582 self.0[0]
1583 }
1584 pub fn get_multiple_lanes_treated_as_one_lane(&self) -> bool {
1585 self.0[1]
1586 }
1587 pub fn get_other_non_motorized_traffic_types(&self) -> bool {
1588 self.0[2]
1589 }
1590 pub fn get_individual_motorized_vehicle_traffic(&self) -> bool {
1591 self.0[3]
1592 }
1593 pub fn get_bus_vehicle_traffic(&self) -> bool {
1594 self.0[4]
1595 }
1596 pub fn get_taxi_vehicle_traffic(&self) -> bool {
1597 self.0[5]
1598 }
1599 pub fn get_pedestrians_traffic(&self) -> bool {
1600 self.0[6]
1601 }
1602 pub fn get_cyclist_vehicle_traffic(&self) -> bool {
1603 self.0[7]
1604 }
1605 pub fn get_tracked_vehicle_traffic(&self) -> bool {
1606 self.0[8]
1607 }
1608 pub fn get_pedestrian_traffic(&self) -> bool {
1609 self.0[9]
1610 }
1611
1612 pub fn set_overlapping_lane_description_provided(&mut self, value: bool) {
1613 self.0.set(0, value)
1614 }
1615 pub fn set_multiple_lanes_treated_as_one_lane(&mut self, value: bool) {
1616 self.0.set(1, value)
1617 }
1618 pub fn set_other_non_motorized_traffic_types(&mut self, value: bool) {
1619 self.0.set(2, value)
1620 }
1621 pub fn set_individual_motorized_vehicle_traffic(&mut self, value: bool) {
1622 self.0.set(3, value)
1623 }
1624 pub fn set_bus_vehicle_traffic(&mut self, value: bool) {
1625 self.0.set(4, value)
1626 }
1627 pub fn set_taxi_vehicle_traffic(&mut self, value: bool) {
1628 self.0.set(5, value)
1629 }
1630 pub fn set_pedestrians_traffic(&mut self, value: bool) {
1631 self.0.set(6, value)
1632 }
1633 pub fn set_cyclist_vehicle_traffic(&mut self, value: bool) {
1634 self.0.set(7, value)
1635 }
1636 pub fn set_tracked_vehicle_traffic(&mut self, value: bool) {
1637 self.0.set(8, value)
1638 }
1639 pub fn set_pedestrian_traffic(&mut self, value: bool) {
1640 self.0.set(9, value)
1641 }
1642 }
1643 impl core::fmt::Display for LaneSharing {
1644 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1645 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1646
1647 if self.get_overlapping_lane_description_provided() {
1648 items.push("overlappingLaneDescriptionProvided: 1".into());
1649 }
1650 if self.get_multiple_lanes_treated_as_one_lane() {
1651 items.push("multipleLanesTreatedAsOneLane: 1".into());
1652 }
1653 if self.get_other_non_motorized_traffic_types() {
1654 items.push("otherNonMotorizedTrafficTypes: 1".into());
1655 }
1656 if self.get_individual_motorized_vehicle_traffic() {
1657 items.push("individualMotorizedVehicleTraffic: 1".into());
1658 }
1659 if self.get_bus_vehicle_traffic() {
1660 items.push("busVehicleTraffic: 1".into());
1661 }
1662 if self.get_taxi_vehicle_traffic() {
1663 items.push("taxiVehicleTraffic: 1".into());
1664 }
1665 if self.get_pedestrians_traffic() {
1666 items.push("pedestriansTraffic: 1".into());
1667 }
1668 if self.get_cyclist_vehicle_traffic() {
1669 items.push("cyclistVehicleTraffic: 1".into());
1670 }
1671 if self.get_tracked_vehicle_traffic() {
1672 items.push("trackedVehicleTraffic: 1".into());
1673 }
1674 if self.get_pedestrian_traffic() {
1675 items.push("pedestrianTraffic: 1".into());
1676 }
1677
1678 write!(f, "{}", items.join(", "))
1679 }
1680 }
1681
1682 impl Default for AllowedManeuvers {
1683 fn default() -> Self {
1684 Self(Default::default())
1685 }
1686 }
1687 impl AllowedManeuvers {
1688 pub fn get_maneuver_straight_allowed(&self) -> bool {
1689 self.0[0]
1690 }
1691 pub fn get_maneuver_left_allowed(&self) -> bool {
1692 self.0[1]
1693 }
1694 pub fn get_maneuver_right_allowed(&self) -> bool {
1695 self.0[2]
1696 }
1697 pub fn get_maneuver_uturn_allowed(&self) -> bool {
1698 self.0[3]
1699 }
1700 pub fn get_maneuver_left_turn_on_red_allowed(&self) -> bool {
1701 self.0[4]
1702 }
1703 pub fn get_maneuver_right_turn_on_red_allowed(&self) -> bool {
1704 self.0[5]
1705 }
1706 pub fn get_maneuver_lane_change_allowed(&self) -> bool {
1707 self.0[6]
1708 }
1709 pub fn get_maneuver_no_stopping_allowed(&self) -> bool {
1710 self.0[7]
1711 }
1712 pub fn get_yield_allways_required(&self) -> bool {
1713 self.0[8]
1714 }
1715 pub fn get_go_with_halt(&self) -> bool {
1716 self.0[9]
1717 }
1718 pub fn get_caution(&self) -> bool {
1719 self.0[10]
1720 }
1721 pub fn get_reserved1(&self) -> bool {
1722 self.0[11]
1723 }
1724
1725 pub fn set_maneuver_straight_allowed(&mut self, value: bool) {
1726 self.0.set(0, value)
1727 }
1728 pub fn set_maneuver_left_allowed(&mut self, value: bool) {
1729 self.0.set(1, value)
1730 }
1731 pub fn set_maneuver_right_allowed(&mut self, value: bool) {
1732 self.0.set(2, value)
1733 }
1734 pub fn set_maneuver_uturn_allowed(&mut self, value: bool) {
1735 self.0.set(3, value)
1736 }
1737 pub fn set_maneuver_left_turn_on_red_allowed(&mut self, value: bool) {
1738 self.0.set(4, value)
1739 }
1740 pub fn set_maneuver_right_turn_on_red_allowed(&mut self, value: bool) {
1741 self.0.set(5, value)
1742 }
1743 pub fn set_maneuver_lane_change_allowed(&mut self, value: bool) {
1744 self.0.set(6, value)
1745 }
1746 pub fn set_maneuver_no_stopping_allowed(&mut self, value: bool) {
1747 self.0.set(7, value)
1748 }
1749 pub fn set_yield_allways_required(&mut self, value: bool) {
1750 self.0.set(8, value)
1751 }
1752 pub fn set_go_with_halt(&mut self, value: bool) {
1753 self.0.set(9, value)
1754 }
1755 pub fn set_caution(&mut self, value: bool) {
1756 self.0.set(10, value)
1757 }
1758 pub fn set_reserved1(&mut self, value: bool) {
1759 self.0.set(11, value)
1760 }
1761 }
1762 impl core::fmt::Display for AllowedManeuvers {
1763 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1764 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1765
1766 if self.get_maneuver_straight_allowed() {
1767 items.push("maneuverStraightAllowed: 1".into());
1768 }
1769 if self.get_maneuver_left_allowed() {
1770 items.push("maneuverLeftAllowed: 1".into());
1771 }
1772 if self.get_maneuver_right_allowed() {
1773 items.push("maneuverRightAllowed: 1".into());
1774 }
1775 if self.get_maneuver_uturn_allowed() {
1776 items.push("maneuverUTurnAllowed: 1".into());
1777 }
1778 if self.get_maneuver_left_turn_on_red_allowed() {
1779 items.push("maneuverLeftTurnOnRedAllowed: 1".into());
1780 }
1781 if self.get_maneuver_right_turn_on_red_allowed() {
1782 items.push("maneuverRightTurnOnRedAllowed: 1".into());
1783 }
1784 if self.get_maneuver_lane_change_allowed() {
1785 items.push("maneuverLaneChangeAllowed: 1".into());
1786 }
1787 if self.get_maneuver_no_stopping_allowed() {
1788 items.push("maneuverNoStoppingAllowed: 1".into());
1789 }
1790 if self.get_yield_allways_required() {
1791 items.push("yieldAllwaysRequired: 1".into());
1792 }
1793 if self.get_go_with_halt() {
1794 items.push("goWithHalt: 1".into());
1795 }
1796 if self.get_caution() {
1797 items.push("caution: 1".into());
1798 }
1799 if self.get_reserved1() {
1800 items.push("reserved1: 1".into());
1801 }
1802
1803 write!(f, "{}", items.join(", "))
1804 }
1805 }
1806
1807 impl Default for IntersectionStatusObject {
1808 fn default() -> Self {
1809 Self(Default::default())
1810 }
1811 }
1812 impl IntersectionStatusObject {
1813 pub fn get_manual_control_is_enabled(&self) -> bool {
1814 self.0[0]
1815 }
1816 pub fn get_stop_time_is_activated(&self) -> bool {
1817 self.0[1]
1818 }
1819 pub fn get_failure_flash(&self) -> bool {
1820 self.0[2]
1821 }
1822 pub fn get_preempt_is_active(&self) -> bool {
1823 self.0[3]
1824 }
1825 pub fn get_signal_priority_is_active(&self) -> bool {
1826 self.0[4]
1827 }
1828 pub fn get_fixed_time_operation(&self) -> bool {
1829 self.0[5]
1830 }
1831 pub fn get_traffic_dependent_operation(&self) -> bool {
1832 self.0[6]
1833 }
1834 pub fn get_standby_operation(&self) -> bool {
1835 self.0[7]
1836 }
1837 pub fn get_failure_mode(&self) -> bool {
1838 self.0[8]
1839 }
1840 pub fn get_off(&self) -> bool {
1841 self.0[9]
1842 }
1843 pub fn get_recent_map_message_update(&self) -> bool {
1844 self.0[10]
1845 }
1846 pub fn get_recent_change_in_map_assigned_lanes_ids_used(&self) -> bool {
1847 self.0[11]
1848 }
1849 pub fn get_no_valid_map_is_available_at_this_time(&self) -> bool {
1850 self.0[12]
1851 }
1852 pub fn get_no_valid_spat_is_available_at_this_time(&self) -> bool {
1853 self.0[13]
1854 }
1855
1856 pub fn set_manual_control_is_enabled(&mut self, value: bool) {
1857 self.0.set(0, value)
1858 }
1859 pub fn set_stop_time_is_activated(&mut self, value: bool) {
1860 self.0.set(1, value)
1861 }
1862 pub fn set_failure_flash(&mut self, value: bool) {
1863 self.0.set(2, value)
1864 }
1865 pub fn set_preempt_is_active(&mut self, value: bool) {
1866 self.0.set(3, value)
1867 }
1868 pub fn set_signal_priority_is_active(&mut self, value: bool) {
1869 self.0.set(4, value)
1870 }
1871 pub fn set_fixed_time_operation(&mut self, value: bool) {
1872 self.0.set(5, value)
1873 }
1874 pub fn set_traffic_dependent_operation(&mut self, value: bool) {
1875 self.0.set(6, value)
1876 }
1877 pub fn set_standby_operation(&mut self, value: bool) {
1878 self.0.set(7, value)
1879 }
1880 pub fn set_failure_mode(&mut self, value: bool) {
1881 self.0.set(8, value)
1882 }
1883 pub fn set_off(&mut self, value: bool) {
1884 self.0.set(9, value)
1885 }
1886 pub fn set_recent_map_message_update(&mut self, value: bool) {
1887 self.0.set(10, value)
1888 }
1889 pub fn set_recent_change_in_map_assigned_lanes_ids_used(&mut self, value: bool) {
1890 self.0.set(11, value)
1891 }
1892 pub fn set_no_valid_map_is_available_at_this_time(&mut self, value: bool) {
1893 self.0.set(12, value)
1894 }
1895 pub fn set_no_valid_spat_is_available_at_this_time(&mut self, value: bool) {
1896 self.0.set(13, value)
1897 }
1898 }
1899 impl core::fmt::Display for IntersectionStatusObject {
1900 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1901 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
1902
1903 if self.get_manual_control_is_enabled() {
1904 items.push("manualControlIsEnabled: 1".into());
1905 }
1906 if self.get_stop_time_is_activated() {
1907 items.push("stopTimeIsActivated: 1".into());
1908 }
1909 if self.get_failure_flash() {
1910 items.push("failureFlash: 1".into());
1911 }
1912 if self.get_preempt_is_active() {
1913 items.push("preemptIsActive: 1".into());
1914 }
1915 if self.get_signal_priority_is_active() {
1916 items.push("signalPriorityIsActive: 1".into());
1917 }
1918 if self.get_fixed_time_operation() {
1919 items.push("fixedTimeOperation: 1".into());
1920 }
1921 if self.get_traffic_dependent_operation() {
1922 items.push("trafficDependentOperation: 1".into());
1923 }
1924 if self.get_standby_operation() {
1925 items.push("standbyOperation: 1".into());
1926 }
1927 if self.get_failure_mode() {
1928 items.push("failureMode: 1".into());
1929 }
1930 if self.get_off() {
1931 items.push("off: 1".into());
1932 }
1933 if self.get_recent_map_message_update() {
1934 items.push("recentMAPmessageUpdate: 1".into());
1935 }
1936 if self.get_recent_change_in_map_assigned_lanes_ids_used() {
1937 items.push("recentChangeInMAPassignedLanesIDsUsed: 1".into());
1938 }
1939 if self.get_no_valid_map_is_available_at_this_time() {
1940 items.push("noValidMAPisAvailableAtThisTime: 1".into());
1941 }
1942 if self.get_no_valid_spat_is_available_at_this_time() {
1943 items.push("noValidSPATisAvailableAtThisTime: 1".into());
1944 }
1945
1946 write!(f, "{}", items.join(", "))
1947 }
1948 }
1949
1950 impl Default for LaneAttributesBarrier {
1951 fn default() -> Self {
1952 Self(Default::default())
1953 }
1954 }
1955 impl LaneAttributesBarrier {
1956 pub fn get_median_revocable_lane(&self) -> bool {
1957 self.0[0]
1958 }
1959 pub fn get_median(&self) -> bool {
1960 self.0[1]
1961 }
1962 pub fn get_white_line_hashing(&self) -> bool {
1963 self.0[2]
1964 }
1965 pub fn get_striped_lines(&self) -> bool {
1966 self.0[3]
1967 }
1968 pub fn get_double_striped_lines(&self) -> bool {
1969 self.0[4]
1970 }
1971 pub fn get_traffic_cones(&self) -> bool {
1972 self.0[5]
1973 }
1974 pub fn get_construction_barrier(&self) -> bool {
1975 self.0[6]
1976 }
1977 pub fn get_traffic_channels(&self) -> bool {
1978 self.0[7]
1979 }
1980 pub fn get_low_curbs(&self) -> bool {
1981 self.0[8]
1982 }
1983 pub fn get_high_curbs(&self) -> bool {
1984 self.0[9]
1985 }
1986
1987 pub fn set_median_revocable_lane(&mut self, value: bool) {
1988 self.0.set(0, value)
1989 }
1990 pub fn set_median(&mut self, value: bool) {
1991 self.0.set(1, value)
1992 }
1993 pub fn set_white_line_hashing(&mut self, value: bool) {
1994 self.0.set(2, value)
1995 }
1996 pub fn set_striped_lines(&mut self, value: bool) {
1997 self.0.set(3, value)
1998 }
1999 pub fn set_double_striped_lines(&mut self, value: bool) {
2000 self.0.set(4, value)
2001 }
2002 pub fn set_traffic_cones(&mut self, value: bool) {
2003 self.0.set(5, value)
2004 }
2005 pub fn set_construction_barrier(&mut self, value: bool) {
2006 self.0.set(6, value)
2007 }
2008 pub fn set_traffic_channels(&mut self, value: bool) {
2009 self.0.set(7, value)
2010 }
2011 pub fn set_low_curbs(&mut self, value: bool) {
2012 self.0.set(8, value)
2013 }
2014 pub fn set_high_curbs(&mut self, value: bool) {
2015 self.0.set(9, value)
2016 }
2017 }
2018 impl core::fmt::Display for LaneAttributesBarrier {
2019 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2020 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2021
2022 if self.get_median_revocable_lane() {
2023 items.push("median-RevocableLane: 1".into());
2024 }
2025 if self.get_median() {
2026 items.push("median: 1".into());
2027 }
2028 if self.get_white_line_hashing() {
2029 items.push("whiteLineHashing: 1".into());
2030 }
2031 if self.get_striped_lines() {
2032 items.push("stripedLines: 1".into());
2033 }
2034 if self.get_double_striped_lines() {
2035 items.push("doubleStripedLines: 1".into());
2036 }
2037 if self.get_traffic_cones() {
2038 items.push("trafficCones: 1".into());
2039 }
2040 if self.get_construction_barrier() {
2041 items.push("constructionBarrier: 1".into());
2042 }
2043 if self.get_traffic_channels() {
2044 items.push("trafficChannels: 1".into());
2045 }
2046 if self.get_low_curbs() {
2047 items.push("lowCurbs: 1".into());
2048 }
2049 if self.get_high_curbs() {
2050 items.push("highCurbs: 1".into());
2051 }
2052
2053 write!(f, "{}", items.join(", "))
2054 }
2055 }
2056
2057 impl Default for LaneAttributesBike {
2058 fn default() -> Self {
2059 Self(Default::default())
2060 }
2061 }
2062 impl LaneAttributesBike {
2063 pub fn get_bike_revocable_lane(&self) -> bool {
2064 self.0[0]
2065 }
2066 pub fn get_pedestrian_use_allowed(&self) -> bool {
2067 self.0[1]
2068 }
2069 pub fn get_is_bike_fly_over_lane(&self) -> bool {
2070 self.0[2]
2071 }
2072 pub fn get_fixed_cycle_time(&self) -> bool {
2073 self.0[3]
2074 }
2075 pub fn get_bi_directional_cycle_times(&self) -> bool {
2076 self.0[4]
2077 }
2078 pub fn get_isolated_by_barrier(&self) -> bool {
2079 self.0[5]
2080 }
2081 pub fn get_unsignalized_segments_present(&self) -> bool {
2082 self.0[6]
2083 }
2084
2085 pub fn set_bike_revocable_lane(&mut self, value: bool) {
2086 self.0.set(0, value)
2087 }
2088 pub fn set_pedestrian_use_allowed(&mut self, value: bool) {
2089 self.0.set(1, value)
2090 }
2091 pub fn set_is_bike_fly_over_lane(&mut self, value: bool) {
2092 self.0.set(2, value)
2093 }
2094 pub fn set_fixed_cycle_time(&mut self, value: bool) {
2095 self.0.set(3, value)
2096 }
2097 pub fn set_bi_directional_cycle_times(&mut self, value: bool) {
2098 self.0.set(4, value)
2099 }
2100 pub fn set_isolated_by_barrier(&mut self, value: bool) {
2101 self.0.set(5, value)
2102 }
2103 pub fn set_unsignalized_segments_present(&mut self, value: bool) {
2104 self.0.set(6, value)
2105 }
2106 }
2107 impl core::fmt::Display for LaneAttributesBike {
2108 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2109 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2110
2111 if self.get_bike_revocable_lane() {
2112 items.push("bikeRevocableLane: 1".into());
2113 }
2114 if self.get_pedestrian_use_allowed() {
2115 items.push("pedestrianUseAllowed: 1".into());
2116 }
2117 if self.get_is_bike_fly_over_lane() {
2118 items.push("isBikeFlyOverLane: 1".into());
2119 }
2120 if self.get_fixed_cycle_time() {
2121 items.push("fixedCycleTime: 1".into());
2122 }
2123 if self.get_bi_directional_cycle_times() {
2124 items.push("biDirectionalCycleTimes: 1".into());
2125 }
2126 if self.get_isolated_by_barrier() {
2127 items.push("isolatedByBarrier: 1".into());
2128 }
2129 if self.get_unsignalized_segments_present() {
2130 items.push("unsignalizedSegmentsPresent: 1".into());
2131 }
2132
2133 write!(f, "{}", items.join(", "))
2134 }
2135 }
2136
2137 impl Default for LaneAttributesCrosswalk {
2138 fn default() -> Self {
2139 Self(Default::default())
2140 }
2141 }
2142 impl LaneAttributesCrosswalk {
2143 pub fn get_crosswalk_revocable_lane(&self) -> bool {
2144 self.0[0]
2145 }
2146 pub fn get_bicycle_use_allowed(&self) -> bool {
2147 self.0[1]
2148 }
2149 pub fn get_is_x_walk_fly_over_lane(&self) -> bool {
2150 self.0[2]
2151 }
2152 pub fn get_fixed_cycle_time(&self) -> bool {
2153 self.0[3]
2154 }
2155 pub fn get_bi_directional_cycle_times(&self) -> bool {
2156 self.0[4]
2157 }
2158 pub fn get_has_push_to_walk_button(&self) -> bool {
2159 self.0[5]
2160 }
2161 pub fn get_audio_support(&self) -> bool {
2162 self.0[6]
2163 }
2164 pub fn get_rf_signal_request_present(&self) -> bool {
2165 self.0[7]
2166 }
2167 pub fn get_unsignalized_segments_present(&self) -> bool {
2168 self.0[8]
2169 }
2170
2171 pub fn set_crosswalk_revocable_lane(&mut self, value: bool) {
2172 self.0.set(0, value)
2173 }
2174 pub fn set_bicycle_use_allowed(&mut self, value: bool) {
2175 self.0.set(1, value)
2176 }
2177 pub fn set_is_x_walk_fly_over_lane(&mut self, value: bool) {
2178 self.0.set(2, value)
2179 }
2180 pub fn set_fixed_cycle_time(&mut self, value: bool) {
2181 self.0.set(3, value)
2182 }
2183 pub fn set_bi_directional_cycle_times(&mut self, value: bool) {
2184 self.0.set(4, value)
2185 }
2186 pub fn set_has_push_to_walk_button(&mut self, value: bool) {
2187 self.0.set(5, value)
2188 }
2189 pub fn set_audio_support(&mut self, value: bool) {
2190 self.0.set(6, value)
2191 }
2192 pub fn set_rf_signal_request_present(&mut self, value: bool) {
2193 self.0.set(7, value)
2194 }
2195 pub fn set_unsignalized_segments_present(&mut self, value: bool) {
2196 self.0.set(8, value)
2197 }
2198 }
2199 impl core::fmt::Display for LaneAttributesCrosswalk {
2200 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2201 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2202
2203 if self.get_crosswalk_revocable_lane() {
2204 items.push("crosswalkRevocableLane: 1".into());
2205 }
2206 if self.get_bicycle_use_allowed() {
2207 items.push("bicyleUseAllowed: 1".into());
2208 }
2209 if self.get_is_x_walk_fly_over_lane() {
2210 items.push("isXwalkFlyOverLane: 1".into());
2211 }
2212 if self.get_fixed_cycle_time() {
2213 items.push("fixedCycleTime: 1".into());
2214 }
2215 if self.get_bi_directional_cycle_times() {
2216 items.push("biDirectionalCycleTimes: 1".into());
2217 }
2218 if self.get_has_push_to_walk_button() {
2219 items.push("hasPushToWalkButton: 1".into());
2220 }
2221 if self.get_audio_support() {
2222 items.push("audioSupport: 1".into());
2223 }
2224 if self.get_rf_signal_request_present() {
2225 items.push("rfSignalRequestPresent: 1".into());
2226 }
2227 if self.get_unsignalized_segments_present() {
2228 items.push("unsignalizedSegmentsPresent: 1".into());
2229 }
2230
2231 write!(f, "{}", items.join(", "))
2232 }
2233 }
2234
2235 impl Default for LaneAttributesParking {
2236 fn default() -> Self {
2237 Self(Default::default())
2238 }
2239 }
2240 impl LaneAttributesParking {
2241 pub fn get_parking_revocable_lane(&self) -> bool {
2242 self.0[0]
2243 }
2244 pub fn get_parallel_parking_in_use(&self) -> bool {
2245 self.0[1]
2246 }
2247 pub fn get_head_in_parking_in_use(&self) -> bool {
2248 self.0[2]
2249 }
2250 pub fn get_do_not_park_zone(&self) -> bool {
2251 self.0[3]
2252 }
2253 pub fn get_parking_for_bus_use(&self) -> bool {
2254 self.0[4]
2255 }
2256 pub fn get_parking_for_taxi_use(&self) -> bool {
2257 self.0[5]
2258 }
2259 pub fn get_no_public_parking_use(&self) -> bool {
2260 self.0[6]
2261 }
2262
2263 pub fn set_parking_revocable_lane(&mut self, value: bool) {
2264 self.0.set(0, value)
2265 }
2266 pub fn set_parallel_parking_in_use(&mut self, value: bool) {
2267 self.0.set(1, value)
2268 }
2269 pub fn set_head_in_parking_in_use(&mut self, value: bool) {
2270 self.0.set(2, value)
2271 }
2272 pub fn set_do_not_park_zone(&mut self, value: bool) {
2273 self.0.set(3, value)
2274 }
2275 pub fn set_parking_for_bus_use(&mut self, value: bool) {
2276 self.0.set(4, value)
2277 }
2278 pub fn set_parking_for_taxi_use(&mut self, value: bool) {
2279 self.0.set(5, value)
2280 }
2281 pub fn set_no_public_parking_use(&mut self, value: bool) {
2282 self.0.set(6, value)
2283 }
2284 }
2285 impl core::fmt::Display for LaneAttributesParking {
2286 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2287 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2288
2289 if self.get_parking_revocable_lane() {
2290 items.push("parkingRevocableLane: 1".into());
2291 }
2292 if self.get_parallel_parking_in_use() {
2293 items.push("parallelParkingInUse: 1".into());
2294 }
2295 if self.get_head_in_parking_in_use() {
2296 items.push("headInParkingInUse: 1".into());
2297 }
2298 if self.get_do_not_park_zone() {
2299 items.push("doNotParkZone: 1".into());
2300 }
2301 if self.get_parking_for_bus_use() {
2302 items.push("parkingForBusUse: 1".into());
2303 }
2304 if self.get_parking_for_taxi_use() {
2305 items.push("parkingForTaxiUse: 1".into());
2306 }
2307 if self.get_no_public_parking_use() {
2308 items.push("noPublicParkingUse: 1".into());
2309 }
2310
2311 write!(f, "{}", items.join(", "))
2312 }
2313 }
2314
2315 impl Default for LaneAttributesSidewalk {
2316 fn default() -> Self {
2317 Self(Default::default())
2318 }
2319 }
2320 impl LaneAttributesSidewalk {
2321 pub fn get_sidewalk_revocable_lane(&self) -> bool {
2322 self.0[0]
2323 }
2324 pub fn get_bicycle_use_allowed(&self) -> bool {
2325 self.0[1]
2326 }
2327 pub fn get_is_sidewalk_fly_over_lane(&self) -> bool {
2328 self.0[2]
2329 }
2330 pub fn get_walk_bikes(&self) -> bool {
2331 self.0[3]
2332 }
2333
2334 pub fn set_sidewalk_revocable_lane(&mut self, value: bool) {
2335 self.0.set(0, value)
2336 }
2337 pub fn set_bicycle_use_allowed(&mut self, value: bool) {
2338 self.0.set(1, value)
2339 }
2340 pub fn set_is_sidewalk_fly_over_lane(&mut self, value: bool) {
2341 self.0.set(2, value)
2342 }
2343 pub fn set_walk_bikes(&mut self, value: bool) {
2344 self.0.set(3, value)
2345 }
2346 }
2347 impl core::fmt::Display for LaneAttributesSidewalk {
2348 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2349 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2350
2351 if self.get_sidewalk_revocable_lane() {
2352 items.push("sidewalk-RevocableLane: 1".into());
2353 }
2354 if self.get_bicycle_use_allowed() {
2355 items.push("bicyleUseAllowed: 1".into());
2356 }
2357 if self.get_is_sidewalk_fly_over_lane() {
2358 items.push("isSidewalkFlyOverLane: 1".into());
2359 }
2360 if self.get_walk_bikes() {
2361 items.push("walkBikes: 1".into());
2362 }
2363
2364 write!(f, "{}", items.join(", "))
2365 }
2366 }
2367
2368 impl Default for LaneAttributesStriping {
2369 fn default() -> Self {
2370 Self(Default::default())
2371 }
2372 }
2373 impl LaneAttributesStriping {
2374 pub fn get_stripe_to_connecting_lanes_revocable_lane(&self) -> bool {
2375 self.0[0]
2376 }
2377 pub fn get_stripe_draw_on_left(&self) -> bool {
2378 self.0[1]
2379 }
2380 pub fn get_stripe_draw_on_right(&self) -> bool {
2381 self.0[2]
2382 }
2383 pub fn get_stripe_to_connecting_lanes_left(&self) -> bool {
2384 self.0[3]
2385 }
2386 pub fn get_stripe_to_connecting_lanes_right(&self) -> bool {
2387 self.0[4]
2388 }
2389 pub fn get_stripe_to_connecting_lanes_ahead(&self) -> bool {
2390 self.0[5]
2391 }
2392
2393 pub fn set_stripe_to_connecting_lanes_revocable_lane(&mut self, value: bool) {
2394 self.0.set(0, value)
2395 }
2396 pub fn set_stripe_draw_on_left(&mut self, value: bool) {
2397 self.0.set(1, value)
2398 }
2399 pub fn set_stripe_draw_on_right(&mut self, value: bool) {
2400 self.0.set(2, value)
2401 }
2402 pub fn set_stripe_to_connecting_lanes_left(&mut self, value: bool) {
2403 self.0.set(3, value)
2404 }
2405 pub fn set_stripe_to_connecting_lanes_right(&mut self, value: bool) {
2406 self.0.set(4, value)
2407 }
2408 pub fn set_stripe_to_connecting_lanes_ahead(&mut self, value: bool) {
2409 self.0.set(5, value)
2410 }
2411 }
2412 impl core::fmt::Display for LaneAttributesStriping {
2413 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2414 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2415
2416 if self.get_stripe_to_connecting_lanes_revocable_lane() {
2417 items.push("stripeToConnectingLanesRevocableLane: 1".into());
2418 }
2419 if self.get_stripe_draw_on_left() {
2420 items.push("stripeDrawOnLeft: 1".into());
2421 }
2422 if self.get_stripe_draw_on_right() {
2423 items.push("stripeDrawOnRight: 1".into());
2424 }
2425 if self.get_stripe_to_connecting_lanes_left() {
2426 items.push("stripeToConnectingLanesLeft: 1".into());
2427 }
2428 if self.get_stripe_to_connecting_lanes_right() {
2429 items.push("stripeToConnectingLanesRight: 1".into());
2430 }
2431 if self.get_stripe_to_connecting_lanes_ahead() {
2432 items.push("stripeToConnectingLanesAhead: 1".into());
2433 }
2434
2435 write!(f, "{}", items.join(", "))
2436 }
2437 }
2438
2439 impl Default for LaneAttributesTrackedVehicle {
2440 fn default() -> Self {
2441 Self(Default::default())
2442 }
2443 }
2444 impl LaneAttributesTrackedVehicle {
2445 pub fn get_spec_revocable_lane(&self) -> bool {
2446 self.0[0]
2447 }
2448 pub fn get_spec_commuter_rail_road_track(&self) -> bool {
2449 self.0[1]
2450 }
2451 pub fn get_spec_light_rail_road_track(&self) -> bool {
2452 self.0[2]
2453 }
2454 pub fn get_spec_heavy_rail_road_track(&self) -> bool {
2455 self.0[3]
2456 }
2457 pub fn get_spec_other_rail_type(&self) -> bool {
2458 self.0[4]
2459 }
2460
2461 pub fn set_spec_revocable_lane(&mut self, value: bool) {
2462 self.0.set(0, value)
2463 }
2464 pub fn set_spec_commuter_rail_road_track(&mut self, value: bool) {
2465 self.0.set(1, value)
2466 }
2467 pub fn set_spec_light_rail_road_track(&mut self, value: bool) {
2468 self.0.set(2, value)
2469 }
2470 pub fn set_spec_heavy_rail_road_track(&mut self, value: bool) {
2471 self.0.set(3, value)
2472 }
2473 pub fn set_spec_other_rail_type(&mut self, value: bool) {
2474 self.0.set(4, value)
2475 }
2476 }
2477 impl core::fmt::Display for LaneAttributesTrackedVehicle {
2478 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2479 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2480
2481 if self.get_spec_revocable_lane() {
2482 items.push("spec-RevocableLane: 1".into());
2483 }
2484 if self.get_spec_commuter_rail_road_track() {
2485 items.push("spec-commuterRailRoadTrack: 1".into());
2486 }
2487 if self.get_spec_light_rail_road_track() {
2488 items.push("spec-lightRailRoadTrack: 1".into());
2489 }
2490 if self.get_spec_heavy_rail_road_track() {
2491 items.push("spec-heavyRailRoadTrack: 1".into());
2492 }
2493 if self.get_spec_other_rail_type() {
2494 items.push("spec-otherRailType: 1".into());
2495 }
2496
2497 write!(f, "{}", items.join(", "))
2498 }
2499 }
2500
2501 impl Default for LaneAttributesVehicle {
2502 fn default() -> Self {
2503 Self(Default::default())
2504 }
2505 }
2506 impl LaneAttributesVehicle {
2507 pub fn get_is_vehicle_revocable_lane(&self) -> bool {
2508 self.0[0]
2509 }
2510 pub fn get_is_vehicle_fly_over_lane(&self) -> bool {
2511 self.0[1]
2512 }
2513 pub fn get_hov_lane_use_only(&self) -> bool {
2514 self.0[2]
2515 }
2516 pub fn get_restricted_to_bus_use(&self) -> bool {
2517 self.0[3]
2518 }
2519 pub fn get_restricted_to_taxi_use(&self) -> bool {
2520 self.0[4]
2521 }
2522 pub fn get_restricted_from_public_use(&self) -> bool {
2523 self.0[5]
2524 }
2525 pub fn get_has_irbeacon_coverage(&self) -> bool {
2526 self.0[6]
2527 }
2528 pub fn get_permission_on_request(&self) -> bool {
2529 self.0[7]
2530 }
2531
2532 pub fn set_is_vehicle_revocable_lane(&mut self, value: bool) {
2533 self.0.set(0, value)
2534 }
2535 pub fn set_is_vehicle_fly_over_lane(&mut self, value: bool) {
2536 self.0.set(1, value)
2537 }
2538 pub fn set_hov_lane_use_only(&mut self, value: bool) {
2539 self.0.set(2, value)
2540 }
2541 pub fn set_restricted_to_bus_use(&mut self, value: bool) {
2542 self.0.set(3, value)
2543 }
2544 pub fn set_restricted_to_taxi_use(&mut self, value: bool) {
2545 self.0.set(4, value)
2546 }
2547 pub fn set_restricted_from_public_use(&mut self, value: bool) {
2548 self.0.set(5, value)
2549 }
2550 pub fn set_has_irbeacon_coverage(&mut self, value: bool) {
2551 self.0.set(6, value)
2552 }
2553 pub fn set_permission_on_request(&mut self, value: bool) {
2554 self.0.set(7, value)
2555 }
2556 }
2557 impl core::fmt::Display for LaneAttributesVehicle {
2558 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2559 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2560
2561 if self.get_is_vehicle_revocable_lane() {
2562 items.push("isVehicleRevocableLane: 1".into());
2563 }
2564 if self.get_is_vehicle_fly_over_lane() {
2565 items.push("isVehicleFlyOverLane: 1".into());
2566 }
2567 if self.get_hov_lane_use_only() {
2568 items.push("hovLaneUseOnly: 1".into());
2569 }
2570 if self.get_restricted_to_bus_use() {
2571 items.push("restrictedToBusUse: 1".into());
2572 }
2573 if self.get_restricted_to_taxi_use() {
2574 items.push("restrictedToTaxiUse: 1".into());
2575 }
2576 if self.get_restricted_from_public_use() {
2577 items.push("restrictedFromPublicUse: 1".into());
2578 }
2579 if self.get_has_irbeacon_coverage() {
2580 items.push("hasIRbeaconCoverage: 1".into());
2581 }
2582 if self.get_permission_on_request() {
2583 items.push("permissionOnRequest: 1".into());
2584 }
2585
2586 write!(f, "{}", items.join(", "))
2587 }
2588 }
2589
2590 impl Default for LaneDirection {
2591 fn default() -> Self {
2592 Self(Default::default())
2593 }
2594 }
2595 impl LaneDirection {
2596 pub fn get_ingress_path(&self) -> bool {
2597 self.0[0]
2598 }
2599 pub fn get_egress_path(&self) -> bool {
2600 self.0[1]
2601 }
2602
2603 pub fn set_ingress_path(&mut self, value: bool) {
2604 self.0.set(0, value)
2605 }
2606 pub fn set_egress_path(&mut self, value: bool) {
2607 self.0.set(1, value)
2608 }
2609 }
2610 impl core::fmt::Display for LaneDirection {
2611 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2612 write!(
2613 f,
2614 "ingressPath: {}, egressPath: {}",
2615 self.get_ingress_path(),
2616 self.get_egress_path()
2617 )
2618 }
2619 }
2620
2621 impl Default for TransitVehicleStatus {
2622 fn default() -> Self {
2623 Self(Default::default())
2624 }
2625 }
2626 impl TransitVehicleStatus {
2627 pub fn get_loading(&self) -> bool {
2628 self.0[0]
2629 }
2630 pub fn get_an_ada_use(&self) -> bool {
2631 self.0[1]
2632 }
2633 pub fn get_a_bike_load(&self) -> bool {
2634 self.0[2]
2635 }
2636 pub fn get_door_open(&self) -> bool {
2637 self.0[3]
2638 }
2639 pub fn get_charging(&self) -> bool {
2640 self.0[4]
2641 }
2642
2643 pub fn set_loading(&mut self, value: bool) {
2644 self.0.set(0, value)
2645 }
2646 pub fn set_an_ada_use(&mut self, value: bool) {
2647 self.0.set(1, value)
2648 }
2649 pub fn set_a_bike_load(&mut self, value: bool) {
2650 self.0.set(2, value)
2651 }
2652 pub fn set_door_open(&mut self, value: bool) {
2653 self.0.set(3, value)
2654 }
2655 pub fn set_charging(&mut self, value: bool) {
2656 self.0.set(4, value)
2657 }
2658 }
2659 impl core::fmt::Display for TransitVehicleStatus {
2660 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2661 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2662
2663 if self.get_loading() {
2664 items.push("loading: 1".into());
2665 }
2666 if self.get_an_ada_use() {
2667 items.push("anADAuse: 1".into());
2668 }
2669 if self.get_a_bike_load() {
2670 items.push("aBikeLoad: 1".into());
2671 }
2672 if self.get_door_open() {
2673 items.push("doorOpen: 1".into());
2674 }
2675 if self.get_charging() {
2676 items.push("charging: 1".into());
2677 }
2678
2679 write!(f, "{}", items.join(", "))
2680 }
2681 }
2682
2683 impl TryFrom<alloc::string::String>
2684 for crate::standards::dsrc_2_2_1::etsi_its_dsrc::DescriptiveName
2685 {
2686 type Error = alloc::string::String;
2687
2688 fn try_from(value: alloc::string::String) -> Result<Self, Self::Error> {
2689 Ok(Self(
2690 Ia5String::from_iso646_bytes(value.as_bytes())
2691 .map_err(|err| alloc::format!("Failed to create DescriptiveName: {err}"))?,
2692 ))
2693 }
2694 }
2695
2696 impl Default for OcitRequestorDescriptionContainer {
2697 fn default() -> Self {
2698 Self::new(None, None, None, None, None, None, None, None)
2699 }
2700 }
2701}
2702
2703#[cfg(feature = "ivim_2_2_1")]
2704pub mod ivim_2_2_1 {
2711 use crate::standards::ivim_2_2_1::gdd::DayOfWeek;
2712
2713 impl Default for DayOfWeek {
2714 fn default() -> Self {
2715 Self(Default::default())
2716 }
2717 }
2718 impl DayOfWeek {
2719 pub fn get_unused(&self) -> bool {
2720 self.0[0]
2721 }
2722 pub fn get_monday(&self) -> bool {
2723 self.0[1]
2724 }
2725 pub fn get_tuesday(&self) -> bool {
2726 self.0[2]
2727 }
2728 pub fn get_wednesday(&self) -> bool {
2729 self.0[3]
2730 }
2731 pub fn get_thursday(&self) -> bool {
2732 self.0[4]
2733 }
2734 pub fn get_friday(&self) -> bool {
2735 self.0[5]
2736 }
2737 pub fn get_saturday(&self) -> bool {
2738 self.0[6]
2739 }
2740 pub fn get_sunday(&self) -> bool {
2741 self.0[7]
2742 }
2743
2744 pub fn set_unused(&mut self, value: bool) {
2745 self.0.set(0, value)
2746 }
2747 pub fn set_monday(&mut self, value: bool) {
2748 self.0.set(1, value)
2749 }
2750 pub fn set_tuesday(&mut self, value: bool) {
2751 self.0.set(2, value)
2752 }
2753 pub fn set_wednesday(&mut self, value: bool) {
2754 self.0.set(3, value)
2755 }
2756 pub fn set_thursday(&mut self, value: bool) {
2757 self.0.set(4, value)
2758 }
2759 pub fn set_friday(&mut self, value: bool) {
2760 self.0.set(5, value)
2761 }
2762 pub fn set_saturday(&mut self, value: bool) {
2763 self.0.set(6, value)
2764 }
2765 pub fn set_sunday(&mut self, value: bool) {
2766 self.0.set(7, value)
2767 }
2768 }
2769 impl core::fmt::Display for DayOfWeek {
2770 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2771 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2772
2773 if self.get_unused() {
2774 items.push("unused: 1".into());
2775 }
2776 if self.get_monday() {
2777 items.push("monday: 1".into());
2778 }
2779 if self.get_tuesday() {
2780 items.push("tuesday: 1".into());
2781 }
2782 if self.get_wednesday() {
2783 items.push("wednesday: 1".into());
2784 }
2785 if self.get_thursday() {
2786 items.push("thursday: 1".into());
2787 }
2788 if self.get_friday() {
2789 items.push("friday: 1".into());
2790 }
2791 if self.get_saturday() {
2792 items.push("saturday: 1".into());
2793 }
2794 if self.get_sunday() {
2795 items.push("sunday: 1".into());
2796 }
2797
2798 write!(f, "{}", items.join(", "))
2799 }
2800 }
2801
2802 mod gdd {
2803 use crate::standards::ivim_2_2_1::gdd::RepeatingPeriodDayTypes;
2804
2805 impl Default for RepeatingPeriodDayTypes {
2806 fn default() -> Self {
2807 Self(Default::default())
2808 }
2809 }
2810 impl RepeatingPeriodDayTypes {
2811 pub fn get_national_holiday(&self) -> bool {
2812 self.0[0]
2813 }
2814 pub fn get_even_days(&self) -> bool {
2815 self.0[1]
2816 }
2817 pub fn get_odd_days(&self) -> bool {
2818 self.0[2]
2819 }
2820 pub fn get_market_day(&self) -> bool {
2821 self.0[3]
2822 }
2823
2824 pub fn set_national_holiday(&mut self, value: bool) {
2825 self.0.set(0, value)
2826 }
2827 pub fn set_even_days(&mut self, value: bool) {
2828 self.0.set(1, value)
2829 }
2830 pub fn set_odd_days(&mut self, value: bool) {
2831 self.0.set(2, value)
2832 }
2833 pub fn set_market_day(&mut self, value: bool) {
2834 self.0.set(3, value)
2835 }
2836 }
2837 impl core::fmt::Display for RepeatingPeriodDayTypes {
2838 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2839 let mut items = alloc::vec::Vec::<alloc::string::String>::new();
2840
2841 if self.get_national_holiday() {
2842 items.push("national-holiday: 1".into());
2843 }
2844 if self.get_even_days() {
2845 items.push("even-days: 1".into());
2846 }
2847 if self.get_odd_days() {
2848 items.push("odd-days: 1".into());
2849 }
2850 if self.get_market_day() {
2851 items.push("market-day: 1".into());
2852 }
2853
2854 write!(f, "{}", items.join(", "))
2855 }
2856 }
2857 }
2858}