nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ bt_mesh_sensor_cli_desc_get()

int bt_mesh_sensor_cli_desc_get ( struct bt_mesh_sensor_cli * cli,
struct bt_mesh_msg_ctx * ctx,
const struct bt_mesh_sensor_type * sensor,
struct bt_mesh_sensor_descriptor * rsp )

#include <include/bluetooth/mesh/sensor_cli.h>

Get the descriptor for the given 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::sensor callback.

Parameters
[in]cliSensor client instance.
[in]ctxMessage context parameters, or NULL to use the configured publish parameters.
[in]sensorSensor instance present on the targeted sensor server.
[out]rspSensor descriptor response buffer, or NULL to keep from blocking.
Return values
0Successfully received the descriptor. The rsp buffer has been filled.
-ENODEVThe sensor server doesn't have the given sensor.
-EALREADYA blocking request is already in progress.
-EADDRNOTAVAILA message context was not provided and publishing is not configured.
-EAGAINThe device has not been provisioned.
-ETIMEDOUTThe request timed out without a response.