Skip to main content

Module device

Module device 

Source
Expand description

The hardware-abstraction boundary: CaDevice.

EN 50221 runs over the Linux CA device (/dev/dvb/adapterN/caM): the application reads/writes the TPDU link-layer byte stream and issues a few ioctls (reset, slot info, capabilities). The runtime is written entirely against this trait so it can be driven by a real device (the linux feature) or by an in-memory mock — which is what makes the state machines testable without hardware, and enables differential testing against an external reference (feed both the same mock, compare the emitted write/ioctl sequences).

Structs§

MockCaDevice
In-memory CaDevice for tests and the differential harness.
RecordingCaDevice
A CaDevice decorator that records every frame in both directions (plus ioctls) for live-CAM diagnostics. Wrap a real device, run, then dump the log — or decode it with trace::decode_log — to get an annotated byte trace without hand-instrumenting the device:
SlotInfo
CA-device slot status (subset of the Linux ca_slot_info the runtime needs).

Enums§

DeviceOp
One recorded device operation, for assertions + differential testing.
LinkEvent
One link-layer event for diagnostics, captured in both directions by RecordingCaDevice.

Traits§

CaDevice
The link-layer device the EN 50221 runtime drives.