Robot Core Documentation
|
Static Public Member Functions | |
static Command | none () |
static Command | idle (Subsystem... requirements) |
static Command | runOnce (Runnable action, Subsystem... requirements) |
static Command | run (Runnable action, Subsystem... requirements) |
static Command | startEnd (Runnable start, Runnable end, Subsystem... requirements) |
static Command | runEnd (Runnable run, Runnable end, Subsystem... requirements) |
static Command | print (String message) |
static Command | waitSeconds (double seconds) |
static Command | waitUntil (BooleanSupplier condition) |
static Command | either (Command onTrue, Command onFalse, BooleanSupplier selector) |
static< K > Command | select (Map< K, Command > commands, Supplier<? extends K > selector) |
static Command | defer (Supplier< Command > supplier, Set< Subsystem > requirements) |
static Command | deferredProxy (Supplier< Command > supplier) |
static Command | sequence (Command... commands) |
static Command | repeatingSequence (Command... commands) |
static Command | parallel (Command... commands) |
static Command | race (Command... commands) |
static Command | deadline (Command deadline, Command... otherCommands) |
Namespace for command factory methods.
For convenience, you might want to static import the members of this class.
|
static |
Runs a group of commands at the same time. Ends once a specific command finishes, and cancels the others.
deadline | the deadline command |
otherCommands | the other commands to include |
IllegalArgumentException | if the deadline command is also in the otherCommands argument |
|
static |
Runs the command supplied by the supplier.
supplier | the command supplier |
requirements | the set of requirements for this command |
|
static |
Constructs a command that schedules the command returned from the supplier when initialized, and ends when it is no longer scheduled. The supplier is called when the command is initialized.
supplier | the command supplier |
|
static |
Runs one of two commands, based on the boolean selector function.
onTrue | the command to run if the selector function returns true |
onFalse | the command to run if the selector function returns false |
selector | the selector function |
|
static |
Constructs a command that does nothing until interrupted.
requirements | Subsystems to require |
|
static |
Constructs a command that does nothing, finishing immediately.
|
static |
Runs a group of commands at the same time. Ends once all commands in the group finish.
commands | the commands to include |
|
static |
Constructs a command that prints a message and finishes.
message | the message to print |
|
static |
Runs a group of commands at the same time. Ends once any command in the group finishes, and cancels the others.
commands | the commands to include |
|
static |
Runs a group of commands in series, one after the other. Once the last command ends, the group is restarted.
commands | the commands to include |
|
static |
Constructs a command that runs an action every iteration until interrupted.
action | the action to run |
requirements | subsystems the action requires |
|
static |
Constructs a command that runs an action every iteration until interrupted, and then runs a second action.
run | the action to run every iteration |
end | the action to run on interrupt |
requirements | subsystems the action requires |
|
static |
Constructs a command that runs an action once and finishes.
action | the action to run |
requirements | subsystems the action requires |
|
static |
Runs one of several commands, based on the selector function.
<K> | The type of key used to select the command |
selector | the selector function |
commands | map of commands to select from |
|
static |
Runs a group of commands in series, one after the other.
commands | the commands to include |
|
static |
Constructs a command that runs an action once and another action when the command is interrupted.
start | the action to run on start |
end | the action to run on interrupt |
requirements | subsystems the action requires |
|
static |
Constructs a command that does nothing, finishing after a specified duration.
seconds | after how long the command finishes |
|
static |
Constructs a command that does nothing, finishing once a condition becomes true.
condition | the condition |