Package de.uka.ipd.sdq.simulation
Interface ISimulationControl
-
- All Known Implementing Classes:
AbstractMain
public interface ISimulationControlControl 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 extendsAbstractMainand provides the missing information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ThrowablegetErrorThrowable()Returns an exception which caused the simulation to terminate in case of simulation errors as indicated by theSimuComResultreturned by the startSimulation methodSimuComStatusgetStatus()Retrieve an object containing the status of this simulation.voidprepareSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)Prepare a simulation runSimulationResultstartSimulation(AbstractSimulationConfig config, IStatusObserver statusObserver, boolean useOwnSensorstorage)Start a simulation runvoidstopSimulation()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 theSimuComResultreturned 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
SimuComStatusobject containing the simulation status
-
-