Open Inventor Reference
SoAlarmSensor Class Reference

Triggers a callback once sometime in the future. More...

#include <Inventor/sensors/SoAlarmSensor.h>

Inheritance diagram for SoAlarmSensor:
SoTimerQueueSensor SoSensor

List of all members.

Public Member Functions

 SoAlarmSensor ()
 Creation methods.
 SoAlarmSensor (SoSensorCB *func, void *data)
 Creation methods.
virtual ~SoAlarmSensor ()
 Destroys the sensor, freeing up any memory associated with it after unscheduling it.
void setTime (const SbTime &absTime)
 Sets the sensor to go off at the specified time.
void setTimeFromNow (const SbTime &relTime)
 Sets the sensor to go off the given amount of time from now.
const SbTimegetTime () const
 Returns the time the sensor is scheduled to be triggered.
virtual void schedule ()
 Overrides the regular schedule() method because we have to set up the trigger time first.

Detailed Description

This type of sensor can be used to schedule a one-time callback for some time in the future. The sensor is not guaranteed to be called at exactly that time, but will be called sometime after the specified time.

See Also
SoOneShotSensor, SoTimerSensor, SoTimerQueueSensor, SbTime

Definition at line 80 of file SoAlarmSensor.h.


Constructor & Destructor Documentation

SoAlarmSensor::SoAlarmSensor ( )

The second method takes the callback function and data to be called when the sensor is triggered.

SoAlarmSensor::SoAlarmSensor ( SoSensorCB func,
void *  data 
)

The second method takes the callback function and data to be called when the sensor is triggered.

virtual SoAlarmSensor::~SoAlarmSensor ( ) [virtual]

Member Function Documentation

const SbTime& SoAlarmSensor::getTime ( ) const [inline]

This differs from getTriggerTime() in that this method returns the time the sensor was set to be scheduled, even if it has not yet been scheduled.

Definition at line 113 of file SoAlarmSensor.h.

virtual void SoAlarmSensor::schedule ( ) [virtual]

Reimplemented from SoTimerQueueSensor.

void SoAlarmSensor::setTime ( const SbTime absTime)

You must also call schedule() for the sensor to be triggered. If the sensor is already scheduled, it must be unscheduled and then rescheduled for the change in the trigger time to take effect.

void SoAlarmSensor::setTimeFromNow ( const SbTime relTime)

You must also call schedule() for the sensor to be triggered. If the sensor is already scheduled, it must be unscheduled and then rescheduled for the change in the trigger time to take effect.


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