8 #ifndef __SUBSYSTEM_H__
9 #define __SUBSYSTEM_H__
11 #include "ErrorBase.h"
12 #include "SmartDashboard/NamedSendable.h"
32 void ConfirmCommand();
34 Command *m_currentCommand =
nullptr;
35 bool m_currentCommandChanged =
true;
36 Command *m_defaultCommand =
nullptr;
38 bool m_initializedDefaultCommand =
false;
41 virtual std::string
GetName()
const;
42 virtual void InitTable(std::shared_ptr<ITable> table);
43 virtual std::shared_ptr<ITable>
GetTable()
const;
47 std::shared_ptr<ITable> m_table;
Definition: Scheduler.h:27
virtual void InitTable(std::shared_ptr< ITable > table)
Initializes a table for this sendable object.
Definition: Subsystem.cpp:129
virtual std::string GetSmartDashboardType() const
Definition: Subsystem.cpp:127
virtual std::shared_ptr< ITable > GetTable() const
Definition: Subsystem.cpp:147
Command * GetDefaultCommand()
Returns the default command (or null if there is none).
Definition: Subsystem.cpp:80
virtual std::string GetName() const
Definition: Subsystem.cpp:125
virtual void InitDefaultCommand()
Initialize the default command for this subsystem This is meant to be the place to call SetDefaultCom...
Definition: Subsystem.cpp:32
Subsystem(const std::string &name)
Creates a subsystem with the given name.
Definition: Subsystem.cpp:18
Definition: Subsystem.h:18
Base class for most objects.
Definition: ErrorBase.h:66
void SetCurrentCommand(Command *command)
Sets the current command.
Definition: Subsystem.cpp:92
Command * GetCurrentCommand() const
Returns the command which currently claims this subsystem.
Definition: Subsystem.cpp:101
The interface for sendable objects that gives the sendable a default name in the Smart Dashboard...
Definition: NamedSendable.h:19
The Command class is at the very core of the entire command framework.
Definition: Command.h:54
void SetDefaultCommand(Command *command)
Sets the default command.
Definition: Subsystem.cpp:44