| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.midlet.MIDlet
edu.wpi.first.wpilibj.RobotBase
public abstract class RobotBase
Implement a Robot Program framework. The RobotBase class is intended to be subclassed by a user creating a robot program. Overridden autonomous() and operatorControl() methods are called at the appropriate time as the match proceeds. In the current implementation, the Autonomous code will run to completion before the OperatorControl code could start. In the future the Autonomous code might be spawned as a task, then killed at the end of the Autonomous period.
| Field Summary | |
|---|---|
| static String | ERRORS_TO_DRIVERSTATION_PROPBoolean System property. | 
| protected  DriverStation | m_ds | 
| static int | ROBOT_TASK_PRIORITYThe VxWorks priority that robot code should work at (so Java code should run at) | 
| Constructor Summary | |
|---|---|
| protected  | RobotBase()Constructor for a generic robot program. | 
| Method Summary | |
|---|---|
| protected  void | destroyApp(boolean unconditional)Called if the MIDlet is terminated by the system. | 
|  void | free()Free the resources for a RobotBase class. | 
| static boolean | getBooleanProperty(String name,
                   boolean defaultValue) | 
|  Watchdog | getWatchdog()Return the instance of the Watchdog timer. | 
|  boolean | isAutonomous()Determine if the robot is currently in Autonomous mode. | 
|  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. | 
|  boolean | isSystemActive()Check on the overall status of the system. | 
|  boolean | isTest()Determine if the robot is currently in Test mode | 
| protected  void | pauseApp()Pauses the application | 
| protected  void | startApp()Starting point for the applications. | 
| abstract  void | startCompetition()Provide an alternate "main loop" via startCompetition(). | 
| Methods inherited from class javax.microedition.midlet.MIDlet | 
|---|
| getAppProperty, notifyDestroyed, notifyPaused, resumeRequest | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int ROBOT_TASK_PRIORITY
public static final String ERRORS_TO_DRIVERSTATION_PROP
protected final DriverStation m_ds
| Constructor Detail | 
|---|
protected RobotBase()
| Method Detail | 
|---|
public void free()
public boolean isSystemActive()
public Watchdog getWatchdog()
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(String name,
                                         boolean defaultValue)
protected final void startApp()
                       throws MIDletStateChangeException
startApp in class MIDletMIDletStateChangeExceptionprotected final void pauseApp()
pauseApp in class MIDlet
protected final void destroyApp(boolean unconditional)
                         throws MIDletStateChangeException
destroyApp in class MIDletunconditional - If true when this method is called, the MIDlet must
    cleanup and release all resources. If false the MIDlet may throw
    MIDletStateChangeException  to indicate it does not want to be destroyed
    at this time.
MIDletStateChangeException - if there is an exception in terminating the midlet| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||