GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOTIMERSENSOR (3)

NAME

SoTimerSensor — sensor that triggers callback repeatedly at regular intervals

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoSensor > SoTimerQueueSensor > SoTimerSensor

SYNOPSIS

#include <Inventor/sensors/SoTimerSensor.h>

Methods from class SoTimerSensor:

       
                    
                     SoTimerSensor()    
   
                    
                     SoTimerSensor(SoSensorCB *func, void *data)    
   
                    
                     ~SoTimerSensor()    
void    
                    
void                 setBaseTime(const SbTime &base)    
const SbTime &    
                    
const SbTime &       getBaseTime() const    
void    
                    
void                 setInterval(const SbTime &interval)    
const SbTime &    
                    
const SbTime &       getInterval() const

Methods from class SoTimerQueueSensor:

    const SbTime &    
                    
const SbTime &       getTriggerTime()    
virtual void    
                    
virtual void         schedule()    
virtual void    
                    
virtual void         unschedule()    
virtual SbBool    
                    
virtual SbBool       isScheduled()

Methods from class SoSensor:

    void    
                    
void                 setFunction(SoSensorCB *callbackFunction)    
SoSensorCB *    
                    
SoSensorCB *         getFunction() const    
void    
                    
void                 setData(void *callbackData)    
void *    
                    
void *               getData() const

DESCRIPTION

Timer sensors trigger their callback function at regular intervals. For example, a timer might be setup to call its callback function every second on the second by setting the base time to SbTime(0.0) and the interval to SbTime(1.0). Timers are guaranteed to be triggered only once when the timer queue is processed, so if the application only processes the timer queue once every 5 seconds (because it is busy doing something else) the once-a-second sensor’s callback will be called only once every 5 seconds.

Note also that SoTimers always schedule themselves to be triggered the next even multiple of the interval time after the base time; so, for example, if the once-a-second sensor is triggered at time 2.9 (because the application way busy doing something at time 2.0 and didn’t get around to processing the sensor queue for a while) it will reschedule itself to go off at time 3.0, not at time 3.9. If the base time was never set, the sensor would be scheduled for time 3.9.

METHODS

       
                    
                     SoTimerSensor()    
   
                    
                     SoTimerSensor(SoSensorCB *func, void *data)
Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

       
                    
                     ~SoTimerSensor()
Destroys the sensor, freeing up any memory associated with it after unscheduling it.

    void    
                    
void                 setBaseTime(const SbTime &base)    
const SbTime &    
                    
const SbTime &       getBaseTime() const    
void    
                    
void                 setInterval(const SbTime &interval)    
const SbTime &    
                    
const SbTime &       getInterval() const
Sets/gets the base time and the interval. The default base time is the time when the sensor is scheduled or rescheduled, and the default interval is 1/30th of a second.

SEE ALSO

SoOneShotSensor, SoAlarmSensor, SoTimerQueueSensor, SbTime

Search for    or go to Top of page |  Section 3 |  Main Index


SOTIMERSENSOR(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.