Skip to main content

Module cbr

Module cbr 

Source
Expand description

Channel Busy Ratio (CBR) sources for the DCC entity.

The DCC algorithms of ETSI TS 102 687 V1.2.1 (2018-04) are access-technology independent, but the CBR they consume is measured by the access layer (clause 5.2). This module decouples the two through the CbrProvider trait, which the DccEntity polls once per evaluation.

Provided implementations:

  • SharedCbr: a thread-safe cell for access layers that push CBR measurements (e.g. a radio SDK callback or an external process).
  • Nl80211SurveyCbr: derives CBR on Linux IEEE 802.11p (ITS-G5) interfaces from the nl80211 channel survey counters (iw dev <iface> survey dump).

Mirrors flexstack/management/cbr.py.

Structs§

Nl80211SurveyCbr
CBR provider for Linux IEEE 802.11p (ITS-G5) interfaces based on nl80211 channel survey counters, as exposed by e.g. the ath9k driver.
SharedCbr
Thread-safe CBR cell for push-based access layers.
SurveySample
Cumulative channel-time counters of the in-use channel, in milliseconds.

Traits§

CbrProvider
A source of Channel Busy Ratio measurements.

Functions§

cbr_from_samples
CBR between two consecutive survey samples: Δbusy / Δactive, clamped to [0, 1].
nl80211_tx_power_dbm
Transmit power of a Linux wireless interface (iw dev <iface> info), if reported; e.g. for the DCC-MCO field of DCC_NET.
parse_survey_dump
Parse the output of iw dev <iface> survey dump and return the counters of the channel marked [in use].
parse_tx_power_dbm
Transmit power in dBm from the output of iw dev <iface> info (txpower 20.00 dBm).