pub trait SecuredFrameNoDecryptRxClient {
    // Required method
    fn receive_secured_frame<'a>(
        &self,
        buf: &'a [u8],
        header: Header<'a>,
        lqi: u8,
        data_offset: usize,
        data_len: usize
    );
}
Expand description

Trait to be implemented by users of the IEEE 802.15.4 device that wish to receive frames possessing link layer security that remain secured (i.e. have not been decrypted). This allows the client to perform decryption on the frame. The callback is trigger whenever a valid frame is received. In this context, raw refers to receiving frames without processing the security of the frame. The SecuredFrameNoDecryptRxClient should not be used to pass frames to the higher layers of the network stack that expect unsecured frames.

Required Methods§

source

fn receive_secured_frame<'a>( &self, buf: &'a [u8], header: Header<'a>, lqi: u8, data_offset: usize, data_len: usize )

When a frame is received, this callback is triggered. The client only receives an immutable borrow of the buffer. All frames, regardless of their secured state, are exposed to the client.

  • buf: The entire buffer containing the frame, potentially also including extra bytes in front used for the physical layer.
  • header: A fully-parsed representation of the MAC header.
  • lqi: The link quality indicator of the received frame.
  • data_offset: Offset of the data payload relative to buf, so that the payload of the frame is contained in buf[data_offset..data_offset + data_len].
  • data_len: Length of the data payload

Implementors§