public abstract class RobotBase extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DriverStation |
m_ds |
static long |
MAIN_THREAD_ID
The ID of the main Java thread.
|
static int |
ROBOT_TASK_PRIORITY
The VxWorks priority that robot code should work at (so Java code should run at).
|
Modifier | Constructor and Description |
---|---|
protected |
RobotBase()
Constructor for a generic robot program.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Free the resources for a RobotBase class.
|
static boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue) |
static void |
initializeHardwareConfiguration()
Common initialization for all robot programs.
|
boolean |
isAutonomous()
Determine if the robot is currently in Autonomous mode as determined by the field
controls.
|
boolean |
isDisabled()
Determine if the Robot is currently disabled.
|
boolean |
isEnabled()
Determine if the Robot is currently enabled.
|
boolean |
isNewDataAvailable()
Indicates if new data is available from the driver station.
|
boolean |
isOperatorControl()
Determine if the robot is currently in Operator Control mode as determined by the field
controls.
|
static boolean |
isReal() |
static boolean |
isSimulation() |
boolean |
isTest()
Determine if the robot is currently in Test mode as determined by the driver
station.
|
static void |
main(java.lang.String... args)
Starting point for the applications.
|
abstract void |
startCompetition()
Provide an alternate "main loop" via startCompetition().
|
public static final int ROBOT_TASK_PRIORITY
public static final long MAIN_THREAD_ID
protected final DriverStation m_ds
protected RobotBase()
This must be used to ensure that the communications code starts. In the future it would be nice to put this code into it's own task that loads on boot so ensure that it runs.
public void free()
public static boolean isSimulation()
public static boolean isReal()
public boolean isDisabled()
public boolean isEnabled()
public boolean isAutonomous()
public boolean isTest()
public boolean isOperatorControl()
public boolean isNewDataAvailable()
public abstract void startCompetition()
public static boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
public static void initializeHardwareConfiguration()
public static void main(java.lang.String... args)