20 #ifndef COIL_PERIODICTASKBASE_H 21 #define COIL_PERIODICTASKBASE_H 23 #include <coil/TimeValue.h> 24 #include <coil/TimeMeasure.h> 25 #include <coil/Task.h> 93 template <
typename T,
typename F =
int (*)()>
120 : m_obj(obj), m_func(func)
158 return (m_obj->*m_func)();
229 virtual void activate() = 0;
246 virtual void finalize() = 0;
263 virtual int suspend(
void) = 0;
280 virtual int resume(
void) = 0;
297 virtual void signal() = 0;
320 virtual bool setTask(
TaskFuncBase* func,
bool delete_in_dtor =
true) = 0;
347 template <
class O,
class F>
372 virtual void setPeriod(
double period) = 0;
414 virtual void executionMeasure(
bool value) = 0;
435 virtual void executionMeasureCount(
int n) = 0;
456 virtual void periodicMeasure(
bool value) = 0;
477 virtual void periodicMeasureCount(
int n) = 0;
516 #endif // COIL_PERIODICTASKBASE_H virtual ~TaskFuncBase()
Destructor.
Structure for time statistics.
virtual int operator()()=0
Functor.
virtual ~TaskFunc()
Destructor.
TaskFunc(T *obj, F func)
Constructor.
bool setTask(O *obj, F fun)
Setting task execution function.
virtual int operator()()
Functor.
virtual ~PeriodicTaskBase()
Destructor.
Common Object Interface Layer.