14#ifndef BT_MESH_LIGHT_XYL_SRV_H__
15#define BT_MESH_LIGHT_XYL_SRV_H__
20#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
37#define BT_MESH_LIGHT_XYL_SRV_INIT(_lightness_srv, _light_xyl_handlers) \
39 .handlers = _light_xyl_handlers, \
40 .lightness_srv = _lightness_srv, \
42 .min = { .x = 0, .y = 0 }, \
43 .max = { .x = UINT16_MAX, .y = UINT16_MAX } \
53#define BT_MESH_MODEL_LIGHT_XYL_SRV(_srv) \
54 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_XYL_SRV, \
55 _bt_mesh_light_xyl_srv_op, &(_srv)->pub, \
56 BT_MESH_MODEL_USER_DATA( \
57 struct bt_mesh_light_xyl_srv, _srv), \
58 &_bt_mesh_light_xyl_srv_cb), \
59 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_XYL_SETUP_SRV, \
60 _bt_mesh_light_xyl_setup_srv_op, NULL, \
61 BT_MESH_MODEL_USER_DATA( \
62 struct bt_mesh_light_xyl_srv, _srv), \
63 &_bt_mesh_light_xyl_setup_srv_cb)
107 struct bt_mesh_msg_ctx *ctx,
120 struct bt_mesh_msg_ctx *ctx,
131 struct bt_mesh_msg_ctx *ctx,
143 struct bt_mesh_msg_ctx *ctx,
158 struct bt_mesh_model_pub
pub;
163 BT_MESH_LIGHT_XYL_OP_RANGE_STATUS,
164 BT_MESH_LIGHT_XYL_MSG_LEN_RANGE_STATUS)];
179#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
204 struct bt_mesh_msg_ctx *ctx,
226 struct bt_mesh_msg_ctx *ctx,
248 struct bt_mesh_msg_ctx *ctx,
269 struct bt_mesh_msg_ctx *ctx);
272extern const struct bt_mesh_model_op _bt_mesh_light_xyl_srv_op[];
273extern const struct bt_mesh_model_op _bt_mesh_light_xyl_setup_srv_op[];
274extern const struct bt_mesh_model_cb _bt_mesh_light_xyl_srv_cb;
275extern const struct bt_mesh_model_cb _bt_mesh_light_xyl_setup_srv_cb;
int bt_mesh_light_xyl_srv_target_pub(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_xyl_status *status)
Publish the current xyL target status.
int bt_mesh_light_xyl_srv_range_pub(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, enum bt_mesh_model_status status_code)
Publish the current xyL Range status.
int bt_mesh_light_xyl_srv_default_pub(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx)
Publish the current xyL Default parameter status.
int bt_mesh_light_xyl_srv_pub(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_xyl_status *status)
Publish the current xyL status.
bt_mesh_model_status
Definition: model_types.h:54
Definition: light_xyl.h:73
struct bt_mesh_light_xy params
Definition: light_xyl_srv.h:68
struct bt_mesh_model_transition * transition
Definition: light_xyl_srv.h:76
Definition: light_xyl_srv.h:66
struct bt_mesh_light_xy target
Definition: light_xyl_srv.h:84
int32_t remaining_time
Definition: light_xyl_srv.h:86
struct bt_mesh_light_xy current
Definition: light_xyl_srv.h:82
Definition: light_xyl_srv.h:80
Definition: light_xyl.h:25
void(*const xy_get)(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_xy_status *rsp)
Get the xy state.
Definition: light_xyl_srv.h:119
void(*const range_update)(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_xy_range *old_range, const struct bt_mesh_light_xy_range *new_range)
The Range state has changed.
Definition: light_xyl_srv.h:130
void(*const xy_set)(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_xy_set *set, struct bt_mesh_light_xy_status *rsp)
Set the xy state.
Definition: light_xyl_srv.h:106
void(*const default_update)(struct bt_mesh_light_xyl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_xy *old_default, const struct bt_mesh_light_xy *new_default)
The Default Parameter state has changed.
Definition: light_xyl_srv.h:142
Definition: light_xyl_srv.h:90
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_XYL_OP_RANGE_STATUS, BT_MESH_LIGHT_XYL_MSG_LEN_RANGE_STATUS)]
Definition: light_xyl_srv.h:164
struct bt_mesh_light_xyl_srv::@155 transient
struct bt_mesh_lightness_srv * lightness_srv
Definition: light_xyl_srv.h:156
struct net_buf_simple pub_buf
Definition: light_xyl_srv.h:160
const struct bt_mesh_light_xyl_srv_handlers * handlers
Definition: light_xyl_srv.h:171
struct bt_mesh_model_pub pub
Definition: light_xyl_srv.h:158
struct bt_mesh_light_xy_range range
Definition: light_xyl_srv.h:169
struct bt_mesh_tid_ctx prev_transaction
Definition: light_xyl_srv.h:166
struct bt_mesh_light_xy xy_default
Definition: light_xyl_srv.h:173
const struct bt_mesh_model * model
Definition: light_xyl_srv.h:154
Definition: light_xyl_srv.h:152
Definition: light_xyl.h:65
Definition: lightness_srv.h:181
Definition: model_types.h:37
Definition: model_types.h:46