Package edu.wpi.first.wpilibj.simulation
Class SimHooks
java.lang.Object
edu.wpi.first.wpilibj.simulation.SimHooks
public final class SimHooks extends Object
-
Method Summary
Modifier and Type Method Description static boolean
getProgramStarted()
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()
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()
-
Method Details
-
setHALRuntimeType
Override the HAL runtime type (simulated/real).- Parameters:
type
- runtime type
-
waitForProgramStart
-
setProgramStarted
-
getProgramStarted
-
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)
-