WPILibC++ 2024.3.2
SimHooks.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9#include <hal/HALBase.h>
10#include <units/time.h>
11
12namespace frc::sim {
13
14/**
15 * Override the HAL runtime type (simulated/real).
16 *
17 * @param type runtime type
18 */
20
22
24
26
27/**
28 * Restart the simulator time.
29 */
31
32/**
33 * Pause the simulator time.
34 */
36
37/**
38 * Resume the simulator time.
39 */
41
42/**
43 * Check if the simulator time is paused.
44 *
45 * @return true if paused
46 */
48
49/**
50 * Advance the simulator time and wait for all notifiers to run.
51 *
52 * @param delta the amount to advance (in seconds)
53 */
54void StepTiming(units::second_t delta);
55
56/**
57 * Advance the simulator time and return immediately.
58 *
59 * @param delta the amount to advance (in seconds)
60 */
61void StepTimingAsync(units::second_t delta);
62
63} // namespace frc::sim
HAL_RuntimeType
Definition: HALBase.h:25
type
Definition: core.h:556
Definition: XboxControllerSim.h:13
void SetRuntimeType(HAL_RuntimeType type)
Override the HAL runtime type (simulated/real).
void RestartTiming()
Restart the simulator time.
void StepTiming(units::second_t delta)
Advance the simulator time and wait for all notifiers to run.
bool GetProgramStarted()
void StepTimingAsync(units::second_t delta)
Advance the simulator time and return immediately.
void SetProgramStarted()
void ResumeTiming()
Resume the simulator time.
void PauseTiming()
Pause the simulator time.
bool IsTimingPaused()
Check if the simulator time is paused.
void WaitForProgramStart()