Expand description
DCC entity: couples a CbrProvider (access layer) with a DCC algorithm and
the facilities layer.
On each evaluation (every 200 ms, aligned to UTC-modulo-200 ms boundaries per ETSI TS 102 687 V1.2.1 clause 5.2) the entity:
- polls the CBR provider;
- runs the reactive (clause 5.3) or adaptive (clause 5.4) algorithm;
- converts the result into
T_GenCam_DCC, the minimum CAM generation interval provided to the CA basic service (ETSI TS 103 900 §6.1.3), bounded to[T_GenCamMin, T_GenCamMax] = [100, 1000]ms; - notifies every registered listener with the new
T_GenCam_DCC.
Conversion:
- Reactive:
T_GenCam_DCC = T_offof the current state (Annex A tables). - Adaptive:
T_GenCam_DCC = T_on / delta(gate interval of equation B.1).
Mirrors flexstack/management/dcc_entity.py.
§Example
use rustflexstack::management::{DccEntity, DccMode, SharedCbr};
let cbr = SharedCbr::new();
let mut dcc = DccEntity::new(DccMode::reactive(), Box::new(cbr.clone()));
// let ctm = ca_service.cam_transmission_management.clone();
// dcc.add_t_gen_cam_dcc_listener(move |ms| ctm.set_t_gen_cam_dcc(ms));
let handle = dcc.spawn();
cbr.report(0.45); // from the access layer
handle.stop();Structs§
- DccEntity
- DCC entity of the ITS-S management layer.
- DccEntity
Handle - Handle to a DCC entity running on a background thread.
- DccEntity
Output - Result of one DCC entity evaluation.
Enums§
- DccMode
- DCC algorithm selection.
Constants§
- DCC_
EVALUATION_ PERIOD_ MS - DCC evaluation period in milliseconds (clause 5.2).
- T_
GEN_ CAM_ DCC_ MAX_ MS - Upper bound of
T_GenCam_DCC(T_GenCamMax, ETSI TS 103 900 §6.1.3) [ms]. - T_
GEN_ CAM_ DCC_ MIN_ MS - Lower bound of
T_GenCam_DCC(T_GenCamMin, ETSI TS 103 900 §6.1.3) [ms].
Functions§
- clamp_
t_ gen_ cam_ dcc - Bound an interval in ms to
[T_GEN_CAM_DCC_MIN_MS, T_GEN_CAM_DCC_MAX_MS].