mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilib] Document simulation APIs (#3079)
- Remove sim checkstyle suppression - Add [[nodiscard]] to C++ register callback functions - Add a couple of missing sim functions Co-authored-by: Peter Johnson <johnson.peter@gmail.com> Co-authored-by: Starlight220 <yotamshlomi@gmail.com>
This commit is contained in:
@@ -11,6 +11,11 @@
|
||||
|
||||
namespace frc::sim {
|
||||
|
||||
/**
|
||||
* Override the HAL runtime type (simulated/real).
|
||||
*
|
||||
* @param type runtime type
|
||||
*/
|
||||
void SetRuntimeType(HAL_RuntimeType type);
|
||||
|
||||
void WaitForProgramStart();
|
||||
@@ -19,16 +24,40 @@ void SetProgramStarted();
|
||||
|
||||
bool GetProgramStarted();
|
||||
|
||||
/**
|
||||
* Restart the simulator time.
|
||||
*/
|
||||
void RestartTiming();
|
||||
|
||||
/**
|
||||
* Pause the simulator time.
|
||||
*/
|
||||
void PauseTiming();
|
||||
|
||||
/**
|
||||
* Resume the simulator time.
|
||||
*/
|
||||
void ResumeTiming();
|
||||
|
||||
/**
|
||||
* Check if the simulator time is paused.
|
||||
*
|
||||
* @return true if paused
|
||||
*/
|
||||
bool IsTimingPaused();
|
||||
|
||||
/**
|
||||
* Advance the simulator time and wait for all notifiers to run.
|
||||
*
|
||||
* @param deltaSeconds the amount to advance (in seconds)
|
||||
*/
|
||||
void StepTiming(units::second_t delta);
|
||||
|
||||
/**
|
||||
* Advance the simulator time and return immediately.
|
||||
*
|
||||
* @param deltaSeconds the amount to advance (in seconds)
|
||||
*/
|
||||
void StepTimingAsync(units::second_t delta);
|
||||
|
||||
} // namespace frc::sim
|
||||
|
||||
Reference in New Issue
Block a user