Pol  Revision:cb584c9
Pol::Core::ScheduledTask Class Referenceabstract

#include <schedule.h>

+ Inheritance diagram for Pol::Core::ScheduledTask:

Public Member Functions

 ScheduledTask (polclock_t next_run_clock)
 
virtual ~ScheduledTask ()
 
virtual void cancel (void)
 
polclock_t clocksleft (polclock_t now)
 
virtual void execute (polclock_t now)=0
 
bool late (polclock_t now)
 
polclock_t next_run_clock () const
 
bool ready (polclock_t now)
 
polticks_t ticks_late (polclock_t now)
 
polticks_t ticks_left (polclock_t now) const
 

Protected Attributes

bool cancelled
 
polclock_t last_run_clock_
 
polclock_t next_run_clock_
 

Friends

polclock_t calc_scheduler_clocksleft (polclock_t now)
 
void check_scheduled_tasks (polclock_t *clocksleft, bool *pactivity)
 
void check_scheduled_tasks2 (void)
 
class SchComparer
 

Detailed Description

Definition at line 39 of file schedule.h.

Constructor & Destructor Documentation

Pol::Core::ScheduledTask::ScheduledTask ( polclock_t  next_run_clock)
explicit

Definition at line 41 of file schedule.cpp.

Pol::Core::ScheduledTask::~ScheduledTask ( )
virtual

Definition at line 46 of file schedule.cpp.

Member Function Documentation

void Pol::Core::ScheduledTask::cancel ( void  )
virtual

Reimplemented in Pol::Core::OneShotTask.

Definition at line 48 of file schedule.cpp.

References cancelled.

Referenced by Pol::Core::OneShotTask::cancel().

polclock_t Pol::Core::ScheduledTask::clocksleft ( polclock_t  now)
virtual void Pol::Core::ScheduledTask::execute ( polclock_t  now)
pure virtual
bool Pol::Core::ScheduledTask::late ( polclock_t  now)
inline

Definition at line 57 of file schedule.cpp.

References next_run_clock_.

Referenced by Pol::Core::check_scheduled_tasks().

bool Pol::Core::ScheduledTask::ready ( polclock_t  now)
inline
polticks_t Pol::Core::ScheduledTask::ticks_late ( polclock_t  now)
inline

Definition at line 61 of file schedule.cpp.

References next_run_clock_.

Referenced by Pol::Core::check_scheduled_tasks().

polticks_t Pol::Core::ScheduledTask::ticks_left ( polclock_t  now) const

Friends And Related Function Documentation

polclock_t calc_scheduler_clocksleft ( polclock_t  now)
friend

Definition at line 245 of file schedule.cpp.

void check_scheduled_tasks ( polclock_t clocksleft,
bool *  pactivity 
)
friend

Definition at line 186 of file schedule.cpp.

void check_scheduled_tasks2 ( void  )
friend
friend class SchComparer
friend

Definition at line 60 of file schedule.h.

Member Data Documentation

bool Pol::Core::ScheduledTask::cancelled
protected
polclock_t Pol::Core::ScheduledTask::last_run_clock_
protected

Definition at line 59 of file schedule.h.

Referenced by Pol::Core::PeriodicTask::execute(), and Pol::Core::PeriodicTask::start().

polclock_t Pol::Core::ScheduledTask::next_run_clock_
protected

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