COSA
An Object-Oriented Platform for Arduino Programming
Job::Scheduler Class Referenceabstract

#include <Job.hh>

Inheritance diagram for Job::Scheduler:
Inheritance graph
Collaboration diagram for Job::Scheduler:
Collaboration graph

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
 

Detailed Description

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.

Definition at line 43 of file Job.hh.

Constructor & Destructor Documentation

Job::Scheduler::Scheduler ( )
inline

Construct default job scheduler and initiate job queue.

Definition at line 48 of file Job.hh.

Member Function Documentation

void Job::Scheduler::dispatch ( )
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.

bool Job::Scheduler::start ( Job job)
virtual

Start given job. Returns true(1) if successful otherwise false(0).

Parameters
[in]jobto start.
Returns
bool.

Reimplemented in RTT::Scheduler.

Definition at line 24 of file Job_Scheduler.cpp.

bool Job::Scheduler::stop ( Job job)
virtual

Stop given job. Returns true(1) if successful otherwise false(0).

Parameters
[in]jobto stop.
Returns
bool.

Definition at line 44 of file Job_Scheduler.cpp.

virtual uint32_t Job::Scheduler::time ( )
pure virtual

Return current scheduler time. '

Returns
time.

Implemented in RTT::Scheduler, Watchdog::Scheduler, and Clock.

Member Data Documentation

Head Job::Scheduler::m_queue
protected

Job queue.

Definition at line 84 of file Job.hh.


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