CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
ctre::phoenix6::CANState Struct Reference

Possible states of the CAN bus. More...

#include <ctre/phoenix6/CANBus.hpp>

Public Member Functions

constexpr CANState (int value)
constexpr CANState ()
constexpr bool operator== (CANState other) const
constexpr auto operator<=> (CANState other) const
constexpr std::string_view ToString () const
 Gets the string representation of this enum.

Public Attributes

int value
 Unique integer value of this CANState.

Static Public Attributes

static constexpr int ErrorActive = 0
 The controller is in normal operation.
static constexpr int ErrorWarning = 1
 The controller has detected errors and is approaching the Error Passive state.
static constexpr int ErrorPassive = 2
 The controller is in the "Error Passive" state and has detected many errors.
static constexpr int BusOff = 3
 The controller is in the "Bus Off" state after detecting too many errors.
static constexpr int Stopped = 4
 The controller has been manually stopped.
static constexpr int Sleeping = 5
 The controller has entered low-power sleep mode.

Friends

std::ostream & operator<< (std::ostream &os, CANState state)

Detailed Description

Possible states of the CAN bus.

Constructor & Destructor Documentation

◆ CANState() [1/2]

ctre::phoenix6::CANState::CANState ( int value)
inlineconstexpr

◆ CANState() [2/2]

ctre::phoenix6::CANState::CANState ( )
inlineconstexpr

Member Function Documentation

◆ operator<=>()

auto ctre::phoenix6::CANState::operator<=> ( CANState other) const
inlineconstexpr

◆ operator==()

bool ctre::phoenix6::CANState::operator== ( CANState other) const
inlineconstexpr

◆ ToString()

std::string_view ctre::phoenix6::CANState::ToString ( ) const
inlineconstexpr

Gets the string representation of this enum.

Returns
String representation of this enum

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
CANState state )
friend

Member Data Documentation

◆ BusOff

int ctre::phoenix6::CANState::BusOff = 3
staticconstexpr

The controller is in the "Bus Off" state after detecting too many errors.

◆ ErrorActive

int ctre::phoenix6::CANState::ErrorActive = 0
staticconstexpr

The controller is in normal operation.

◆ ErrorPassive

int ctre::phoenix6::CANState::ErrorPassive = 2
staticconstexpr

The controller is in the "Error Passive" state and has detected many errors.

◆ ErrorWarning

int ctre::phoenix6::CANState::ErrorWarning = 1
staticconstexpr

The controller has detected errors and is approaching the Error Passive state.

◆ Sleeping

int ctre::phoenix6::CANState::Sleeping = 5
staticconstexpr

The controller has entered low-power sleep mode.

◆ Stopped

int ctre::phoenix6::CANState::Stopped = 4
staticconstexpr

The controller has been manually stopped.

◆ value

int ctre::phoenix6::CANState::value

Unique integer value of this CANState.


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