![]() |
nRF Connect SDK API 3.3.99
|
| int bt_mesh_sensor_cli_series_entries_get | ( | struct bt_mesh_sensor_cli * | cli, |
| struct bt_mesh_msg_ctx * | ctx, | ||
| const struct bt_mesh_sensor_type * | sensor, | ||
| const union bt_mesh_sensor_column_key * | range_start, | ||
| const union bt_mesh_sensor_column_key * | range_end, | ||
| struct bt_mesh_sensor_series_entry * | rsp, | ||
| uint32_t * | count ) |
#include <include/bluetooth/mesh/sensor_cli.h>
Get multiple sensor series data entries.
Retrieves all data series columns starting within the given range (inclusive), or all data series entries if range_start or range_end is NULL. For instance, requesting range [1, 5] from a sensor with columns [0, 2], [1, 4], [4, 5] and [5, 8] will return all columns except [0, 2]. For sensors with only one or two channels, the range values are indices into the column series, inclusive.
If a rsp array is provided and the client received a response, the array will be filled with as many of the response columns 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.
This call is blocking if the rsp buffer is non-NULL. Otherwise, this function will return, and the response will be passed to the bt_mesh_sensor_cli_handlers::series_entry callback as a list of sensor descriptors.
| [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. |
| [in] | range_start | Start of column range to get, or NULL to get all columns. |
| [in] | range_end | End of column range to get, or NULL to get all columns. |
| [out] | rsp | Array of entries to copy the response into, or NULL to keep from blocking. |
| [in,out] | count | The number of entries in rsp. Is changed to reflect the number of entries in the response. |
| 0 | Successfully received the full list of sensor series columns. The rsp 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 sensor columns in the response was too big to fit in the rsp array. The rsp array has been filled up to the original count, and count has been changed to the number of columns in the response. |
| -ENOTSUP | The sensor doesn't support series data. |
| -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. |