14#ifndef BT_MESH_DM_CLI_H__
15#define BT_MESH_DM_CLI_H__
22#include <zephyr/bluetooth/addr.h>
23#include <zephyr/sys/slist.h>
24#include <zephyr/bluetooth/mesh/access.h>
75 struct bt_mesh_msg_ctx *ctx,
87 struct bt_mesh_msg_ctx *ctx,
98 const struct bt_mesh_model *
model;
102 struct bt_mesh_model_pub
pub;
106 uint8_t
pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DM_START_OP,
107 BT_MESH_DM_START_MSG_LEN_MAX)];
124#define BT_MESH_MODEL_DM_CLI_INIT(_mem, _cnt, _handlers) \
128 .handlers = _handlers, \
137#define BT_MESH_MODEL_DM_CLI(_cli) \
138 BT_MESH_MODEL_VND_CB(BT_MESH_VENDOR_COMPANY_ID, BT_MESH_MODEL_ID_DM_CLI, \
139 _bt_mesh_dm_cli_op, &(_cli)->pub, \
140 BT_MESH_MODEL_USER_DATA(struct bt_mesh_dm_cli, _cli), \
164 struct bt_mesh_msg_ctx *ctx,
217extern const struct bt_mesh_model_op _bt_mesh_dm_cli_op[];
218extern const struct bt_mesh_model_cb _bt_mesh_dm_cli_cb;
int bt_mesh_dm_cli_measurement_start(struct bt_mesh_dm_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_dm_cli_start *start, struct bt_mesh_dm_cli_results *rsp)
Start a distance measurement on a Distance Measurement server.
int bt_mesh_dm_cli_results_get(struct bt_mesh_dm_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t entry_cnt, struct bt_mesh_dm_cli_results *rsp)
Get measurement results from a Distance Measurement server.
int bt_mesh_dm_cli_config(struct bt_mesh_dm_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_dm_cfg *set, struct bt_mesh_dm_cli_cfg_status *rsp)
Set or get the config state in the Distance Measurement server.
dm_ranging_mode
Ranging mode definition.
Definition dm.h:40
Definition dm_common.h:59
uint8_t result_entry_cnt
Definition dm_cli.h:47
uint8_t status
Definition dm_cli.h:43
struct bt_mesh_dm_cfg def
Definition dm_cli.h:49
bool is_in_progress
Definition dm_cli.h:45
void(*const result_handler)(struct bt_mesh_dm_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_dm_cli_results *results)
Result status message handler.
Definition dm_cli.h:86
void(*const cfg_status_handler)(struct bt_mesh_dm_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_dm_cli_cfg_status *status)
Config status message handler.
Definition dm_cli.h:74
uint8_t entry_cnt
Definition dm_cli.h:35
struct bt_mesh_dm_res_entry * res
Definition dm_cli.h:37
uint8_t status
Definition dm_cli.h:33
struct bt_mesh_dm_cfg * cfg
Definition dm_cli.h:61
bool reuse_transaction
Definition dm_cli.h:55
enum dm_ranging_mode mode
Definition dm_cli.h:57
uint16_t addr
Definition dm_cli.h:59
struct bt_mesh_msg_ack_ctx ack_ctx
Definition dm_cli.h:100
const struct bt_mesh_dm_cli_handlers *const handlers
Definition dm_cli.h:94
struct net_buf_simple pub_buf
Definition dm_cli.h:104
uint8_t tid
Definition dm_cli.h:96
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DM_START_OP, BT_MESH_DM_START_MSG_LEN_MAX)]
Definition dm_cli.h:107
const struct bt_mesh_model * model
Definition dm_cli.h:98
struct bt_mesh_dm_res_entry * res_arr
Definition dm_cli.h:109
struct bt_mesh_model_pub pub
Definition dm_cli.h:102
uint8_t entry_cnt
Definition dm_cli.h:111
Definition dm_common.h:29