Skip to main content

Module transport

Module transport 

Source
Expand description

Transport layer: physical-medium abstraction and the HDLC and wrapper data-link sub-layers that carry xDLMS APDUs (IEC 62056-46 / IEC 62056-47). Transport layer for the DLMS/COSEM communication profiles.

The layer is split into two independent concerns:

  • crate::transport::PhysicalTransport — a bidirectional byte channel abstracting the concrete medium (serial line, TCP connection, UDP socket). It is provided by the user of the library.
  • crate::transport::DataLinkLayer — a framing sub-layer that carries xDLMS APDUs over a physical transport. Two implementations are provided (added in later commits): an HDLC layer usable over any medium, and a wrapper layer for TCP/UDP only.

Because the framing sub-layers are generic over the physical transport, the same HDLC implementation works over a serial line and over TCP, while the wrapper sub-layer is bounded on crate::transport::NetworkTransport so it can only be built over TCP/UDP.

Modules§

hdlc
The HDLC-based data link layer (IEC 62056-46, ISO/IEC 13239 frame format type 3).
wrapper
The DLMS/COSEM wrapper sub-layer (IEC 62056-47).

Structs§

MemoryTransport
An in-memory loopback transport, primarily for tests: bytes written with PhysicalTransport::send are read back by PhysicalTransport::receive.

Traits§

DataLinkLayer
A data link / framing sub-layer that carries xDLMS APDUs.
NetworkTransport
Marker trait for network transports (TCP/UDP).
PhysicalTransport
A bidirectional byte channel abstracting the physical medium.