1.1.18.9.4 WDRV_WINC_MQTT_PUB_STATUS_CALLBACK Typedef
C
typedef void (*WDRV_WINC_MQTT_PUB_STATUS_CALLBACK) ( DRV_HANDLE handle, uintptr_t userCtx, WDRV_WINC_MQTT_PUB_HANDLE pubHandle, uint16_t packetId, WDRV_WINC_MQTT_PUB_STATUS_TYPE status );
Description
Callback is called when the publish message changes state.
Parameters
Parameters | Description |
---|---|
handle | Client handle obtained by a call to WDRV_WINC_Open . |
userCtx | User context passed to the callback. |
pubHandle | Publish handle issued until packet ID is known. |
packetId | Packet ID when known. |
status | Status of publish request. |
Returns
None.
Remarks
If pubHandle is valid the status refers to the sending of a publish message:
status | Meaning |
---|---|
WDRV_WINC_MQTT_PUB_STATUS_SENT | Publish message has been sent, packetId is set to the packet ID of the message sent. This packet ID can be used to aligned with further events to this callback for QoS acknowledgement/completion. |
WDRV_WINC_MQTT_PUB_STATUS_ERROR | There was an error sending the publish message. |
If the pubHandle is not valid the status refers to the receiving of a publish message:
status | Meaning |
---|---|
WDRV_WINC_MQTT_PUB_STATUS_RECV | A PUBACK (QoS 1) or PUBCOMP (QoS 2) response has been received. The packetId will aligned with a previous call to this callback. |
WDRV_WINC_MQTT_PUB_STATUS_ERROR | An error occurred during the publish operation. |