Rust Decentralized Environmental (DENM)
The rustflexstack::facilities::decentralized_environmental_notification_service module implements ETSI TS 103 831 V2.3.1 (Decentralized Environmental Notification Messages).
Components
denm_bindings: Rust types for the management, situation, location and à-la-carte containers.denm_coder:DenmCoder, the UPER encoder and decoder, and theDenmtype.den_protocol: the event table: action identifiers, update, cancellation and negation, the receiving message table.denm_transmission: repetition, validity and keep-alive forwarding.denm_reception: decodes received DENMs, checks their SSP and delivers them to the application and the LDM.
Encoding & Decoding DENMs
use rustflexstack::facilities::decentralized_environmental_notification_service::denm_coder::{Denm, DenmCoder};
let coder = DenmCoder::new();
let raw_bytes: Vec<u8> = vec![/* a received DENM */];
if let Ok(denm) = coder.decode(&raw_bytes) {
let action_id = &denm.denm.management.action_id;
println!("Action ID: station {:?}, sequence {:?}",
action_id.originating_station_id, action_id.sequence_number);
}
examples/denm_sender_receiver.rs triggers and receives DENMs over a complete stack.