![]() |
nRF Connect SDK API 3.3.99
|
| int bt_mesh_sensor_cli_all_get | ( | struct bt_mesh_sensor_cli * | cli, |
| struct bt_mesh_msg_ctx * | ctx, | ||
| struct bt_mesh_sensor_data * | sensors, | ||
| uint32_t * | count ) |
#include <include/bluetooth/mesh/sensor_cli.h>
Read sensor data from all sensors on a server.
This call is blocking if the sensors buffer is non-NULL. Otherwise, this function will return, and the response will be passed to the bt_mesh_sensor_cli_handlers::data callback.
| [in] | cli | Sensor client instance. |
| [in] | ctx | Message context parameters, or NULL to use the configured publish parameters. |
| [out] | sensors | Array of the sensors data to fill with the response, or NULL to keep from blocking. |
| [in,out] | count | The number of elements in the sensors array. Will be changed to reflect the resulting number of elements in a list. |
| 0 | Successfully received the sensor data. |
| -ENODEV | The sensor server doesn't have the given sensor. |
| -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. |