Pol  Rev 533
PeriodicTask Class Reference

#include <schedule.h>

+ Inheritance diagram for PeriodicTask:
+ Collaboration diagram for PeriodicTask:

List of all members.

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 void execute (polclock_t now)
void set_secs (int n_secs)
void start ()

Private Attributes

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

Detailed Description

Definition at line 63 of file schedule.h.


Constructor & Destructor Documentation

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

Definition at line 84 of file schedule.cpp.

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

Definition at line 93 of file schedule.cpp.


Member Function Documentation

void PeriodicTask::execute ( polclock_t  now) [virtual]

Implements ScheduledTask.

Definition at line 121 of file schedule.cpp.

References ScheduledTask::last_run_clock_, n_clocks, and ScheduledTask::next_run_clock_.

void PeriodicTask::set_secs ( int  n_secs)

Definition at line 103 of file schedule.cpp.

References n_clocks, n_initial_clocks, and POLCLOCKS_PER_SEC.

Referenced by read_pol_config().

+ Here is the caller graph for this function:

Definition at line 108 of file schedule.cpp.

References add_task(), ScheduledTask::last_run_clock_, n_initial_clocks, ScheduledTask::next_run_clock_, and polclock().

Referenced by read_pol_config(), and start_tasks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Member Data Documentation

void(* PeriodicTask::f)(void) [private]

Definition at line 77 of file schedule.h.

Definition at line 76 of file schedule.h.

Referenced by execute(), and set_secs().

Definition at line 75 of file schedule.h.

Referenced by set_secs(), and start().

const char* PeriodicTask::name_ [private]

Definition at line 78 of file schedule.h.


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