1.1.18.16 WDRV_WINC_MQTTSubscribe

C

WDRV_WINC_STATUS WDRV_WINC_MQTTSubscribe
(
    DRV_HANDLE handle,
    WDRV_WINC_MQTT_QOS_TYPE qos,
    const char *pTopicName,
    const WDRV_WINC_MQTT_SUB_PROP *const pSubProp,
    WDRV_WINC_MQTT_SUBSCRIBE_CALLBACK pfSubscribeCb,
    uintptr_t subscribeCbCtx
)

Description

Sends a subscription request to the MQTT broker.

Precondition

WDRV_WINC_Initialize must have been called.

WDRV_WINC_Open must have been called to obtain a valid handle.

WDRV_WINC_MQTTConnect must have been called to connect to a broker.

Parameters

ParametersDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
qosQuality of service required.
pTopicNamePointer to topic name to subscribe to.
pSubPropPointer to an optional subscription property structure.
pfSubscribeCbPointer to subscription callback.
subscribeCbCtxUser context to pass to callback when called.

Returns

  • WDRV_WINC_STATUS_OK - A subscribe 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

None.