Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoAlarmSensor Class Reference

The SoAlarmSensor class is a sensor which will trigger once at a specified time. More...

#include <Inventor/sensors/SoAlarmSensor.h>

Inheritance diagram for SoAlarmSensor:
SoTimerQueueSensor SoSensor

Public Member Functions

 SoAlarmSensor (SoSensorCB *func, void *data)
 
 SoAlarmSensor (void)
 
virtual ~SoAlarmSensor (void)
 
const SbTimegetTime (void) const
 
virtual void schedule (void)
 
void setTime (const SbTime &abstime)
 
void setTimeFromNow (const SbTime &reltime)
 
- Public Member Functions inherited from SoTimerQueueSensor
 SoTimerQueueSensor (SoSensorCB *func, void *data)
 
 SoTimerQueueSensor (void)
 
virtual ~SoTimerQueueSensor (void)
 
const SbTimegetTriggerTime (void) const
 
virtual SbBool isScheduled (void) const
 
virtual void trigger (void)
 
virtual void unschedule (void)
 
- Public Member Functions inherited from SoSensor
 SoSensor (SoSensorCB *func, void *data)
 
 SoSensor (void)
 
virtual ~SoSensor (void)
 
voidgetData (void) const
 
SoSensorCBPtr getFunction (void) const
 
SoSensorgetNextInQueue (void) const
 
void setData (void *callbackdata)
 
void setFunction (SoSensorCB *callbackfunction)
 
void setNextInQueue (SoSensor *next)
 

Additional Inherited Members

- Static Public Member Functions inherited from SoSensor
static void initClass (void)
 
- Protected Member Functions inherited from SoTimerQueueSensor
void setTriggerTime (const SbTime &time)
 
- Protected Attributes inherited from SoTimerQueueSensor
SbBool scheduled
 
- Protected Attributes inherited from SoSensor
SoSensorCB * func
 
voidfuncData
 

Detailed Description

The SoAlarmSensor class is a sensor which will trigger once at a specified time.

SoAlarmSensor provides a convenient way of setting up triggers for jobs which should be executed only once when they are scheduled.

Constructor & Destructor Documentation

◆ SoAlarmSensor() [1/2]

SoAlarmSensor::SoAlarmSensor ( void )

Default constructor.

◆ SoAlarmSensor() [2/2]

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

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

See also
setFunction(), setData()

◆ ~SoAlarmSensor()

SoAlarmSensor::~SoAlarmSensor ( void )
virtual

Destructor.

Member Function Documentation

◆ getTime()

const SbTime & SoAlarmSensor::getTime ( void ) const

Returns the trigger time for the alarm as an absolute value from 1970-01-01 00:00:00.

See also
setTime(), setTimeFromNow()

◆ schedule()

void SoAlarmSensor::schedule ( void )
virtual

Put the sensor in the global timer queue.

See also
unschedule(), isScheduled()

Reimplemented from SoTimerQueueSensor.

◆ setTime()

void SoAlarmSensor::setTime ( const SbTime & abstime)

Set the time at which the sensor will trigger.

Note that you must manually schedule() the sensor after calling this method.

See also
setTimeFromNow(), getTime()

◆ setTimeFromNow()

void SoAlarmSensor::setTimeFromNow ( const SbTime & reltime)

Set the alarm to be triggered at a specified offset from the current time.

Note that you must manually schedule() the sensor after calling this method.

See also
setTime(), getTime()

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