CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CPNS::ITimer Class Referenceabstract

Timer object interface. More...

+ Inheritance diagram for CPNS::ITimer:
+ Collaboration diagram for CPNS::ITimer:

Public Member Functions

virtual void SetTime (CPNS::uint32 const dwTimeMilliseconds, CPNS::boolean const fOneShot)=0
 Start the timer. More...
 
virtual void SetBPM (CPNS::BPM16 const wBPM, CPNS::boolean const fOneShot)=0
 Start the timer. More...
 
virtual void Stop ()=0
 Stop the timer. More...
 
virtual CPNS::boolean IsRunning ()=0
 Check if the timer is running. More...
 
- Public Member Functions inherited from CPNS::IObject
virtual CPNS::ICHAIGetCHAI ()=0
 Get a pointer to the CHAI hosting this object. More...
 
virtual void RegisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Register an Object's notification handler. More...
 
virtual void UnregisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Unregister an Object's notification handler. More...
 
virtual CPNS::Enums::ObjectTypes GetObjectType () const =0
 Get the object type. More...
 
virtual CPNS::uint32 GetHandle () const =0
 Get a unique handle to the object if this object is handled by the trashcan. More...
 
virtual void SetUserDataPtr (void const *const pData)=0
 Set a custom user ptr data. More...
 
virtual void * GetUserDataPtr () const =0
 Get custom user ptr data. More...
 
virtual void SetUserDataUInt32 (const CPNS::uint32 dwData)=0
 Set a custom user uint32 data. More...
 
virtual CPNS::uint32 GetUserDataUInt32 () const =0
 Get custom user uint32 data. More...
 

Detailed Description

Timer object interface.

Used to handle CHAI's timers

Member Function Documentation

virtual CPNS::boolean CPNS::ITimer::IsRunning ( )
pure virtual

Check if the timer is running.

Returns
TRUE if the timer is running
virtual void CPNS::ITimer::SetBPM ( CPNS::BPM16 const  wBPM,
CPNS::boolean const  fOneShot 
)
pure virtual

Start the timer.

Calling SetTime while the timer is running restarts the timer.

Parameters
[in]wBPMTimer time in BPM
[in]fOneShotTRUE for a one shot timer, FALSE for a free running timer.
Warning
A one shot timer does not mean that the timer object is going to be destroyed on timer expiration. A one shot timer object return to asleep status, waiting for a new SetXXX call or destruction (using the CHAI's RemoveTimer() method)
virtual void CPNS::ITimer::SetTime ( CPNS::uint32 const  dwTimeMilliseconds,
CPNS::boolean const  fOneShot 
)
pure virtual

Start the timer.

Calling SetTime while the timer is running restarts the timer.

Parameters
[in]dwTimeMillisecondsTimer time in milliseconds.
[in]fOneShotTRUE for a one shot timer, FALSE for a free running timer.
Warning
A one shot timer does not mean that the timer object is going to be destroyed on timer expiration. A one shot timer object return to asleep status, waiting for a new SetXXX call or destruction (using the CHAI's RemoveTimer() method)
virtual void CPNS::ITimer::Stop ( )
pure virtual

Stop the timer.