Skip to main content

Module layer

Module layer 

Source
Expand description

A layer between the scheduler and the medium (#157): a transform over SDUs with no I/O of its own.

Encryption (#158), a peer address on a shared channel (#160), fragmentation below Zenoh’s establishment floor (#162), forward error correction (#161), compression (#163): each is a function of its own state over opaque SDUs. A layer never awaits, never owns a task or a socket, and never forwards a method, because it is not a Medium. One Stack in the driver composes the configured layers into the single Medium the scheduler sees, and owns every piece of I/O once: backpressure, the receive loop, the timers. See docs/design/sdu-layers.md §1–§3; the reason is this workspace’s own history of hand-written decorators (#50, #51, #52).

What stays absolute: a layer never parses a Zenoh batch (I1), never retransmits (architecture §4.13), and never claims a property it does not provide, for reliability (I2) or security (I6). conformance::layer holds every layer to what that implies, without a runtime.

Structs§

LayerContext
What a layer is told about its place at construction: the device it serves, and where it may keep state it must not lose (#158’s counters), if the host gave the driver one.

Enums§

Decoded
What Layer::decode made of a frame.
LayerError
Why a layer refused to be built over what is below it, or refused an SDU.

Traits§

Layer
A synchronous transform over SDUs, composed by the driver’s Stack.

Type Aliases§

Frames
What a layer hands down or up: frames for the layer below, or SDUs for the layer above, each on a lane. One SDU may become several frames (a fragment layer, FEC repair) and one frame may become none (a reassembly in progress, a refused forgery).