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
Parameters | Description |
---|---|
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 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
.