![]() |
nRF Connect SDK API 3.3.99
|
| int bt_mesh_sensor_cli_setting_get | ( | struct bt_mesh_sensor_cli * | cli, |
| struct bt_mesh_msg_ctx * | ctx, | ||
| const struct bt_mesh_sensor_type * | sensor, | ||
| const struct bt_mesh_sensor_type * | setting, | ||
| struct bt_mesh_sensor_setting_status * | rsp ) |
#include <include/bluetooth/mesh/sensor_cli.h>
Get a setting value for a sensor.
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::setting_status callback.
| [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] | setting | Setting to read. |
| [out] | rsp | Sensor setting value response buffer, or NULL to keep from blocking. |
| 0 | Successfully received the setting value. The rsp buffer has been filled. |
| -ENOENT | The sensor doesn't have the given setting. |
| -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. |