| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.wpi.first.wpilibj.command.Scheduler
public class Scheduler
The Scheduler is a singleton which holds the top-level running commands.  It is in charge
 of both calling the command's run() method and to make sure that there are
 no two commands with conflicting requirements running.
 
It is fine if teams wish to take control of the Scheduler themselves, all that needs to be done
 is to call Scheduler.getInstance().run() often
 to have Commands function correctly.  However, this is already done for you if you
 use the CommandBased Robot template.
Command| Method Summary | |
|---|---|
|  void | add(Command command)Adds the command to the Scheduler. | 
|  void | addButton(Trigger.ButtonScheduler button)Adds a button to the Scheduler. | 
|  void | disable()Disable the command scheduler. | 
|  void | enable()Enable the command scheduler. | 
| static Scheduler | getInstance()Returns the Scheduler, creating it if one does not exist. | 
|  String | getName() | 
|  String | getSmartDashboardType() | 
|  ITable | getTable() | 
|  String | getType() | 
|  void | initTable(ITable subtable)Initializes a table for this sendable object. | 
|  void | removeAll()Removes all commands | 
|  void | run()Runs a single iteration of the loop. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static Scheduler getInstance()
Scheduler, creating it if one does not exist.
Schedulerpublic void add(Command command)
Scheduler.  This will not add the Command immediately, but will
 instead wait for the proper time in the run() loop before doing so.  The command returns
 immediately and does nothing if given null.
 Adding a Command to the Scheduler involves the Scheduler removing any Command
 which has shared requirements.
command - the command to addpublic void addButton(Trigger.ButtonScheduler button)
Scheduler.  The Scheduler will poll the button
 during its run().
button - the button to addpublic void run()
Command system.  The loop has five stages:
 
public void removeAll()
public void disable()
public void enable()
public String getName()
getName in interface NamedSendablepublic String getType()
public void initTable(ITable subtable)
initTable in interface Sendablesubtable - The table to put the values in.public ITable getTable()
getTable in interface Sendablepublic String getSmartDashboardType()
getSmartDashboardType in interface Sendable| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||