14#ifndef BT_MESH_LIGHT_SAT_SRV_H__
15#define BT_MESH_LIGHT_SAT_SRV_H__
20#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
37#define BT_MESH_LIGHT_SAT_SRV_INIT(_handlers) \
39 .handlers = _handlers, \
40 .lvl = BT_MESH_LVL_SRV_INIT( \
41 &_bt_mesh_light_sat_srv_lvl_handlers), \
42 .range = BT_MESH_LIGHT_HSL_OP_RANGE_DEFAULT, \
51#define BT_MESH_MODEL_LIGHT_SAT_SRV(_srv) \
52 BT_MESH_MODEL_LVL_SRV(&(_srv)->lvl), \
53 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_HSL_SAT_SRV, \
54 _bt_mesh_light_sat_srv_op, &(_srv)->pub, \
55 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_sat_srv, \
57 &_bt_mesh_light_sat_srv_cb)
78 struct bt_mesh_msg_ctx *ctx,
92 struct bt_mesh_msg_ctx *ctx,
104 struct bt_mesh_msg_ctx *ctx,
105 uint16_t old_default,
106 uint16_t new_default);
118 struct bt_mesh_msg_ctx *ctx,
140 struct bt_mesh_model_pub
pub;
142 struct net_buf_simple
buf;
145 BT_MESH_LIGHT_SAT_OP_STATUS,
146 BT_MESH_LIGHT_HSL_MSG_MAXLEN_SAT_STATUS)];
159#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
184 struct bt_mesh_msg_ctx *ctx,
188extern const struct bt_mesh_model_op _bt_mesh_light_sat_srv_op[];
189extern const struct bt_mesh_model_cb _bt_mesh_light_sat_srv_cb;
191 _bt_mesh_light_sat_srv_lvl_handlers;
int bt_mesh_light_sat_srv_pub(struct bt_mesh_light_sat_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_sat_status *status)
Publish the current HSL Saturation status.
Definition light_hsl.h:147
Definition light_hsl_srv.h:94
void(*const set)(struct bt_mesh_light_sat_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_sat *set, struct bt_mesh_light_sat_status *rsp)
Set the Saturation state.
Definition light_sat_srv.h:77
void(*const range_update)(struct bt_mesh_light_sat_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 saturation range has been updated.
Definition light_sat_srv.h:116
void(*const get)(struct bt_mesh_light_sat_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_sat_status *rsp)
Get the Saturation state.
Definition light_sat_srv.h:91
void(*const default_update)(struct bt_mesh_light_sat_srv *srv, struct bt_mesh_msg_ctx *ctx, uint16_t old_default, uint16_t new_default)
The default saturation value has been updated.
Definition light_sat_srv.h:103
Definition light_sat_srv.h:60
struct bt_mesh_tid_ctx prev_transaction
Definition light_sat_srv.h:148
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_LIGHT_SAT_OP_STATUS, BT_MESH_LIGHT_HSL_MSG_MAXLEN_SAT_STATUS)]
Definition light_sat_srv.h:146
uint16_t dflt
Definition light_sat_srv.h:153
uint16_t last
Definition light_sat_srv.h:156
struct net_buf_simple buf
Definition light_sat_srv.h:142
struct bt_mesh_model_pub pub
Definition light_sat_srv.h:140
struct bt_mesh_lvl_srv lvl
Definition light_sat_srv.h:129
const struct bt_mesh_model * model
Definition light_sat_srv.h:134
const struct bt_mesh_light_sat_srv_handlers * handlers
Definition light_sat_srv.h:131
const struct bt_mesh_light_hsl_srv * hsl
Definition light_sat_srv.h:138
struct bt_mesh_light_sat_srv::@156 transient
struct bt_mesh_light_hsl_range range
Definition light_sat_srv.h:151
Definition light_sat_srv.h:127
Definition light_hsl.h:137
Definition light_hsl.h:113
Definition gen_lvl_srv.h:52
Definition gen_lvl_srv.h:143
Definition model_types.h:46