15#ifndef BT_MESH_GEN_DTT_SRV_H__
16#define BT_MESH_GEN_DTT_SRV_H__
18#include <zephyr/bluetooth/mesh.h>
35#define BT_MESH_DTT_SRV_INIT(_update) \
46#define BT_MESH_MODEL_DTT_SRV(_srv) \
47 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_SRV, \
48 _bt_mesh_dtt_srv_op, &(_srv)->pub, \
49 BT_MESH_MODEL_USER_DATA(struct bt_mesh_dtt_srv, \
71 struct bt_mesh_msg_ctx *ctx,
72 uint32_t old_transition_time,
73 uint32_t new_transition_time);
75 const struct bt_mesh_model *
model;
77 struct bt_mesh_model_pub
pub;
81 uint8_t
pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DTT_OP_STATUS,
82 BT_MESH_DTT_MSG_LEN_STATUS)];
108 struct bt_mesh_msg_ctx *ctx);
136 if (IS_ENABLED(CONFIG_BT_MESH_DTT_SRV)) {
143 transition->
delay = 0;
144 return (srv != NULL);
148extern const struct bt_mesh_model_op _bt_mesh_dtt_srv_op[];
149extern const struct bt_mesh_model_cb _bt_mesh_dtt_srv_cb;
int bt_mesh_dtt_srv_pub(struct bt_mesh_dtt_srv *srv, struct bt_mesh_msg_ctx *ctx)
Publish the current transition time.
struct bt_mesh_dtt_srv * bt_mesh_dtt_srv_get(const struct bt_mesh_elem *elem)
Find the Generic DTT server over multiple elements.
static bool bt_mesh_dtt_srv_transition_get(const struct bt_mesh_model *model, struct bt_mesh_model_transition *transition)
Get the default transition parameters for the given model.
Definition gen_dtt_srv.h:131
void bt_mesh_dtt_srv_set(struct bt_mesh_dtt_srv *srv, uint32_t transition_time)
Set the Default Transition Time of the DTT server.
struct net_buf_simple pub_buf
Definition gen_dtt_srv.h:79
const struct bt_mesh_model * model
Definition gen_dtt_srv.h:75
uint32_t transition_time
Definition gen_dtt_srv.h:56
void(*const update)(struct bt_mesh_dtt_srv *srv, struct bt_mesh_msg_ctx *ctx, uint32_t old_transition_time, uint32_t new_transition_time)
Update handler for the transition time state.
Definition gen_dtt_srv.h:70
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_DTT_OP_STATUS, BT_MESH_DTT_MSG_LEN_STATUS)]
Definition gen_dtt_srv.h:82
struct bt_mesh_model_pub pub
Definition gen_dtt_srv.h:77
Definition gen_dtt_srv.h:54
uint32_t delay
Definition model_types.h:39
uint32_t time
Definition model_types.h:38
Definition model_types.h:37