15 #define START_ROBOT_CLASS(_ClassName_) \
17 if (!HALInitialize()) { \
18 std::cerr << "FATAL ERROR: HAL could not be initialized" << std::endl; \
21 HALReport(HALUsageReporting::kResourceType_Language, \
22 HALUsageReporting::kLanguage_CPlusPlus); \
23 _ClassName_ *robot = new _ClassName_(); \
24 RobotBase::robotSetup(robot); \
45 static void setInstance(
RobotBase *robot);
53 static void startRobotTask(FUNCPTR factory);
54 static void robotTask(FUNCPTR factory,
Task *task);
55 virtual void StartCompetition() = 0;
66 Task *m_task =
nullptr;
bool IsTest() const
Determine if the robot is currently in Test mode.
Definition: RobotBase.cpp:108
bool IsNewDataAvailable() const
Indicates if new data is available from the driver station.
Definition: RobotBase.cpp:115
bool IsEnabled() const
Determine if the Robot is currently enabled.
Definition: RobotBase.cpp:81
bool IsDisabled() const
Determine if the Robot is currently disabled.
Definition: RobotBase.cpp:87
bool IsOperatorControl() const
Determine if the robot is currently in Operator Control mode.
Definition: RobotBase.cpp:101
Implement a Robot Program framework.
Definition: RobotBase.h:40
RobotBase()
Constructor for a generic robot program.
Definition: RobotBase.cpp:46
This class exists for the sole purpose of getting its destructor called when the module unloads...
Definition: RobotBase.cpp:126
bool IsAutonomous() const
Determine if the robot is currently in Autonomous mode.
Definition: RobotBase.cpp:94
virtual ~RobotBase()
Free the resources for a RobotBase class.
Definition: RobotBase.cpp:70
Wrapper class around std::thread that allows changing thread priority.
Definition: Task.h:19
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:27