1SoDelayQueueSensor(3IV)()                            SoDelayQueueSensor(3IV)()
2
3
4

NAME

6       SoDelayQueueSensor  —  abstract base class for sensors not dependent on
7       time
8

INHERITS FROM

10       SoSensor > SoDelayQueueSensor
11

SYNOPSIS

13       #include <Inventor/sensors/SoDelayQueueSensor.h>
14
15          Methods from class SoDelayQueueSensor:
16
17     void                setPriority(uint32_t pri)
18     uint32_t            getPriority()
19     static uint32_t     getDefaultPriority()
20     virtual void        schedule()
21     virtual void        unschedule()
22     virtual SbBool      isScheduled()
23
24          Methods from class SoSensor:
25
26     void                setFunction(SoSensorCB *callbackFunction)
27     SoSensorCB *        getFunction() const
28     void                setData(void *callbackData)
29     void *              getData() const
30
31

DESCRIPTION

33       Delay  queue  sensors  are  separate  from  timer  queue  sensors  (see
34       SoTimerQueueSensor) and provide methods for setting the relative prior‐
35       ities of the sensors in the delay queue (sensors with higher priorities
36       will be triggered first).
37
38       Sensors  with  non-zero  priorities  are  added to the delay queue when
39       scheduled, and are all processed once, in order, when the  delay  queue
40       is  processed,  which  normally  happens as part of your program's main
41       loop (see SoXt::mainLoop() or SoDB::doSelect()). Typically,  the  delay
42       queue  is processed whenever there are no events waiting to be distrib‐
43       uted and there are no timer queue sensors waiting to be triggered.  The
44       delay  queue  also has a timeout to ensure that delay queue sensors are
45       triggered even if there are always events or timer sensors waiting; see
46       SoDB::setDelaySensorTimeout().
47
48       Sensors  with  priority 0 are treated specially. Priority 0 sensors are
49       triggered almost immediately after they are scheduled, before the  pro‐
50       gram  returns  to the main loop. Priority 0 sensors are not necessarily
51       triggered immediately when they are scheduled,  however;  if  they  are
52       scheduled  as part of the evaluation of a field connection network they
53       may not be triggered until the evaluation of the network  is  complete.
54       Also, if a priority 0 sensor is scheduled within the callback method of
55       another priority 0 sensor, it will not be triggered until the  callback
56       method  is  complete (also note that if more than one priority 0 sensor
57       is scheduled, the order in which they fire is undefined).
58

METHODS

60     void                setPriority(uint32_t pri)
61     uint32_t            getPriority()
62          Sets/gets the priority of the sensor. Priorities can be  changed  at
63          any  time;  if  the  priority  is  changed to zero and it is already
64          scheduled, the sensor is immediately triggered and removed from  the
65          queue.
66
67     static uint32_t     getDefaultPriority()
68          Returns the default delay queue sensor priority, which is 100.
69
70     virtual void        schedule()
71          If  this sensor's priority is non-zero, adds this sensor to the list
72          of delay queue sensors ready to be triggered. This is a way of  mak‐
73          ing a sensor fire without changing the thing it is sensing.
74
75          Calling schedule() within the callback function causes the sensor to
76          be called repeatedly. Because sensors are processed only once  every
77          time  the  delay  queue  is processed (even if they reschedule them‐
78          selves), timers and events will still be processed. This should  not
79          be  done  with  a priority zero sensor because an infinite loop will
80          result.
81
82     virtual void        unschedule()
83          If this sensor is scheduled, removes it from the delay queue so that
84          it will not be triggered.
85
86     virtual SbBool      isScheduled()
87          Returns TRUE if this sensor has been scheduled and is waiting in the
88          delay queue to be triggered. Sensors  are  removed  from  the  queue
89          before their callback function is triggered.
90
91

SEE ALSO

93       SoTimerQueueSensor,    SoDataSensor,    SoFieldSensor,    SoIdleSensor,
94       SoOneShotSensor, SoNodeSensor, SoPathSensor, SoSensorManager
95
96
97
98
99                                                     SoDelayQueueSensor(3IV)()
Impressum