Expand description
Pure-Rust EN 50221 DVB Common Interface runtime — the driver loop over
the dvb_ci codecs.
dvb_ci is no_std and owns the wire layer (TPDU / SPDU / APDU
parse+serialize, CA_PMT building, CI Plus extensions). This crate adds the
runtime: device I/O, the TPDU poll loop, SPDU session management, and the
per-resource state machines that together drive a physical CAM, per
ETSI EN 50221 and TS 101 699.
§Design
The whole runtime is written against the CaDevice trait (the
hardware-abstraction boundary), so it runs against either:
- a real Linux CA device (
/dev/dvb/adapterN/caM, thelinuxfeature), or - the in-memory
MockCaDevice, which makes the state machines testable without hardware and enables differential testing against an external reference (drive both with the same scripted mock CAM and assert the emittedwrite/ioctl byte sequences match).
Implemented from the EN 50221 specification.
§Status
Foundation: the CaDevice abstraction + mock. The TPDU/SPDU/resource state
machines and the Linux device implementation land incrementally.
Re-exports§
pub use device::CaDevice;pub use device::DeviceOp;pub use device::MockCaDevice;pub use device::SlotInfo;pub use driver::Driver;pub use event::Action;pub use event::Event;pub use event::HostRequest;pub use event::Notification;pub use linux::LinuxCaDevice;pub use stack::CiStack;pub use dvb_ci;
Modules§
- device
- The hardware-abstraction boundary:
CaDevice. - driver
- The driver — the one place I/O happens. It pumps a
CaDeviceagainst the sans-IOCiStack: reads frames in, executes the stack’sActions (writes/ioctls) out, tracks the requested poll timer, and collectsNotifications for the host application. - event
- The sans-IO event/action model.
- linux
- Linux
/dev/dvb/adapterN/caMCaDeviceimplementation (thelinuxfeature). - resource
- The resource layer — application-layer state machines (ETSI EN 50221 §8), one per resource, driven by the session layer’s APDUs.
- session
- SPDU session layer — a sans-IO mechanism over the transport layer (ETSI EN 50221 §7.2).
- stack
- The CI protocol stack — composes the transport + session layers (and, as they land, the resource state machines) into one sans-IO core.
- transport
- TPDU transport layer — a sans-IO state machine for the single transport connection per CI slot (ETSI EN 50221 §A.4).