Functions

  • WEAVE_ERROR Read (Key aKey, uint32_t & aValue)

    Read integer value of a key from persistent storage.

    Platform is responsible for validating aKey.

    Parameters

    aKey [in] A key to a persistently-stored value.
    aValue [in] A reference to an integer value.

    Returns

    WEAVE_ERROR_INVALID_ARGUMENT if aKey is NULL

    WEAVE_ERROR_INVALID_STRING_LENGTH if aKey exceeds

    WEAVE_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH

    WEAVE_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND if aKey does not exist

    WEAVE_NO_ERROR otherwise

  • WEAVE_ERROR Write (Key aKeyuint32_t aValue)

    Write the integer value of a key to persistent storage.

    Platform is responsible for validating aKey.

    If aKey does not exist, it will be created and assigned aValue.

    Otherwise any existing value of aKey will be replaced with aValue.

    Parameters

    aKey [in] A key to a persistently-stored value.
    aValue [in] The value.

    Returns

    WEAVE_ERROR_INVALID_ARGUMENT if aKey is NULL

    WEAVE_ERROR_INVALID_STRING_LENGTH if aKey exceeds

    WEAVE_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH

    WEAVE_NO_ERROR otherwise