Class SimHooks

java.lang.Object
edu.wpi.first.wpilibj.simulation.SimHooks

public final class SimHooks extends Object
Simulation hooks.
  • Method Details

    • setHALRuntimeType

      public static void setHALRuntimeType(int type)
      Override the HAL runtime type (simulated/real).
      Parameters:
      type - runtime type
    • waitForProgramStart

      public static void waitForProgramStart()
      Waits until the user program has started.
    • setProgramStarted

      public static void setProgramStarted()
      Sets that the user program has started.
    • getProgramStarted

      public static boolean getProgramStarted()
      Returns true if the user program has started.
      Returns:
      True if the user program has started.
    • restartTiming

      public static void restartTiming()
      Restart the simulator time.
    • pauseTiming

      public static void pauseTiming()
      Pause the simulator time.
    • resumeTiming

      public static void resumeTiming()
      Resume the simulator time.
    • isTimingPaused

      public static boolean isTimingPaused()
      Check if the simulator time is paused.
      Returns:
      true if paused
    • stepTiming

      public static void stepTiming(double deltaSeconds)
      Advance the simulator time and wait for all notifiers to run.
      Parameters:
      deltaSeconds - the amount to advance (in seconds)
    • stepTimingAsync

      public static void stepTimingAsync(double deltaSeconds)
      Advance the simulator time and return immediately.
      Parameters:
      deltaSeconds - the amount to advance (in seconds)