OpenCMISS-Zinc C++ API Documentation
Public Member Functions | List of all members
OpenCMISS::Zinc::TimenotifierRegular Class Reference

A derived timenotifier type which requests notifications at regular intervals. More...

#include <timenotifier.hpp>

Inheritance diagram for OpenCMISS::Zinc::TimenotifierRegular:
OpenCMISS::Zinc::Timenotifier

Public Member Functions

 TimenotifierRegular (cmzn_timenotifier_regular_id timenotifier_regular_id)
 
cmzn_timenotifier_regular_id getDerivedId ()
 
int setFrequency (double frequency)
 
int setOffset (double timeOffset)
 
- Public Member Functions inherited from OpenCMISS::Zinc::Timenotifier
 Timenotifier (cmzn_timenotifier_id in_timenotifier_id)
 
 Timenotifier (const Timenotifier &timenotifier)
 
Timenotifieroperator= (const Timenotifier &timenotifier)
 
bool isValid () const
 
cmzn_timenotifier_id getId () const
 
double getTime ()
 
int setCallback (Timenotifiercallback &callback)
 
int clearCallback ()
 
double getNextCallbackTime (enum Timekeeper::PlayDirection playDirection)
 
TimenotifierRegular castRegular ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenCMISS::Zinc::Timenotifier
cmzn_timenotifier_id id
 

Detailed Description

A derived timenotifier type which requests notifications at regular intervals.

A derived timenotifier type which requests notifications at regular intervals.

Member Function Documentation

cmzn_timenotifier_regular_id OpenCMISS::Zinc::TimenotifierRegular::getDerivedId ( )
inline

Return the C handle of the derived TimenotifierRegular object.

Returns
C handle of the derived TimenotifierRegular if this objects is valid, 0 otherwise.
int OpenCMISS::Zinc::TimenotifierRegular::setFrequency ( double  frequency)
inline

This controls the rate which the time dependent object is called back. The default value is 10 which means time notifier will receive 10 callbacks per unit of time in the time keeper. i.e. If the update frequency of time notifier is set to be 10, the actual interval between each callbacks is: 1/(update frequency) which is 0.1s. Note that the time notifier does not promise to receive callback exactly 0.1s after the previous callback.

Parameters
frequencyThe number of times which time notifier will receive callback per unit of time in the time keeper. Must be positive.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::TimenotifierRegular::setOffset ( double  timeOffset)
inline

Sets the offset of times when a regular time notifier notifies clients. Notification occurs at the given time_offset and every mulitple of 1/freqency away from the offset.

Parameters
timeOffsetThis set the time that notifier will receive callback.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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