14#ifndef BT_MESH_SCHEDULER_SRV_H__
15#define BT_MESH_SCHEDULER_SRV_H__
17#include <zephyr/kernel.h>
35#define BT_MESH_SCHEDULER_SRV_INIT(_action_set_cb, _time_srv) \
37 .action_set_cb = _action_set_cb, .time_srv = _time_srv, \
50#define BT_MESH_MODEL_SCHEDULER_SRV(_srv) \
51 BT_MESH_MODEL_SCENE_SRV(&(_srv)->scene_srv), \
52 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_SCHEDULER_SRV, \
53 _bt_mesh_scheduler_srv_op, \
55 BT_MESH_MODEL_USER_DATA(struct bt_mesh_scheduler_srv, \
57 &_bt_mesh_scheduler_srv_cb), \
58 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_SCHEDULER_SETUP_SRV, \
59 _bt_mesh_scheduler_setup_srv_op, \
61 BT_MESH_MODEL_USER_DATA(struct bt_mesh_scheduler_srv, \
63 &_bt_mesh_scheduler_setup_srv_cb)
89 const struct bt_mesh_model *
model;
91 struct bt_mesh_model_pub
pub;
96 BT_MESH_MODEL_BUF_LEN(BT_MESH_SCHEDULER_OP_ACTION_STATUS,
97 BT_MESH_SCHEDULER_MSG_LEN_ACTION_STATUS)];
115 struct bt_mesh_msg_ctx *ctx,
134extern const struct bt_mesh_model_cb _bt_mesh_scheduler_srv_cb;
135extern const struct bt_mesh_model_op _bt_mesh_scheduler_srv_op[];
136extern const struct bt_mesh_model_cb _bt_mesh_scheduler_setup_srv_cb;
137extern const struct bt_mesh_model_op _bt_mesh_scheduler_setup_srv_op[];
int bt_mesh_scheduler_srv_time_update(struct bt_mesh_scheduler_srv *srv)
Update time of the scheduled action.
#define BT_MESH_SCHEDULER_ACTION_ENTRY_COUNT
Definition scheduler.h:24
Definition scene_srv.h:71
Definition scheduler.h:91
struct bt_mesh_schedule_entry sch_reg[BT_MESH_SCHEDULER_ACTION_ENTRY_COUNT]
Definition scheduler_srv.h:85
struct bt_mesh_time_tai sched_tai[BT_MESH_SCHEDULER_ACTION_ENTRY_COUNT]
Definition scheduler_srv.h:72
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_SCHEDULER_OP_ACTION_STATUS, BT_MESH_SCHEDULER_MSG_LEN_ACTION_STATUS)]
Definition scheduler_srv.h:97
struct bt_mesh_model_pub pub
Definition scheduler_srv.h:91
struct net_buf_simple pub_buf
Definition scheduler_srv.h:93
struct bt_mesh_time_srv * time_srv
Definition scheduler_srv.h:99
struct bt_mesh_scene_srv scene_srv
Definition scheduler_srv.h:101
const struct bt_mesh_model * model
Definition scheduler_srv.h:89
uint8_t idx
Definition scheduler_srv.h:75
uint16_t active_bitmap
Definition scheduler_srv.h:81
void(*const action_set_cb)(struct bt_mesh_scheduler_srv *srv, struct bt_mesh_msg_ctx *ctx, uint8_t idx, struct bt_mesh_schedule_entry *entry)
Scheduler action set callback.
Definition scheduler_srv.h:114
struct k_work_delayable delayed_work
Definition scheduler_srv.h:70
uint8_t last_idx
Definition scheduler_srv.h:77
Definition scheduler_srv.h:66
Definition time_srv.h:124