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 booleangetProgramStarted()static booleanisTimingPaused()Check if the simulator time is paused.static voidpauseTiming()Pause the simulator time.static voidrestartTiming()Restart the simulator time.static voidresumeTiming()Resume the simulator time.static voidsetHALRuntimeType(int type)Override the HAL runtime type (simulated/real).static voidsetProgramStarted()static voidstepTiming(double deltaSeconds)Advance the simulator time and wait for all notifiers to run.static voidstepTimingAsync(double deltaSeconds)Advance the simulator time and return immediately.static voidwaitForProgramStart()
-
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)
-