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
| Parameters | Description |
|---|---|
| handle | Client handle obtained by a call to WDRV_WINC_Open. |
| qos | Quality of service required. |
| pTopicName | Pointer to topic name to subscribe to. |
| pSubProp | Pointer to an optional subscription property structure. |
| pfSubscribeCb | Pointer to subscription callback. |
| subscribeCbCtx | User 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.
