#[repr(C)]pub struct PamojaLorawanHeader {}Expand description
What a frame says about itself before any key is involved.
Every field is a scalar, so this crosses the boundary by value. is_data is
1 when dev_addr and fcnt are meaningful, which is every message type
except the two join frames, and has_fport is 1 when fport is.
Nothing here is authenticated, since checking the MIC needs the session key.
Treat it as a routing hint until pamoja_lorawan_session_decode has verified
the frame.
Fields§
§payload_len: usizeThe length of the still-encrypted payload, in bytes.
dev_addr: u32The device address, meaningful only when is_data is 1.
fcnt: u16The low 16 bits of the frame counter, meaningful only when is_data is 1.
message_type: PamojaLorawanMessageTypeWhat kind of message the frame is.
fport: u8The port the frame was sent on, meaningful only when has_fport is 1.
is_data: u81 for a data frame, 0 for one of the two join frames.
has_fport: u81 when the frame carries a port rather than only frame options.
confirmed: u81 when the frame asks to be acknowledged.
adr: u81 when the frame takes part in adaptive data rate.
ack: u81 when the frame acknowledges the last confirmed one.
fpending: u81 when the network has more downlink data waiting.
fopts_len: u8How many bytes of frame options the header carries, from 0 to 15.
adr_ack_req: u81 when an uplink asks the network to answer. Reserved on a downlink, which reads
0.
class_b: u81 when an uplink comes from a device running Class B.
Trait Implementations§
Source§impl Clone for PamojaLorawanHeader
impl Clone for PamojaLorawanHeader
Source§fn clone(&self) -> PamojaLorawanHeader
fn clone(&self) -> PamojaLorawanHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more