|
static void | registerCommand (std::string name, std::shared_ptr< frc2::Command > command) |
|
static void | registerCommand (std::string name, frc2::CommandPtr &&command) |
|
static bool | hasCommand (std::string name) |
|
static frc2::CommandPtr | getCommand (std::string name) |
|
static std::unordered_map< std::string, std::shared_ptr< frc2::Command > > & | GetNamedCommands () |
|
◆ getCommand()
frc2::CommandPtr NamedCommands::getCommand |
( |
std::string |
name | ) |
|
|
static |
Returns the command with the given name.
- Parameters
-
name | the name of the command to get |
- Returns
- the command with the given name, wrapped in a functional command, or a none command if it has not been registered
◆ hasCommand()
static bool pathplanner::NamedCommands::hasCommand |
( |
std::string |
name | ) |
|
|
inlinestatic |
Returns whether a command with the given name has been registered.
- Parameters
-
name | the name of the command to check |
- Returns
- true if a command with the given name has been registered, false otherwise
◆ registerCommand()
static void pathplanner::NamedCommands::registerCommand |
( |
std::string |
name, |
|
|
std::shared_ptr< frc2::Command > |
command |
|
) |
| |
|
inlinestatic |
Registers a command with the given name.
- Parameters
-
name | the name of the command |
command | shared pointer to the command to register |
The documentation for this class was generated from the following files:
- src/main/native/include/pathplanner/lib/auto/NamedCommands.h
- src/main/native/cpp/pathplanner/lib/auto/NamedCommands.cpp