-
Notifications
You must be signed in to change notification settings - Fork 0
DS_CAP_TIMERS
This capability add support for timers, used to execute certain actions in future. The way to define future event is determined by timer type. Grossly, there are two ways of designating future time: absolute (when system has notion of system time and can be programmed for a future timestamp) and relative (when system does not have notion of time but can be programmed for some time in future using some time counting technique relative to the original time point). The library supports several timer types:
- Absolute timer — fires at a given time in future
- Solar timer — fires at sun-related event (sunrise or sunset)
- Countdown timer — fires after some time period from now
For the countdown timer, two implementations are offered — one relying on absolute time, and another relying on relative time.
Timer actions are specified using a string called "action". When timer event fires, the library calls a user-defined callback function, which can check the timer "action" property in order to decide which code to execute.
This capability defines an abstract timer interface (ds::Timer
class); in order to actually use a timer, user has to select one of the four timer implementations listed above.
None.
None.
None.
None. See the corresponding timer implementations.
System::begin() |
Not required |
System::update() |
Not required |
Note that while this capability per se does not require System::begin()
call, the underlying implementations, like absolute timer, would most likely need it to work correctly. Check their respective pages for details.
None.
- DS_CAP_APP_ID
- DS_CAP_APP_LOG
- DS_CAP_BUTTON
- DS_CAP_MDNS
- DS_CAP_SYS_FS
- DS_CAP_SYS_LED
- DS_CAP_SYS_LOG
- DS_CAP_SYS_LOG_HW
- DS_CAP_SYS_NETWORK
- DS_CAP_SYS_RESET
- DS_CAP_SYS_RTCMEM
- DS_CAP_SYS_TIME
- DS_CAP_SYS_UPTIME
- DS_CAP_TIMERS
- DS_CAP_TIMERS_ABS
- DS_CAP_TIMERS_COUNT_ABS
- DS_CAP_TIMERS_COUNT_TICK
- DS_CAP_TIMERS_SOLAR
- DS_CAP_WEB_TIMERS
- DS_CAP_WEBSERVER
- DS_CAP_WIFIMANAGER