PathPlannerLib
Loading...
Searching...
No Matches
pathplanner::NamedCommands Class Reference

Static Public Member Functions

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 ()
 

Member Function Documentation

◆ getCommand()

frc2::CommandPtr NamedCommands::getCommand ( std::string  name)
static

Returns the command with the given name.

Parameters
namethe 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
namethe 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
namethe name of the command
commandshared pointer to the command to register

The documentation for this class was generated from the following files: