14 #include "llvm/raw_ostream.h"
20 #define START_ROBOT_CLASS(_ClassName_) \
22 if (!HAL_Initialize(500, 0)) { \
23 llvm::errs() << "FATAL ERROR: HAL could not be initialized\n"; \
26 HAL_Report(HALUsageReporting::kResourceType_Language, \
27 HALUsageReporting::kLanguage_CPlusPlus); \
28 llvm::outs() << "\n********** Robot program starting **********\n"; \
29 static _ClassName_ robot; \
30 robot.StartCompetition(); \
51 virtual void StartCompetition() = 0;
62 static std::thread::id m_threadId;
bool IsEnabled() const
Determine if the Robot is currently enabled.
Definition: RobotBase.cpp:70
bool IsAutonomous() const
Determine if the robot is currently in Autonomous mode.
Definition: RobotBase.cpp:83
bool IsDisabled() const
Determine if the Robot is currently disabled.
Definition: RobotBase.cpp:76
static std::thread::id GetThreadId()
Gets the ID of the main robot thread.
Definition: RobotBase.cpp:109
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:27
bool IsNewDataAvailable() const
Indicates if new data is available from the driver station.
Definition: RobotBase.cpp:104
bool IsOperatorControl() const
Determine if the robot is currently in Operator Control mode.
Definition: RobotBase.cpp:90
Implement a Robot Program framework.
Definition: RobotBase.h:42
bool IsTest() const
Determine if the robot is currently in Test mode.
Definition: RobotBase.cpp:97
RobotBase()
Constructor for a generic robot program.
Definition: RobotBase.cpp:38