8#include <initializer_list>
40 std::initializer_list<Subsystem*> requirements);
50 std::span<Subsystem* const> requirements = {});
58 void End(
bool interrupted)
override;
61 std::function<void()> m_toRun;
63 units::second_t m_period;
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26
A command that starts a notifier to run the given runnable periodically in a separate thread.
Definition: NotifierCommand.h:30
NotifierCommand(NotifierCommand &&other)
NotifierCommand(const NotifierCommand &other)
void Initialize() override
The initial subroutine of a command.
NotifierCommand(std::function< void()> toRun, units::second_t period, std::span< Subsystem *const > requirements={})
Creates a new NotifierCommand.
NotifierCommand(std::function< void()> toRun, units::second_t period, std::initializer_list< Subsystem * > requirements)
Creates a new NotifierCommand.
void End(bool interrupted) override
The action to take when the command ends.
Notifiers run a callback function on a separate thread at a specified period.
Definition: Notifier.h:29
Definition: InstantCommand.h:14