14#ifndef BT_MESH_LIGHT_HUE_SRV_H__
15#define BT_MESH_LIGHT_HUE_SRV_H__
20#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
37#define BT_MESH_LIGHT_HUE_SRV_INIT(_handlers) \
39 .handlers = _handlers, \
40 .lvl = BT_MESH_LVL_SRV_INIT( \
41 &_bt_mesh_light_hue_srv_lvl_handlers), \
42 .range = BT_MESH_LIGHT_HSL_OP_RANGE_DEFAULT, \
51#define BT_MESH_MODEL_LIGHT_HUE_SRV(_srv) \
52 BT_MESH_MODEL_LVL_SRV(&(_srv)->lvl), \
53 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_HSL_HUE_SRV, \
54 _bt_mesh_light_hue_srv_op, &(_srv)->pub, \
55 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_hue_srv, \
57 &_bt_mesh_light_hue_srv_cb)
84 struct bt_mesh_msg_ctx *ctx,
109 struct bt_mesh_msg_ctx *ctx,
122 struct bt_mesh_msg_ctx *ctx,
134 struct bt_mesh_msg_ctx *ctx,
135 uint16_t old_default,
136 uint16_t new_default);
148 struct bt_mesh_msg_ctx *ctx,
170 struct bt_mesh_model_pub
pub;
172 struct net_buf_simple
buf;
175 BT_MESH_LIGHT_HUE_OP_STATUS,
176 BT_MESH_LIGHT_HSL_MSG_MAXLEN_HUE_STATUS)];
189#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
214 struct bt_mesh_msg_ctx *ctx,
218extern const struct bt_mesh_model_op _bt_mesh_light_hue_srv_op[];
219extern const struct bt_mesh_model_cb _bt_mesh_light_hue_srv_cb;
221 _bt_mesh_light_hue_srv_lvl_handlers;
int bt_mesh_light_hue_srv_pub(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue_status *status)
Publish the current HSL Hue status.
Definition light_hsl.h:147
Definition light_hsl_srv.h:94
Definition light_hsl.h:64
void(*const default_update)(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, uint16_t old_default, uint16_t new_default)
The default hue has been updated.
Definition light_hue_srv.h:133
void(*const move_set)(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue_move *move, struct bt_mesh_light_hue_status *rsp)
Move the hue continuously at a certain rate.
Definition light_hue_srv.h:108
void(*const range_update)(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_range *old_range, const struct bt_mesh_light_hsl_range *new_range)
The valid hue range has been updated.
Definition light_hue_srv.h:146
void(*const set)(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hue *set, struct bt_mesh_light_hue_status *rsp)
Set the Hue state.
Definition light_hue_srv.h:83
void(*const get)(struct bt_mesh_light_hue_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_hue_status *rsp)
Get the Hue state.
Definition light_hue_srv.h:121
Definition light_hue_srv.h:60
struct bt_mesh_lvl_srv lvl
Definition light_hue_srv.h:159
const struct bt_mesh_light_hue_srv_handlers * handlers
Definition light_hue_srv.h:161
struct bt_mesh_light_hsl_range range
Definition light_hue_srv.h:181
const struct bt_mesh_light_hsl_srv * hsl
Definition light_hue_srv.h:168
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_HUE_OP_STATUS, BT_MESH_LIGHT_HSL_MSG_MAXLEN_HUE_STATUS)]
Definition light_hue_srv.h:176
struct bt_mesh_light_hue_srv::@155 transient
struct bt_mesh_model_pub pub
Definition light_hue_srv.h:170
struct net_buf_simple buf
Definition light_hue_srv.h:172
struct bt_mesh_tid_ctx prev_transaction
Definition light_hue_srv.h:178
uint16_t dflt
Definition light_hue_srv.h:183
uint16_t last
Definition light_hue_srv.h:186
const struct bt_mesh_model * model
Definition light_hue_srv.h:164
Definition light_hue_srv.h:157
Definition light_hsl.h:127
Definition light_hsl.h:88
Definition gen_lvl_srv.h:52
Definition gen_lvl_srv.h:143
Definition model_types.h:46