1.2.3.7 SYS_MQTT_PublishConfig Struct

C

typedef struct
{
    //Qos (0/ 1/ 2)
    uint8_t qos;
    
    //Retain (0/1) - Message needs to be retained by the Broker till every subscriber receives it
    uint8_t retain;
    
    //Message to be Published
    uint8_t message[SYS_MQTT_MSG_MAX_LEN];
    
    //Message Length
    uint16_t messageLength;
    
    //Topic on which to Publish the message
    char *topicName;
    
    //Topic Length
    uint16_t topicLength;
} SYS_MQTT_PublishConfig;

Summary

Used for Reading the message that has been received on a topic subscribed to. The structure is also used for passing on the LWT config when connecting to MQTT Broker.

Remarks

This Message is passed to the Application via the SYS_MQTT_CALLBACK() function