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

◆ bt_mesh_sensor_srv_pub()

int bt_mesh_sensor_srv_pub ( struct bt_mesh_sensor_srv * srv,
struct bt_mesh_msg_ctx * ctx,
struct bt_mesh_sensor * sensor,
const struct bt_mesh_sensor_value * value )

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

Publish a sensor value.

Immediately publishes the given sensor value, without checking thresholds or intervals.

See also
bt_mesh_sensor_srv_pub
Parameters
[in]srvSensor server instance.
[in]ctxMessage context to publish with, or NULL to publish on the configured publish parameters.
[in]sensorSensor to publish with.
[in]valueSensor value to publish, interpreted as an array of sensor channel values matching the sensor channels specified by the sensor type. The length of the array must match the sensor channel count.
Returns
0 on success, or (negative) error code otherwise.