Struct lorawan::maccommandcreator::DevStatusAnsCreator
source · pub struct DevStatusAnsCreator { /* private fields */ }
Expand description
DevStatusAnsCreator serves for creating DevStatusAns MacCommand.
Examples
let mut creator = lorawan::maccommandcreator::DevStatusAnsCreator::new();
let res = creator.set_battery(0xfe).set_margin(-32).unwrap().build();
Implementations§
source§impl DevStatusAnsCreator
impl DevStatusAnsCreator
sourcepub fn set_battery(&mut self, battery: u8) -> &mut Self
pub fn set_battery(&mut self, battery: u8) -> &mut Self
Sets the battery of the DevStatusAns to the provided value.
Argument
- battery - the value to be used as the battery level. 0 means external enery source, 1 and 254 are the smallest and biggest values of normal battery reading, while 255 indicates that the device failed to measure its battery level.
Trait Implementations§
source§impl Debug for DevStatusAnsCreator
impl Debug for DevStatusAnsCreator
source§impl Default for DevStatusAnsCreator
impl Default for DevStatusAnsCreator
Auto Trait Implementations§
impl RefUnwindSafe for DevStatusAnsCreator
impl Send for DevStatusAnsCreator
impl Sync for DevStatusAnsCreator
impl Unpin for DevStatusAnsCreator
impl UnwindSafe for DevStatusAnsCreator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more