FreeRTOS
Macros
Macros to define MQTT fixed header size.

Macros

#define mqttREMAINING_LENGTH_MAX_BYTES   4
 
#define mqttREMAINING_LENGTH_MIN_BYTES   1
 
#define mqttFIXED_HEADER_MAX_SIZE   ( 1 + mqttREMAINING_LENGTH_MAX_BYTES )
 
#define mqttFIXED_HEADER_MIN_SIZE   ( 1 + mqttREMAINING_LENGTH_MIN_BYTES )
 

Detailed Description

Each MQTT message starts with a fixed header. The first byte contains the message type and related flags. The next 1-4 bytes contain the length of the packet excluding the length of fixed header (namely "Remaining Length"). "Remaining Length" field can span up to 4 bytes, so the maximum length of MQTT fixed header can be 5 bytes and minimum length can be 2 bytes.

Macro Definition Documentation

◆ mqttREMAINING_LENGTH_MAX_BYTES

#define mqttREMAINING_LENGTH_MAX_BYTES   4

Remaining Length field can span maximum 4 bytes.

Definition at line 56 of file aws_mqtt_lib.h.

◆ mqttREMAINING_LENGTH_MIN_BYTES

#define mqttREMAINING_LENGTH_MIN_BYTES   1

Remaining Length field must be of at least 1 byte.

Definition at line 57 of file aws_mqtt_lib.h.