60#ifndef _SO_SENSOR_MANAGER_
61#define _SO_SENSOR_MANAGER_
82 { changedFunc = funcArg; changedFuncData = data; }
115 {
return (delayQueue != NULL); }
124 int doSelect(
int nfds, fd_set *readfds, fd_set *writefds,
126 struct timeval *userTimeOut);
136 static void delayQTimeoutCB(
void *,
SoSensor *);
152 void (*changedFunc)(
void *);
153 void *changedFuncData;
156 void notifyChanged();
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Class for representation of a time.
Triggers a callback once sometime in the future.
Abstract base class for sensors not dependent on time.
void setDelaySensorTimeout(const SbTime &t)
Set/get delay queue sensors (OneShot, Node, Path, etc) timeout value.
void removeDelaySensor(SoDelayQueueSensor *s)
void removeRescheduledTimer(SoTimerQueueSensor *s)
bool isDelaySensorPending()
Returns TRUE if there is at least one sensor in the delay queue.
int doSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *userTimeOut)
Just like UNIX select() call, but checks sensor queues while waiting for events.
bool isTimerSensorPending(SbTime &tm)
Returns TRUE if there is at least one sensor in the timer queue.
void processDelayQueue(bool isIdle)
Process all sensors in the delay queue.
void insertDelaySensor(SoDelayQueueSensor *s)
Insert/remove an delay or timer event into/from the appropriate queue.
void rescheduleTimer(SoTimerSensor *s)
Timers are all rescheduled at the same time, after they have been triggered.
void setChangedCallback(void(*funcArg)(void *), void *data)
Set up a function to call when either queue has a sensor added or removed.
void insertTimerSensor(SoTimerQueueSensor *s)
void removeTimerSensor(SoTimerQueueSensor *s)
void processTimerQueue()
Process appropriate sensors in the timer queue based on current time.
const SbTime & getDelaySensorTimeout()
void processImmediateQueue()
Process all immediate (priority 0) sensors in the delay queue.
SoSensorManager()
Constructor, destructor.
Abstract base class for Inventor sensors.
Abstract base class for sensors dependent on time.
Sensor that triggers callback repeatedly at regular intervals.