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