PeriodicTask class. More...
#include <PeriodicTask.h>
Classes | |
class | alive_t |
alive_t class More... | |
struct | statistics_t |
Structure for task execution time measurement management. More... | |
struct | suspend_t |
Structure for task suspend management. More... | |
Public Types | |
typedef coil::Guard< coil::Mutex > | Guard |
Public Member Functions | |
virtual void | activate () |
Starting the task. More... | |
virtual void | executionMeasure (bool value) |
Validate a Task execute time measurement. More... | |
virtual void | executionMeasureCount (int n) |
Task execute time measurement period. More... | |
virtual void | finalize () |
Finalizing the task. More... | |
virtual TimeMeasure::Statistics | getExecStat () |
Get a result in task execute time measurement. More... | |
virtual TimeMeasure::Statistics | getPeriodStat () |
Get a result in task period time measurement. More... | |
virtual void | periodicMeasure (bool value) |
Validate a Task period time measurement. More... | |
virtual void | periodicMeasureCount (int n) |
Task period time measurement count. More... | |
PeriodicTask () | |
Constructor. More... | |
virtual int | resume (void) |
Resuming the suspended task. More... | |
virtual void | setPeriod (double period) |
Setting task execution period. More... | |
virtual void | setPeriod (TimeValue &period) |
Setting task execution period. More... | |
virtual bool | setTask (TaskFuncBase *func, bool delete_in_dtor=true) |
Setting task execution function. More... | |
template<class O , class F > | |
bool | setTask (O *obj, F fun) |
Setting task execution function. More... | |
virtual void | signal () |
Executing the suspended task one tick. More... | |
virtual int | suspend (void) |
Suspending the task. More... | |
virtual | ~PeriodicTask () |
Destructor. More... | |
Public Member Functions inherited from coil::PeriodicTaskBase | |
template<class O , class F > | |
bool | setTask (O *obj, F fun) |
Setting task execution function. More... | |
virtual | ~PeriodicTaskBase () |
Destructor. More... | |
Public Member Functions inherited from coil::Task | |
virtual int | close (unsigned long flags=0) |
Task close. More... | |
virtual int | close (unsigned long flags=0) |
Task close. More... | |
virtual int | open (void *args=0) |
Task open. More... | |
virtual int | open (void *args=0) |
Task open. More... | |
virtual void | reset () |
Reset of task count. More... | |
virtual void | reset () |
Reset of task count. More... | |
Task () | |
Constructor. More... | |
Task () | |
Constructor. More... | |
virtual int | wait (void) |
Waiting for the thread terminate. More... | |
virtual int | wait (void) |
Waiting for the thread terminate. More... | |
virtual | ~Task () |
Destructor. More... | |
virtual | ~Task () |
Destructor. More... | |
Protected Member Functions | |
virtual void | sleep () |
Thread sleep. More... | |
virtual int | svc () |
Thread execution for PeriodicTask. More... | |
virtual void | updateExecStat () |
Update for execute state. More... | |
virtual void | updatePeriodStat () |
Update for period state. More... | |
Protected Attributes | |
alive_t | m_alive |
Task alive flag. More... | |
bool | m_deleteInDtor |
Task execution function delete flag. More... | |
unsigned int | m_execCount |
Task execution time measurement count. More... | |
unsigned int | m_execCountMax |
Task execution time measurement max count. More... | |
bool | m_execMeasure |
Task execution time measurement flag. More... | |
statistics_t | m_execStat |
Task execution time measurement statistics. More... | |
coil::TimeMeasure | m_execTime |
Task execution time measurement infomation. More... | |
TaskFuncBase * | m_func |
Task execution function. More... | |
bool | m_nowait |
Thread sleep flag. More... | |
coil::TimeValue | m_period |
Task execution period. More... | |
unsigned int | m_periodCount |
Task periodic time measurement count. More... | |
unsigned int | m_periodCountMax |
Task periodic time measurement max count. More... | |
bool | m_periodMeasure |
Task periodic time measurement flag. More... | |
statistics_t | m_periodStat |
Task periodic time measurement statistics. More... | |
coil::TimeMeasure | m_periodTime |
Task periodic time measurement infomation. More... | |
suspend_t | m_suspend |
Task suspend infomation. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from coil::Task | |
static void * | svc_run (void *args=0) |
Start thread Execution. More... | |
static unsigned int WINAPI | svc_run (void *args=0) |
Start thread Execution. More... | |
PeriodicTask class.
Definition at line 61 of file PeriodicTask.h.
Definition at line 65 of file PeriodicTask.h.
coil::PeriodicTask::PeriodicTask | ( | ) |
|
virtual |
|
virtual |
Starting the task.
Starting a thread to execute a task. If the task/thread is started properly, it will return 'TRUE'. if the task/thread are already started or task function object is not set, 'FALSE' will be returned.
Implements coil::PeriodicTaskBase.
Definition at line 65 of file PeriodicTask.cpp.
|
virtual |
Validate a Task execute time measurement.
Implements coil::PeriodicTaskBase.
Definition at line 199 of file PeriodicTask.cpp.
|
virtual |
Task execute time measurement period.
Implements coil::PeriodicTaskBase.
Definition at line 211 of file PeriodicTask.cpp.
|
virtual |
Finalizing the task.
Finalizing the task running.
Implements coil::PeriodicTaskBase.
Definition at line 82 of file PeriodicTask.cpp.
|
virtual |
Get a result in task execute time measurement.
Implements coil::PeriodicTaskBase.
Definition at line 247 of file PeriodicTask.cpp.
|
virtual |
Get a result in task period time measurement.
Implements coil::PeriodicTaskBase.
Definition at line 260 of file PeriodicTask.cpp.
|
virtual |
Validate a Task period time measurement.
Implements coil::PeriodicTaskBase.
Definition at line 223 of file PeriodicTask.cpp.
|
virtual |
Task period time measurement count.
Implements coil::PeriodicTaskBase.
Definition at line 235 of file PeriodicTask.cpp.
|
virtual |
Resuming the suspended task.
Resuming the suspended task
Implements coil::PeriodicTaskBase.
Definition at line 113 of file PeriodicTask.cpp.
|
virtual |
Setting task execution period.
period | Execution period [sec] |
Implements coil::PeriodicTaskBase.
Definition at line 159 of file PeriodicTask.cpp.
|
virtual |
Setting task execution period.
period | Execution period |
Implements coil::PeriodicTaskBase.
Definition at line 179 of file PeriodicTask.cpp.
|
virtual |
Setting task execution function.
func | Set int (*)() type function pointer |
Implements coil::PeriodicTaskBase.
Definition at line 144 of file PeriodicTask.cpp.
|
inline |
Setting task execution function.
func | Set int (*)() type function pointer |
Definition at line 218 of file PeriodicTask.h.
|
virtual |
Executing the suspended task one tick.
Executing the suspended task one tick
Implements coil::PeriodicTaskBase.
Definition at line 131 of file PeriodicTask.cpp.
|
protectedvirtual |
Thread sleep.
Definition at line 319 of file PeriodicTask.cpp.
|
virtual |
Suspending the task.
Suspending the task running.
Implements coil::PeriodicTaskBase.
Definition at line 99 of file PeriodicTask.cpp.
|
protectedvirtual |
Thread execution for PeriodicTask.
Reimplemented from coil::Task.
Definition at line 276 of file PeriodicTask.cpp.
|
protectedvirtual |
Update for execute state.
Definition at line 335 of file PeriodicTask.cpp.
|
protectedvirtual |
Update for period state.
Definition at line 353 of file PeriodicTask.cpp.
|
protected |
Task alive flag.
Definition at line 405 of file PeriodicTask.h.
|
protected |
Task execution function delete flag.
Definition at line 379 of file PeriodicTask.h.
|
protected |
Task execution time measurement count.
Definition at line 460 of file PeriodicTask.h.
|
protected |
Task execution time measurement max count.
Definition at line 469 of file PeriodicTask.h.
|
protected |
Task execution time measurement flag.
Definition at line 451 of file PeriodicTask.h.
|
protected |
Task execution time measurement statistics.
Definition at line 478 of file PeriodicTask.h.
|
protected |
Task execution time measurement infomation.
Definition at line 487 of file PeriodicTask.h.
|
protected |
Task execution function.
Definition at line 370 of file PeriodicTask.h.
|
protected |
Thread sleep flag.
Definition at line 361 of file PeriodicTask.h.
|
protected |
Task execution period.
Definition at line 352 of file PeriodicTask.h.
|
protected |
Task periodic time measurement count.
Definition at line 505 of file PeriodicTask.h.
|
protected |
Task periodic time measurement max count.
Definition at line 514 of file PeriodicTask.h.
|
protected |
Task periodic time measurement flag.
Definition at line 496 of file PeriodicTask.h.
|
protected |
Task periodic time measurement statistics.
Definition at line 523 of file PeriodicTask.h.
|
protected |
Task periodic time measurement infomation.
Definition at line 532 of file PeriodicTask.h.
|
protected |
Task suspend infomation.
Definition at line 429 of file PeriodicTask.h.