![]() |
WPILibC++ 2025.3.2
|
A command that starts a notifier to run the given runnable periodically in a separate thread. More...
#include <frc2/command/NotifierCommand.h>
Public Member Functions | |
| NotifierCommand (std::function< void()> toRun, units::second_t period, Requirements requirements={}) | |
| Creates a new NotifierCommand. | |
| NotifierCommand (NotifierCommand &&other) | |
| NotifierCommand (const NotifierCommand &other) | |
| void | Initialize () override |
| void | End (bool interrupted) override |
Public Member Functions inherited from frc2::CommandHelper< Command, NotifierCommand > | |
| CommandHelper ()=default | |
| CommandPtr | ToPtr () &&override |
A command that starts a notifier to run the given runnable periodically in a separate thread.
Has no end condition as-is; either subclass it or use Command::WithTimeout(double) or Command::Until(BooleanSupplier) to give it one.
WARNING: Do not use this class unless you are confident in your ability to make the executed code thread-safe. If you do not know what "thread-safe" means, that is a good sign that you should not use this class.
This class is provided by the NewCommands VendorDep
| frc2::NotifierCommand::NotifierCommand | ( | std::function< void()> | toRun, |
| units::second_t | period, | ||
| Requirements | requirements = {} ) |
Creates a new NotifierCommand.
| toRun | the runnable for the notifier to run |
| period | the period at which the notifier should run |
| requirements | the subsystems required by this command |
| frc2::NotifierCommand::NotifierCommand | ( | NotifierCommand && | other | ) |
| frc2::NotifierCommand::NotifierCommand | ( | const NotifierCommand & | other | ) |
|
override |
|
override |