Cheetah Software  1.0
PeriodicFunction Class Reference

#include <PeriodicTask.h>

+ Inheritance diagram for PeriodicFunction:
+ Collaboration diagram for PeriodicFunction:

Public Member Functions

 PeriodicFunction (PeriodicTaskManager *taskManager, float period, std::string name, void(*function)())
 
void cleanup ()
 
void init ()
 
void run ()
 
 ~PeriodicFunction ()
 
- 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 ()
 

Private Attributes

void(* _function )() = nullptr
 

Detailed Description

A periodic task for calling a function

Definition at line 73 of file PeriodicTask.h.

Constructor & Destructor Documentation

PeriodicFunction::PeriodicFunction ( PeriodicTaskManager taskManager,
float  period,
std::string  name,
void(*)()  function 
)
inline

Definition at line 75 of file PeriodicTask.h.

77  : PeriodicTask(taskManager, period, name), _function(function) {}
PeriodicTask(PeriodicTaskManager *taskManager, float period, std::string name)
void(* _function)()
Definition: PeriodicTask.h:85
PeriodicFunction::~PeriodicFunction ( )
inline

Definition at line 82 of file PeriodicTask.h.

References PeriodicTask::stop().

82 { stop(); }

+ Here is the call graph for this function:

Member Function Documentation

void PeriodicFunction::cleanup ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 78 of file PeriodicTask.h.

78 {}
void PeriodicFunction::init ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 79 of file PeriodicTask.h.

79 {}
void PeriodicFunction::run ( )
inlinevirtual

Implements PeriodicTask.

Definition at line 80 of file PeriodicTask.h.

80 { _function(); }
void(* _function)()
Definition: PeriodicTask.h:85

Member Data Documentation

void(* PeriodicFunction::_function) () = nullptr
private

Definition at line 85 of file PeriodicTask.h.


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