SoAlarmSensor — triggers a callback once sometime in the future
Contents
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.
Inherits From
SoSensor > SoTimerQueueSensor > SoAlarmSensor
Methods
SoAlarmSensor()SoAlarmSensor(SoSensorCB*func,void*data)
Creation methods. The second method takes the callback function and data to be called when the sensor
is triggered.
~SoAlarmSensor()
Destroys the sensor, freeing up any memory associated with it after unscheduling it.
voidsetTime(constSbTime&absTime)
Sets the sensor to go off at the specified time. 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.
voidsetTimeFromNow(constSbTime&relTime)
Sets the sensor to go off the given amount of time from now. 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.
constSbTime&getTime()const
Returns the time at which the sensor is set to be triggered. This is similar to the getTriggerTime
method, but returns the time even if the sensor has not yet been scheduled.
Name
SoAlarmSensor — triggers a callback once sometime in the future
See Also
SoOneShotSensor,SoTimerSensor,SoTimerQueueSensor,SbTimeSoAlarmSensor(3IV)()
Synopsis
#include<Inventor/sensors/SoAlarmSensor.h>
Methods from class SoAlarmSensor:
SoAlarmSensor()SoAlarmSensor(SoSensorCB*func,void*data)~SoAlarmSensor()voidsetTime(constSbTime&absTime)voidsetTimeFromNow(constSbTime&relTime)constSbTime&getTime()const
Methods from class SoTimerQueueSensor:
constSbTime&getTriggerTime()virtualvoidschedule()virtualvoidunschedule()virtualSbBoolisScheduled()
Methods from class SoSensor:
voidsetFunction(SoSensorCB*callbackFunction)SoSensorCB*getFunction()constvoidsetData(void*callbackData)void*getData()const