libamxp
1.4.0
Patterns C Implementation
|
Structure containing a schedule item. More...
#include <amxp_scheduler.h>
Data Fields | |
amxp_cron_expr_t | cron |
amxp_cron_expr_t | end_cron |
uint32_t | duration |
bool | end_time_is_set |
amxc_ts_t | next |
amxp_timer_t * | timer |
bool | enabled |
amxc_llist_it_t | lit |
amxc_htable_it_t | hit |
Structure containing a schedule item.
This structure defines a schedule item. A schedule item defines points in time and can optionally have duration. The points in time are defined using a cron expression. The duration can either be a fixed time in seconds or another point in time defined using a second cron expression.
A schedule item can be enabled or disabled at any moment.
A schedule item has a unique identifier, which can be any string, and must be unique within a scheduler. The schedule item identifier is used in the signal names.
To activate a schedule item it must be added to a scheduler. Whenever the defined point in time is readched the scheduler will emit or trigger a signal (event).
Multiple callback functions (slots) can be added to the scheduler, either on all schedule items or on a specific item.
Definition at line 126 of file amxp_scheduler.h.
amxp_cron_expr_t _scheduler_item::cron |
The parsed cron expression
Definition at line 127 of file amxp_scheduler.h.
uint32_t _scheduler_item::duration |
The duration of the item in seconds
Definition at line 129 of file amxp_scheduler.h.
bool _scheduler_item::enabled |
Is this schedule item enabled (true) or disabled (false)
Definition at line 133 of file amxp_scheduler.h.
amxp_cron_expr_t _scheduler_item::end_cron |
The end time, is used to calculated the duration
Definition at line 128 of file amxp_scheduler.h.
bool _scheduler_item::end_time_is_set |
Set to true when end cron is set.
Definition at line 130 of file amxp_scheduler.h.
amxc_htable_it_t _scheduler_item::hit |
Used to store the item in the scheduler, used for look-up by identifier
Definition at line 135 of file amxp_scheduler.h.
amxc_llist_it_t _scheduler_item::lit |
Used to store the item in the scheduler ordered list
Definition at line 134 of file amxp_scheduler.h.
amxc_ts_t _scheduler_item::next |
Next time this schedule will trigger
Definition at line 131 of file amxp_scheduler.h.
amxp_timer_t* _scheduler_item::timer |
The timer, used when this schedule is triggered with a duration different then 0
Definition at line 132 of file amxp_scheduler.h.