CTRE Phoenix Pro C++ 23.0.12
ctre::phoenixpro::signals::MagnetHealthValue Class Reference

Magnet health as measured by CANcoder. More...

#include <ctre/phoenixpro/signals/SpnEnums.hpp>

Inheritance diagram for ctre::phoenixpro::signals::MagnetHealthValue:
ctre::phoenixpro::ISerializable

Public Member Functions

 MagnetHealthValue (int value)
 
 MagnetHealthValue ()
 
std::string ToString () const
 Gets the string representation of this enum. More...
 
std::string Serialize () const
 
bool operator== (const MagnetHealthValue &data) const
 
bool operator== (int data) const
 
bool operator< (const MagnetHealthValue &data) const
 
bool operator< (int data) const
 
virtual std::string Serialize () const =0
 

Public Attributes

int value
 

Static Public Attributes

static constexpr int Magnet_Red = 1
 
static constexpr int Magnet_Orange = 2
 
static constexpr int Magnet_Green = 3
 
static constexpr int Magnet_Invalid = 0
 

Friends

std::ostream & operator<< (std::ostream &os, const MagnetHealthValue &data)
 

Detailed Description

Magnet health as measured by CANcoder.

Magnet health as measured by CANcoder. Red indicates too close or too far, Orange is adequate but with reduced accuracy, green is ideal. Invalid means the accuracy cannot be determined.

Constructor & Destructor Documentation

◆ MagnetHealthValue() [1/2]

ctre::phoenixpro::signals::MagnetHealthValue::MagnetHealthValue ( int  value)
inline

◆ MagnetHealthValue() [2/2]

ctre::phoenixpro::signals::MagnetHealthValue::MagnetHealthValue ( )
inline

Member Function Documentation

◆ operator<() [1/2]

bool ctre::phoenixpro::signals::MagnetHealthValue::operator< ( const MagnetHealthValue data) const
inline

◆ operator<() [2/2]

bool ctre::phoenixpro::signals::MagnetHealthValue::operator< ( int  data) const
inline

◆ operator==() [1/2]

bool ctre::phoenixpro::signals::MagnetHealthValue::operator== ( const MagnetHealthValue data) const
inline

◆ operator==() [2/2]

bool ctre::phoenixpro::signals::MagnetHealthValue::operator== ( int  data) const
inline

◆ Serialize()

std::string ctre::phoenixpro::signals::MagnetHealthValue::Serialize ( ) const
inlinevirtual

◆ ToString()

std::string ctre::phoenixpro::signals::MagnetHealthValue::ToString ( ) const
inline

Gets the string representation of this enum.

Returns
String representation of this enum

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const MagnetHealthValue data 
)
friend

Member Data Documentation

◆ Magnet_Green

constexpr int ctre::phoenixpro::signals::MagnetHealthValue::Magnet_Green = 3
staticconstexpr

◆ Magnet_Invalid

constexpr int ctre::phoenixpro::signals::MagnetHealthValue::Magnet_Invalid = 0
staticconstexpr

◆ Magnet_Orange

constexpr int ctre::phoenixpro::signals::MagnetHealthValue::Magnet_Orange = 2
staticconstexpr

◆ Magnet_Red

constexpr int ctre::phoenixpro::signals::MagnetHealthValue::Magnet_Red = 1
staticconstexpr

◆ value

int ctre::phoenixpro::signals::MagnetHealthValue::value

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