[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:
Peter Johnson
2021-01-11 21:55:45 -08:00
committed by GitHub
parent 26584ff145
commit 9c3b51ca0f
64 changed files with 4516 additions and 199 deletions

View File

@@ -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