WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
Public Member Functions | List of all members
SimpleRobot Class Reference

#include <SimpleRobot.h>

Inheritance diagram for SimpleRobot:
RobotBase

Public Member Functions

virtual void RobotInit ()
 
virtual void Disabled ()
 
virtual void Autonomous ()
 
virtual void OperatorControl ()
 
virtual void Test ()
 
virtual void RobotMain ()
 
void StartCompetition ()
 
- Public Member Functions inherited from RobotBase
bool IsEnabled ()
 
bool IsDisabled ()
 
bool IsAutonomous ()
 
bool IsOperatorControl ()
 
bool IsTest ()
 
bool IsSystemActive ()
 
bool IsNewDataAvailable ()
 
WatchdogGetWatchdog ()
 

Additional Inherited Members

- Static Public Member Functions inherited from RobotBase
static RobotBasegetInstance ()
 
static void setInstance (RobotBase *robot)
 
static void startRobotTask (FUNCPTR factory)
 
static void robotTask (FUNCPTR factory, Task *task)
 
- Protected Member Functions inherited from RobotBase
virtual ~RobotBase ()
 
 RobotBase ()
 
- Static Protected Member Functions inherited from RobotBase
static void WriteVersionString ()
 
- Protected Attributes inherited from RobotBase
Taskm_task
 
Watchdog m_watchdog
 
DriverStationm_ds
 

Detailed Description

Todo:
If this is going to last until release, it needs a better name.

Member Function Documentation

void SimpleRobot::Autonomous ( )
virtual

Autonomous should go here. Programmers should override this method to run code that should run while the field is in the autonomous period. This will be called once each time the robot enters the autonomous state.

void SimpleRobot::Disabled ( )
virtual

Disabled should go here. Programmers should override this method to run code that should run while the field is disabled.

void SimpleRobot::OperatorControl ( )
virtual

Operator control (tele-operated) code should go here. Programmers should override this method to run code that should run while the field is in the Operator Control (tele-operated) period. This is called once each time the robot enters the teleop state.

void SimpleRobot::RobotInit ( )
virtual

Robot-wide initialization code should go here.

Programmers should override this method for default Robot-wide initialization which will be called each time the robot enters the disabled state.

void SimpleRobot::RobotMain ( )
virtual

Robot main program for free-form programs.

This should be overridden by user subclasses if the intent is to not use the Autonomous() and OperatorControl() methods. In that case, the program is responsible for sensing when to run the autonomous and operator control functions in their program.

This method will be called immediately after the constructor is called. If it has not been overridden by a user subclass (i.e. the default version runs), then the Autonomous() and OperatorControl() methods will be called.

void SimpleRobot::StartCompetition ( )
virtual

Start a competition. This code needs to track the order of the field starting to ensure that everything happens in the right order. Repeatedly run the correct method, either Autonomous or OperatorControl or Test when the robot is enabled. After running the correct method, wait for some state to change, either the other mode starts or the robot is disabled. Then go back and wait for the robot to be enabled again.

Implements RobotBase.

void SimpleRobot::Test ( )
virtual

Test program should go here. Programmers should override this method to run code that executes while the robot is in test mode. This will be called once whenever the robot enters test mode


The documentation for this class was generated from the following files: