[][src]Function openthread_sys::otPlatSettingsGet

pub unsafe extern "C" fn otPlatSettingsGet(
    aInstance: *mut otInstance,
    aKey: u16,
    aIndex: c_int,
    aValue: *mut u8,
    aValueLength: *mut u16
) -> otError

Fetches the value of a setting ** This function fetches the value of the setting identified

  • by aKey and write it to the memory pointed to by aValue.
  • It then writes the length to the integer pointed to by
  • aValueLength. The initial value of aValueLength is the
  • maximum number of bytes to be written to aValue.
  • This function can be used to check for the existence of
  • a key without fetching the value by setting aValue and
  • aValueLength to NULL. You can also check the length of
  • the setting without fetching it by setting only aValue
  • to NULL.
  • Note that the underlying storage implementation is not
  • required to maintain the order of settings with multiple
  • values. The order of such values MAY change after ANY
  • write operation to the store.
  • @param[in] aInstance The OpenThread instance structure.
  • @param[in] aKey The key associated with the requested setting.
  • @param[in] aIndex The index of the specific item to get.
  • @param[out] aValue A pointer to where the value of the setting should be written. May be set to NULL if
  •                           just testing for the presence or length of a setting.
  • @param[inout] aValueLength A pointer to the length of the value. When called, this pointer should point to an
  •                           integer containing the maximum value size that can be written to aValue. At return,
  •                           the actual length of the setting is written. This may be set to NULL if performing
  •                           a presence check.
  • @retval OT_ERROR_NONE The given setting was found and fetched successfully.
  • @retval OT_ERROR_NOT_FOUND The given setting was not found in the setting store.
  • @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented on this platform. */