Type Alias Ieee802154ComponentMacDeviceType

Source
pub type Ieee802154ComponentMacDeviceType<R, A> = Framer<'static, AwakeMac<'static, R>, VirtualAES128CCM<'static, A>>;

Aliased Type§

struct Ieee802154ComponentMacDeviceType<R, A> { /* private fields */ }

Implementations

Source§

impl<'a, M, A> Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source

pub fn new( mac: &'a M, aes_ccm: &'a A, crypt_buf: SubSliceMut<'static, u8>, ) -> Framer<'a, M, A>

Source

pub fn set_key_procedure(&self, key_procedure: &'a dyn KeyProcedure)

Sets the IEEE 802.15.4 key lookup procedure to be used.

Source

pub fn set_device_procedure(&self, device_procedure: &'a dyn DeviceProcedure)

Sets the IEEE 802.15.4 key lookup procedure to be used.

Trait Implementations

Source§

impl<'a, M, A> CCMClient for Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source§

fn crypt_done( &self, buf: &'static mut [u8], res: Result<(), ErrorCode>, tag_is_valid: bool, )

res is Ok(()) if the encryption/decryption process succeeded. This does not mean that the message has been verified in the case of decryption. If we are encrypting: tag_is_valid is true iff res is Ok(()). If we are decrypting: tag_is_valid is true iff res is Ok(()) and the message authentication tag is valid.
Source§

impl<'a, M, A> ConfigClient for Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source§

fn config_done(&self, _: Result<(), ErrorCode>)

Configuring the radio has finished. Read more
Source§

impl<'a, M, A> MacDevice<'a> for Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source§

fn set_transmit_client(&self, client: &'a dyn TxClient)

Sets the transmission client of this MAC device
Source§

fn set_receive_client(&self, client: &'a dyn RxClient)

Sets the receive client of this MAC device
Source§

fn get_address(&self) -> u16

The short 16-bit address of the MAC device
Source§

fn get_address_long(&self) -> [u8; 8]

The long 64-bit address (EUI-64) of the MAC device
Source§

fn get_pan(&self) -> u16

The 16-bit PAN ID of the MAC device
Source§

fn set_address(&self, addr: u16)

Set the short 16-bit address of the MAC device
Source§

fn set_address_long(&self, addr: [u8; 8])

Set the long 64-bit address (EUI-64) of the MAC device
Source§

fn set_pan(&self, id: u16)

Set the 16-bit PAN ID of the MAC device
Source§

fn config_commit(&self)

This method must be called after one or more calls to set_*. If set_* is called without calling config_commit, there is no guarantee that the underlying hardware configuration (addresses, pan ID) is in line with this MAC device implementation.
Source§

fn is_on(&self) -> bool

Returns if the MAC device is currently on.
Source§

fn start(&self) -> Result<(), ErrorCode>

Start the radio. Read more
Source§

fn prepare_data_frame( &self, buf: &'static mut [u8], dst_pan: u16, dst_addr: MacAddress, src_pan: u16, src_addr: MacAddress, security_needed: Option<(SecurityLevel, KeyId)>, ) -> Result<Frame, &'static mut [u8]>

Prepares a mutable buffer slice as an 802.15.4 frame by writing the appropriate header bytes into the buffer. This needs to be done before adding the payload because the length of the header is not fixed. Read more
Source§

fn transmit(&self, frame: Frame) -> Result<(), (ErrorCode, &'static mut [u8])>

Transmits a frame that has been prepared by the above process. If the transmission process fails, the buffer inside the frame is returned so that it can be re-used.
Source§

impl<'a, M, A> RxClient for Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source§

fn receive( &self, buf: &'static mut [u8], frame_len: usize, lqi: u8, crc_valid: bool, _: Result<(), ErrorCode>, )

Packet was received. Read more
Source§

impl<'a, M, A> TxClient for Framer<'a, M, A>
where M: Mac<'a>, A: AES128CCM<'a>,

Source§

fn send_done( &self, buf: &'static mut [u8], acked: bool, result: Result<(), ErrorCode>, )

Send is complete or an error occurred during transmission. Read more