Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PollThread Class Reference#include <PollThread.h>
Inheritance diagram for PollThread:
![]() Detailed Descriptiondescription of PollThreadDefinition at line 13 of file PollThread.h.
Constructor & Destructor Documentation
Member Function Documentation
requests that the thread be started, if not already running (you need to create a separate instances if you want to run multiple copies)
Reimplemented from Thread. Definition at line 9 of file PollThread.cc. Referenced by PollThread().
this is the function which will be called at the specified frequency, override it with your own functionality
Definition at line 15 of file PollThread.cc. Referenced by run().
called if a signal is sent while sleeping, should reset delay to indicate remaining sleep time, relative to startTime On return, delay should be set such that delay-startTime.Age() is remaining sleep time. In other words, simply set delay to the period to maintain previously requested timing. This default implementation will set delay to the remaining time needed to maintain current period setting. Feel free to override and reset period (or other member variables) if you need to change timing dynamically. If the period is shortened such that poll() should have already occurred based on time of previous call and the new period (plus any delay value), then poll() will be called immediately upon return. Reimplemented from Thread. Definition at line 23 of file PollThread.cc.
called by launch() once the thread has been set up; when this returns, the thread ends, see runloop() Default implementation repeatedly calls runloop(), usleep(), and testCancel(). If you override, you should also be sure to call testCancel occasionally in order to support stop() If function returns a value, that value overrides returnValue. If cancel occurs, returnValue is used. Reimplemented from Thread. Definition at line 36 of file PollThread.cc.
Member Data Documentation
amount of time to delay between call to start() and first call to poll(), or if interrupt occurs after first poll(), amount of time to re-sleep
Definition at line 61 of file PollThread.h. Referenced by interrupted(), and run().
amount of time between calls to poll() -- if zero or negative, no delay will be made between calls (other than a call to testCancel())
Definition at line 62 of file PollThread.h. Referenced by interrupted(), poll(), and run().
the time at which start() was called or the current period began
Definition at line 63 of file PollThread.h. Referenced by interrupted(), run(), and start().
if true, the time spent in poll() is subtracted from the next sleep time so frequency is fixed; if false, period is added onto whatever time poll() takes
Definition at line 64 of file PollThread.h. Referenced by getTrackPollTime(), run(), and setTrackPollTime().
set to true after start until after first call to poll has completed
Definition at line 65 of file PollThread.h. Referenced by interrupted(), run(), and start().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:36 2007 by Doxygen 1.5.4 |