-
Notifications
You must be signed in to change notification settings - Fork 2
Oscar Software Framework Manual Simulation Module
scs edited this page Jul 13, 2012
·
2 revisions
Go to Table of Contents.
The simulation module is used to keep track of the current simulation progress on the host platform. It is generally not used directly by the application, but rather by other modules. But it is allowed for the application to directly register a callback every new time step.
Not hardware resource related.
None.
Following code segment demonstrates the usage of the sim module. For the sake of simplicity, error checking as well as framework creation and destruction are neglected.
OscSimInitialize(); /* (2) */ for( ever) { /* main loop */ ... doAlgorithm .. OscSimStep(); /* (3) */ }
- Register a callback to be made every simulation time step. In this case, the function 'callback' should be called.
- Start the simulation process.
- Increment the time step every incrementation of the main loop.