[−][src]Struct lorawan::maccommands::DevStatusAnsPayload
DevStatusAnsPayload represents the DevStatusAns LoRaWAN MACCommand.
Implementations
impl<'a> DevStatusAnsPayload<'a>
[src]
pub fn new<'b>(data: &'a [u8]) -> Result<DevStatusAnsPayload<'a>, &'b str>
[src]
Creates a new instance of the mac command if there is enought data.
pub fn new_as_mac_cmd<'b>(
data: &'a [u8]
) -> Result<(MacCommand<'a>, usize), &'b str>
[src]
data: &'a [u8]
) -> Result<(MacCommand<'a>, usize), &'b str>
pub const fn cid() -> u8
[src]
Command identifier.
pub const fn uplink() -> bool
[src]
Sent by end device or sent by network server.
pub const fn len() -> usize
[src]
length of the payload of the mac command.
impl<'a> DevStatusAnsPayload<'a>
[src]
pub fn battery(&self) -> u8
[src]
The battery level of the device.
Note: 0 means that the device is powered by an external source, 255 means that the device was unable to measure its battery level, any other value represents the actual battery level.
pub fn margin(&self) -> i8
[src]
The margin is the demodulation signal-to-noise ratio in dB rounded to the nearest integer value for the last successfully received DevStatusReq command.
Trait Implementations
impl<'a> Debug for DevStatusAnsPayload<'a>
[src]
impl<'a> PartialEq<DevStatusAnsPayload<'a>> for DevStatusAnsPayload<'a>
[src]
fn eq(&self, other: &DevStatusAnsPayload<'a>) -> bool
[src]
fn ne(&self, other: &DevStatusAnsPayload<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for DevStatusAnsPayload<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for DevStatusAnsPayload<'a>
impl<'a> Send for DevStatusAnsPayload<'a>
impl<'a> Sync for DevStatusAnsPayload<'a>
impl<'a> Unpin for DevStatusAnsPayload<'a>
impl<'a> UnwindSafe for DevStatusAnsPayload<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,