Package de.uka.ipd.sdq.simulation
Interface ISimulationControl
-
- All Known Implementing Classes:
AbstractMain
public interface ISimulationControl
Control interface for simulation frameworks. It defines methods, which are responsible for starting and stopping the simulation. When SimuCom is used, the code generated for each SimuCom instance contains the class main.SimuComControl that extendsAbstractMain
and provides the missing information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Throwable
getErrorThrowable()
Returns an exception which caused the simulation to terminate in case of simulation errors as indicated by theSimuComResult
returned by the startSimulation methodSimuComStatus
getStatus()
Retrieve an object containing the status of this simulation.void
prepareSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)
Prepare a simulation runSimulationResult
startSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)
Start a simulation runvoid
stopSimulation()
Cancels a running simulation by disallowing the generation of new simulation events
-
-
-
Method Detail
-
prepareSimulation
void prepareSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)
Prepare a simulation run- Parameters:
config
- The configuration object which sets many simulation parameters like stop conditions, storage location, etc.statusObserver
- An observer which gets notifications on the simulation progressuseOwnSensorstorage
- If true, the simulation uses an own, temporary result store instead of the sensorfactory storage passed in the simulation parameter object. Use this for remote simulation docks which do not have access to the local sensor factory storages
-
startSimulation
SimulationResult startSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)
Start a simulation run- Parameters:
config
- The configuration object which sets many simulation parameters like stop conditions, storage location, etc.statusObserver
- An observer which gets notifications on the simulation progressuseOwnSensorstorage
- If true, the simulation uses an own, temporary result store instead of the sensorfactory storage passed in the simulation parameter object. Use this for remote simulation docks which do not have access to the local sensor factory storages- Returns:
- The result of the simulation run
-
stopSimulation
void stopSimulation()
Cancels a running simulation by disallowing the generation of new simulation events
-
getErrorThrowable
Throwable getErrorThrowable()
Returns an exception which caused the simulation to terminate in case of simulation errors as indicated by theSimuComResult
returned by the startSimulation method- Returns:
- The exception which caused the simulation to terminate
-
getStatus
SimuComStatus getStatus()
Retrieve an object containing the status of this simulation.- Returns:
- A
SimuComStatus
object containing the simulation status
-
-