DSim simulation manager class. More...
Public Member Functions | |
dsim_simulation (const char *filename, sd_data_type_manager *tm=NULL) | |
void | start_simulation () |
bool | run_simulation_step () |
void | pause_simulation () |
void | resume_simulation () |
DSim simulation manager class.
The dsim_simulation class provides high-level management functions for initiating and running a DSim simulation. The VisualCommander data source will instantiate this class automatically and then call functions as appropriate according to the setup file provided. The class may also be called directly by other applications.
dsim_simulation::dsim_simulation | ( | const char * | filename, |
sd_data_type_manager * | tm = NULL |
||
) |
Constructor for a new DSimsimulation. If the path to a setup file is provided, the setup file is opened and used to load the specified simulation. Creates the base simulation variables including the elapsed time, simulation name, paused status boolean, etc. The timestep is also marked as a command.
filename | An optional parameter providing a setup file to load. See the Setup Files page. |
void dsim_simulation::pause_simulation | ( | ) |
Pause a simulation.
void dsim_simulation::resume_simulation | ( | ) |
Resume the simulation.
bool dsim_simulation::run_simulation_step | ( | ) |
Run a single simulation step.
void dsim_simulation::start_simulation | ( | ) |
Start the simulation. Writes the log header and initial values to the log file (if specified).