Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PollThread Class Referencedescription of PollThread More...
Inheritance diagram for PollThread:
Detailed Descriptiondescription of PollThread Definition at line 13 of file PollThread.h.
Constructor & Destructor Documentation
constructor Definition at line 16 of file PollThread.h.
constructor Definition at line 18 of file PollThread.h.
destructor Definition at line 22 of file PollThread.h. Member Function Documentation
returns trackPollTime Definition at line 31 of file PollThread.h.
called if a SIGALRM is sent (generally, by a call to interrupt()) Reimplemented from Thread.
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 24 of file PollThread.cc.
this is the function which will be called at the specified frequency, override it with your own functionality
Reimplemented in CallbackPollThread. Definition at line 16 of file PollThread.cc. Referenced by run().
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 37 of file PollThread.cc.
sets trackPollTime Definition at line 32 of file PollThread.h.
requests that the thread be started, if not already running (you need to create separate instances if you want to run multiple copies) Reimplemented from Thread. Definition at line 10 of file PollThread.cc. Referenced by CallbackPollThread::CallbackPollThread(). 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 58 of file PollThread.h. Referenced by interrupted(), CallbackPollThread::resetPeriod(), and run().
set to true after start until after first call to poll has completed Definition at line 62 of file PollThread.h. Referenced by interrupted(), run(), and start().
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 59 of file PollThread.h. Referenced by interrupted(), poll(), CallbackPollThread::resetPeriod(), and run().
the time at which start() was called or the current period began Definition at line 60 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 61 of file PollThread.h. Referenced by getTrackPollTime(), run(), and setTrackPollTime(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3 |