#include <MQTTClient.h>
Public Attributes | |
int | dup |
int | msgid |
void * | payload |
int | payloadlen |
MQTTProperties | properties |
int | qos |
int | retained |
char | struct_id [4] |
int | struct_version |
A structure representing the payload and attributes of an MQTT message. The message topic is not part of this structure (see MQTTClient_publishMessage(), MQTTClient_publish(), MQTTClient_receive(), MQTTClient_freeMessage() and MQTTClient_messageArrived()).
Definition at line 266 of file MQTTClient.h.
int MQTTClient_message::dup |
The dup flag indicates whether or not this message is a duplicate. It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message.
Definition at line 316 of file MQTTClient.h.
int MQTTClient_message::msgid |
The message identifier is normally reserved for internal use by the MQTT client and server.
Definition at line 320 of file MQTTClient.h.
void* MQTTClient_message::payload |
A pointer to the payload of the MQTT message.
Definition at line 276 of file MQTTClient.h.
int MQTTClient_message::payloadlen |
The length of the MQTT message payload in bytes.
Definition at line 274 of file MQTTClient.h.
MQTTProperties MQTTClient_message::properties |
The MQTT V5 properties associated with the message.
Definition at line 324 of file MQTTClient.h.
int MQTTClient_message::qos |
The quality of service (QoS) assigned to the message. There are three levels of QoS:
Definition at line 290 of file MQTTClient.h.
int MQTTClient_message::retained |
The retained flag serves two purposes depending on whether the message it is associated with is being published or received.
retained = true
For messages being published, a true setting indicates that the MQTT server should retain a copy of the message. The message will then be transmitted to new subscribers to a topic that matches the message topic. For subscribers registering a new subscription, the flag being true indicates that the received message is not a new one, but one that has been retained by the MQTT server.
retained = false
For publishers, this indicates that this message should not be retained by the MQTT server. For subscribers, a false setting indicates this is a normal message, received as a result of it being published to the server.
Definition at line 309 of file MQTTClient.h.
char MQTTClient_message::struct_id[4] |
The eyecatcher for this structure. must be MQTM.
Definition at line 269 of file MQTTClient.h.
int MQTTClient_message::struct_version |
The version number of this structure. Must be 0 or 1 0 indicates no message properties
Definition at line 272 of file MQTTClient.h.