public class SoDelayQueueSensor extends SoSensor
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 (see SoWin.mainLoop() or SoDB.doSelect()). 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
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoDelayQueueSensor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static long |
getDefaultPriority()
Returns the default delay queue sensor priority, which is 100.
|
long |
getPriority()
Gets the priority of the sensor.
|
boolean |
isIdleOnly() |
void |
setPriority(long pri)
Sets the priority of the sensor.
|
isScheduled, schedule, setTask, unschedule
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public boolean isIdleOnly()
public long getPriority()
public static long getDefaultPriority()
public void setPriority(long pri)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com