15#ifndef BT_MESH_GEN_BATTERY_SRV_H__
16#define BT_MESH_GEN_BATTERY_SRV_H__
32#define BT_MESH_BATTERY_SRV_INIT(_get_handler) \
34 .get = _get_handler, \
43#define BT_MESH_MODEL_BATTERY_SRV(_srv) \
44 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_BATTERY_SRV, \
45 _bt_mesh_battery_srv_op, &(_srv)->pub, \
46 BT_MESH_MODEL_USER_DATA(struct bt_mesh_battery_srv, \
48 &_bt_mesh_battery_srv_cb)
56 const struct bt_mesh_model *
model;
58 struct bt_mesh_model_pub
pub;
62 uint8_t
pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_BATTERY_OP_STATUS,
63 BT_MESH_BATTERY_MSG_LEN_STATUS)];
77 struct bt_mesh_msg_ctx *ctx,
100 struct bt_mesh_msg_ctx *ctx,
104extern const struct bt_mesh_model_op _bt_mesh_battery_srv_op[];
105extern const struct bt_mesh_model_cb _bt_mesh_battery_srv_cb;
int bt_mesh_battery_srv_pub(struct bt_mesh_battery_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_battery_status *status)
Publish the Generic Battery Server model status.
struct net_buf_simple pub_buf
Definition gen_battery_srv.h:60
const struct bt_mesh_model * model
Definition gen_battery_srv.h:56
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_BATTERY_OP_STATUS, BT_MESH_BATTERY_MSG_LEN_STATUS)]
Definition gen_battery_srv.h:63
void(*const get)(struct bt_mesh_battery_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_battery_status *rsp)
Get the Battery state.
Definition gen_battery_srv.h:76
struct bt_mesh_model_pub pub
Definition gen_battery_srv.h:58
Definition gen_battery_srv.h:54
Definition gen_battery.h:79