12 #include <wpi/StringRef.h>
13 #include <wpi/Twine.h>
15 #include "frc/ErrorBase.h"
16 #include "frc/smartdashboard/Sendable.h"
17 #include "frc/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;
void SetDefaultCommand(Command *command)
Sets the default command.
Definition: SPIAccelerometerSim.h:18
void SetCurrentCommand(Command *command)
Sets the current command.
Subsystem(const wpi::Twine &name)
Creates a subsystem with the given name.
virtual void InitDefaultCommand()
Initialize the default command for this subsystem.
wpi::StringRef GetCurrentCommandName() const
Returns the current command name, or empty string if no current command.
Definition: Subsystem.h:23
Command * GetCurrentCommand() const
Returns the command which currently claims this subsystem.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
virtual void Periodic()
When the run method of the scheduler is called this method will be called.
wpi::StringRef GetDefaultCommandName()
Returns the default command name, or empty string is there is none.
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
Command * GetDefaultCommand()
Returns the default command (or null if there is none).
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.
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
Definition: Scheduler.h:21