[][src]Struct lorawan::maccommandcreator::RXParamSetupAnsCreator

pub struct RXParamSetupAnsCreator { /* fields omitted */ }

RXParamSetupAnsCreator serves for creating RXParamSetupAns MacCommand.

Examples

let mut creator = lorawan::maccommandcreator::RXParamSetupAnsCreator::new();
let res = creator
    .set_channel_ack(true)
    .set_rx2_data_rate_ack(true)
    .set_rx1_data_rate_offset_ack(true)
    .build();

Implementations

impl RXParamSetupAnsCreator[src]

pub fn new() -> Self[src]

Creates a new instance of the class.

pub fn build(&self) -> &[u8][src]

Returns the serialized version of the class as bytes.

impl RXParamSetupAnsCreator[src]

pub fn set_channel_ack(&mut self, ack: bool) -> &mut Self[src]

Sets the channel acknowledgement of the RXParamSetupAns to the provided value.

Argument

  • ack - true meaning that the channel was acceptable or false otherwise.

pub fn set_rx2_data_rate_ack(&mut self, ack: bool) -> &mut Self[src]

Sets the rx2 data rate acknowledgement of the RXParamSetupAns to the provided value.

Argument

  • ack - true meaning that the rx2 data rate was acceptable or false otherwise.

pub fn set_rx1_data_rate_offset_ack(&mut self, ack: bool) -> &mut Self[src]

Sets the rx1 data rate offset acknowledgement of the RXParamSetupAns to the provided value.

Argument

  • ack - true meaning that the rx1 data rate offset was acceptable or false otherwise.

Trait Implementations

impl Default for RXParamSetupAnsCreator[src]

impl SerializableMacCommand for RXParamSetupAnsCreator[src]

fn payload_bytes(&self) -> &[u8][src]

Bytes of the SerializableMacCommand without the cid.

fn cid(&self) -> u8[src]

The cid of the SerializableMacCommand.

fn payload_len(&self) -> usize[src]

Length of the SerializableMacCommand without the cid.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.