COSA
An Object-Oriented Platform for Arduino Programming
|
#include <Job.hh>
Public Member Functions | |
Scheduler () | |
virtual bool | start (Job *job) |
virtual bool | stop (Job *job) |
virtual void | dispatch () |
virtual uint32_t | time ()=0 |
Protected Attributes | |
Head | m_queue |
Abstract class for scheduling of jobs. Must be sub-classed to implement time base. The virtual member start() queues jobs, stop() dequeues jobs, dispatch() which typically is called from an interrupt service will by default push a timeout event to the job. The default event handler will call the job run() virtual member function.
|
inline |
|
virtual |
Dispatch expired jobs. This member function is typically called from an interrupt service routine.
Reimplemented in RTT::Scheduler.
Definition at line 53 of file Job_Scheduler.cpp.
|
virtual |
Start given job. Returns true(1) if successful otherwise false(0).
[in] | job | to start. |
Reimplemented in RTT::Scheduler.
Definition at line 24 of file Job_Scheduler.cpp.
|
virtual |
Stop given job. Returns true(1) if successful otherwise false(0).
[in] | job | to stop. |
Definition at line 44 of file Job_Scheduler.cpp.
|
pure virtual |
Return current scheduler time. '
Implemented in RTT::Scheduler, Watchdog::Scheduler, and Clock.