WPILibC++ 2022.4.1
frc2 Namespace Reference

Classes

class  Button
 A class used to bind command scheduling to button presses. More...
 
class  Command
 A state machine representing a complete action to be performed by the robot. More...
 
class  CommandBase
 A Sendable base class for Commands. More...
 
class  CommandGroupBase
 A base for CommandGroups. More...
 
class  CommandHelper
 CRTP implementation to allow polymorphic decorator functions in Command. More...
 
class  CommandScheduler
 The scheduler responsible for running Commands. More...
 
class  CommandState
 Class that holds scheduling state for a command. More...
 
class  ConditionalCommand
 Runs one of two commands, depending on the value of the given condition when this command is initialized. More...
 
class  FunctionalCommand
 A command that allows the user to pass in functions for each of the basic command methods through the constructor. More...
 
class  InstantCommand
 A Command that runs instantly; it will initialize, execute once, and end on the same iteration of the scheduler. More...
 
class  JoystickButton
 A class used to bind command scheduling to joystick button presses. More...
 
class  MecanumControllerCommand
 A command that uses two PID controllers (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a mecanum drive. More...
 
class  NetworkButton
 A Button that uses a NetworkTable boolean field. More...
 
class  NotifierCommand
 A command that starts a notifier to run the given runnable periodically in a separate thread. More...
 
class  ParallelCommandGroup
 A CommandGroup that runs a set of commands in parallel, ending when the last command ends. More...
 
class  ParallelDeadlineGroup
 A CommandGroup that runs a set of commands in parallel, ending only when a specific command (the "deadline") ends, interrupting all other commands that are still running at that point. More...
 
class  ParallelRaceGroup
 A CommandGroup that runs a set of commands in parallel, ending when any one of the commands ends and interrupting all the others. More...
 
class  PerpetualCommand
 A command that runs another command in perpetuity, ignoring that command's end conditions. More...
 
class  PIDCommand
 A command that controls an output with a PIDController. More...
 
class  PIDController
 Implements a PID control loop. More...
 
class  PIDSubsystem
 A subsystem that uses a PIDController to control an output. More...
 
class  POVButton
 A class used to bind command scheduling to joystick POV presses. More...
 
class  PrintCommand
 A command that prints a string when initialized. More...
 
class  ProfiledPIDCommand
 A command that controls an output with a ProfiledPIDController. More...
 
class  ProfiledPIDSubsystem
 A subsystem that uses a ProfiledPIDController to control an output. More...
 
class  ProxyScheduleCommand
 Schedules the given commands when this command is initialized, and ends when all the commands are no longer scheduled. More...
 
class  RamseteCommand
 A command that uses a RAMSETE controller to follow a trajectory with a differential drive. More...
 
class  RunCommand
 A command that runs a Runnable continuously. More...
 
class  ScheduleCommand
 Schedules the given commands when this command is initialized. More...
 
class  SelectCommand
 Runs one of a selection of commands, either using a selector and a key to command mapping, or a supplier that returns the command directly at runtime. More...
 
class  SequentialCommandGroup
 A CommandGroups that runs a list of commands in sequence. More...
 
class  StartEndCommand
 A command that runs a given runnable when it is initialized, and another runnable when it ends. More...
 
class  Subsystem
 A robot subsystem. More...
 
class  SubsystemBase
 A base for subsystems that handles registration in the constructor, and provides a more intuitive method for setting the default command. More...
 
class  SwerveControllerCommand
 A command that uses two PID controllers (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a swerve drive. More...
 
class  TrapezoidProfileCommand
 A command that runs a TrapezoidProfile. More...
 
class  TrapezoidProfileSubsystem
 A subsystem that generates and runs trapezoidal motion profiles automatically. More...
 
class  Trigger
 A class used to bind command scheduling to events. More...
 
class  WaitCommand
 A command that does nothing but takes a specified amount of time to finish. More...
 
class  WaitUntilCommand
 A command that does nothing but ends after a specified match time or condition. More...
 

Functions

template<typename T >
void SetInsert (wpi::SmallVectorImpl< T * > &vector, wpi::span< T *const > toAdd)
 
template<typename T >
std::string GetTypeName (const T &type)
 
bool RequirementsDisjoint (Command *first, Command *second)
 Checks if two commands have disjoint requirement sets. More...
 

Variables

const size_t invalid_index = std::numeric_limits<size_t>::max()
 

Function Documentation

◆ GetTypeName()

template<typename T >
std::string frc2::GetTypeName ( const T &  type)

◆ RequirementsDisjoint()

bool frc2::RequirementsDisjoint ( Command first,
Command second 
)

Checks if two commands have disjoint requirement sets.

Parameters
firstThe first command to check.
secondThe second command to check.
Returns
False if first and second share a requirement.

◆ SetInsert()

template<typename T >
void frc2::SetInsert ( wpi::SmallVectorImpl< T * > &  vector,
wpi::span< T *const >  toAdd 
)

Variable Documentation

◆ invalid_index

const size_t frc2::invalid_index = std::numeric_limits<size_t>::max()