| 1 |
NAME SoTimerQueueSensor SoTimerQSens "" { |
| 2 |
abstract base class for sensors dependent on time |
| 3 |
} |
| 4 |
INCLUDE sensors/SoTimerQueueSensor.h |
| 5 |
DESC { |
| 6 |
Timer queue sensors are sensors that trigger themselves at specific |
| 7 |
times. The timer queue is normally processed as part of a programs |
| 8 |
main loop when the program is not busy doing something else. Note |
| 9 |
that processing the timer queue is not asynchronous \(em the program must |
| 10 |
re-enter its main loop for timers to be triggered. When the timer |
| 11 |
queue is processed, all timers scheduled to go off at or before the |
| 12 |
current time are triggered once, in order from earliest to latest. |
| 13 |
} |
| 14 |
|
| 15 |
METHOD getTrigTime const SbTime &getTriggerTime() { |
| 16 |
Returns the time at which this sensor is scheduled to be triggered. |
| 17 |
If the sensor is not scheduled the results are undefined. |
| 18 |
} |
| 19 |
|
| 20 |
METHOD sched virtual void schedule() { |
| 21 |
Adds this sensor to the timer queue. Subclasses provide methods for |
| 22 |
setting when the sensor will be triggered. |
| 23 |
} |
| 24 |
METHOD unsched virtual void unschedule() { |
| 25 |
If this sensor is scheduled, removes it from the timer queue so that |
| 26 |
it will not be triggered. |
| 27 |
} |
| 28 |
METHOD isSched virtual SbBool isScheduled() { |
| 29 |
Returns TRUE if this sensor has been scheduled and is waiting in the |
| 30 |
timer queue to be triggered. |
| 31 |
} |
| 32 |
|
| 33 |
ALSO { SoTimerSensor, SoAlarmSensor, SoIdleSensor, SoOneShotSensor, |
| 34 |
SoDataSensor } |
| 35 |
|