|
2010 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.
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. |
protected void |
free()
Free the resources for a RobotBase class. |
Watchdog |
getWatchdog()
Return the instance of the Watchdog timer. |
boolean |
isAutonomous()
Determine if the robot is currently in Autnomous 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. |
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 |
Constructor Detail |
---|
protected RobotBase()
Method Detail |
---|
protected void free()
public boolean isSystemActive()
public Watchdog getWatchdog()
public boolean isDisabled()
public boolean isEnabled()
public boolean isAutonomous()
public boolean isOperatorControl()
public boolean isNewDataAvailable()
public abstract void startCompetition()
protected final void startApp() throws MIDletStateChangeException
startApp
in class MIDlet
MIDletStateChangeException
protected final void pauseApp()
pauseApp
in class MIDlet
protected final void destroyApp(boolean unconditional) throws MIDletStateChangeException
destroyApp
in class MIDlet
unconditional
- 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
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |