Skip to main content

Crate modem_device

Crate modem_device 

Source
Expand description

The seam between the driver and a medium.

This crate deliberately does not depend on zenoh, and CI holds that with a dependency-graph guard. The driver moves opaque batches and the medium moves opaque SDUs; the moment either could parse a key expression, the second policy plane the architecture forbids would exist (docs/architecture.md I1, §4.8).

Everything here describes a medium in terms a modem vendor would recognise — how big an SDU may be, whether it can transmit and receive at once, whether delivery is ordered and loss-free. Nothing here describes Zenoh.

Two traits since #117, split along the planes of docs/design/device-planes.md: Device is what the management plane serves — a report, events, a lifecycle, and later a configuration plane — and Medium: Device is the SDU data plane on top of it. A device whose data plane is the kernel’s is a Netdev: Device — named, served on the management plane, and never seen by the lanes.

Re-exports§

pub use action::Actions;
pub use config::Configure;

Modules§

action
Operator actions (#129): explicit, costed, never scheduled.
config
The configuration plane’s vocabulary (#125).
conformance
A conformance kit for device implementors (#131).

Structs§

Capabilities
What a medium can do, as the medium itself would describe it.
DeviceEvent
Something the medium wants to say when nobody is calling Medium::send.
DutyCycle
Why a medium is not transmitting, when the answer is “not yet”.
EndpointId
A remote endpoint reachable over the medium.
Identity
What a device is, with RFC 8348’s field names (#122).
LaneKey
The driver’s view of one QoS lane.
Metrics
Counters a medium exposes for telemetry.
NetdevStats
A network interface’s counters (#130), with RFC 8343’s names where Linux keeps exactly that counter and nothing else.
OperStatus
What a device says about whether it is working (#121).
Report
What a device says about itself, as far as it knows.

Enums§

AccessTechnology
The access technology a bearer is on (#123). Closed and #[non_exhaustive]: a value is added when a device produces it, and a reader that sees one it does not know treats it as text.
AdminState
RFC 2863’s administrative status: what was asked of the device.
DeviceError
Why a medium refused or failed an SDU.
Duplex
Whether the medium can transmit and receive simultaneously.
Edge
Which way a condition just went.
OperState
RFC 2863’s operational status — the states something here produces.
Registration
Where a bearer stands with its network (ModemManager’s 3GPP registration states; #123). A device that registers with nothing — a point-to-point radio — reports none.

Constants§

LENGTH_PREFIX
Zenoh’s own framing on the data path: a two-byte little-endian length before every batch, which the driver strips before the medium and re-adds after (docs/architecture.md §4.1). Stated here because a batch of N bytes puts N - 2 on the medium, and every document that names a max_batch_size has to add it back — the contract’s Capabilities does.

Traits§

Device
A device: anything the driver serves on the management plane.
Medium
A physical or simulated medium: the SDU data plane of a Device.
Netdev
A device whose data plane is the kernel’s: a network interface that Zenoh reaches over an ordinary TCP link bound to it (#118, #130).

Type Aliases§

Sdu
One service data unit: exactly what the medium carries in one transmission.