14#ifndef BT_MESH_GEN_ONOFF_CLI_H__
15#define BT_MESH_GEN_ONOFF_CLI_H__
31#define BT_MESH_ONOFF_CLI_INIT(_status_handler) \
33 .status_handler = _status_handler, \
42#define BT_MESH_MODEL_ONOFF_CLI(_cli) \
43 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_ONOFF_CLI, \
44 _bt_mesh_onoff_cli_op, &(_cli)->pub, \
45 BT_MESH_MODEL_USER_DATA(struct bt_mesh_onoff_cli, \
47 &_bt_mesh_onoff_cli_cb)
63 struct bt_mesh_msg_ctx *ctx,
70 struct bt_mesh_model_pub
pub;
74 uint8_t
pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_ONOFF_OP_SET,
75 BT_MESH_ONOFF_MSG_MAXLEN_SET)];
77 const struct bt_mesh_model *
model;
99 struct bt_mesh_msg_ctx *ctx,
124 struct bt_mesh_msg_ctx *ctx,
143 struct bt_mesh_msg_ctx *ctx,
147extern const struct bt_mesh_model_op _bt_mesh_onoff_cli_op[];
148extern const struct bt_mesh_model_cb _bt_mesh_onoff_cli_cb;
int bt_mesh_onoff_cli_set_unack(struct bt_mesh_onoff_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_onoff_set *set)
Set the OnOff state in the srv without requesting a response.
int bt_mesh_onoff_cli_set(struct bt_mesh_onoff_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_onoff_set *set, struct bt_mesh_onoff_status *rsp)
Set the OnOff state in the srv.
int bt_mesh_onoff_cli_get(struct bt_mesh_onoff_cli *cli, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_onoff_status *rsp)
Get the status of the bound srv.
struct net_buf_simple pub_buf
Definition gen_onoff_cli.h:72
struct bt_mesh_msg_ack_ctx ack_ctx
Definition gen_onoff_cli.h:68
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_ONOFF_OP_SET, BT_MESH_ONOFF_MSG_MAXLEN_SET)]
Definition gen_onoff_cli.h:75
struct bt_mesh_model_pub pub
Definition gen_onoff_cli.h:70
void(*const status_handler)(struct bt_mesh_onoff_cli *cli, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_onoff_status *status)
OnOff status message handler.
Definition gen_onoff_cli.h:62
const struct bt_mesh_model * model
Definition gen_onoff_cli.h:77
uint8_t tid
Definition gen_onoff_cli.h:66
Definition gen_onoff_cli.h:54
Definition gen_onoff.h:24
Definition gen_onoff.h:40