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

ParametersDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
userCtxUser context passed to the callback.
pubHandlePublish handle issued until packet ID is known.
packetIdPacket ID when known.
statusStatus of publish request.

Returns

None.

Remarks

If pubHandle is valid the status refers to the sending of a publish message:

statusMeaning
WDRV_WINC_MQTT_PUB_STATUS_SENTPublish 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_ERRORThere was an error sending the publish message.

If the pubHandle is not valid the status refers to the receiving of a publish message:

statusMeaning
WDRV_WINC_MQTT_PUB_STATUS_RECVA 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_ERRORAn error occurred during the publish operation.