pub struct SealedWor { /* private fields */ }Expand description
A wake-on-radio frame ahead of a Class A uplink, before its integrity code is checked.
Implementations§
Source§impl SealedWor
impl SealedWor
Sourcepub const fn wfcnt(&self) -> u16
pub const fn wfcnt(&self) -> u16
Returns the low sixteen bits of the frame counter the frame carries.
§Returns
The counter’s low bits, which a relay extends to the 32-bit counter it expects.
Sourcepub fn open(
&self,
keys: &WorKeys,
wfcnt: u32,
wor: Carrier,
) -> Result<Carrier, LorawanError>
pub fn open( &self, keys: &WorKeys, wfcnt: u32, wor: Carrier, ) -> Result<Carrier, LorawanError>
Checks the frame’s integrity code and decrypts where the uplink will follow.
§Arguments
keys- the device’s keys.wfcnt- the full 32-bit frame counter the relay takes the frame to carry.wor- the carrier the frame arrived on, which the encryption folds in.
§Returns
Where and how fast the uplink follows.
§Errors
Returns LorawanError::FcntMismatch for a counter whose low bits are not the
frame’s, and LorawanError::MicMismatch when the integrity code does not verify.
Trait Implementations§
impl Copy for SealedWor
impl Eq for SealedWor
impl StructuralPartialEq for SealedWor
Auto Trait Implementations§
impl Freeze for SealedWor
impl RefUnwindSafe for SealedWor
impl Send for SealedWor
impl Sync for SealedWor
impl Unpin for SealedWor
impl UnsafeUnpin for SealedWor
impl UnwindSafe for SealedWor
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