public abstract class AbstractMain extends Object implements ISimulationControl, org.osgi.framework.BundleActivator
Constructor and Description |
---|
AbstractMain() |
Modifier and Type | Method and Description |
---|---|
Throwable |
getErrorThrowable()
Returns an exception which caused the simulation to terminate in case of simulation errors as
indicated by the
SimuComResult returned by the startSimulation method |
SimuComModel |
getModel() |
SimuComStatus |
getStatus()
Retrieve an object containing the status of this simulation.
|
void |
prepareSimulation(AbstractSimulationConfig config,
IStatusObserver observer,
boolean isRemoteRun)
Prepare a simulation run
|
void |
start(org.osgi.framework.BundleContext context) |
SimulationResult |
startSimulation(AbstractSimulationConfig config,
IStatusObserver observer,
boolean isRemoteRun)
Start a simulation run
|
void |
stop(org.osgi.framework.BundleContext context) |
void |
stopSimulation()
Cancels a running simulation by disallowing the generation of new simulation events
|
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
Exception
public SimuComModel getModel()
public Throwable getErrorThrowable()
ISimulationControl
SimuComResult
returned by the startSimulation methodgetErrorThrowable
in interface ISimulationControl
public void prepareSimulation(AbstractSimulationConfig config, IStatusObserver observer, boolean isRemoteRun)
ISimulationControl
prepareSimulation
in interface ISimulationControl
config
- The configuration object which sets many simulation parameters like stop
conditions, storage location, etc.observer
- An observer which gets notifications on the simulation progressisRemoteRun
- 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
storagespublic SimulationResult startSimulation(AbstractSimulationConfig config, IStatusObserver observer, boolean isRemoteRun)
ISimulationControl
startSimulation
in interface ISimulationControl
config
- The configuration object which sets many simulation parameters like stop
conditions, storage location, etc.observer
- An observer which gets notifications on the simulation progressisRemoteRun
- 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
storagespublic void stopSimulation()
ISimulationControl
stopSimulation
in interface ISimulationControl
public SimuComStatus getStatus()
ISimulationControl
getStatus
in interface ISimulationControl
SimuComStatus
object containing the simulation status