1.1.18.7.4 WDRV_WINC_MQTTUserPropSet

C

WDRV_WINC_STATUS WDRV_WINC_MQTTUserPropSet
(
    DRV_HANDLE handle,
    const uint8_t *pKey,
    size_t lenKey,
    const uint8_t *pValue,
    size_t lenValue
)

Description

Used to set or clear the value associated with a user property key.

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.
pKeyPointer to UTF-8 key name.
lenKeyLength of key name.
pValuePointer to UTF-8 value.
lenValueLength of value.

Returns

  • WDRV_WINC_STATUS_OK - Request was accepted.

  • 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

Setting pValue to NULL or lenValue to zero will cause the user property key to be removed.