WPILibC++ 2024.3.2
frc2::WaitCommand Class Reference

A command that does nothing but takes a specified amount of time to finish. More...

#include <frc2/command/WaitCommand.h>

Inheritance diagram for frc2::WaitCommand:
frc2::CommandHelper< Command, WaitCommand >

Public Member Functions

 WaitCommand (units::second_t duration)
 Creates a new WaitCommand. More...
 
 WaitCommand (WaitCommand &&other)=default
 
 WaitCommand (const WaitCommand &other)=default
 
void Initialize () override
 
void End (bool interrupted) override
 
bool IsFinished () override
 
bool RunsWhenDisabled () const override
 
void InitSendable (wpi::SendableBuilder &builder) override
 
- Public Member Functions inherited from frc2::CommandHelper< Command, WaitCommand >
 CommandHelper ()=default
 
CommandPtr ToPtr () &&override
 

Protected Attributes

frc::Timer m_timer
 The timer used for waiting. More...
 

Additional Inherited Members

- Protected Member Functions inherited from frc2::CommandHelper< Command, WaitCommand >
std::unique_ptr< CommandTransferOwnership () &&override
 

Detailed Description

A command that does nothing but takes a specified amount of time to finish.

This class is provided by the NewCommands VendorDep

Constructor & Destructor Documentation

◆ WaitCommand() [1/3]

frc2::WaitCommand::WaitCommand ( units::second_t  duration)
explicit

Creates a new WaitCommand.

This command will do nothing, and end after the specified duration.

Parameters
durationthe time to wait

◆ WaitCommand() [2/3]

frc2::WaitCommand::WaitCommand ( WaitCommand &&  other)
default

◆ WaitCommand() [3/3]

frc2::WaitCommand::WaitCommand ( const WaitCommand other)
default

Member Function Documentation

◆ End()

void frc2::WaitCommand::End ( bool  interrupted)
override

◆ Initialize()

void frc2::WaitCommand::Initialize ( )
override

◆ InitSendable()

void frc2::WaitCommand::InitSendable ( wpi::SendableBuilder builder)
override

◆ IsFinished()

bool frc2::WaitCommand::IsFinished ( )
override

◆ RunsWhenDisabled()

bool frc2::WaitCommand::RunsWhenDisabled ( ) const
override

Member Data Documentation

◆ m_timer

frc::Timer frc2::WaitCommand::m_timer
protected

The timer used for waiting.


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