15#ifndef BT_MESH_GEN_ONOFF_SRV_H__
16#define BT_MESH_GEN_ONOFF_SRV_H__
33#define BT_MESH_ONOFF_SRV_INIT(_handlers) \
35 .handlers = _handlers, \
44#define BT_MESH_MODEL_ONOFF_SRV(_srv) \
45 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_ONOFF_SRV, \
46 _bt_mesh_onoff_srv_op, &(_srv)->pub, \
47 BT_MESH_MODEL_USER_DATA(struct bt_mesh_onoff_srv, \
49 &_bt_mesh_onoff_srv_cb)
70 struct bt_mesh_msg_ctx *ctx,
84 struct bt_mesh_msg_ctx *ctx,
98 const struct bt_mesh_model *
model;
100 struct bt_mesh_model_pub
pub;
105 BT_MESH_ONOFF_OP_STATUS, BT_MESH_ONOFF_MSG_MAXLEN_STATUS)];
129 struct bt_mesh_msg_ctx *ctx,
133extern const struct bt_mesh_model_op _bt_mesh_onoff_srv_op[];
134extern const struct bt_mesh_model_cb _bt_mesh_onoff_srv_cb;
int bt_mesh_onoff_srv_pub(struct bt_mesh_onoff_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_onoff_status *status)
Publish the Generic OnOff Server model status.
Definition gen_onoff.h:24
void(*const get)(struct bt_mesh_onoff_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_onoff_status *rsp)
Get the OnOff state.
Definition gen_onoff_srv.h:83
void(*const set)(struct bt_mesh_onoff_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_onoff_set *set, struct bt_mesh_onoff_status *rsp)
Set the OnOff state.
Definition gen_onoff_srv.h:69
Definition gen_onoff_srv.h:52
const struct bt_mesh_model * model
Definition gen_onoff_srv.h:98
atomic_t flags
Definition gen_onoff_srv.h:107
struct net_buf_simple pub_buf
Definition gen_onoff_srv.h:102
struct bt_mesh_model_pub pub
Definition gen_onoff_srv.h:100
const struct bt_mesh_onoff_srv_handlers * handlers
Definition gen_onoff_srv.h:96
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_ONOFF_OP_STATUS, BT_MESH_ONOFF_MSG_MAXLEN_STATUS)]
Definition gen_onoff_srv.h:105
struct bt_mesh_tid_ctx prev_transaction
Definition gen_onoff_srv.h:94
Definition gen_onoff_srv.h:92
Definition gen_onoff.h:40
Definition model_types.h:46