Package edu.wpi.first.wpilibj.simulation
Class SimHooks
java.lang.Object
edu.wpi.first.wpilibj.simulation.SimHooks
public final class SimHooks extends Object
Simulation hooks.
-
Method Summary
Modifier and Type Method Description static boolean
getProgramStarted()
Returns true if the user program has started.static boolean
isTimingPaused()
Check if the simulator time is paused.static void
pauseTiming()
Pause the simulator time.static void
restartTiming()
Restart the simulator time.static void
resumeTiming()
Resume the simulator time.static void
setHALRuntimeType(int type)
Override the HAL runtime type (simulated/real).static void
setProgramStarted()
Sets that the user program has started.static void
stepTiming(double deltaSeconds)
Advance the simulator time and wait for all notifiers to run.static void
stepTimingAsync(double deltaSeconds)
Advance the simulator time and return immediately.static void
waitForProgramStart()
Waits until the user program has started.
-
Method Details
-
setHALRuntimeType
Override the HAL runtime type (simulated/real).- Parameters:
type
- runtime type
-
waitForProgramStart
Waits until the user program has started. -
setProgramStarted
Sets that the user program has started. -
getProgramStarted
Returns true if the user program has started.- Returns:
- True if the user program has started.
-
restartTiming
Restart the simulator time. -
pauseTiming
Pause the simulator time. -
resumeTiming
Resume the simulator time. -
isTimingPaused
Check if the simulator time is paused.- Returns:
- true if paused
-
stepTiming
Advance the simulator time and wait for all notifiers to run.- Parameters:
deltaSeconds
- the amount to advance (in seconds)
-
stepTimingAsync
Advance the simulator time and return immediately.- Parameters:
deltaSeconds
- the amount to advance (in seconds)
-