1.1.11.5 WDRV_WINC_MQTTLWTSet

Function

WDRV_WINC_STATUS WDRV_WINC_MQTTLWTSet
(
DRV_HANDLE handle,
const WDRV_WINC_MQTT_MSG_INFO *pMsgInfo,
const char *pTopicName,
const uint8_t *pTopicData,
size_t topicDataLen
)

Summary

Sets the MQTT LWT message.

Description

Configures the Last Will and Testament message to be sent with an MQTT connect.

Precondition

WDRV_WINC_Initialize should have been called. WDRV_WINC_Open should have been called to obtain a valid handle.

Parameters

handle - Client handle obtained by a call to WDRV_WINC_Open.

pMsgInfo - Pointer to message information if required.

pTopicName - Pointer to topic name.

pTopicData - Pointer to data to publish to topic.

topicDataLen - Length of data to publish.

Returns

WDRV_WINC_STATUS_OK - A scan was initiated.

WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.

WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected.

WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.

Remarks

This must be called before WDRV_WINC_MQTTConnect.