WisunPacketStatusRsp

Struct WisunPacketStatusRsp 

Source
pub struct WisunPacketStatusRsp(/* private fields */);
Expand description

Response for GetWisunPacketStatus command

Implementations§

Source§

impl WisunPacketStatusRsp

Source

pub fn new() -> Self

Create a new response buffer

Source

pub fn status(&mut self) -> Status

Return Status

Source

pub fn header(&self) -> u16

Raw 16bit received header

Source

pub fn pkt_len(&self) -> u16

Length of the last received packet in bytes (including optional data added in the FIFO, crc, …)

Source

pub fn rssi_avg(&self) -> u16

Average over last packet received of RSSI. Actual signal power is –rssi_avg/2 (dBm)

Source

pub fn rssi_sync(&self) -> u16

Latch RSSI value after syncword detection. Actual signal power is –rssi_sync/2 (dBm)

Source

pub fn syncword_idx(&self) -> bool

Index of detected syncword (0/1)

Source

pub fn lqi(&self) -> u8

Link quality indicator (0.25dB)

Trait Implementations§

Source§

impl AsMut<[u8]> for WisunPacketStatusRsp

Source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl Default for WisunPacketStatusRsp

Source§

fn default() -> WisunPacketStatusRsp

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.