![]() |
nRF Connect SDK API 3.3.99
|
| int bt_mesh_sensor_cli_settings_get | ( | struct bt_mesh_sensor_cli * | cli, |
| struct bt_mesh_msg_ctx * | ctx, | ||
| const struct bt_mesh_sensor_type * | sensor, | ||
| uint16_t * | ids, | ||
| uint32_t * | count ) |
#include <include/bluetooth/mesh/sensor_cli.h>
Get the list of settings for the given sensor.
This call is blocking if the ids buffer is non-NULL. Otherwise, this function will return, and the response will be passed to the bt_mesh_sensor_cli_handlers::settings callback.
If an ids array is provided and the client received a response, the array will be filled with as many of the response ids as it can fit, even if the buffer isn't big enough. If the call fails in a way that results in no response, count is set to 0.
| [in] | cli | Sensor client instance. |
| [in] | ctx | Message context parameters, or NULL to use the configured publish parameters. |
| [in] | sensor | Sensor instance present on the targeted sensor server. |
| [out] | ids | Array of sensor setting IDs to fill with the response, or NULL to keep from blocking. |
| [in,out] | count | The number of elements in the ids array. Will be changed to reflect the resulting number of IDs. |
| 0 | Successfully received the full list of sensor setting IDs. The ids array and count has been changed to reflect the response contents. |
| -ENODEV | The sensor server doesn't have the given sensor. |
| -E2BIG | The list of IDs in the response was too big to fit in the ids array. The ids array has been filled up to the original count, and count has been changed to the number of IDs in the response. |
| -EALREADY | A blocking request is already in progress. |
| -EADDRNOTAVAIL | A message context was not provided and publishing is not configured. |
| -EAGAIN | The device has not been provisioned. |
| -ETIMEDOUT | The request timed out without a response. |