[][src]Struct lorawan::creator::JoinAcceptCreator

pub struct JoinAcceptCreator<D, F> { /* fields omitted */ }

JoinAcceptCreator serves for creating binary representation of Physical Payload of JoinAccept.

Implementations

impl<D: AsMut<[u8]>, F: CryptoFactory + Default> JoinAcceptCreator<D, F>[src]

pub fn with_options<'a>(data: D, factory: F) -> Result<Self, &'a str>[src]

Creates a well initialized JoinAcceptCreator with specific data and crypto functions.

TODO: Add more detials & and example

pub fn set_app_nonce<H: AsRef<[u8]>, T: Into<AppNonce<H>>>(
    &mut self,
    app_nonce: T
) -> &mut Self
[src]

Sets the AppNonce of the JoinAccept to the provided value.

Argument

  • app_nonce - instance of lorawan::parser::AppNonce or anything that can be converted into it.

pub fn set_net_id<H: AsRef<[u8]>, T: Into<NwkAddr<H>>>(
    &mut self,
    net_id: T
) -> &mut Self
[src]

Sets the network ID of the JoinAccept to the provided value.

Argument

  • net_id - instance of lorawan::parser::NwkAddr or anything that can be converted into it.

pub fn set_dev_addr<H: AsRef<[u8]>, T: Into<DevAddr<H>>>(
    &mut self,
    dev_addr: T
) -> &mut Self
[src]

Sets the device address of the JoinAccept to the provided value.

Argument

  • dev_addr - instance of lorawan::parser::DevAddr or anything that can be converted into it.

pub fn set_dl_settings<T: Into<DLSettings>>(
    &mut self,
    dl_settings: T
) -> &mut Self
[src]

Sets the DLSettings of the JoinAccept to the provided value.

Argument

  • dl_settings - instance of lorawan::maccommands::DLSettings or anything that can be converted into it.

pub fn set_rx_delay(&mut self, rx_delay: u8) -> &mut Self[src]

Sets the RX delay of the JoinAccept to the provided value.

Argument

  • rx_delay - the rx delay for the first receive window.

pub fn set_c_f_list<'a, C: AsRef<[Frequency<'a>]>>(
    &mut self,
    list: C
) -> Result<&mut Self, &str>
[src]

Sets the CFList of the JoinAccept to the provided value.

Argument

  • ch_list - list of Frequences to be sent to the device.

pub fn build(&mut self, key: &AES128) -> Result<&[u8], &str>[src]

Provides the binary representation of the encrypted join accept physical payload with the MIC set.

Argument

  • key - the key to be used for encryption and setting the MIC.

Trait Implementations

impl<D: Default, F: Default> Default for JoinAcceptCreator<D, F>[src]

Auto Trait Implementations

impl<D, F> RefUnwindSafe for JoinAcceptCreator<D, F> where
    D: RefUnwindSafe,
    F: RefUnwindSafe

impl<D, F> Send for JoinAcceptCreator<D, F> where
    D: Send,
    F: Send

impl<D, F> Sync for JoinAcceptCreator<D, F> where
    D: Sync,
    F: Sync

impl<D, F> Unpin for JoinAcceptCreator<D, F> where
    D: Unpin,
    F: Unpin

impl<D, F> UnwindSafe for JoinAcceptCreator<D, F> where
    D: UnwindSafe,
    F: UnwindSafe

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.