Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

project_get_time Namespace Reference


Detailed Description

If we're running locally, these will let users in "project" space control time for simulation.


Functions

unsigned int default_get_time_callback ()
 provides default implementation of get_time_callback -- starts a TimeET instance on the first call and then returns its age thereafter
unsigned int(*) get_time_callback ()
 This by default will return the time in milliseconds since the first call was made. Note this is a function pointer, so you can reassign it to your own implementation!
float(*) get_timeScale_callback ()
 You can reassign this to your own implementation if you might play games with time control. For instance, the simulator can assign a function which simply returns SharedGlobals::timeScale. By default this is NULL, which indicates to getTimeScale that it should use the default implementation. Note that this is a slightly different usage paradigm than get_time_callback(), which is assumed to always be non-NULL (at least, unless you assign a value to simulation_time...).

Variables

unsigned int simulation_time = -1U
 This will default to -1, which signals get_time() to use get_time_callback. Any other value will cause that value to be used instead.
unsigned int(* get_time_callback )() = &default_get_time_callback
 This by default will return the time in milliseconds since the first call was made. Note this is a function pointer, so you can reassign it to your own implementation!
float(* get_timeScale_callback )() = NULL
 You can reassign this to your own implementation if you might play games with time control. For instance, the simulator can assign a function which simply returns SharedGlobals::timeScale. By default this is NULL, which indicates to getTimeScale that it should use the default implementation. Note that this is a slightly different usage paradigm than get_time_callback(), which is assumed to always be non-NULL (at least, unless you assign a value to simulation_time...).


Function Documentation

unsigned int project_get_time::default_get_time_callback (  ) 

provides default implementation of get_time_callback -- starts a TimeET instance on the first call and then returns its age thereafter

Definition at line 20 of file get_time.cc.

unsigned int(*) project_get_time::get_time_callback (  ) 

This by default will return the time in milliseconds since the first call was made. Note this is a function pointer, so you can reassign it to your own implementation!

For instance, the simulator can assign a function which forwards the call to SharedGlobals::get_time(), so that all processes get consistent time values under control of the simulator Note that this is a slightly different usage paradigm than get_timeScale_callback(), which is probably cleaner, but trying to avoid spreading dependency on TimeET.h

You can reassign this to your own implementation if you might play games with time control. For instance, the simulator can assign a function which simply returns SharedGlobals::timeScale. By default this is NULL, which indicates to getTimeScale that it should use the default implementation. Note that this is a slightly different usage paradigm than get_time_callback(), which is assumed to always be non-NULL (at least, unless you assign a value to simulation_time...).


Variable Documentation

unsigned int(* project_get_time::get_time_callback)() (  )  = &default_get_time_callback

This by default will return the time in milliseconds since the first call was made. Note this is a function pointer, so you can reassign it to your own implementation!

For instance, the simulator can assign a function which forwards the call to SharedGlobals::get_time(), so that all processes get consistent time values under control of the simulator Note that this is a slightly different usage paradigm than get_timeScale_callback(), which is probably cleaner, but trying to avoid spreading dependency on TimeET.h

Referenced by get_time().

float(* project_get_time::get_timeScale_callback)() (  )  = NULL

You can reassign this to your own implementation if you might play games with time control. For instance, the simulator can assign a function which simply returns SharedGlobals::timeScale. By default this is NULL, which indicates to getTimeScale that it should use the default implementation. Note that this is a slightly different usage paradigm than get_time_callback(), which is assumed to always be non-NULL (at least, unless you assign a value to simulation_time...).

Referenced by getTimeScale().

This will default to -1, which signals get_time() to use get_time_callback. Any other value will cause that value to be used instead.

Definition at line 17 of file get_time.cc.

Referenced by get_time(), and getTimeScale().


Tekkotsu v4.0
Generated Thu Nov 22 00:58:58 2007 by Doxygen 1.5.4