Loading...
Searching...
No Matches
lorawan_hdr_t Struct Reference

Data type to represent a LoRaWAN packet header. More...

Detailed Description

Data type to represent a LoRaWAN packet header.

     This definition includes MHDR and FHDR in the same structure.
     The structure of the header is as follows:
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|Mtype| RFU |Maj| LoRaWAN Address ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... | Frame Control | Frame Counter |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
See also
LoRaWAN spcefication, section 4

Definition at line 74 of file hdr.h.

#include <hdr.h>

Data Fields

uint8_t mt_maj
 message type and major version
 
le_uint32_t addr
 32 bit LoRaWAN address
 
uint8_t fctrl
 frame control
 
le_uint16_t fcnt
 frame counter
 

Field Documentation

◆ addr

le_uint32_t lorawan_hdr_t::addr

32 bit LoRaWAN address

Definition at line 88 of file hdr.h.

◆ fcnt

le_uint16_t lorawan_hdr_t::fcnt

frame counter

Definition at line 90 of file hdr.h.

◆ fctrl

uint8_t lorawan_hdr_t::fctrl

frame control

Definition at line 89 of file hdr.h.

◆ mt_maj

uint8_t lorawan_hdr_t::mt_maj

message type and major version

The message type are the 3 most significant bytes and the major version are the 2 less significant bytes. There are 3 bytes in the middle reserved for future usage. This module provides helper functions to set and get:

Definition at line 87 of file hdr.h.


The documentation for this struct was generated from the following file: