12 #include <wpi/StringRef.h> 13 #include <wpi/Twine.h> 15 #include "ErrorBase.h" 16 #include "SmartDashboard/Sendable.h" 17 #include "SmartDashboard/SendableBase.h" 129 void AddChild(std::shared_ptr<Sendable> child);
154 void ConfirmCommand();
156 Command* m_currentCommand =
nullptr;
157 bool m_currentCommandChanged =
true;
158 Command* m_defaultCommand =
nullptr;
159 bool m_initializedDefaultCommand =
false;
Definition: Utility.cpp:119
virtual void Periodic()
When the run method of the scheduler is called this method will be called.
Definition: Subsystem.cpp:79
wpi::StringRef GetCurrentCommandName() const
Returns the current command name, or empty string if no current command.
Definition: Subsystem.cpp:70
virtual void InitDefaultCommand()
Initialize the default command for this subsystem.
Definition: Subsystem.cpp:81
Definition: Subsystem.h:23
Command * GetDefaultCommand()
Returns the default command (or null if there is none).
Definition: Subsystem.cpp:46
void SetDefaultCommand(Command *command)
Sets the default command.
Definition: Subsystem.cpp:23
Command * GetCurrentCommand() const
Returns the command which currently claims this subsystem.
Definition: Subsystem.cpp:68
wpi::StringRef GetDefaultCommandName()
Returns the default command name, or empty string is there is none.
Definition: Subsystem.cpp:54
Base class for most objects.
Definition: ErrorBase.h:74
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Definition: SendableBase.h:19
Definition: SendableBuilder.h:23
Definition: Sendable.h:18
void AddChild(const wpi::Twine &name, std::shared_ptr< Sendable > child)
Associate a Sendable with this Subsystem.
Definition: Subsystem.cpp:83
The Command class is at the very core of the entire command framework.
Definition: Command.h:48
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
Subsystem(const wpi::Twine &name)
Creates a subsystem with the given name.
Definition: Subsystem.cpp:18
void SetCurrentCommand(Command *command)
Sets the current command.
Definition: Subsystem.cpp:63
Definition: Scheduler.h:27
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Definition: Subsystem.cpp:110