WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::cmd::WaitCommand Class Reference

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

#include <wpi/commands2/WaitCommand.hpp>

Inheritance diagram for wpi::cmd::WaitCommand:
wpi::cmd::CommandHelper< Command, WaitCommand >

Public Member Functions

 WaitCommand (wpi::units::second_t duration)
 Creates a new WaitCommand.
 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::util::SendableBuilder &builder) override
Public Member Functions inherited from wpi::cmd::CommandHelper< Command, WaitCommand >
 CommandHelper ()=default
CommandPtr ToPtr () &&override

Protected Attributes

wpi::Timer m_timer
 The timer used for waiting.

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]

wpi::cmd::WaitCommand::WaitCommand ( wpi::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]

wpi::cmd::WaitCommand::WaitCommand ( WaitCommand && other)
default

◆ WaitCommand() [3/3]

wpi::cmd::WaitCommand::WaitCommand ( const WaitCommand & other)
default

Member Function Documentation

◆ End()

void wpi::cmd::WaitCommand::End ( bool interrupted)
override

◆ Initialize()

void wpi::cmd::WaitCommand::Initialize ( )
override

◆ InitSendable()

void wpi::cmd::WaitCommand::InitSendable ( wpi::util::SendableBuilder & builder)
override

◆ IsFinished()

bool wpi::cmd::WaitCommand::IsFinished ( )
override

◆ RunsWhenDisabled()

bool wpi::cmd::WaitCommand::RunsWhenDisabled ( ) const
override

Member Data Documentation

◆ m_timer

wpi::Timer wpi::cmd::WaitCommand::m_timer
protected

The timer used for waiting.


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