nebula::exec::task::PeriodicTask
This class helps the application developer to define nebula::exec::task::Tasks which are periodically executed at fixed intervals. The interval is a configurable value which can be provided while declaring the task instance. Also the implementation supports extensible nebula::exec::task::TimerPolicy mechanism, so that the underlying timer mechanism can be defined by the application developer. It allows to use timer sources such as HW timer or other proprietary timer mechanisms as application need.
The implementation also provide nebula::exec::task::DefaultTimerPolicy for normal usage.
See also: DefaultTimerPolicy
Example:
// Task definition
Class LooperTask : public Task {
// This method will be periodically invoked
bool run() {
// Implementation
}
// Other task method implementations
};
PeriodicTask<LooperTask, 100000000> task; // run every 100ms
- Parameters
Task
Task Implementationinterval
interval time in nsPolicy
Backend timer policy to be used
See also: Task
See also: DefaultTimerPolicy
class nebula::exec::task::PeriodicTask
Helper for defining periodic tasks, which are invoked at fixed intervals.
Members
public inline
PeriodicTask
()
Construct a new Periodic Task object and schedule it.