Skip to main content

Module dcc_net

Module dcc_net 

Source
Expand description

DCC_NET: the GeoNetworking part of Decentralized Congestion Control over ITS-G5 (ETSI TS 103 836-4-2 V2.1.1 (2025-04), clauses 5 to 7).

  • DCC variables CBR_L_0_Hop, CBR_L_1_Hop, CBR_L_2_Hop and the global CBR_G, calculated every itsGNCBRGTriggerInterval with a random start offset (clauses 5.2 and 5.3);
  • Location Table Entry Extension for ITS-G5 (LocTEX-G5) per neighbour, soft-state with lifetime itsGnLifetimeLocTEX (clause 6.2);
  • the DCC-MCO field of the SHB Extended Header (clause 6.3.3, table 3).

The local CBR (CBR_L_0_Hop) is measured by the access layer and read from a CbrProvider, e.g. Nl80211SurveyCbr on a Linux ITS-G5 interface. CBR_G is published in DccNet::global_cbr (a SharedCbr) so that the DCC entity uses it as input (clause 5.3, DCC_CROSS).

Wiring on a Linux ITS-G5 interface:

ⓘ
use rustflexstack::geonet::dcc_net::DccNet;
use rustflexstack::management::cbr::{nl80211_tx_power_dbm, Nl80211SurveyCbr};
use rustflexstack::management::dcc_entity::{DccEntity, DccMode};

let dcc_net = DccNet::new(
    Some(Box::new(Nl80211SurveyCbr::new("wlan0"))),
    nl80211_tx_power_dbm("wlan0").unwrap_or(0.0),
);
let dcc = DccEntity::new(DccMode::reactive(), Box::new(dcc_net.global_cbr.clone()));
let (gn, ll_rx, btp_rx) = Router::spawn_with_dcc_net(mib, None, None, None, Some(dcc_net));

Mirrors flexstack/geonet/dcc_net.py.

Structs§

DccNet
DCC_NET entity of a GeoAdhoc router over ITS-G5.
LocTexG5
Location Table Entry Extension for ITS-G5 (clause 6.2.2).

Constants§

ITS_GN_CBR_G_TRIGGER_INTERVAL_MS
Annex A, table A.1: T_Trig [ms].
ITS_GN_CBR_LIFETIME_MS
Annex A, table A.1: T_Cbr [ms].
ITS_GN_CBR_TARGET
Annex A, table A.1: CBR_Target.
ITS_GN_LIFETIME_LOCTEX_MS
Annex A, table A.1: lifetime of the LocTEX-G5 [ms].

Functions§

decode_dcc_mco
(CBR_R_0_Hop, CBR_R_1_Hop, transmit power [dBm]) of a received DCC-MCO field, or None when the field is absent: a sender without DCC_NET leaves the four octets zero-filled (TS 103 836-4-1 reserved field).
encode_dcc_mco
DCC-MCO field (octets 40-43 of the SHB packet header, table 3): CBRs as floor(CBR x 255), transmit power in dBm clamped to [0, 31], octet 43 reserved for MCO.