13#ifndef BT_MESH_SENSOR_CLI_H__
14#define BT_MESH_SENSOR_CLI_H__
33#define BT_MESH_SENSOR_CLI_INIT(_handlers) \
44#define BT_MESH_MODEL_SENSOR_CLI(_cli) \
45 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_SENSOR_CLI, _bt_mesh_sensor_cli_op, \
47 BT_MESH_MODEL_USER_DATA(struct bt_mesh_sensor_cli, \
49 &_bt_mesh_sensor_cli_cb)
57 const struct bt_mesh_model *
model;
59 struct bt_mesh_model_pub
pub;
64 BT_MESH_MODEL_BUF_LEN(BT_MESH_SENSOR_OP_CADENCE_SET,
65 BT_MESH_SENSOR_MSG_MAXLEN_CADENCE_SET),
66 BT_MESH_MODEL_BUF_LEN(BT_MESH_SENSOR_OP_SETTING_SET,
67 BT_MESH_SENSOR_MSG_MAXLEN_SETTING_SET))];
152 struct bt_mesh_msg_ctx *ctx,
171 struct bt_mesh_msg_ctx *ctx,
188 struct bt_mesh_msg_ctx *ctx,
205 struct bt_mesh_msg_ctx *ctx,
207 const uint16_t *ids, uint32_t count);
250 struct bt_mesh_msg_ctx *ctx,
252 uint8_t index, uint8_t count,
267 struct bt_mesh_msg_ctx *ctx, uint16_t id,
476 struct bt_mesh_msg_ctx *ctx,
503 struct bt_mesh_msg_ctx *ctx,
530 struct bt_mesh_msg_ctx *ctx,
621 struct bt_mesh_msg_ctx *ctx,
623 uint16_t *ids, uint32_t *count);
649 struct bt_mesh_msg_ctx *ctx,
677 struct bt_mesh_msg_ctx *ctx,
682extern const struct bt_mesh_model_op _bt_mesh_sensor_cli_op[];
683extern const struct bt_mesh_model_cb _bt_mesh_sensor_cli_cb;
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)
Set the cadence state for the given sensor.
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)
Get a setting value for a sensor.
int bt_mesh_sensor_cli_series_entry_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, const union bt_mesh_sensor_column_key *column, struct bt_mesh_sensor_series_entry *rsp)
Read a single sensor series data entry.
int bt_mesh_sensor_cli_settings_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, uint16_t *ids, uint32_t *count)
Get the list of settings for the given sensor.
int bt_mesh_sensor_cli_cadence_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, struct bt_mesh_sensor_cadence_status *rsp)
Get the cadence state.
int bt_mesh_sensor_cli_series_entries_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, const union bt_mesh_sensor_column_key *range_start, const union bt_mesh_sensor_column_key *range_end, struct bt_mesh_sensor_series_entry *rsp, uint32_t *count)
Get multiple sensor series data entries.
int bt_mesh_sensor_cli_desc_all_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_sensor_info *sensors, uint32_t *count)
Retrieve all sensor descriptors in a sensor server.
int bt_mesh_sensor_cli_setting_set_unack(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, const struct bt_mesh_sensor_value *value)
Set a setting value for a sensor without requesting a response.
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)
Get the descriptor for the given sensor.
int bt_mesh_sensor_cli_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, struct bt_mesh_sensor_value *rsp)
Read sensor data from a sensor instance.
int bt_mesh_sensor_cli_all_get(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_sensor_data *sensors, uint32_t *count)
Read sensor data from all sensors on a server.
int bt_mesh_sensor_cli_setting_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_type *setting, const struct bt_mesh_sensor_value *value, struct bt_mesh_sensor_setting_status *rsp)
Set a setting value for a sensor.
int bt_mesh_sensor_cli_cadence_set_unack(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)
Set the cadence state for the given sensor without requesting a response.
struct bt_mesh_sensor_threshold threshold
Definition sensor_cli.h:89
uint8_t fast_period_div
Definition sensor_cli.h:81
uint8_t min_int
Definition sensor_cli.h:87
Definition sensor_cli.h:75
void(* unknown_type)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t id, uint32_t opcode)
Unknown type callback.
Definition sensor_cli.h:266
void(* series_entry)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, uint8_t index, uint8_t count, const struct bt_mesh_sensor_series_entry *entry)
Series entry callback.
Definition sensor_cli.h:249
void(* cadence)(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)
Sensor cadence callback.
Definition sensor_cli.h:187
void(* settings)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, const uint16_t *ids, uint32_t count)
Sensor settings list callback.
Definition sensor_cli.h:204
void(* setting_status)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, const struct bt_mesh_sensor_setting_status *setting)
Sensor setting status callback.
Definition sensor_cli.h:221
void(* sensor)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_info *sensor)
Sensor description callback.
Definition sensor_cli.h:170
void(* data)(struct bt_mesh_sensor_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_sensor_type *sensor, const struct bt_mesh_sensor_value *value)
Sensor data callback.
Definition sensor_cli.h:151
Definition sensor_cli.h:137
uint8_t pub_data[MAX(BT_MESH_MODEL_BUF_LEN(BT_MESH_SENSOR_OP_CADENCE_SET, BT_MESH_SENSOR_MSG_MAXLEN_CADENCE_SET), BT_MESH_MODEL_BUF_LEN(BT_MESH_SENSOR_OP_SETTING_SET, BT_MESH_SENSOR_MSG_MAXLEN_SETTING_SET))]
Definition sensor_cli.h:67
struct bt_mesh_model_pub pub
Definition sensor_cli.h:59
const struct bt_mesh_model * model
Definition sensor_cli.h:57
const struct bt_mesh_sensor_cli_handlers * cb
Definition sensor_cli.h:71
struct net_buf_simple pub_buf
Definition sensor_cli.h:61
struct bt_mesh_msg_ack_ctx ack_ctx
Definition sensor_cli.h:69
Definition sensor_cli.h:55
const struct bt_mesh_sensor_type * type
Definition sensor_cli.h:121
struct bt_mesh_sensor_value value[CONFIG_BT_MESH_SENSOR_CHANNELS_MAX]
Definition sensor_cli.h:123
Definition sensor_cli.h:119
uint16_t id
Definition sensor_cli.h:113
struct bt_mesh_sensor_descriptor descriptor
Definition sensor_cli.h:115
Definition sensor_cli.h:111
struct bt_mesh_sensor_value value[CONFIG_BT_MESH_SENSOR_CHANNELS_MAX]
Definition sensor_cli.h:107
struct bt_mesh_sensor_column column
Definition sensor_cli.h:105
Definition sensor_cli.h:103
bool writable
Definition sensor_cli.h:99
const struct bt_mesh_sensor_type * type
Definition sensor_cli.h:95
struct bt_mesh_sensor_value value[CONFIG_BT_MESH_SENSOR_CHANNELS_MAX]
Definition sensor_cli.h:97
Definition sensor_cli.h:93
struct bt_mesh_sensor_value sensor_value
Definition sensor_cli.h:132
uint16_t index
Definition sensor_cli.h:133
Sensor column indexing value.
Definition sensor_cli.h:131