![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
What the runtime needs from the outside world: a clock, a way to wait, and the competition mode. More...
#include <Platform.hpp>
Public Member Functions | |
| virtual | ~Platform ()=default |
| virtual Time | now () const =0 |
| Monotonic time. | |
| virtual void | sleepUntil (Time time)=0 |
| Blocks until now() >= time. Returns immediately if that time has passed. | |
| virtual CompetitionMode | competitionMode () const =0 |
| The mode field control is in right now. | |
What the runtime needs from the outside world: a clock, a way to wait, and the competition mode.
impl/Pros/Runtime/ProsPlatform implements this on the V5; impl/Simulation/Runtime/SimulationPlatform is a fake for host tests, where waiting simply advances time and the mode is set by the test.
|
virtualdefault |
|
nodiscardpure virtual |
The mode field control is in right now.
Implemented in rz::ProsPlatform, and rz::SimulationPlatform.
|
nodiscardpure virtual |
Monotonic time.
Implemented in rz::ProsPlatform, and rz::SimulationPlatform.
|
pure virtual |
Blocks until now() >= time. Returns immediately if that time has passed.
Implemented in rz::ProsPlatform, and rz::SimulationPlatform.