17 #include "Commands/Command.h"
18 #include "ErrorBase.h"
19 #include "HAL/cpp/priority_mutex.h"
20 #include "SmartDashboard/NamedSendable.h"
21 #include "SmartDashboard/SmartDashboard.h"
22 #include "networktables/NetworkTable.h"
40 void SetEnabled(
bool enabled);
44 void InitTable(std::shared_ptr<ITable> subTable);
45 std::shared_ptr<ITable>
GetTable()
const;
47 std::string GetType()
const;
53 void ProcessCommandAddition(
Command* command);
55 Command::SubsystemSet m_subsystems;
57 typedef std::vector<ButtonScheduler*> ButtonVector;
58 ButtonVector m_buttons;
59 typedef std::vector<Command*> CommandVector;
61 CommandVector m_additions;
62 typedef std::set<Command*> CommandSet;
63 CommandSet m_commands;
64 bool m_adding =
false;
65 bool m_enabled =
true;
66 std::vector<std::string> commands;
67 std::vector<double> ids;
68 std::vector<double> toCancel;
69 std::shared_ptr<ITable> m_table;
70 bool m_runningCommandsChanged =
false;
void AddCommand(Command *command)
Add a command to be scheduled later.
Definition: Scheduler.cpp:43
void Run()
Runs a single iteration of the loop.
Definition: Scheduler.cpp:112
std::string GetName() const
Definition: Scheduler.cpp:265
void RegisterSubsystem(Subsystem *subsystem)
Registers a Subsystem to this Scheduler, so that the Scheduler might know if a default Command needs ...
Definition: Scheduler.cpp:169
Definition: Subsystem.h:20
void InitTable(std::shared_ptr< ITable > subTable)
Initializes a table for this sendable object.
Definition: Scheduler.cpp:271
std::shared_ptr< ITable > GetTable() const
Definition: Scheduler.cpp:279
Definition: priority_mutex.h:53
void ResetAll()
Completely resets the scheduler.
Definition: Scheduler.cpp:209
static Scheduler * GetInstance()
Returns the Scheduler, creating it if one does not exist.
Definition: Scheduler.cpp:28
Base class for most objects.
Definition: ErrorBase.h:72
void Remove(Command *command)
Removes the Command from the Scheduler.
Definition: Scheduler.cpp:182
void UpdateTable()
Update the network tables associated with the Scheduler object on the SmartDashboard.
Definition: Scheduler.cpp:222
std::string GetSmartDashboardType() const
Definition: Scheduler.cpp:269
The Command class is at the very core of the entire command framework.
Definition: Command.h:52
The interface for sendable objects that gives the sendable a default name in the Smart Dashboard...
Definition: NamedSendable.h:21
Definition: Scheduler.h:29