|
TaskSched
|
This class runs the scheduled tasks. More...
#include <TaskSched.h>
Public Member Functions | |
| unsigned long | getSize () |
| return the number of tasks in the run queue More... | |
| Sched () | |
| void | begin () |
| void | addTask (Task *task) |
| void | enable () |
| enable the scheduler More... | |
| void | disable () |
| disable the scheduler More... | |
| bool | isEnabled () |
| return true if the scheduler is enabled More... | |
| const SimpleList< Task * > & | getTasks () const |
| void | run () |
| called perodically to check if a task should be scheduled More... | |
This class runs the scheduled tasks.
It's kinda like the DTO in the Java world.
Definition at line 279 of file TaskSched.h.
| Sched::Sched | ( | ) |
| void Sched::addTask | ( | Task * | task | ) |
Definition at line 244 of file TaskSched.cpp.
References Task::getName(), and SimpleList< T >::push_back().
| void Sched::begin | ( | ) |
used to start the scheduling. A call to begin will also enable the scheduler.
Definition at line 241 of file TaskSched.cpp.
| void Sched::disable | ( | ) |
disable the scheduler
Definition at line 256 of file TaskSched.cpp.
| void Sched::enable | ( | ) |
enable the scheduler
Definition at line 253 of file TaskSched.cpp.
| unsigned long Sched::getSize | ( | ) |
return the number of tasks in the run queue
Definition at line 233 of file TaskSched.cpp.
References SimpleList< T >::get_size().
| const SimpleList< Task * > & Sched::getTasks | ( | ) | const |
| bool Sched::isEnabled | ( | ) |
| void Sched::run | ( | ) |
called perodically to check if a task should be scheduled
Definition at line 265 of file TaskSched.cpp.
References SimpleList< T >::begin(), SimpleList< T >::end(), Task::getName(), Task::isEnabled(), and Task::showInit().