ParallelCommandGroup
-
class ParallelCommandGroup : public Command
Runs multiple Command s at once, with the command ending once all individual commands finsh.
Public Functions
-
inline ParallelCommandGroup(const std::initializer_list<Command*> commands)
Create a new ParallelCommandGroup given a initializer list of commands.
Warning
No Commands in the parallel can require the same hardware! If this happens the code will immediately abort
- Parameters:
commands – Initializer list of Command s to run in this parallel
-
inline virtual void initialize() override
Initialize all commands in the ParallelCommandGroup
-
inline virtual void execute() override
Runs all the active commands in the ParallelCommandGroup
-
inline virtual bool isFinished() override
Returns true if all commands are finished.
- Returns:
True if all commands are finished
-
inline virtual void end(bool interrupted) override
Ends all commands with the ones that should be interrupted being interrupted.
- Parameters:
interrupted – Ends all commands based on if they are done or not
-
inline virtual std::vector<Subsystem*> getRequirements() override
Gets all the required subsystems for this ParallelCommandGroup.
- Returns:
Set of all requirements of all the command
-
inline ParallelCommandGroup(const std::initializer_list<Command*> commands)