13 #include <wpi/StringRef.h>
14 #include <wpi/Twine.h>
16 #include "frc/ErrorBase.h"
17 #include "frc/smartdashboard/Sendable.h"
18 #include "frc/smartdashboard/SendableHelper.h"
163 void AddChild(std::shared_ptr<Sendable> child);
188 void ConfirmCommand();
190 Command* m_currentCommand =
nullptr;
191 bool m_currentCommandChanged =
true;
192 Command* m_defaultCommand =
nullptr;
193 bool m_initializedDefaultCommand =
false;
virtual void Periodic()
When the run method of the scheduler is called this method will be called.
Definition: Scheduler.h:22
void SetName(const wpi::Twine &name)
Sets the name of this Subsystem.
std::string GetName() const
Gets the name of this Subsystem.
Command * GetDefaultCommand()
Returns the default command (or null if there is none).
The Command class is at the very core of the entire command framework.
Definition: Command.h:49
std::string GetSubsystem() const
Gets the subsystem name of this Subsystem.
Definition: Subsystem.h:24
void AddChild(const wpi::Twine &name, std::shared_ptr< Sendable > child)
Associate a Sendable with this Subsystem.
void SetSubsystem(const wpi::Twine &subsystem)
Sets the subsystem name of this Subsystem.
Base class for most objects.
Definition: ErrorBase.h:104
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
void SetDefaultCommand(Command *command)
Sets the default command.
void SetCurrentCommand(Command *command)
Sets the current command.
Subsystem(const wpi::Twine &name)
Creates a subsystem with the given name.
Interface for Sendable objects.
Definition: Sendable.h:17
virtual void InitDefaultCommand()
Initialize the default command for this subsystem.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
Command * GetCurrentCommand() const
Returns the command which currently claims this subsystem.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:85
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
Definition: SendableBuilder.h:23
wpi::StringRef GetDefaultCommandName()
Returns the default command name, or empty string is there is none.
wpi::StringRef GetCurrentCommandName() const
Returns the current command name, or empty string if no current command.