|
Cheetah Software
1.0
|
#include <PeriodicTask.h>
Inheritance diagram for PeriodicTask:
Collaboration diagram for PeriodicTask:Public Member Functions | |
| PeriodicTask (PeriodicTaskManager *taskManager, float period, std::string name) | |
| void | start () |
| void | stop () |
| void | printStatus () |
| void | clearMax () |
| bool | isSlow () |
| virtual void | init ()=0 |
| virtual void | run ()=0 |
| virtual void | cleanup ()=0 |
| virtual | ~PeriodicTask () |
| float | getPeriod () |
| float | getRuntime () |
| float | getMaxPeriod () |
| float | getMaxRuntime () |
Private Member Functions | |
| void | loopFunction () |
Private Attributes | |
| float | _period |
| volatile bool | _running = false |
| float | _lastRuntime = 0 |
| float | _lastPeriodTime = 0 |
| float | _maxPeriod = 0 |
| float | _maxRuntime = 0 |
| std::string | _name |
| std::thread | _thread |
A single periodic task which will call run() at the given frequency
Definition at line 19 of file PeriodicTask.h.
| PeriodicTask::PeriodicTask | ( | PeriodicTaskManager * | taskManager, |
| float | period, | ||
| std::string | name | ||
| ) |
Definition at line 14 of file PeriodicTask.cpp.
References PeriodicTaskManager::addTask().
Here is the call graph for this function:
|
inlinevirtual |
Definition at line 31 of file PeriodicTask.h.
References stop().
Here is the call graph for this function:
|
pure virtual |
Implemented in PeriodicMemberFunction< T >, PrintTaskStatus, PeriodicFunction, RobotInterface, RobotRunner, and TestPeriodicTask.
Here is the caller graph for this function:| void PeriodicTask::clearMax | ( | ) |
|
inline |
|
inline |
Definition at line 39 of file PeriodicTask.h.
References _maxRuntime, and loopFunction().
Here is the call graph for this function:
|
inline |
|
inline |
|
pure virtual |
Implemented in PeriodicMemberFunction< T >, PrintTaskStatus, PeriodicFunction, RobotInterface, RobotRunner, and TestPeriodicTask.
Here is the caller graph for this function:| bool PeriodicTask::isSlow | ( | ) |
Definition at line 44 of file PeriodicTask.cpp.
References _maxPeriod, _maxRuntime, and _period.
Here is the caller graph for this function:
|
private |
Definition at line 65 of file PeriodicTask.cpp.
References _lastPeriodTime, _lastRuntime, _maxPeriod, _maxRuntime, _name, _period, _running, f(), Timer::getSeconds(), run(), and Timer::start().
Here is the call graph for this function:
Here is the caller graph for this function:| void PeriodicTask::printStatus | ( | ) |
Definition at line 53 of file PeriodicTask.cpp.
References _lastPeriodTime, _lastRuntime, _maxPeriod, _maxRuntime, _name, _period, _running, isSlow(), printf_color(), and Red.
Here is the call graph for this function:
|
pure virtual |
Implemented in PeriodicMemberFunction< T >, PrintTaskStatus, PeriodicFunction, RobotInterface, RobotRunner, and TestPeriodicTask.
Here is the caller graph for this function:| void PeriodicTask::start | ( | ) |
Definition at line 20 of file PeriodicTask.cpp.
References _name, _running, _thread, init(), and loopFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| void PeriodicTask::stop | ( | ) |
|
private |
Definition at line 47 of file PeriodicTask.h.
|
private |
Definition at line 46 of file PeriodicTask.h.
|
private |
Definition at line 48 of file PeriodicTask.h.
|
private |
Definition at line 49 of file PeriodicTask.h.
|
private |
Definition at line 50 of file PeriodicTask.h.
|
private |
Definition at line 44 of file PeriodicTask.h.
|
private |
Definition at line 45 of file PeriodicTask.h.
|
private |
Definition at line 51 of file PeriodicTask.h.