1.1.18.8.5 WDRV_WINC_MQTTLWTSet

C

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
)

Description

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

Precondition

WDRV_WINC_Initialize must have been called.

WDRV_WINC_Open must have been called to obtain a valid handle.

##Parameters

ParametersDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
pMsgInfoPointer to message information if required.
pTopicNamePointer to topic name.
pTopicDataPointer to data to publish to topic.
topicDataLenLength of data to publish.

Returns

  • WDRV_WINC_STATUS_OK - A LWT update was sent.

  • 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.