32 template <std::derived_from<Command> T>
191 [[deprecated(
"Replace with DeadlineFor")]]
282 [[deprecated(
"Use CommandScheduler::GetInstance().Schedule() instead.")]]
325 explicit operator
bool() const&;
328 explicit operator
bool() && = delete;
338 std::
string m_moveOutSite{
""};
339 void AssertValid()
const;
@ name
Definition base.h:690
typename std::decay< T >::type decay_t
Definition base.h:321
A state machine representing a complete action to be performed by the robot.
Definition Command.hpp:41
InterruptionBehavior
An enum describing the command's behavior when another command with a shared requirement is scheduled...
Definition Command.hpp:173
CommandPtr OnlyWhile(std::function< bool()> condition) &&
Decorates this command with a run condition.
CommandPtr(CommandPtr &&)
CommandPtr FinallyDo(std::function< void()> end) &&
Decorates this command with a lambda to call on interrupt or end, following the command's inherent Co...
CommandPtr AlongWith(CommandPtr &¶llel) &&
Decorates this command with a set of commands to run parallel to it, ending when the last command end...
CommandPtr & operator=(CommandPtr &&)=default
CommandPtr Repeatedly() &&
Decorates this command to run repeatedly, restarting it when it ends, until this command is interrupt...
std::unique_ptr< Command > Unwrap() &&
Convert to the underlying unique_ptr.
CommandPtr AsProxy() &&
Decorates this command to run "by proxy" by wrapping it in a ProxyCommand.
CommandPtr(std::unique_ptr< Command > &&command)
CommandPtr DeadlineFor(CommandPtr &¶llel) &&
Decorates this command with a set of commands to run parallel to it, ending when the calling command ...
CommandPtr AndThen(std::function< void()> toRun, Requirements requirements={}) &&
Decorates this command with a runnable to run after the command finishes.
CommandPtr WithTimeout(wpi::units::second_t duration) &&
Decorates this command with a timeout.
bool HasRequirement(Subsystem *requirement) const &
Whether the command requires a given subsystem.
void Cancel() const &
Cancels this command.
CommandPtr AndThen(CommandPtr &&next) &&
Decorates this command with a set of commands to run after it in sequence.
CommandPtr FinallyDo(std::function< void(bool)> end) &&
Decorates this command with a lambda to call on interrupt or end, following the command's inherent Co...
CommandPtr WithDeadline(CommandPtr &&deadline) &&
Creates a new command that runs this command and the deadline in parallel, finishing (and interruptin...
CommandPtr Until(std::function< bool()> condition) &&
Decorates this command with an interrupt condition.
CommandPtr HandleInterrupt(std::function< void()> handler) &&
Decorates this command with a lambda to call on interrupt, following the command's inherent Command::...
CommandPtr OnlyIf(std::function< bool()> condition) &&
Decorates this command to only run if this condition is met.
CommandPtr(T &&command)
Definition CommandPtr.hpp:34
bool IsScheduled() const &
Whether or not the command is currently scheduled.
CommandPtr(std::nullptr_t)=delete
CommandPtr RaceWith(CommandPtr &¶llel) &&
Decorates this command with a set of commands to run parallel to it, ending when the first command en...
CommandPtr BeforeStarting(std::function< void()> toRun, Requirements requirements={}) &&
Decorates this command with a runnable to run before this command starts.
CommandPtr DeadlineWith(CommandPtr &¶llel) &&
Decorates this command with a set of commands to run parallel to it, ending when the calling command ...
CommandPtr WithInterruptBehavior(Command::InterruptionBehavior interruptBehavior) &&
Decorates this command to have a different interrupt behavior.
CommandPtr IgnoringDisable(bool doesRunWhenDisabled) &&
Decorates this command to run or stop when disabled.
static std::vector< std::unique_ptr< Command > > UnwrapVector(std::vector< CommandPtr > &&vec)
Convert a vector of CommandPtr objects to their underlying unique_ptrs.
Command * get() const &
Get a raw pointer to the held command.
CommandPtr WithName(std::string_view name) &&
Decorates this Command with a name.
void Schedule() const &
Schedules this command.
CommandPtr Unless(std::function< bool()> condition) &&
Decorates this command to only run if this condition is not met.
CommandPtr BeforeStarting(CommandPtr &&before) &&
Decorates this command with another command to run before this command starts.
Represents requirements for a command, which is a set of (pointers to) subsystems.
Definition Requirements.hpp:20
A robot subsystem.
Definition Subsystem.hpp:42
Definition StringMap.hpp:773
Definition CommandNiDsStadiaController.hpp:15