Pol  Revision:3cfda13
Pol::Core::PeriodicTask Class Reference

#include <schedule.h>

+ Inheritance diagram for Pol::Core::PeriodicTask:

Public Member Functions

 PeriodicTask (void(*f)(void), int n_secs, const char *name)
 
 PeriodicTask (void(*f)(void), int initial_wait_seconds, int periodic_seconds, const char *name)
 
virtual ~PeriodicTask ()
 
virtual void execute (polclock_t now) POL_OVERRIDE
 
void set_secs (int n_secs)
 
void start ()
 
- Public Member Functions inherited from Pol::Core::ScheduledTask
 ScheduledTask (polclock_t next_run_clock)
 
virtual ~ScheduledTask ()
 
virtual void cancel (void)
 
polclock_t clocksleft (polclock_t now)
 
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
 

Private Attributes

void(* f )(void)
 
polclock_t n_clocks
 
polclock_t n_initial_clocks
 
const char * name_
 

Additional Inherited Members

- Protected Attributes inherited from Pol::Core::ScheduledTask
bool cancelled
 
polclock_t last_run_clock_
 
polclock_t next_run_clock_
 

Detailed Description

Definition at line 75 of file schedule.h.

Constructor & Destructor Documentation

Pol::Core::PeriodicTask::PeriodicTask ( void(*)(void)  f,
int  n_secs,
const char *  name 
)

Definition at line 71 of file schedule.cpp.

Pol::Core::PeriodicTask::PeriodicTask ( void(*)(void)  f,
int  initial_wait_seconds,
int  periodic_seconds,
const char *  name 
)

Definition at line 80 of file schedule.cpp.

virtual Pol::Core::PeriodicTask::~PeriodicTask ( )
inlinevirtual

Definition at line 81 of file schedule.h.

References POL_OVERRIDE.

Member Function Documentation

void Pol::Core::PeriodicTask::execute ( polclock_t  now)
virtual
void Pol::Core::PeriodicTask::set_secs ( int  n_secs)

Definition at line 91 of file schedule.cpp.

References n_clocks, n_initial_clocks, and Pol::Core::POLCLOCKS_PER_SEC.

Member Data Documentation

void( * Pol::Core::PeriodicTask::f) (void)
private

Definition at line 91 of file schedule.h.

polclock_t Pol::Core::PeriodicTask::n_clocks
private

Definition at line 90 of file schedule.h.

Referenced by execute(), and set_secs().

polclock_t Pol::Core::PeriodicTask::n_initial_clocks
private

Definition at line 89 of file schedule.h.

Referenced by set_secs(), and start().

const char* Pol::Core::PeriodicTask::name_
private

Definition at line 92 of file schedule.h.


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