WPILibC++ 2024.3.2
frc::DSControlWord Class Reference

A wrapper around Driver Station control word. More...

#include <frc/DSControlWord.h>

Public Member Functions

 DSControlWord ()
 DSControlWord constructor. More...
 
bool IsEnabled () const
 Check if the DS has enabled the robot. More...
 
bool IsDisabled () const
 Check if the robot is disabled. More...
 
bool IsEStopped () const
 Check if the robot is e-stopped. More...
 
bool IsAutonomous () const
 Check if the DS is commanding autonomous mode. More...
 
bool IsAutonomousEnabled () const
 Check if the DS is commanding autonomous mode and if it has enabled the robot. More...
 
bool IsTeleop () const
 Check if the DS is commanding teleop mode. More...
 
bool IsTeleopEnabled () const
 Check if the DS is commanding teleop mode and if it has enabled the robot. More...
 
bool IsTest () const
 Check if the DS is commanding test mode. More...
 
bool IsDSAttached () const
 Check if the DS is attached. More...
 
bool IsFMSAttached () const
 Is the driver station attached to a Field Management System? More...
 

Detailed Description

A wrapper around Driver Station control word.

Constructor & Destructor Documentation

◆ DSControlWord()

frc::DSControlWord::DSControlWord ( )

DSControlWord constructor.

Upon construction, the current Driver Station control word is read and stored internally.

Member Function Documentation

◆ IsAutonomous()

bool frc::DSControlWord::IsAutonomous ( ) const

Check if the DS is commanding autonomous mode.

Returns
True if the robot is being commanded to be in autonomous mode

◆ IsAutonomousEnabled()

bool frc::DSControlWord::IsAutonomousEnabled ( ) const

Check if the DS is commanding autonomous mode and if it has enabled the robot.

Returns
True if the robot is being commanded to be in autonomous mode and enabled.

◆ IsDisabled()

bool frc::DSControlWord::IsDisabled ( ) const

Check if the robot is disabled.

Returns
True if the robot is explicitly disabled or the DS is not connected

◆ IsDSAttached()

bool frc::DSControlWord::IsDSAttached ( ) const

Check if the DS is attached.

Returns
True if the DS is connected to the robot

◆ IsEnabled()

bool frc::DSControlWord::IsEnabled ( ) const

Check if the DS has enabled the robot.

Returns
True if the robot is enabled and the DS is connected

◆ IsEStopped()

bool frc::DSControlWord::IsEStopped ( ) const

Check if the robot is e-stopped.

Returns
True if the robot is e-stopped

◆ IsFMSAttached()

bool frc::DSControlWord::IsFMSAttached ( ) const

Is the driver station attached to a Field Management System?

Returns
True if the robot is competing on a field being controlled by a Field Management System

◆ IsTeleop()

bool frc::DSControlWord::IsTeleop ( ) const

Check if the DS is commanding teleop mode.

Returns
True if the robot is being commanded to be in teleop mode

◆ IsTeleopEnabled()

bool frc::DSControlWord::IsTeleopEnabled ( ) const

Check if the DS is commanding teleop mode and if it has enabled the robot.

Returns
True if the robot is being commanded to be in teleop mode and enabled.

◆ IsTest()

bool frc::DSControlWord::IsTest ( ) const

Check if the DS is commanding test mode.

Returns
True if the robot is being commanded to be in test mode

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