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

◆ value_in_column

bool(*const bt_mesh_sensor_format_cb::value_in_column) (const struct bt_mesh_sensor_value *sensor_val, const struct bt_mesh_sensor_column *col)

Check if a bt_mesh_sensor_value lies within a bt_mesh_sensor_column.

sensor_val, col->start and col->width must all have the same format.

If sensor_val, col->start or col->width represent a non-numeric value, this will return false.

A value is considered to be in a column if

start <= value <= start + width

where start is the value represented by col->start, value is the value represented by sensor_val, and width is the value represented by col->width.

Parameters
[in]sensor_valThe bt_mesh_sensor_value to check.
[in]colThe bt_mesh_sensor_column to check against.
Returns
true if sensor_val, col->start and col->width represent numeric values and sensor_val is inside the range specified by col, inclusive. false otherwise.