# SoDelayQueueSensor Class Reference
[Sensor classes]

`#include <Inventor/sensors/SoDelayQueueSensor.h>`

Inheritance diagram for SoDelayQueueSensor:

List of all members.

## Detailed Description

The SoDelayQueueSensor class is the abstract base class for priority scheduled sensors.

Delay queue sensors are invoked upon various events not related to time occurs. See documentation of subclasses to see which types of events can be surveilled by the builtin sensor types.

The priority values can be used to queue events by their importance, so the sensors are triggered in the sequence you want.

## Public Member Functions

| SoDelayQueueSensor (void)
| SoDelayQueueSensor (SoSensorCB *func, void *data)
virtual | ~SoDelayQueueSensor (void)
void | setPriority (uint32_t pri)
uint32_t | getPriority (void) const
virtual void | schedule (void)
virtual void | unschedule (void)
virtual SbBool | isScheduled (void) const
virtual SbBool | isIdleOnly (void) const
virtual void | trigger (void)

## Static Public Member Functions

uint32_t | getDefaultPriority (void)

## Protected Attributes

SbBool | scheduled

## Constructor & Destructor Documentation

SoDelayQueueSensor::SoDelayQueueSensor | ( | void |  | ) |

| Default constructor.

SoDelayQueueSensor::SoDelayQueueSensor | ( | SoSensorCB * | func,
|  | void * | data
| ) |

Constructor taking as arguments the sensor callback function and the userdata which will be passed the callback.

See also:
  setFunction(), setData()

SoDelayQueueSensor::~SoDelayQueueSensor | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

void SoDelayQueueSensor::setPriority | ( | uint32_t | pri | ) |

Set this sensor's priority in the scheduling queue.

See also:
  getPriority(), getDefaultPriority()

uint32_t SoDelayQueueSensor::getPriority | ( | void |  | ) | const

Returns sensor scheduling priority.

See also:
  setPriority(), getDefaultPriority()

uint32_t SoDelayQueueSensor::getDefaultPriority | ( | void |  | ) | `[static]`

Returns the default scheduling priority value.

See also:
  getPriority()

void SoDelayQueueSensor::schedule | ( | void |  | ) | `[virtual]`

Put the sensor in the global delay queue. This means it will be triggered either when the CPU is idle, or when the specified delay queue time-out is reached.

See also:
  SoDB::setDelaySensorTimeout(), unschedule(), isScheduled()

Implements SoSensor.

void SoDelayQueueSensor::unschedule | ( | void |  | ) | `[virtual]`

Remove sensor from the delay queue, without triggering it first.

See also:
  schedule(), isScheduled()

Implements SoSensor.

SbBool SoDelayQueueSensor::isScheduled | ( | void |  | ) | const`[virtual]`

Check if this sensor is scheduled for triggering.

See also:
  schedule(), unschedule()

Implements SoSensor.

SbBool SoDelayQueueSensor::isIdleOnly | ( | void |  | ) | const`[virtual]`

Returns a flag indicating whether or not the sensor should only be triggered if the application is truly idle, and not when the delay queue is processed because of the delay queue timeout.

See also:
  SoDB::setDelaySensorTimeout()

void SoDelayQueueSensor::trigger | ( | void |  | ) | `[virtual]`

| Trigger the sensor's callback function. Reimplemented from SoSensor. Reimplemented in SoDataSensor, and SoFieldSensor.

## Member Data Documentation

SbBool SoDelayQueueSensor::scheduled `[protected]`

| `TRUE` if the sensor is currently scheduled.

The documentation for this class was generated from the following files:

- SoDelayQueueSensor.h
- SoDelayQueueSensor.cpp