Skip to main content

DataLinkLayer

Trait DataLinkLayer 

Source
pub trait DataLinkLayer {
    // Required methods
    fn send_apdu(&mut self, apdu: &[u8]) -> Result<()>;
    fn receive_apdu(&mut self) -> Result<Vec<u8>>;

    // Provided method
    fn client_sap(&self) -> Option<u8> { ... }
}
Expand description

A data link / framing sub-layer that carries xDLMS APDUs.

Implemented by the HDLC and wrapper sub-layers.

Required Methods§

Source

fn send_apdu(&mut self, apdu: &[u8]) -> Result<()>

Frames and sends one APDU.

Source

fn receive_apdu(&mut self) -> Result<Vec<u8>>

Receives and de-frames one APDU.

Provided Methods§

Source

fn client_sap(&self) -> Option<u8>

Client SAP learned from the data-link peer address, when known.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§