18 #include "Commands/Command.h" 19 #include "ErrorBase.h" 20 #include "SmartDashboard/NamedSendable.h" 21 #include "SmartDashboard/SmartDashboard.h" 22 #include "networktables/NetworkTable.h" 23 #include "networktables/NetworkTableEntry.h" 41 void SetEnabled(
bool enabled);
45 void InitTable(std::shared_ptr<nt::NetworkTable> subTable);
47 std::string GetType()
const;
53 void ProcessCommandAddition(
Command* command);
55 Command::SubsystemSet m_subsystems;
56 std::mutex m_buttonsLock;
57 typedef std::vector<ButtonScheduler*> ButtonVector;
58 ButtonVector m_buttons;
59 typedef std::vector<Command*> CommandVector;
60 std::mutex m_additionsLock;
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;
72 bool m_runningCommandsChanged =
false;
void AddCommand(Command *command)
Add a command to be scheduled later.
Definition: Scheduler.cpp:42
void Run()
Runs a single iteration of the loop.
Definition: Scheduler.cpp:112
std::string GetName() const
Definition: Scheduler.cpp:272
void RegisterSubsystem(Subsystem *subsystem)
Registers a Subsystem to this Scheduler, so that the Scheduler might know if a default Command needs ...
Definition: Scheduler.cpp:176
Definition: Subsystem.h:21
void InitTable(std::shared_ptr< nt::NetworkTable > subTable)
Initializes a table for this sendable object.
Definition: Scheduler.cpp:278
void ResetAll()
Completely resets the scheduler.
Definition: Scheduler.cpp:215
static Scheduler * GetInstance()
Returns the Scheduler, creating it if one does not exist.
Definition: Scheduler.cpp:27
Base class for most objects.
Definition: ErrorBase.h:74
void Remove(Command *command)
Removes the Command from the Scheduler.
Definition: Scheduler.cpp:189
void UpdateTable()
Update the network tables associated with the Scheduler object on the SmartDashboard.
Definition: Scheduler.cpp:230
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
std::string GetSmartDashboardType() const
Definition: Scheduler.cpp:276
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:30