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 71 of file hdr.h.

#include <hdr.h>

Data Fields

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

Field Documentation

◆ 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 84 of file hdr.h.


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