coreMQTT v5.0.2
MQTT 5.0 Client Library
 
Loading...
Searching...
No Matches
Constants

Constants defined in the MQTT library. More...

Macros

#define MQTT_PACKET_ID_INVALID   ( ( uint16_t ) 0U )
 Invalid packet identifier.
 
#define MQTT_SUB_UNSUB_MAX_VECTORS   ( 4U )
 Maximum number of vectors in subscribe and unsubscribe packet.
 
#define MQTT_PACKET_TYPE_CONNECT   ( ( uint8_t ) 0x10U )
 CONNECT (client-to-server).
 
#define MQTT_PACKET_TYPE_CONNACK   ( ( uint8_t ) 0x20U )
 CONNACK (server-to-client).
 
#define MQTT_PACKET_TYPE_PUBLISH   ( ( uint8_t ) 0x30U )
 PUBLISH (bidirectional).
 
#define MQTT_PACKET_TYPE_PUBACK   ( ( uint8_t ) 0x40U )
 PUBACK (bidirectional).
 
#define MQTT_PACKET_TYPE_PUBREC   ( ( uint8_t ) 0x50U )
 PUBREC (bidirectional).
 
#define MQTT_PACKET_TYPE_PUBREL   ( ( uint8_t ) 0x62U )
 PUBREL (bidirectional).
 
#define MQTT_PACKET_TYPE_PUBCOMP   ( ( uint8_t ) 0x70U )
 PUBCOMP (bidirectional).
 
#define MQTT_PACKET_TYPE_SUBSCRIBE   ( ( uint8_t ) 0x82U )
 SUBSCRIBE (client-to-server).
 
#define MQTT_PACKET_TYPE_SUBACK   ( ( uint8_t ) 0x90U )
 SUBACK (server-to-client).
 
#define MQTT_PACKET_TYPE_UNSUBSCRIBE   ( ( uint8_t ) 0xA2U )
 UNSUBSCRIBE (client-to-server).
 
#define MQTT_PACKET_TYPE_UNSUBACK   ( ( uint8_t ) 0xB0U )
 UNSUBACK (server-to-client).
 
#define MQTT_PACKET_TYPE_PINGREQ   ( ( uint8_t ) 0xC0U )
 PINGREQ (client-to-server).
 
#define MQTT_PACKET_TYPE_PINGRESP   ( ( uint8_t ) 0xD0U )
 PINGRESP (server-to-client).
 
#define MQTT_PACKET_TYPE_DISCONNECT   ( ( uint8_t ) 0xE0U )
 DISCONNECT (client-to-server).
 
#define MQTT_PACKET_TYPE_AUTH   ( ( uint8_t ) 0xF0U )
 AUTH (bidirectional).
 
#define MQTT_PROP_VALIDATE_CONNECT   ( &MQTT_PACKET_TYPE_CONNECT_VAL )
 Validate property for CONNECT.
 
#define MQTT_PROP_VALIDATE_PUBLISH   ( &MQTT_PACKET_TYPE_PUBLISH_VAL )
 Validate property for PUBLISH.
 
#define MQTT_PROP_VALIDATE_SUBSCRIBE   ( &MQTT_PACKET_TYPE_SUBSCRIBE_VAL )
 Validate property for SUBSCRIBE.
 
#define MQTT_PROP_VALIDATE_UNSUBSCRIBE   ( &MQTT_PACKET_TYPE_UNSUBSCRIBE_VAL )
 Validate property for UNSUBSCRIBE.
 
#define MQTT_PROP_VALIDATE_DISCONNECT   ( &MQTT_PACKET_TYPE_DISCONNECT_VAL )
 Validate property for DISCONNECT.
 
#define MQTT_PROP_NO_VALIDATE   ( NULL )
 Skip packet type validation.
 
#define MQTT_PUBLISH_ACK_PACKET_SIZE   ( 4UL )
 The size of MQTT PUBACK, PUBREC, PUBREL, and PUBCOMP packets, per MQTT spec.
 
#define MQTT_STATE_CURSOR_INITIALIZER   ( ( size_t ) 0 )
 Initializer value for an MQTTStateCursor_t, indicating a search should start at the beginning of a state record array.
 

Variables

static const uint8_t MQTT_PACKET_TYPE_CONNECT_VAL = ( uint8_t ) 0x10U
 Convenience pointers for the pOptionalMqttPacketType parameter of the MQTTPropAdd_* functions.
 
static const uint8_t MQTT_PACKET_TYPE_PUBLISH_VAL = ( uint8_t ) 0x30U
 PUBLISH value for property validation.
 
static const uint8_t MQTT_PACKET_TYPE_SUBSCRIBE_VAL = ( uint8_t ) 0x82U
 SUBSCRIBE value for property validation.
 
static const uint8_t MQTT_PACKET_TYPE_UNSUBSCRIBE_VAL = ( uint8_t ) 0xA2U
 UNSUBSCRIBE value for property validation.
 
static const uint8_t MQTT_PACKET_TYPE_DISCONNECT_VAL = ( uint8_t ) 0xE0U
 DISCONNECT value for property validation.
 

Detailed Description

Constants defined in the MQTT library.

Macro Definition Documentation

◆ MQTT_PACKET_ID_INVALID

#define MQTT_PACKET_ID_INVALID   ( ( uint16_t ) 0U )

Invalid packet identifier.

Zero is an invalid packet identifier as per MQTT 5.0 spec.

Variable Documentation

◆ MQTT_PACKET_TYPE_CONNECT_VAL

const uint8_t MQTT_PACKET_TYPE_CONNECT_VAL = ( uint8_t ) 0x10U
static

Convenience pointers for the pOptionalMqttPacketType parameter of the MQTTPropAdd_* functions.

Pass one of these to enable runtime validation that a property is allowed in the intended packet type. Pass MQTT_PROP_NO_VALIDATE (NULL) to skip validation.

MQTTStatus_t MQTTPropAdd_PayloadFormat(MQTTPropBuilder_t *pPropertyBuilder, bool payloadFormat, const uint8_t *pOptionalMqttPacketType)
Adds Payload Format Indicator property to the MQTT property builder.
Definition: core_mqtt_prop_serializer.c:987
MQTTStatus_t MQTTPropAdd_SessionExpiry(MQTTPropBuilder_t *pPropertyBuilder, uint32_t sessionExpiry, const uint8_t *pOptionalMqttPacketType)
Adds Session Expiry Interval property to the MQTT property builder.
Definition: core_mqtt_prop_serializer.c:803
MQTTStatus_t MQTTPropAdd_UserProp(MQTTPropBuilder_t *pPropertyBuilder, const MQTTUserProperty_t *userProperty, const uint8_t *pOptionalMqttPacketType)
Adds User Property to the MQTT property builder.
Definition: core_mqtt_prop_serializer.c:692
#define MQTT_PROP_NO_VALIDATE
Skip packet type validation.
Definition: core_mqtt_serializer.h:120
#define MQTT_PROP_VALIDATE_CONNECT
Validate property for CONNECT.
Definition: core_mqtt_serializer.h:115
#define MQTT_PROP_VALIDATE_PUBLISH
Validate property for PUBLISH.
Definition: core_mqtt_serializer.h:116

CONNECT value for property validation.