[−][src]Struct lorawan::creator::JoinRequestCreator
JoinRequestCreator serves for creating binary representation of Physical Payload of JoinRequest.
Implementations
impl<D: AsMut<[u8]>, F: CryptoFactory> JoinRequestCreator<D, F>
[src]
pub fn with_options<'a>(data: D, factory: F) -> Result<Self, &'a str>
[src]
Creates a well initialized JoinRequestCreator with specific crypto functions.
pub fn set_app_eui<H: AsRef<[u8]>, T: Into<EUI64<H>>>(
&mut self,
app_eui: T
) -> &mut Self
[src]
&mut self,
app_eui: T
) -> &mut Self
Sets the application EUI of the JoinRequest to the provided value.
Argument
- app_eui - instance of lorawan::parser::EUI64 or anything that can be converted into it.
pub fn set_dev_eui<H: AsRef<[u8]>, T: Into<EUI64<H>>>(
&mut self,
dev_eui: T
) -> &mut Self
[src]
&mut self,
dev_eui: T
) -> &mut Self
Sets the device EUI of the JoinRequest to the provided value.
Argument
- dev_eui - instance of lorawan::parser::EUI64 or anything that can be converted into it.
pub fn set_dev_nonce<H: AsRef<[u8]>, T: Into<DevNonce<H>>>(
&mut self,
dev_nonce: T
) -> &mut Self
[src]
&mut self,
dev_nonce: T
) -> &mut Self
Sets the device nonce of the JoinRequest to the provided value.
Argument
- dev_nonce - instance of lorawan::parser::DevNonce or anything that can be converted into it.
pub fn build(&mut self, key: &AES128) -> Result<&[u8], &str>
[src]
Provides the binary representation of the JoinRequest physical payload with the MIC set.
Argument
- key - the key to be used for setting the MIC.
impl JoinRequestCreator<[u8; 23], DefaultFactory>
[src]
pub fn new() -> Self
[src]
Creates a well initialized JoinRequestCreator.
Examples
let mut phy = lorawan::creator::JoinRequestCreator::new(); let key = lorawan::keys::AES128([7; 16]); phy.set_app_eui(&[1; 8]); phy.set_dev_eui(&[2; 8]); phy.set_dev_nonce(&[3; 2]); let payload = phy.build(&key).unwrap();
Trait Implementations
impl<D: Default, F: Default> Default for JoinRequestCreator<D, F>
[src]
fn default() -> JoinRequestCreator<D, F>
[src]
Auto Trait Implementations
impl<D, F> RefUnwindSafe for JoinRequestCreator<D, F> where
D: RefUnwindSafe,
F: RefUnwindSafe,
D: RefUnwindSafe,
F: RefUnwindSafe,
impl<D, F> Send for JoinRequestCreator<D, F> where
D: Send,
F: Send,
D: Send,
F: Send,
impl<D, F> Sync for JoinRequestCreator<D, F> where
D: Sync,
F: Sync,
D: Sync,
F: Sync,
impl<D, F> Unpin for JoinRequestCreator<D, F> where
D: Unpin,
F: Unpin,
D: Unpin,
F: Unpin,
impl<D, F> UnwindSafe for JoinRequestCreator<D, F> where
D: UnwindSafe,
F: UnwindSafe,
D: UnwindSafe,
F: UnwindSafe,
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>,