pub struct Uplink<'a> { /* private fields */ }Expand description
An uplink data frame to encode, built up from the fields a sender sets.
Construct one with new and turn on whatever applies; the rest default
off. A higher port carries application data; port 0 carries MAC commands.
§Examples
use pamoja_lorawan::Uplink;
let uplink = Uplink::new(7, 2, b"reading").confirmed().with_adr();Implementations§
Source§impl<'a> Uplink<'a>
impl<'a> Uplink<'a>
Sourcepub fn confirmed(self) -> Self
pub fn confirmed(self) -> Self
Marks the uplink as confirmed, asking the network to acknowledge it.
§Returns
The uplink, for chaining.
Sourcepub fn with_adr(self) -> Self
pub fn with_adr(self) -> Self
Sets the adaptive-data-rate bit, letting the network manage the data rate.
§Returns
The uplink, for chaining.
Sourcepub fn with_ack(self) -> Self
pub fn with_ack(self) -> Self
Sets the acknowledgement bit, confirming a previously received downlink.
§Returns
The uplink, for chaining.
Sourcepub fn with_fopts(self, fopts: &'a [u8]) -> Self
pub fn with_fopts(self, fopts: &'a [u8]) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Uplink<'a>
impl<'a> RefUnwindSafe for Uplink<'a>
impl<'a> Send for Uplink<'a>
impl<'a> Sync for Uplink<'a>
impl<'a> Unpin for Uplink<'a>
impl<'a> UnsafeUnpin for Uplink<'a>
impl<'a> UnwindSafe for Uplink<'a>
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