Class BaseParallelCommandGroup
java.lang.Object
org.wpilib.command2.Command
xbot.common.command.BaseCommand
xbot.common.command.BaseParallelCommandGroup
- All Implemented Interfaces:
AutoCloseable, org.wpilib.telemetry.TelemetryLoggable, org.wpilib.tunable.ComplexTunable, TunablePrefixProvider
A command composition that runs a set of commands in parallel, ending when the last command ends.
The rules for command compositions apply: command instances that are passed to it cannot be added to any other composition or scheduled individually, and the composition requires all subsystems its components require.
This class is provided by the NewCommands VendorDep
-
Nested Class Summary
Nested classes/interfaces inherited from class org.wpilib.command2.Command
org.wpilib.command2.Command.InterruptionBehavior -
Field Summary
Fields inherited from class BaseCommand
aKitLog, log, monitor, runningAlert -
Constructor Summary
ConstructorsConstructorDescriptionBaseParallelCommandGroup(org.wpilib.command2.Command... commands) Creates a new ParallelCommandGroup. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddCommands(org.wpilib.command2.Command... commands) Adds the given commands to the group.final voidend(boolean interrupted) final voidexecute()org.wpilib.command2.Command.InterruptionBehaviorfinal voidfinal booleanbooleanMethods inherited from class BaseCommand
close, getPrefix, publishToTunables, publishToTunables, setRunsWhenDisabledMethods inherited from class org.wpilib.command2.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, finallyDo, finallyDo, getName, getRequirements, getTelemetryType, getTunableType, handleInterrupt, hasRequirement, ignoringDisable, isScheduled, logTo, onlyIf, onlyWhile, publishTunable, raceWith, repeatedly, setName, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeoutMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wpilib.tunable.ComplexTunable
publishChildTunable, publishChildTunable, removeChildTunable, setChildTunableChanged, updateTunable
-
Constructor Details
-
BaseParallelCommandGroup
public BaseParallelCommandGroup(org.wpilib.command2.Command... commands) Creates a new ParallelCommandGroup. The given commands will be executed simultaneously. The command composition will finish when the last command finishes. If the composition is interrupted, only the commands that are still running will be interrupted.- Parameters:
commands- the commands to include in this composition.
-
-
Method Details
-
addCommands
public final void addCommands(org.wpilib.command2.Command... commands) Adds the given commands to the group.- Parameters:
commands- Commands to add to the group.
-
initialize
public final void initialize()- Overrides:
initializein classBaseCommand
-
execute
public final void execute()- Overrides:
executein classorg.wpilib.command2.Command
-
end
public final void end(boolean interrupted) - Overrides:
endin classBaseCommand
-
isFinished
public final boolean isFinished()- Overrides:
isFinishedin classorg.wpilib.command2.Command
-
runsWhenDisabled
public boolean runsWhenDisabled()- Overrides:
runsWhenDisabledin classBaseCommand
-
getInterruptionBehavior
public org.wpilib.command2.Command.InterruptionBehavior getInterruptionBehavior()- Overrides:
getInterruptionBehaviorin classorg.wpilib.command2.Command
-