RobotCore
Robot Core Documentation
|
Public Member Functions | |
abstract void | addCommands (Command... commands) |
Public Member Functions inherited from edu.wpi.first.wpilibj2.command.CommandBase | |
final void | addRequirements (Subsystem... requirements) |
Set< Subsystem > | getRequirements () |
Public Member Functions inherited from edu.wpi.first.wpilibj2.command.Command | |
default void | initialize () |
default void | execute () |
default void | end (boolean interrupted) |
default boolean | isFinished () |
default ParallelRaceGroup | withTimeout (double seconds) |
default ParallelRaceGroup | withInterrupt (BooleanSupplier condition) |
default SequentialCommandGroup | beforeStarting (Runnable toRun, Subsystem... requirements) |
default SequentialCommandGroup | andThen (Runnable toRun, Subsystem... requirements) |
default SequentialCommandGroup | andThen (Command... next) |
default ParallelDeadlineGroup | deadlineWith (Command... parallel) |
default ParallelCommandGroup | alongWith (Command... parallel) |
default ParallelRaceGroup | raceWith (Command... parallel) |
default PerpetualCommand | perpetually () |
default ProxyScheduleCommand | asProxy () |
default void | schedule (boolean interruptible) |
default void | schedule () |
default void | cancel () |
default boolean | isScheduled () |
default boolean | hasRequirement (Subsystem requirement) |
default boolean | runsWhenDisabled () |
default String | getName () |
Static Public Member Functions | |
static void | clearGroupedCommands () |
static void | clearGroupedCommand (Command command) |
static void | requireUngrouped (Command... commands) |
static void | requireUngrouped (Collection< Command > commands) |
static CommandGroupBase | sequence (Command... commands) |
static CommandGroupBase | parallel (Command... commands) |
static CommandGroupBase | race (Command... commands) |
static CommandGroupBase | deadline (Command deadline, Command... commands) |
Additional Inherited Members | |
Protected Attributes inherited from edu.wpi.first.wpilibj2.command.CommandBase | |
Set< Subsystem > | m_requirements = new HashSet<>() |
A base for CommandGroups. Statically tracks commands that have been allocated to groups to ensure those commands are not also used independently, which can result in inconsistent command state and unpredictable execution.
|
abstract |
Adds the given commands to the command group.
commands | The commands to add. |
Reimplemented in edu.wpi.first.wpilibj2.command.SequentialCommandGroup, edu.wpi.first.wpilibj2.command.ParallelRaceGroup, edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup, and edu.wpi.first.wpilibj2.command.ParallelCommandGroup.
|
static |
Removes a single command from the list of grouped commands, allowing it to be freely used again.
WARNING: Using this haphazardly can result in unexpected/undesirable behavior. Do not use this unless you fully understand what you are doing.
command | the command to remove from the list of grouped commands |
|
static |
Clears the list of grouped commands, allowing all commands to be freely used again.
WARNING: Using this haphazardly can result in unexpected/undesirable behavior. Do not use this unless you fully understand what you are doing.
|
static |
Factory method for ParallelDeadlineGroup, included for brevity/convenience.
deadline | the deadline command |
commands | the commands to include |
|
static |
Factory method for ParallelCommandGroup, included for brevity/convenience.
commands | the commands to include |
|
static |
Factory method for ParallelRaceGroup, included for brevity/convenience.
commands | the commands to include |
|
static |
Requires that the specified commands not have been already allocated to a CommandGroup. Throws an IllegalArgumentException if commands have been allocated.
commands | The commands to check |
|
static |
Requires that the specified commands not have been already allocated to a CommandGroup. Throws an IllegalArgumentException if commands have been allocated.
commands | The commands to check |
|
static |
Factory method for SequentialCommandGroup, included for brevity/convenience.
commands | the commands to include |