1.1.18.8.6 WDRV_WINC_MQTTConnect

C

WDRV_WINC_STATUS WDRV_WINC_MQTTConnect
(
    DRV_HANDLE handle,
    bool cleanSession,
    uint16_t keepAliveTime,
    WDRV_WINC_MQTT_PROTO_VER protocolVer,
    const WDRV_WINC_MQTT_CONN_PROP *const pConnProp,
    WDRV_WINC_MQTT_CONN_STATUS_CALLBACK pfConnCb,
    uintptr_t connCbCtx
)

Description

Starts a connection to an MQTT broker.

Precondition

WDRV_WINC_Initialize must have been called.

WDRV_WINC_Open must have been called to obtain a valid handle.

Parameters

ParametersDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
cleanSessionFlag indicating if a clean session should be used.
keepAliveTimeKeep alive time (in seconds).
protocolVerProtocol version.
pConnPropPointer to optional connection properties structure.
pfConnCbPointer to connection status callback.
connCbCtxUser context to pass to callback when called.

Returns

  • WDRV_WINC_STATUS_OK - A connect request 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.