Struct lorawan::creator::JoinAcceptCreator
source · pub struct JoinAcceptCreator<D, F> { /* private fields */ }
Expand description
JoinAcceptCreator serves for creating binary representation of Physical Payload of JoinAccept.
Implementations§
source§impl<D: AsMut<[u8]>, F: CryptoFactory + Default> JoinAcceptCreator<D, F>
impl<D: AsMut<[u8]>, F: CryptoFactory + Default> JoinAcceptCreator<D, F>
sourcepub fn with_options(data: D, factory: F) -> Result<Self, Error>
pub fn with_options(data: D, factory: F) -> Result<Self, Error>
Creates a well initialized JoinAcceptCreator with specific data and crypto functions.
TODO: Add more details & and example
sourcepub fn set_app_nonce<H: AsRef<[u8]>, T: Into<AppNonce<H>>>(
&mut self,
app_nonce: T
) -> &mut Self
pub fn set_app_nonce<H: AsRef<[u8]>, T: Into<AppNonce<H>>>( &mut self, app_nonce: T ) -> &mut Self
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.
sourcepub fn set_net_id<H: AsRef<[u8]>, T: Into<NwkAddr<H>>>(
&mut self,
net_id: T
) -> &mut Self
pub fn set_net_id<H: AsRef<[u8]>, T: Into<NwkAddr<H>>>( &mut self, net_id: T ) -> &mut Self
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.
sourcepub fn set_dev_addr<H: AsRef<[u8]>, T: Into<DevAddr<H>>>(
&mut self,
dev_addr: T
) -> &mut Self
pub fn set_dev_addr<H: AsRef<[u8]>, T: Into<DevAddr<H>>>( &mut self, dev_addr: T ) -> &mut Self
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.
sourcepub fn set_dl_settings<T: Into<DLSettings>>(
&mut self,
dl_settings: T
) -> &mut Self
pub fn set_dl_settings<T: Into<DLSettings>>( &mut self, dl_settings: T ) -> &mut Self
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.
sourcepub fn set_rx_delay(&mut self, rx_delay: u8) -> &mut Self
pub fn set_rx_delay(&mut self, rx_delay: u8) -> &mut Self
Sets the RX delay of the JoinAccept to the provided value.
Argument
- rx_delay - the rx delay for the first receive window.
Trait Implementations§
Auto Trait Implementations§
impl<D, F> RefUnwindSafe for JoinAcceptCreator<D, F>where
D: RefUnwindSafe,
F: RefUnwindSafe,
impl<D, F> Send for JoinAcceptCreator<D, F>
impl<D, F> Sync for JoinAcceptCreator<D, F>
impl<D, F> Unpin for JoinAcceptCreator<D, F>
impl<D, F> UnwindSafe for JoinAcceptCreator<D, F>where
D: UnwindSafe,
F: UnwindSafe,
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