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 extends AbstractMain and provides the missing information.
  • Method Details

    • 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 progress
      useOwnSensorstorage - 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 progress
      useOwnSensorstorage - 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 the SimuComResult 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