15 #include <networktables/NetworkTableEntry.h> 16 #include <wpi/mutex.h> 18 #include "Commands/Command.h" 19 #include "ErrorBase.h" 20 #include "SmartDashboard/SendableBase.h" 24 class ButtonScheduler;
88 void SetEnabled(
bool enabled);
96 void ProcessCommandAddition(
Command* command);
98 Command::SubsystemSet m_subsystems;
99 wpi::mutex m_buttonsMutex;
100 typedef std::vector<ButtonScheduler*> ButtonVector;
101 ButtonVector m_buttons;
102 typedef std::vector<Command*> CommandVector;
103 wpi::mutex m_additionsMutex;
104 CommandVector m_additions;
105 typedef std::set<Command*> CommandSet;
106 CommandSet m_commands;
107 bool m_adding =
false;
108 bool m_enabled =
true;
109 std::vector<std::string> commands;
110 std::vector<double> ids;
111 std::vector<double> toCancel;
115 bool m_runningCommandsChanged =
false;
void AddCommand(Command *command)
Add a command to be scheduled later.
Definition: Scheduler.cpp:26
void Run()
Runs a single iteration of the loop.
Definition: Scheduler.cpp:47
Definition: Utility.cpp:119
void RegisterSubsystem(Subsystem *subsystem)
Registers a Subsystem to this Scheduler, so that the Scheduler might know if a default Command needs ...
Definition: Scheduler.cpp:39
Definition: Subsystem.h:23
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Definition: Scheduler.cpp:137
void ResetAll()
Completely resets the scheduler.
Definition: Scheduler.cpp:124
static Scheduler * GetInstance()
Returns the Scheduler, creating it if one does not exist.
Definition: Scheduler.cpp:21
Base class for most objects.
Definition: ErrorBase.h:74
void Remove(Command *command)
Removes the Command from the Scheduler.
Definition: Scheduler.cpp:101
Definition: SendableBase.h:19
Definition: SendableBuilder.h:23
NetworkTables Entry.
Definition: NetworkTableEntry.h:35
The Command class is at the very core of the entire command framework.
Definition: Command.h:48
Definition: Scheduler.h:27