Data Structures | Defines | Typedefs | Enumerations | Functions

OrxClock

Data Structures

struct  orxCLOCK_INFO

Defines

#define orxCLOCK_KU32_CLOCK_BANK_SIZE   16
#define orxCLOCK_KU32_FUNCTION_BANK_SIZE   16
#define orxCLOCK_KU32_TIMER_BANK_SIZE   32

Typedefs

typedef struct __orxCLOCK_t orxCLOCK
typedef void(orxFASTCALL * orxCLOCK_FUNCTION )(const orxCLOCK_INFO *_pstClockInfo, void *_pContext)

Enumerations

enum  orxCLOCK_EVENT {
  orxCLOCK_EVENT_RESTART = 0, orxCLOCK_EVENT_RESYNC, orxCLOCK_EVENT_PAUSE, orxCLOCK_EVENT_UNPAUSE,
  orxCLOCK_EVENT_NUMBER, orxCLOCK_EVENT_NONE = orxENUM_NONE
}
enum  orxCLOCK_MOD_TYPE {
  orxCLOCK_MOD_TYPE_FIXED = 0, orxCLOCK_MOD_TYPE_MULTIPLY, orxCLOCK_MOD_TYPE_MAXED, orxCLOCK_MOD_TYPE_NUMBER,
  orxCLOCK_MOD_TYPE_NONE = orxENUM_NONE
}
enum  orxCLOCK_PRIORITY {
  orxCLOCK_PRIORITY_LOWEST = 0, orxCLOCK_PRIORITY_LOWER, orxCLOCK_PRIORITY_LOW, orxCLOCK_PRIORITY_NORMAL,
  orxCLOCK_PRIORITY_HIGH, orxCLOCK_PRIORITY_HIGHER, orxCLOCK_PRIORITY_HIGHEST, orxCLOCK_PRIORITY_NUMBER,
  orxCLOCK_PRIORITY_NONE = orxENUM_NONE
}
enum  orxCLOCK_TYPE {
  orxCLOCK_TYPE_CORE = 0, orxCLOCK_TYPE_USER, orxCLOCK_TYPE_SECOND, orxCLOCK_TYPE_NUMBER,
  orxCLOCK_TYPE_NONE = orxENUM_NONE
}

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxClock_AddGlobalTimer (const orxCLOCK_FUNCTION _pfnCallback, orxFLOAT _fDelay, orxS32 _s32Repetition, void *_pContext)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_AddTimer (orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback, orxFLOAT _fDelay, orxS32 _s32Repetition, void *_pContext)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_Create (orxFLOAT _fTickSize, orxCLOCK_TYPE _eType)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_CreateFromConfig (const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Delete (orxCLOCK *_pstClock)
orxDLLAPI void orxFASTCALL orxClock_Exit ()
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_FindFirst (orxFLOAT _fTickSize, orxCLOCK_TYPE _eType)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_FindNext (const orxCLOCK *_pstClock)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_Get (const orxSTRING _zName)
orxDLLAPI void *orxFASTCALL orxClock_GetContext (const orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_GetFromInfo (const orxCLOCK_INFO *_pstClockInfo)
orxDLLAPI const orxCLOCK_INFO
*orxFASTCALL 
orxClock_GetInfo (const orxCLOCK *_pstClock)
orxDLLAPI const orxSTRING
orxFASTCALL 
orxClock_GetName (const orxCLOCK *_pstClock)
orxDLLAPI orxCLOCK *orxFASTCALL orxClock_GetNext (const orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Init ()
orxDLLAPI orxBOOL orxFASTCALL orxClock_IsPaused (const orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Pause (orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Register (orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback, void *_pContext, orxMODULE_ID _eModuleID, orxCLOCK_PRIORITY _ePriority)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_RemoveGlobalTimer (const orxCLOCK_FUNCTION _pfnCallback, orxFLOAT _fDelay, void *_pContext)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_RemoveTimer (orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback, orxFLOAT _fDelay, void *_pContext)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Restart (orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Resync (orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_ResyncAll ()
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetContext (orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback, void *_pContext)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetModifier (orxCLOCK *_pstClock, orxCLOCK_MOD_TYPE _eModType, orxFLOAT _fModValue)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetTickSize (orxCLOCK *_pstClock, orxFLOAT _fTickSize)
orxDLLAPI void orxFASTCALL orxClock_Setup ()
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Unpause (orxCLOCK *_pstClock)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Unregister (orxCLOCK *_pstClock, const orxCLOCK_FUNCTION _pfnCallback)
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Update ()

Detailed Description

Clock module Module that handles clocks which is the low level kernel part of orx execution.


Define Documentation

#define orxCLOCK_KU32_CLOCK_BANK_SIZE   16

Clock bank size

Definition at line 51 of file orxClock.h.

#define orxCLOCK_KU32_FUNCTION_BANK_SIZE   16

Function bank size

Definition at line 54 of file orxClock.h.

#define orxCLOCK_KU32_TIMER_BANK_SIZE   32

Timer bank size

Definition at line 52 of file orxClock.h.


Typedef Documentation

typedef struct __orxCLOCK_t orxCLOCK

Clock structure

Definition at line 138 of file orxClock.h.

typedef void(orxFASTCALL * orxCLOCK_FUNCTION)(const orxCLOCK_INFO *_pstClockInfo, void *_pContext)

Clock callback function type to use with clock bindings

Definition at line 141 of file orxClock.h.


Enumeration Type Documentation

Event enum

Enumerator:
orxCLOCK_EVENT_RESTART 

Event sent when a clock restarts

orxCLOCK_EVENT_RESYNC 

Event sent when a clock recyncs

orxCLOCK_EVENT_PAUSE 

Event sent when a clock is paused

orxCLOCK_EVENT_UNPAUSE 

Event sent when a clock is unpaused

orxCLOCK_EVENT_NUMBER 
orxCLOCK_EVENT_NONE 

Definition at line 123 of file orxClock.h.

Clock mod type enum

Enumerator:
orxCLOCK_MOD_TYPE_FIXED 

The given DT will always be constant (= modifier value)

orxCLOCK_MOD_TYPE_MULTIPLY 

The given DT will be the real one * modifier

orxCLOCK_MOD_TYPE_MAXED 

The given DT will be the real one maxed by the modifier value

orxCLOCK_MOD_TYPE_NUMBER 
orxCLOCK_MOD_TYPE_NONE 

Definition at line 75 of file orxClock.h.

Clock priority

Enumerator:
orxCLOCK_PRIORITY_LOWEST 
orxCLOCK_PRIORITY_LOWER 
orxCLOCK_PRIORITY_LOW 
orxCLOCK_PRIORITY_NORMAL 
orxCLOCK_PRIORITY_HIGH 
orxCLOCK_PRIORITY_HIGHER 
orxCLOCK_PRIORITY_HIGHEST 
orxCLOCK_PRIORITY_NUMBER 
orxCLOCK_PRIORITY_NONE 

Definition at line 90 of file orxClock.h.

Clock type enum

Enumerator:
orxCLOCK_TYPE_CORE 
orxCLOCK_TYPE_USER 
orxCLOCK_TYPE_SECOND 
orxCLOCK_TYPE_NUMBER 
orxCLOCK_TYPE_NONE 

Definition at line 59 of file orxClock.h.


Function Documentation

orxDLLAPI orxSTATUS orxFASTCALL orxClock_AddGlobalTimer ( const orxCLOCK_FUNCTION  _pfnCallback,
orxFLOAT  _fDelay,
orxS32  _s32Repetition,
void *  _pContext 
)

Adds a global timer function (ie. using the main core clock)

Parameters:
[in]_pfnCallbackConcerned timer callback
[in]_fDelayTimer's delay between 2 calls, must be strictly positive
[in]_s32RepetitionNumber of times this timer should be called before removed, -1 for infinite
[in]_pContextContext that will be transmitted to the callback when called
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_AddTimer ( orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback,
orxFLOAT  _fDelay,
orxS32  _s32Repetition,
void *  _pContext 
)

Adds a timer function to a clock

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackConcerned timer callback
[in]_fDelayTimer's delay between 2 calls, must be strictly positive
[in]_s32RepetitionNumber of times this timer should be called before removed, -1 for infinite
[in]_pContextContext that will be transmitted to the callback when called
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_Create ( orxFLOAT  _fTickSize,
orxCLOCK_TYPE  _eType 
)

Creates a clock

Parameters:
[in]_fTickSizeTick size for the clock (in seconds)
[in]_eTypeType of the clock
Returns:
orxCLOCK / orxNULL
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_CreateFromConfig ( const orxSTRING  _zConfigID )

Creates a clock from config

Parameters:
[in]_zConfigIDConfig ID @ return orxCLOCK / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Delete ( orxCLOCK _pstClock )

Deletes a clock

Parameters:
[in]_pstClockConcerned clock
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxClock_Exit (  )

Exits from the clock module

orxDLLAPI orxCLOCK* orxFASTCALL orxClock_FindFirst ( orxFLOAT  _fTickSize,
orxCLOCK_TYPE  _eType 
)

Finds a clock given its tick size and its type

Parameters:
[in]_fTickSizeTick size of the desired clock (in seconds)
[in]_eTypeType of the desired clock
Returns:
orxCLOCK / orxNULL
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_FindNext ( const orxCLOCK _pstClock )

Finds next clock of same type/tick size

Parameters:
[in]_pstClockConcerned clock
Returns:
orxCLOCK / orxNULL
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_Get ( const orxSTRING  _zName )

Gets clock given its name

Parameters:
[in]_zNameClock name
Returns:
orxCLOCK / orxNULL
orxDLLAPI void* orxFASTCALL orxClock_GetContext ( const orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback 
)

Gets a callback function context

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackConcerned callback
Returns:
Registered context
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_GetFromInfo ( const orxCLOCK_INFO _pstClockInfo )

Gets clock from its info

Parameters:
[in]_pstClockInfoConcerned clock info
Returns:
orxCLOCK / orxNULL
orxDLLAPI const orxCLOCK_INFO* orxFASTCALL orxClock_GetInfo ( const orxCLOCK _pstClock )

Gets clock info

Parameters:
[in]_pstClockConcerned clock
Returns:
orxCLOCK_INFO / orxNULL
orxDLLAPI const orxSTRING orxFASTCALL orxClock_GetName ( const orxCLOCK _pstClock )

Gets clock config name

Parameters:
[in]_pstClockConcerned clock
Returns:
orxSTRING / orxSTRING_EMPTY
orxDLLAPI orxCLOCK* orxFASTCALL orxClock_GetNext ( const orxCLOCK _pstClock )

Gets next existing clock in list (can be used to parse all existing clocks)

Parameters:
[in]_pstClockConcerned clock
Returns:
orxCLOCK / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Init (  )

Inits the clock module

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL orxClock_IsPaused ( const orxCLOCK _pstClock )

Is a clock paused?

Parameters:
[in]_pstClockConcerned clock
Returns:
orxTRUE if paused, orxFALSE otherwise
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Pause ( orxCLOCK _pstClock )

Pauses a clock

Parameters:
[in]_pstClockConcerned clock
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Register ( orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback,
void *  _pContext,
orxMODULE_ID  _eModuleID,
orxCLOCK_PRIORITY  _ePriority 
)

Registers a callback function to a clock

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackCallback to register
[in]_pContextContext that will be transmitted to the callback when called
[in]_eModuleIDID of the module related to this callback
[in]_ePriorityPriority for the function
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_RemoveGlobalTimer ( const orxCLOCK_FUNCTION  _pfnCallback,
orxFLOAT  _fDelay,
void *  _pContext 
)

Removes a global timer function (ie. from the main core clock)

Parameters:
[in]_pfnCallbackConcerned timer callback to remove
[in]_fDelayDelay between 2 calls of the timer to remove, -1.0f for removing all occurences regardless of their respective delay
[in]_pContextContext of the timer to remove, orxNULL for removing all occurrences regardless of their context
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_RemoveTimer ( orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback,
orxFLOAT  _fDelay,
void *  _pContext 
)

Removes a timer function from a clock

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackConcerned timer callback to remove
[in]_fDelayDelay between 2 calls of the timer to remove, -1.0f for removing all occurences regardless of their respective delay
[in]_pContextContext of the timer to remove, orxNULL for removing all occurrences regardless of their context
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Restart ( orxCLOCK _pstClock )

Restarts a clock

Parameters:
[in]_pstClockConcerned clock
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Resync ( orxCLOCK _pstClock )

Resyncs a clock (accumulated DT => 0)

Parameters:
[in]_pstClockConcerned clock
orxDLLAPI orxSTATUS orxFASTCALL orxClock_ResyncAll (  )

Resyncs all clocks (accumulated DT => 0)

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetContext ( orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback,
void *  _pContext 
)

Sets a callback function context

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackConcerned callback
[in]_pContextContext that will be transmitted to the callback when called
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetModifier ( orxCLOCK _pstClock,
orxCLOCK_MOD_TYPE  _eModType,
orxFLOAT  _fModValue 
)

Sets a clock modifier

Parameters:
[in]_pstClockConcerned clock
[in]_eModTypeModifier type
[in]_fModValueModifier value
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_SetTickSize ( orxCLOCK _pstClock,
orxFLOAT  _fTickSize 
)

Sets a clock tick size

Parameters:
[in]_pstClockConcerned clock
[in]_fTickSizeTick size
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxClock_Setup (  )

Clock module setup

orxDLLAPI orxSTATUS orxFASTCALL orxClock_Unpause ( orxCLOCK _pstClock )

Unpauses a clock

Parameters:
[in]_pstClockConcerned clock
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Unregister ( orxCLOCK _pstClock,
const orxCLOCK_FUNCTION  _pfnCallback 
)

Unregisters a callback function from a clock

Parameters:
[in]_pstClockConcerned clock
[in]_pfnCallbackCallback to remove
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxClock_Update (  )

Updates the clock system

Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.5.6