9#pragma warning(disable : 4521)
48 std::vector<std::unique_ptr<Command>>&& commands);
59 template <wpi::DecayedDerivedFrom<Command> T,
60 wpi::DecayedDerivedFrom<Command>... Commands>
62 SetDeadline(std::make_unique<std::decay_t<T>>(std::forward<T>(deadline)));
79 template <wpi::DecayedDerivedFrom<Command>... Commands>
81 std::vector<std::unique_ptr<Command>> foo;
82 ((void)foo.emplace_back(std::make_unique<std::decay_t<Commands>>(
83 std::forward<Commands>(commands))),
92 void End(
bool interrupted) final;
105 void SetDeadline(
std::unique_ptr<
Command>&& deadline);
109 bool m_runWhenDisabled{
true};
112 bool m_finished{
true};
CRTP implementation to allow polymorphic decorator functions in Command.
Definition CommandHelper.h:25
A state machine representing a complete action to be performed by the robot.
Definition Command.h:41
InterruptionBehavior
An enum describing the command's behavior when another command with a shared requirement is scheduled...
Definition Command.h:173
@ kCancelIncoming
This command continues, and the incoming command is not scheduled.
A command composition that runs a set of commands in parallel, ending only when a specific command (t...
Definition ParallelDeadlineGroup.h:35
ParallelDeadlineGroup(ParallelDeadlineGroup &)=delete
ParallelDeadlineGroup(ParallelDeadlineGroup &&other)=default
void AddCommands(Commands &&... commands)
Adds the given commands to the group.
Definition ParallelDeadlineGroup.h:80
ParallelDeadlineGroup(std::unique_ptr< Command > &&deadline, std::vector< std::unique_ptr< Command > > &&commands)
Creates a new ParallelDeadlineGroup.
Command::InterruptionBehavior GetInterruptionBehavior() const override
void InitSendable(wpi::SendableBuilder &builder) override
ParallelDeadlineGroup(const ParallelDeadlineGroup &)=delete
bool RunsWhenDisabled() const override
void End(bool interrupted) final
ParallelDeadlineGroup(T &&deadline, Commands &&... commands)
Creates a new ParallelDeadlineGroup.
Definition ParallelDeadlineGroup.h:61
Definition FunctionalCommand.h:13
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
Foonathan namespace.
Definition ntcore_cpp.h:26