Public Attributes | List of all members
MQTTClient_willOptions Struct Reference

#include <MQTTClient.h>

Public Attributes

const char * message
 
struct {
   const void *   data
 
   int   len
 
payload
 
int qos
 
int retained
 
char struct_id [4]
 
int struct_version
 
const char * topicName
 

Detailed Description

MQTTClient_willOptions defines the MQTT "Last Will and Testament" (LWT) settings for the client. In the event that a client unexpectedly loses its connection to the server, the server publishes the LWT message to the LWT topic on behalf of the client. This allows other clients (subscribed to the LWT topic) to be made aware that the client has disconnected. To enable the LWT function for a specific client, a valid pointer to an MQTTClient_willOptions structure is passed in the MQTTClient_connectOptions structure used in the MQTTClient_connect() call that connects the client to the server. The pointer to MQTTClient_willOptions can be set to NULL if the LWT function is not required.

Definition at line 610 of file MQTTClient.h.

Member Data Documentation

const void* MQTTClient_willOptions::data

binary payload data

Definition at line 635 of file MQTTClient.h.

int MQTTClient_willOptions::len

binary payload length

Definition at line 634 of file MQTTClient.h.

const char* MQTTClient_willOptions::message

The LWT payload in string form.

Definition at line 621 of file MQTTClient.h.

struct { ... } MQTTClient_willOptions::payload

The LWT payload in binary form. This is only checked and used if the message option is NULL

int MQTTClient_willOptions::qos

The quality of service setting for the LWT message (see MQTTClient_message.qos and qos).

Definition at line 630 of file MQTTClient.h.

int MQTTClient_willOptions::retained

The retained flag for the LWT message (see MQTTClient_message.retained).

Definition at line 625 of file MQTTClient.h.

char MQTTClient_willOptions::struct_id[4]

The eyecatcher for this structure. must be MQTW.

Definition at line 613 of file MQTTClient.h.

int MQTTClient_willOptions::struct_version

The version number of this structure. Must be 0 or 1 0 means there is no binary payload option

Definition at line 617 of file MQTTClient.h.

const char* MQTTClient_willOptions::topicName

The LWT topic to which the LWT message will be published.

Definition at line 619 of file MQTTClient.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49