Struct libits_client::reception::exchange::decentralized_environmental_notification_message::DecentralizedEnvironmentalNotificationMessage [−][src]
pub struct DecentralizedEnvironmentalNotificationMessage {
pub protocol_version: u8,
pub station_id: u32,
pub management_container: ManagementContainer,
pub situation_container: Option<SituationContainer>,
pub location_container: Option<LocationContainer>,
pub alacarte_container: Option<AlacarteContainer>,
}Fields
protocol_version: u8station_id: u32management_container: ManagementContainersituation_container: Option<SituationContainer>location_container: Option<LocationContainer>alacarte_container: Option<AlacarteContainer>Implementations
pub fn new_stationary_vehicle(
station_id: u32,
originating_station_id: u32,
event_position: ReferencePosition,
sequence_number: u16,
etsi_timestamp: u128,
event_position_heading: Option<u16>
) -> Self
pub fn new_stationary_vehicle(
station_id: u32,
originating_station_id: u32,
event_position: ReferencePosition,
sequence_number: u16,
etsi_timestamp: u128,
event_position_heading: Option<u16>
) -> Self
Create a new DecentralizedEnvironmentalNotificationMessage of cause 94 (Stationary Vehicle).
Arguments
station_id: the station idoriginating_station_id: the originating station idevent_position: the reference position of the eventsequence_number: the sequence numberetsi_timestamp: the timestamp on ETSI formatevent_position_heading: the heading of the reference position of he event
returns: DecentralizedEnvironmentalNotificationMessage The Stationary Vehicle DENM built using the provided elements.
Examples
use crate::reception::exchange::reference_position::ReferencePosition; let reference_timestamp = now() as u64; let denm = DecentralizedEnvironmentalNotificationMessage::new_stationary_vehicle(
pub fn new_traffic_condition(
station_id: u32,
originating_station_id: u32,
event_position: ReferencePosition,
sequence_number: u16,
etsi_timestamp: u128,
subcause: Option<u8>,
relevance_distance: Option<u8>,
relevance_traffic_direction: Option<u8>,
event_speed: Option<u16>,
event_position_heading: Option<u16>
) -> Self
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more