Watch
0
0
Fork
You've already forked esp32-c_its-companion
0

WIP denm: Show warning symbol

TODO: Show distance to DENM?
This commit is contained in:
Jannik Beyerstedt 2026-09-07 13:41:48 +02:00
commit 91d3b0b5ee
10 changed files with 207 additions and 8 deletions

View file

@ -1,13 +1,14 @@
//! C-ITS DENM Evaluation
use c_its_parser::standards::cdd_2_2_1::etsi_its_cdd;
use c_its_parser::standards::denm_2_2_1::denm_pdu_description;
use log::info;
pub fn handle_denm(etsi: &denm_pdu_description::DENM) {
pub fn handle_denm(etsi: &denm_pdu_description::DENM) -> Option<etsi_its_cdd::CauseCodeChoice> {
let mgmt = &etsi.denm.management;
if mgmt.termination.is_some() {
return;
return None;
}
if let (Some(sit), Some(loc)) = (&etsi.denm.situation, &etsi.denm.location) {
@ -38,7 +39,11 @@ pub fn handle_denm(etsi: &denm_pdu_description::DENM) {
"DENN: {station_id}/{seq_num} CC {cc}/{scc} at {lat_deg:.3}°N, {lon_deg:.3}°E until {end_time:?}"
);
}
Some(sit.event_type.cc_and_scc.clone())
} else {
info!("DENM: One of situation or location container not available");
None
}
}