Cheetah Software  1.0
TestPeriodicTask Class Reference
+ Inheritance diagram for TestPeriodicTask:
+ Collaboration diagram for TestPeriodicTask:

Public Member Functions

void run () override
 
void init () override
 
void cleanup () override
 
- Public Member Functions inherited from PeriodicTask
 PeriodicTask (PeriodicTaskManager *taskManager, float period, std::string name)
 
void start ()
 
void stop ()
 
void printStatus ()
 
void clearMax ()
 
bool isSlow ()
 
virtual ~PeriodicTask ()
 
float getPeriod ()
 
float getRuntime ()
 
float getMaxPeriod ()
 
float getMaxRuntime ()
 

Public Attributes

int _counter = 0
 
bool _cleanedUp = false
 
bool _init = false
 
bool _slow = false
 

Detailed Description

Definition at line 6 of file test_periodic_tasks.cpp.

Member Function Documentation

void TestPeriodicTask::cleanup ( )
inlineoverridevirtual

Implements PeriodicTask.

Definition at line 21 of file test_periodic_tasks.cpp.

21 { _cleanedUp = true; }
void TestPeriodicTask::init ( )
inlineoverridevirtual

Implements PeriodicTask.

Definition at line 19 of file test_periodic_tasks.cpp.

19 { _init = true; }
void TestPeriodicTask::run ( )
inlineoverridevirtual

Implements PeriodicTask.

Definition at line 14 of file test_periodic_tasks.cpp.

14  {
15  _counter++;
16  if (_slow) usleep(15000);
17  }

Member Data Documentation

bool TestPeriodicTask::_cleanedUp = false

Definition at line 10 of file test_periodic_tasks.cpp.

int TestPeriodicTask::_counter = 0

Definition at line 9 of file test_periodic_tasks.cpp.

bool TestPeriodicTask::_init = false

Definition at line 11 of file test_periodic_tasks.cpp.

bool TestPeriodicTask::_slow = false

Definition at line 12 of file test_periodic_tasks.cpp.


The documentation for this class was generated from the following file: