13 #include "ErrorBase.h"
14 #include "SmartDashboard/NamedSendable.h"
24 explicit Subsystem(
const std::string& name);
35 void ConfirmCommand();
37 Command* m_currentCommand =
nullptr;
38 bool m_currentCommandChanged =
true;
39 Command* m_defaultCommand =
nullptr;
41 bool m_initializedDefaultCommand =
false;
44 std::string
GetName()
const override;
45 void InitTable(std::shared_ptr<ITable> subtable)
override;
46 std::shared_ptr<ITable>
GetTable()
const override;
50 std::shared_ptr<ITable> m_table;
virtual void Periodic()
When the run method of the scheduler is called this method will be called.
Definition: Subsystem.cpp:110
std::shared_ptr< ITable > GetTable() const override
Definition: Subsystem.cpp:156
virtual void InitDefaultCommand()
Initialize the default command for this subsystem.
Definition: Subsystem.cpp:35
Definition: Subsystem.h:20
Command * GetDefaultCommand()
Returns the default command (or null if there is none).
Definition: Subsystem.cpp:82
void SetDefaultCommand(Command *command)
Sets the default command.
Definition: Subsystem.cpp:46
void InitTable(std::shared_ptr< ITable > subtable) override
Initializes a table for this sendable object.
Definition: Subsystem.cpp:138
Command * GetCurrentCommand() const
Returns the command which currently claims this subsystem.
Definition: Subsystem.cpp:105
std::string GetName() const override
Definition: Subsystem.cpp:134
std::string GetSmartDashboardType() const override
Definition: Subsystem.cpp:136
Base class for most objects.
Definition: ErrorBase.h:72
The Command class is at the very core of the entire command framework.
Definition: Command.h:52
Subsystem(const std::string &name)
Creates a subsystem with the given name.
Definition: Subsystem.cpp:21
The interface for sendable objects that gives the sendable a default name in the Smart Dashboard...
Definition: NamedSendable.h:21
void SetCurrentCommand(Command *command)
Sets the current command.
Definition: Subsystem.cpp:95
Definition: Scheduler.h:29