radio_mux

Function radio_mux 

Source
pub async fn radio_mux<M, const RX: usize, const TX: usize>(
    real: &'static Channels<M, RX, TX>,
    clients: &'static [&'static Channels<M, RX, TX>],
    mode: &'static MuxMode,
    stats: Option<&'static StatsLedger>,
) -> !
where M: RawMutex,
Expand description

Run the multiplexer over the real radio Channels bundle.

real must be the bundle served by the radio runner, and the mux must be that bundle’s only client. Each entry in clients is one virtual bundle, owned (RX-drained and TX-fed) by exactly one radio client. clients[0] must be the ULCP session; the rest are on the medium.

§Counting

This is the only place on a device where every frame that reaches the air, and every frame that comes off it, passes exactly once no matter which client owns it — the ULCP session transmits straight to the radio and never touches the device node’s MAC — so stats is tallied here rather than anywhere further up. A board with no ledger passes None.