RaidZeroLib
Coroutine robot framework for VEX V5
Toggle main menu visibility
Loading...
Searching...
No Matches
Platform.hpp
1
#pragma once
2
#include "RaidZeroLib/api/Units/Units.hpp"
3
4
namespace
rz
{
5
7
enum class
CompetitionMode
{
Disabled
,
Autonomous
,
Driver
};
8
15
class
Platform
{
16
public
:
17
virtual
~Platform
() =
default
;
18
20
[[nodiscard]]
virtual
Time
now
()
const
= 0;
21
23
virtual
void
sleepUntil
(
Time
time) = 0;
24
26
[[nodiscard]]
virtual
CompetitionMode
competitionMode
()
const
= 0;
27
};
28
29
}
// namespace rz
rz::Platform
What the runtime needs from the outside world: a clock, a way to wait, and the competition mode.
Definition
Platform.hpp:15
rz::Platform::~Platform
virtual ~Platform()=default
rz::Platform::now
virtual Time now() const =0
Monotonic time.
rz::Platform::sleepUntil
virtual void sleepUntil(Time time)=0
Blocks until now() >= time. Returns immediately if that time has passed.
rz::Platform::competitionMode
virtual CompetitionMode competitionMode() const =0
The mode field control is in right now.
rz::CompetitionMode
CompetitionMode
What field control (or a competition switch) currently allows the robot to do.
Definition
Platform.hpp:7
rz::CompetitionMode::Driver
@ Driver
Definition
Platform.hpp:7
rz::CompetitionMode::Autonomous
@ Autonomous
Definition
Platform.hpp:7
rz::CompetitionMode::Disabled
@ Disabled
Definition
Platform.hpp:7
rz::Time
au::QuantityPointD< au::Seconds > Time
Definition
Units.hpp:17
rz
Definition
DriverControl.hpp:11
RaidZeroLib
api
Runtime
Platform.hpp
Generated by
1.18.0