15#ifndef BT_MESH_GEN_LVL_SRV_H__
16#define BT_MESH_GEN_LVL_SRV_H__
33#define BT_MESH_LVL_SRV_INIT(_handlers) \
35 .handlers = _handlers, \
44#define BT_MESH_MODEL_LVL_SRV(_srv) \
45 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_LEVEL_SRV, _bt_mesh_lvl_srv_op, \
47 BT_MESH_MODEL_USER_DATA(struct bt_mesh_lvl_srv, \
63 struct bt_mesh_msg_ctx *ctx,
84 struct bt_mesh_msg_ctx *ctx,
107 struct bt_mesh_msg_ctx *ctx,
134 struct bt_mesh_msg_ctx *ctx,
149 struct bt_mesh_model_pub
pub;
153 uint8_t
pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LVL_OP_STATUS,
154 BT_MESH_LVL_MSG_MAXLEN_STATUS)];
172 struct bt_mesh_msg_ctx *ctx,
176extern const struct bt_mesh_model_op _bt_mesh_lvl_srv_op[];
177extern const struct bt_mesh_model_cb _bt_mesh_lvl_srv_cb;
int bt_mesh_lvl_srv_pub(struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lvl_status *status)
Publish the current Level state.
void(*const delta_set)(struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lvl_delta_set *delta_set, struct bt_mesh_lvl_status *rsp)
Change the Level state relative to its current value.
Definition gen_lvl_srv.h:106
void(*const get)(struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_lvl_status *rsp)
Get the current Level state.
Definition gen_lvl_srv.h:62
void(*const set)(struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lvl_set *set, struct bt_mesh_lvl_status *rsp)
Set the Level state.
Definition gen_lvl_srv.h:83
void(*const move_set)(struct bt_mesh_lvl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_lvl_move_set *move_set, struct bt_mesh_lvl_status *rsp)
Move the Level state continuously at a given rate.
Definition gen_lvl_srv.h:133
Definition gen_lvl_srv.h:52
struct net_buf_simple pub_buf
Definition gen_lvl_srv.h:151
const struct bt_mesh_lvl_srv_handlers *const handlers
Definition gen_lvl_srv.h:145
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LVL_OP_STATUS, BT_MESH_LVL_MSG_MAXLEN_STATUS)]
Definition gen_lvl_srv.h:154
struct bt_mesh_model_pub pub
Definition gen_lvl_srv.h:149
struct bt_mesh_tid_ctx tid
Definition gen_lvl_srv.h:156
const struct bt_mesh_model * model
Definition gen_lvl_srv.h:147
Definition gen_lvl_srv.h:143
Definition model_types.h:46