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

◆ bt_mesh_sensor_cli_cadence_set()

int bt_mesh_sensor_cli_cadence_set ( struct bt_mesh_sensor_cli * cli,
struct bt_mesh_msg_ctx * ctx,
const struct bt_mesh_sensor_type * sensor,
const struct bt_mesh_sensor_cadence_status * cadence,
struct bt_mesh_sensor_cadence_status * rsp )

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

Set the cadence state 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::cadence callback.

Note
Only single-channel sensors support cadence.
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.
[in]cadenceNew sensor cadence for the sensor.
[out]rspSensor cadence response buffer, or NULL to keep from blocking.
Return values
0Successfully received the cadence. The rsp buffer has been filled.
-ENOTSUPThe sensor doesn't support cadence settings.
-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.