pub unsafe extern "C" fn otPlatSettingsAdd(
    aInstance: *mut otInstance,
    aKey: u16,
    aValue: *const u8,
    aValueLength: u16
) -> otError
Expand description

Adds a value to a setting.

Adds the value to a setting identified by @p aKey, without replacing any existing values.

Note that the underlying implementation is not required to maintain the order of the items associated with a specific key. The added value may be added to the end, the beginning, or even somewhere in the middle. The order of any pre-existing values may also change.

Calling this function successfully may cause unrelated settings with multiple values to be reordered.

OpenThread stack guarantees to use otPlatSettingsAdd() method for a @p aKey that was either previously managed by otPlatSettingsAdd() (i.e., contains one or more items) or is empty and/or fully deleted (contains no value).

Platform layer can rely and use this fact for optimizing its implementation.

@param[in] aInstance The OpenThread instance structure. @param[in] aKey The key associated with the setting to change. @param[in] aValue A pointer to where the new value of the setting should be read from. MUST NOT be NULL if @p aValueLength is non-zero. @param[in] aValueLength The length of the data pointed to by @p aValue. May be zero.

@retval OT_ERROR_NONE The given setting was added or staged to be added. @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented on this platform. @retval OT_ERROR_NO_BUFS No space remaining to store the given setting.