|
| SoDelayQueueSensor () |
| Constructors. The second form takes standard callback function and data.
|
|
| SoDelayQueueSensor (SoSensorCB *func, void *data) |
|
virtual | ~SoDelayQueueSensor () |
| Destructor.
|
|
void | setPriority (uint32_t pri) |
| Sets the priority of the sensor.
|
|
uint32_t | getPriority () const |
| Gets the priority of the sensor.
|
|
virtual void | schedule () |
| If this sensor's priority is non-zero, adds this sensor to the list of delay queue sensors ready to be triggered.
|
|
virtual void | unschedule () |
| If this sensor is scheduled, removes it from the delay queue so that it will not be triggered.
|
|
virtual bool | isScheduled () const |
| Returns TRUE if this sensor has been scheduled and is waiting in the delay queue to be triggered.
|
|
virtual bool | isIdleOnly () const |
| This method is overriden by IdleSensors to tell sensor manager that they should only be processed when there really is idle time (and not when the delay queue timeout expires).
|
|
void | setCounter (uint32_t c) |
| Set/inquire counter when sensor was last triggered.
|
|
uint32_t | getCounter () const |
|
| SoSensor () |
| Constructors. The second form takes callback function and data.
|
|
| SoSensor (SoSensorCB *f, void *d) |
|
virtual | ~SoSensor () |
| Virtual destructor so that subclasses are deleted properly.
|
|
void | setFunction (SoSensorCB *f) |
| Sets the callback function that is called when the sensor is triggered.
|
|
void | setData (void *d) |
| Sets the callback data passed to the callback function.
|
|
SoSensorCB * | getFunction () const |
| Returns the callback function that will be called when the sensor is triggered.
|
|
void * | getData () const |
| Returns the user-supplied pointer that will be passed to the callback function.
|
|
virtual void | schedule ()=0 |
| Schedules the sensor for triggering at the appropriate time.
|
|
virtual void | unschedule ()=0 |
| Unschedules sensor to keep it from being triggered.
|
|
virtual bool | isScheduled () const =0 |
| Returns whether the sensor is scheduled.
|
|
virtual void | trigger () |
| Triggers the sensor, calling its callback function.
|
|
virtual bool | isBefore (const SoSensor *s) const =0 |
| This returns TRUE if this sensor should precede sensor s in whichever queue this sensor would be in.
|
|
void | setNextInQueue (SoSensor *next) |
| Sets/returns the next sensor in whichever queue the sensor is in.
|
|
SoSensor * | getNextInQueue () const |
|
Delay queue sensors are separate from timer queue sensors (see SoTimerQueueSensor) and provide methods for setting the relative priorities of the sensors in the delay queue (sensors with higher priorities will be triggered first).
Sensors with non-zero priorities are added to the delay queue when scheduled, and are all processed once, in order, when the delay queue is processed, which normally happens as part of your program's main loop. Typically, the delay queue is processed whenever there are no events waiting to be distributed and there are no timer queue sensors waiting to be triggered. The delay queue also has a timeout to ensure that delay queue sensors are triggered even if there are always events or timer sensors waiting; see SoDB::setDelaySensorTimeout().
Sensors with priority 0 are treated specially. Priority 0 sensors are triggered almost immediately after they are scheduled, before the program returns to the main loop. Priority 0 sensors are not necessarily triggered immediately when they are scheduled, however; if they are scheduled as part of the evaluation of a field connection network they may not be triggered until the evaluation of the network is complete. Also, if a priority 0 sensor is scheduled within the callback method of another priority 0 sensor, it will not be triggered until the callback method is complete (also note that if more than one priority 0 sensor is scheduled, the order in which they fire is undefined).
- See Also
- SoTimerQueueSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoOneShotSensor, SoNodeSensor, SoPathSensor, SoSensorManager
Definition at line 110 of file SoDelayQueueSensor.h.