14#ifndef BT_MESH_LIGHT_HSL_SRV_H__
15#define BT_MESH_LIGHT_HSL_SRV_H__
37#define BT_MESH_LIGHT_HSL_SRV_INIT(_lightness_srv, _hue_handlers, _sat_handlers) \
39 .lightness = _lightness_srv, \
40 .hue = BT_MESH_LIGHT_HUE_SRV_INIT(_hue_handlers), \
41 .sat = BT_MESH_LIGHT_SAT_SRV_INIT(_sat_handlers), \
53#define BT_MESH_MODEL_LIGHT_HSL_SRV(_srv, ...) \
54 BT_MESH_MODEL_METADATA_CB(BT_MESH_MODEL_ID_LIGHT_HSL_SRV, \
55 _bt_mesh_light_hsl_srv_op, &(_srv)->pub, \
56 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_hsl_srv, \
58 &_bt_mesh_light_hsl_srv_cb, __VA_ARGS__), \
59 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_HSL_SETUP_SRV, \
60 _bt_mesh_light_hsl_setup_srv_op, NULL, \
61 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_hsl_srv, \
63 &_bt_mesh_light_hsl_setup_srv_cb)
66#define BT_MESH_LIGHT_HSL_HUE_RANGE_METADATA_ID 0x0005
69#define BT_MESH_LIGHT_HSL_SAT_RANGE_METADATA_ID 0x0006
77#define BT_MESH_LIGHT_HSL_HUE_RANGE_METADATA(range_min, range_max) \
78 BT_MESH_MODELS_METADATA_ENTRY(4, BT_MESH_LIGHT_HSL_HUE_RANGE_METADATA_ID, \
79 ((uint16_t[]){(range_min), (range_max)}))
87#define BT_MESH_LIGHT_HSL_SAT_RANGE_METADATA(range_min, range_max) \
88 BT_MESH_MODELS_METADATA_ENTRY(4, BT_MESH_LIGHT_HSL_SAT_RANGE_METADATA_ID, \
89 ((uint16_t[]){(range_min), (range_max)}))
105 struct bt_mesh_model_pub
pub;
107 struct net_buf_simple
buf;
110 BT_MESH_LIGHT_HSL_OP_STATUS,
111 BT_MESH_LIGHT_HSL_MSG_MAXLEN_STATUS)];
140 struct bt_mesh_msg_ctx *ctx,
144extern const struct bt_mesh_model_op _bt_mesh_light_hsl_srv_op[];
145extern const struct bt_mesh_model_op _bt_mesh_light_hsl_setup_srv_op[];
146extern const struct bt_mesh_model_cb _bt_mesh_light_hsl_srv_cb;
147extern const struct bt_mesh_model_cb _bt_mesh_light_hsl_setup_srv_cb;
int bt_mesh_light_hsl_srv_pub(struct bt_mesh_light_hsl_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_hsl_status *status)
Publish the current HSL status.
struct bt_mesh_light_sat_srv sat
Definition: light_hsl_srv.h:98
struct bt_mesh_model_pub pub
Definition: light_hsl_srv.h:105
struct bt_mesh_light_hue_srv hue
Definition: light_hsl_srv.h:96
struct bt_mesh_tid_ctx prev_transaction
Definition: light_hsl_srv.h:118
const struct bt_mesh_model * model
Definition: light_hsl_srv.h:103
struct net_buf_simple buf
Definition: light_hsl_srv.h:107
struct bt_mesh_lightness_srv * lightness
Definition: light_hsl_srv.h:100
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_HSL_OP_STATUS, BT_MESH_LIGHT_HSL_MSG_MAXLEN_STATUS)]
Definition: light_hsl_srv.h:111
bool pub_pending
Definition: light_hsl_srv.h:116
Definition: light_hsl_srv.h:94
Definition: light_hsl.h:80
Definition: light_hue_srv.h:157
Definition: light_sat_srv.h:127
Definition: lightness_srv.h:181
Definition: model_types.h:46