#[repr(C)]pub struct PamojaLorawanHeader {
pub payload_len: usize,
pub dev_addr: u32,
pub fcnt: u16,
pub message_type: PamojaLorawanMessageType,
pub fport: u8,
pub is_data: u8,
pub has_fport: u8,
pub confirmed: u8,
pub adr: u8,
pub ack: u8,
pub fpending: u8,
pub fopts_len: u8,
}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.
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 moreimpl Copy for PamojaLorawanHeader
Source§impl Debug for PamojaLorawanHeader
impl Debug for PamojaLorawanHeader
impl Eq for PamojaLorawanHeader
Source§impl PartialEq for PamojaLorawanHeader
impl PartialEq for PamojaLorawanHeader
Source§fn eq(&self, other: &PamojaLorawanHeader) -> bool
fn eq(&self, other: &PamojaLorawanHeader) -> bool
self and other values to be equal, and is used by ==.