Module meshcore

Module meshcore 

Source
Expand description

The MeshCore forwarder: a third radio client beside the session and the device node, forwarding MeshCore v1 traffic the way a MeshCore repeater does.

The forwarding decisions are [umsh_meshcore_forwarder]’s. This module is what makes it a device: its virtual mux bundle (MESHCORE_CH), the shared duty ledger and the CAD gate on its transmits, the busy backoff it shares with the UMSH MAC, and the device-domain settings that say whether it runs at all.

It runs only while all of these hold:

  • the radio is enabled (PROP_PHY_ENABLED);
  • MeshCore forwarding is enabled (PROP_MESHCORE_FORWARDING_ENABLED), on its own: the device node’s repeater has its own switch;
  • the identity it was brought up under has a public key MeshCore lets a repeater run under.

When any of them stops holding, everything the forwarder had seen and queued is forgotten. Its receive queue is drained regardless: the mux hands every client a copy of each frame, and in backhaul mode a full queue here would refuse the host’s own transmissions.

The only identity input is the public key, which supplies this node’s path entries. The forwarder signs nothing and originates nothing.

Structs§

MeshCoreStorage
The forwarder’s bulk state: its duplicate memory, its delay queue, the frame being transmitted, and its generator. A few kilobytes of plain data, which a board places where its RAM allows—external RAM where it has some—and hands to forwarder_loop.

Statics§

MESHCORE_CH
The forwarder’s virtual radio bundle (a mux client after the device node). Static whether or not the forwarder is running, like crate::device_node::NODE_CH.
MESHCORE_RESEED
Fresh seeds for the forwarder’s generator, from a board that harvests entropy after boot.

Functions§

derive_seed
The forwarder’s generator seed, derived from the device node’s.
forwarder_loop
Run the forwarder in storage, built for the identity whose public key is public_key.