Class SSimulation


  • public class SSimulation
    extends java.lang.Object
    Helper class for simulation control.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEBUG_BLOCKERS  
    • Constructor Summary

      Constructors 
      Constructor Description
      SSimulation()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean addBlocker​(IFuture<?> adblock)
      Add the future as simulation blocker, if currently in simulation mode.
      static Future<java.lang.Void> block()
      Create future as simulation blocker, if currently in simulation mode.
      static ServiceCall debugBlocker()
      Add caller stack to service call on debug.
      static boolean isBisimulating​(IInternalAccess ia)
      Check if running in bisimulation.
      static boolean isSimulating​(IInternalAccess ia)
      Check if running in (single platform) simulation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSimulation

        public SSimulation()
    • Method Detail

      • addBlocker

        public static boolean addBlocker​(IFuture<?> adblock)
        Add the future as simulation blocker, if currently in simulation mode. Simulation blocking means the clock will not advance until the future is done. This allows synchronizing external threads (e.g. swing) with the simulation execution.
      • block

        public static Future<java.lang.Void> block()
        Create future as simulation blocker, if currently in simulation mode. Simulation blocking means the clock will not advance until the future is done. This allows synchronizing external threads (e.g. swing) with the simulation execution.
        Returns:
        A future that has to be set to null for simulation to continue or null if not running in simulation mode.
      • isBisimulating

        public static boolean isBisimulating​(IInternalAccess ia)
        Check if running in bisimulation.
      • isSimulating

        public static boolean isSimulating​(IInternalAccess ia)
        Check if running in (single platform) simulation.
      • debugBlocker

        public static ServiceCall debugBlocker()
        Add caller stack to service call on debug.