14#ifndef BT_MESH_LIGHT_TEMP_SRV_H__
15#define BT_MESH_LIGHT_TEMP_SRV_H__
20#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
37#define BT_MESH_LIGHT_TEMP_SRV_INIT(_handlers) \
39 .lvl = BT_MESH_LVL_SRV_INIT( \
40 &_bt_mesh_light_temp_srv_lvl_handlers), \
41 .pub = { .msg = NET_BUF_SIMPLE(BT_MESH_MODEL_BUF_LEN( \
42 BT_MESH_LIGHT_TEMP_STATUS, \
43 BT_MESH_LIGHT_CTL_MSG_MAXLEN_TEMP_STATUS)) }, \
44 .handlers = _handlers, \
56#define BT_MESH_MODEL_LIGHT_TEMP_SRV(_srv, ...) \
57 BT_MESH_MODEL_LVL_SRV(&(_srv)->lvl), \
58 BT_MESH_MODEL_METADATA_CB( \
59 BT_MESH_MODEL_ID_LIGHT_CTL_TEMP_SRV, \
60 _bt_mesh_light_temp_srv_op, &(_srv)->pub, \
61 BT_MESH_MODEL_USER_DATA(struct bt_mesh_light_temp_srv, _srv), \
62 &_bt_mesh_light_temp_srv_cb, __VA_ARGS__)
65#define BT_MESH_LIGHT_CTL_TEMP_RANGE_METADATA_ID 0x0004
73#define BT_MESH_LIGHT_CTL_TEMP_RANGE_METADATA(range_min, range_max) \
74 BT_MESH_MODELS_METADATA_ENTRY(4, BT_MESH_LIGHT_CTL_TEMP_RANGE_METADATA_ID, \
75 ((uint16_t[]){(range_min), (range_max)}))
96 struct bt_mesh_msg_ctx *ctx,
109 struct bt_mesh_msg_ctx *ctx,
152 struct bt_mesh_model_pub
pub;
169#if IS_ENABLED(CONFIG_EMDS) && IS_ENABLED(CONFIG_BT_SETTINGS)
194 struct bt_mesh_msg_ctx *ctx,
198extern const struct bt_mesh_model_op _bt_mesh_light_temp_srv_op[];
199extern const struct bt_mesh_model_cb _bt_mesh_light_temp_srv_cb;
201 _bt_mesh_light_temp_srv_lvl_handlers;
int bt_mesh_light_temp_srv_pub(struct bt_mesh_light_temp_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_status *status)
Publish the current CTL Temperature status.
Definition light_ctl_srv.h:65
Definition light_ctl.h:102
Definition light_ctl.h:78
void(*const range_update)(struct bt_mesh_light_temp_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_range *old_range, const struct bt_mesh_light_temp_range *new_range)
The Temperature Range state has changed.
Definition light_temp_srv.h:119
void(*const get)(struct bt_mesh_light_temp_srv *srv, struct bt_mesh_msg_ctx *ctx, struct bt_mesh_light_temp_status *rsp)
Get the CTL Temperature state.
Definition light_temp_srv.h:108
void(*const default_update)(struct bt_mesh_light_temp_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp *old_default, const struct bt_mesh_light_temp *new_default)
The Default Light Temperature has changed.
Definition light_temp_srv.h:132
void(*const set)(struct bt_mesh_light_temp_srv *srv, struct bt_mesh_msg_ctx *ctx, const struct bt_mesh_light_temp_set *set, struct bt_mesh_light_temp_status *rsp)
Set the Light Temperature state.
Definition light_temp_srv.h:95
Definition light_temp_srv.h:78
const struct bt_mesh_light_temp_srv_handlers * handlers
Definition light_temp_srv.h:156
struct bt_mesh_light_temp_srv::@157 transient
struct bt_mesh_light_temp_range range
Definition light_temp_srv.h:161
uint16_t corrective_delta
Definition light_temp_srv.h:163
const struct bt_mesh_model * model
Definition light_temp_srv.h:146
struct bt_mesh_light_temp dflt
Definition light_temp_srv.h:159
struct bt_mesh_lvl_srv lvl
Definition light_temp_srv.h:144
struct bt_mesh_tid_ctx prev_transaction
Definition light_temp_srv.h:154
struct bt_mesh_model_pub pub
Definition light_temp_srv.h:152
const struct bt_mesh_light_ctl_srv * ctl
Definition light_temp_srv.h:150
Definition light_temp_srv.h:142
Definition light_ctl.h:92
Definition light_ctl.h:42
Definition gen_lvl_srv.h:52
Definition gen_lvl_srv.h:143
Definition model_types.h:46