public final class Scheduler extends java.lang.Object implements NamedSendable
| Modifier and Type | Field and Description |
|---|---|
private static StringArray |
commands
The commands.
|
private static NumberArray |
ids
The to cancel.
|
private static boolean |
m_adding
The m_adding.
|
private static java.util.Vector<Command> |
m_additions
The m_additions.
|
private static java.util.Vector<Binding> |
m_binds |
private static java.util.Vector<Trigger.ButtonScheduler> |
m_buttons
The m_buttons.
|
private static boolean |
m_disabled
The m_disabled.
|
private static byte |
m_disabledCounter
The m_disabled counter.
|
private static Command |
m_firstCommand |
private static Scheduler |
m_instance
The m_instance.
|
private static Command |
m_lastCommand |
private static ILogger |
m_log
The m_log.
|
private static boolean |
m_running |
private static java.util.Vector<Subsystem> |
m_subsystems
The m_subsystems.
|
private static ITable |
m_table
The m_table.
|
private static NumberArray |
toCancel
The to cancel.
|
| Modifier | Constructor and Description |
|---|---|
private |
Scheduler()
Instantiates a new scheduler.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
add_internal(Command command)
Adds a command immediately to the
Scheduler. |
static void |
add(Command command)
Adds the.
|
static void |
addBind(Binding sink) |
static void |
addButton(Trigger.ButtonScheduler btn)
Adds the button.
|
static Scheduler |
getInstance()
Gets the single instance of Scheduler.
|
java.lang.String |
getName() |
java.lang.String |
getSmartDashboardType() |
ITable |
getTable() |
java.lang.String |
getType()
Gets the type.
|
static void |
initialize() |
void |
initTable(ITable subtable) |
(package private) static void |
registerSubsystem(Subsystem system)
|
static void |
removeAll()
Removes the all.
|
static void |
run()
Runs a single iteration of the loop.
|
static void |
setEnabled(boolean enabled)
Sets the enabled.
|
private static Scheduler m_instance
private static final ILogger m_log
private static ITable m_table
private static boolean m_adding
private static boolean m_disabled
private static byte m_disabledCounter
private static boolean m_running
private static final java.util.Vector<Subsystem> m_subsystems
private static final java.util.Vector<Trigger.ButtonScheduler> m_buttons
private static final java.util.Vector<Command> m_additions
private static final java.util.Vector<Binding> m_binds
private static final Command m_firstCommand
private static final Command m_lastCommand
private static StringArray commands
private static NumberArray ids
private static NumberArray toCancel
public static void initialize()
public static Scheduler getInstance()
public static void add(Command command)
command - the commandpublic static void addBind(Binding sink)
public static void addButton(Trigger.ButtonScheduler btn)
btn - the btnprotected static void add_internal(Command command)
Scheduler. This should only be
called in the run() loop. Any command with conflicting
requirements will be removed, unless it is uninterruptable. Giving
null does nothing.command - the Command to addpublic static void run()
Command system. The loop has five
stages:
static void registerSubsystem(Subsystem system)
Subsystem to this Scheduler, so that the
Scheduler might know if a default Command needs to be
run. All Subsystems should call this.system - the systempublic static void removeAll()
public static void setEnabled(boolean enabled)
enabled - the new enabledpublic java.lang.String getType()
public java.lang.String getName()
getName in interface NamedSendablepublic java.lang.String getSmartDashboardType()
getSmartDashboardType in interface Sendable