Public Member Functions

dsim_simulation Class Reference

DSim simulation manager class. More...

List of all members.

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 ()

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
filenameAn optional parameter providing a setup file to load. See the Setup Files page.

Member Function Documentation

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.

Returns:
The result of dsim_simulation::step_simulation() or else flase if a simulation error was detected.
void dsim_simulation::start_simulation (  )

Start the simulation. Writes the log header and initial values to the log file (if specified).

 All Classes Files Functions Typedefs Enumerations Enumerator