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  -  SOTIMECOUNTER (3)

NAME

SoTimeCounter — timed integer counter

CONTENTS

Inherits From
Synopsis
Description
Inputs
Outputs
Methods
File Format/defaults
See Also

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoTimeCounter

SYNOPSIS

#include <Inventor/engines/SoTimeCounter.h>

Inputs from class SoTimeCounter:

    SoSFTime    
                    
SoSFTime             timeIn    
SoSFShort    
                    
SoSFShort            min    
SoSFShort    
                    
SoSFShort            max    
SoSFShort    
                    
SoSFShort            step    
SoSFBool    
                    
SoSFBool             on    
SoSFFloat    
                    
SoSFFloat            frequency    
SoMFFloat    
                    
SoMFFloat            duty    
SoSFShort    
                    
SoSFShort            reset    
SoSFTrigger    
                    
SoSFTrigger          syncIn

Outputs from class SoTimeCounter:

    (SoSFShort)    
                    
(SoSFShort)          output    
(SoSFTrigger)    
                    
(SoSFTrigger)        syncOut

Methods from class SoTimeCounter:

       
                    
                     SoTimeCounter()

Methods from class SoEngine:

    static SoType    
                    
static SoType        getClassTypeId()    
virtual int    
                    
virtual int          getOutputs(SoEngineOutputList &list) const    
SoEngineOutput *    
                    
SoEngineOutput *     getOutput(const SbName &outputName) const    
SbBool    
                    
SbBool               getOutputName(const SoEngineOutput *output, SbName &outputName) const    
SoEngine *    
                    
SoEngine *           copy() const    
static SoEngine *    
                    
static SoEngine *    getByName(const SbName &name)    
static int    
                    
static int           getByName(const SbName &name, SoEngineList &list)

Methods from class SoFieldContainer:

    void    
                    
void                 setToDefaults()    
SbBool    
                    
SbBool               hasDefaultValues() const    
SbBool    
                    
SbBool               fieldsAreEqual(const SoFieldContainer *fc) const    
void    
                    
void                 copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)    
SbBool    
                    
SbBool               set(const char *fieldDataString)    
void    
                    
void                 get(SbString &fieldDataString)    
virtual int    
                    
virtual int          getFields(SoFieldList &resultList) const    
virtual SoField *    
                    
virtual SoField *    getField(const SbName &fieldName) const    
SbBool    
                    
SbBool               getFieldName(const SoField *field, SbName &fieldName) const    
SbBool    
                    
SbBool               isNotifyEnabled() const    
SbBool    
                    
SbBool               enableNotify(SbBool flag)

Methods from class SoBase:

    void    
                    
void                 ref()    
void    
                    
void                 unref() const    
void    
                    
void                 unrefNoDelete() const    
void    
                    
void                 touch()    
virtual SoType    
                    
virtual SoType       getTypeId() const    
SbBool    
                    
SbBool               isOfType(SoType type) const    
virtual void    
                    
virtual void         setName(const SbName &name)    
virtual SbName    
                    
virtual SbName       getName() const

DESCRIPTION

This engine is a counter that outputs numbers, starting at a minimum value, increasing by a step value, and ending with a number that does not exceed the maximum value. When the maximum number is reached, it starts counting from the beginning again.

The difference between this engine and the SoCounter engine, is that this engine also has a timeIn input, which allows the counting cycles to be timed. This engine counts automatically over time; it does not need to be triggered to go to the next step. By default, the timeIn input is connected to the realTime global field. It can, however, be connected to any time source.

The frequency input field controls how many min-to-max cycles are performed per second. For example, a frequency value of 0.5 means that it will take 2 seconds to complete a single min-to-max cycle.

The steps in the count cycle do not necessarily all have the same duration. Using the duty input field, you can arbitrarily split the time period of the count cycle between the steps. For example, if there are 5 steps in the cycle, a duty input of (1., 2., 2., 2., 1.) will make the second, third, and fourth steps take twice as long as the first and last steps.

At any time the counter can be reset to a specific value. If you set the reset input field to a value, the engine will continue counting from there. Note that the counter will always output numbers based on the min, max and step values, and setting the reset value does not affect the those input fields. If the reset value is not a legal counter value, the counter will still behave as though it is:



If reset is greater than max, the counter is set to max. If reset is less than min, the counter is set to min. If reset is between step values, the counter is set to the lower step.

Each time a counting cycle is started, the syncOut output is triggered. This output can be used to synchronize some other event with the counting cycle. Other events can also synchronize the counter by triggering the syncIn input.

You can pause the engine, by setting the on input to FALSE, and it will stop updating the output field. When you turn off the pause, by setting on to TRUE, it will start counting again from where it left off.

INPUTS

    SoSFTime    
                    
SoSFTime             timeIn
Running time.

    SoSFShort    
                    
SoSFShort            min
Minimum value for the counter.

    SoSFShort    
                    
SoSFShort            max
Maximum value for the counter.

    SoSFShort    
                    
SoSFShort            step
Counter step value.

    SoSFBool    
                    
SoSFBool             on
Counter pauses if this is set to FALSE.

    SoSFFloat    
                    
SoSFFloat            frequency
Number of min-to-max cycles per second.

    SoMFFloat    
                    
SoMFFloat            duty
Duty cycle values.

    SoSFShort    
                    
SoSFShort            reset
Reset the counter to the specified value.

    SoSFTrigger    
                    
SoSFTrigger          syncIn
Restart at the beginning of the cycle.

OUTPUTS

    (SoSFShort)    
                    
(SoSFShort)          output
Counts min-to-max, in step increments.

    (SoSFTrigger)    
                    
(SoSFTrigger)        syncOut
Triggers at cycle start.

METHODS

       
                    
                     SoTimeCounter()
Constructor

FILE FORMAT/DEFAULTS

TimeCounter {



min        0
max        1
step       1
on         TRUE
frequency  1
duty       1
timeIn     <current time>
syncIn     
reset      0


}

SEE ALSO

SoCounter, SoElapsedTime, SoEngineOutput

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


SOTIMECOUNTER(3IV) (-->)

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