Loading [MathJax]/extensions/tex2jax.js
CTRE Phoenix 6 C++ 25.4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ctre::phoenix6::configs::CANdleConfiguration Class Reference

Class for CTR Electronics' CANdle® branded device, a device that controls LEDs over the CAN bus. More...

#include <ctre/phoenix6/core/CoreCANdle.hpp>

Inheritance diagram for ctre::phoenix6::configs::CANdleConfiguration:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

constexpr CANdleConfiguration ()=default
 
constexpr CANdleConfigurationWithCustomParams (CustomParamsConfigs newCustomParams)
 Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.
 
constexpr CANdleConfigurationWithLED (LEDConfigs newLED)
 Modifies this configuration's LED parameter and returns itself for method-chaining and easier to use config API.
 
constexpr CANdleConfigurationWithCANdleFeatures (CANdleFeaturesConfigs newCANdleFeatures)
 Modifies this configuration's CANdleFeatures parameter and returns itself for method-chaining and easier to use config API.
 
std::string ToString () const
 Get the string representation of this configuration.
 
std::string Serialize () const
 Get the serialized form of this configuration.
 
ctre::phoenix::StatusCode Deserialize (const std::string &to_deserialize)
 Take a string and deserialize it to this configuration.
 
- Public Member Functions inherited from ctre::phoenix6::configs::ParentConfiguration
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

bool FutureProofConfigs {true}
 True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.
 
CustomParamsConfigs CustomParams
 Custom Params.
 
LEDConfigs LED
 Configs related to CANdle LED control.
 
CANdleFeaturesConfigs CANdleFeatures
 Configs related to general CANdle features.
 

Detailed Description

Class for CTR Electronics' CANdle® branded device, a device that controls LEDs over the CAN bus.

This handles the configurations for the hardware::CANdle

Constructor & Destructor Documentation

◆ CANdleConfiguration()

ctre::phoenix6::configs::CANdleConfiguration::CANdleConfiguration ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::CANdleConfiguration::Deserialize ( const std::string & to_deserialize)
inlinevirtual

Take a string and deserialize it to this configuration.

Implements ctre::phoenix6::configs::ParentConfiguration.

◆ Serialize()

std::string ctre::phoenix6::configs::CANdleConfiguration::Serialize ( ) const
inlinevirtual

Get the serialized form of this configuration.

Implements ctre::phoenix6::ISerializable.

◆ ToString()

std::string ctre::phoenix6::configs::CANdleConfiguration::ToString ( ) const
inlinevirtual

Get the string representation of this configuration.

Implements ctre::phoenix6::configs::ParentConfiguration.

◆ WithCANdleFeatures()

CANdleConfiguration & ctre::phoenix6::configs::CANdleConfiguration::WithCANdleFeatures ( CANdleFeaturesConfigs newCANdleFeatures)
inlineconstexpr

Modifies this configuration's CANdleFeatures parameter and returns itself for method-chaining and easier to use config API.

Configs related to general CANdle features.

This includes configs such as disabling the 5V rail and the behavior of VBat output.

Parameter list:

Parameters
newCANdleFeaturesParameter to modify
Returns
Itself

◆ WithCustomParams()

CANdleConfiguration & ctre::phoenix6::configs::CANdleConfiguration::WithCustomParams ( CustomParamsConfigs newCustomParams)
inlineconstexpr

Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:

Parameters
newCustomParamsParameter to modify
Returns
Itself

◆ WithLED()

CANdleConfiguration & ctre::phoenix6::configs::CANdleConfiguration::WithLED ( LEDConfigs newLED)
inlineconstexpr

Modifies this configuration's LED parameter and returns itself for method-chaining and easier to use config API.

Configs related to CANdle LED control.

All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.

Parameter list:

Parameters
newLEDParameter to modify
Returns
Itself

Member Data Documentation

◆ CANdleFeatures

CANdleFeaturesConfigs ctre::phoenix6::configs::CANdleConfiguration::CANdleFeatures

Configs related to general CANdle features.

This includes configs such as disabling the 5V rail and the behavior of VBat output.

Parameter list:

◆ CustomParams

CustomParamsConfigs ctre::phoenix6::configs::CANdleConfiguration::CustomParams

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:

◆ FutureProofConfigs

bool ctre::phoenix6::configs::CANdleConfiguration::FutureProofConfigs {true}

True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.

This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.

This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.

◆ LED

LEDConfigs ctre::phoenix6::configs::CANdleConfiguration::LED

Configs related to CANdle LED control.

All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.

Parameter list:


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