Expand description
Local Dynamic Map (LDM) facility.
Implements the ETSI TS 103 301 Local Dynamic Map in pure Rust, replacing
the Python reference’s TinyDB JSON-on-disk backend with a lock-guarded
in-memory HashMap.
§Architecture
┌──────────────────────────────────────────────────────────┐
│ LdmFacility │
│ │
│ IfLdm3 ──────────────────────────────────┐ │
│ (register/add/update/delete provider data) │ │
│ ▼ │
│ LdmService │
│ │ │
│ IfLdm4 ──────────────────────────────►─┤ │
│ (register/query/subscribe consumer) │ │
│ ▼ │
│ LdmStore │
│ (HashMap<u64, StoredRecord>) │
│ ▲ │
│ LdmMaintenance (1 Hz thread) │
└──────────────────────────────────────────────────────────┘§Quick start
use rustflexstack::facilities::local_dynamic_map::{LdmFacility, LdmHandle};
use rustflexstack::facilities::local_dynamic_map::ldm_types::{
RegisterDataConsumerReq, RequestDataObjectsReq,
};
use rustflexstack::facilities::local_dynamic_map::ldm_constants::ITS_AID_CAM;
// Parc Tecnològic del Vallès, 5 km radius
let ldm: LdmHandle = LdmFacility::new(415_520_000, 21_340_000, 5_000.0);
ldm.if_ldm_4.register_data_consumer(RegisterDataConsumerReq { application_id: ITS_AID_CAM });
let resp = ldm.if_ldm_4.request_data_objects(RequestDataObjectsReq {
application_id: ITS_AID_CAM,
data_object_types: vec![ITS_AID_CAM],
filter: None,
order: None,
max_results: None,
});
println!("LDM contains {} CAM record(s)", resp.data_objects.len());Re-exports§
pub use if_ldm_3::IfLdm3;pub use if_ldm_4::IfLdm4;pub use ldm_maintenance::AreaCenter;pub use ldm_storage::ItsDataObject;
Modules§
- if_
ldm_ 3 - IF.LDM.3 — Data Provider interface.
- if_
ldm_ 4 - IF.LDM.4 — Data Consumer interface.
- ldm_
constants - LDM constants — ITS-AID values, epoch offset and spatial helpers.
- ldm_
maintenance - LDM maintenance — background garbage-collection and subscription firing.
- ldm_
service - LDM service layer — business logic for insert, query, and subscriptions.
- ldm_
storage - LDM in-memory storage —
ItsDataObject,StoredRecord,LdmStore. - ldm_
types - ETSI IF.LDM.3 / IF.LDM.4 request and response types.
Structs§
- LdmFacility
- Top-level LDM facility.
Type Aliases§
- LdmHandle
- A cheaply-cloneable handle to a running LDM facility.