REVLib - C++
rev::spark::SparkFlexConfig Class Reference

#include <SparkFlexConfig.h>

Inherits rev::spark::SparkBaseConfig.

Public Member Functions

 SparkFlexConfig ()=default
 
 ~SparkFlexConfig () override=default
 
 SparkFlexConfig (const SparkFlexConfig &)=delete
 
SparkFlexConfigoperator= (const SparkFlexConfig &)=delete
 
 SparkFlexConfig (SparkFlexConfig &&) noexcept=delete
 
SparkFlexConfigoperator= (SparkFlexConfig &&) noexcept=delete
 
SparkFlexConfigApply (SparkFlexConfig &config)
 
SparkFlexConfigApply (ExternalEncoderConfig &config)
 
std::string Flatten () override
 
virtual SparkBaseConfigApply (SparkBaseConfig &config)
 
virtual SparkBaseConfigApply (AbsoluteEncoderConfig &config)
 
virtual SparkBaseConfigApply (AnalogSensorConfig &config)
 
virtual SparkBaseConfigApply (EncoderConfig &config)
 
virtual SparkBaseConfigApply (LimitSwitchConfig &config)
 
virtual SparkBaseConfigApply (SoftLimitConfig &config)
 
virtual SparkBaseConfigApply (ClosedLoopConfig &config)
 
virtual SparkBaseConfigApply (SignalsConfig &config)
 
- Public Member Functions inherited from rev::spark::SparkBaseConfig
 SparkBaseConfig ()=default
 
 ~SparkBaseConfig () override=default
 
 SparkBaseConfig (const SparkBaseConfig &)=delete
 
SparkBaseConfigoperator= (const SparkBaseConfig &)=delete
 
 SparkBaseConfig (SparkBaseConfig &&) noexcept=delete
 
SparkBaseConfigoperator= (SparkBaseConfig &&) noexcept=delete
 
virtual SparkBaseConfigSetIdleMode (IdleMode idleMode)
 
virtual SparkBaseConfigInverted (bool inverted)
 
virtual SparkBaseConfigSmartCurrentLimit (int stallLimit, int freeLimit=0, int limitRpm=20000)
 
virtual SparkBaseConfigSecondaryCurrentLimit (double limit, int chopCycles=0)
 
virtual SparkBaseConfigOpenLoopRampRate (double rate)
 
virtual SparkBaseConfigClosedLoopRampRate (double rate)
 
virtual SparkBaseConfigVoltageCompensation (double nominalVoltage)
 
virtual SparkBaseConfigDisableVoltageCompensation ()
 
virtual SparkBaseConfigFollow (int leaderCanId, bool invert=false)
 
virtual SparkBaseConfigFollow (SparkBase &leader, bool invert=false)
 
virtual SparkBaseConfigDisableFollowerMode ()
 
- Public Member Functions inherited from rev::spark::BaseConfig
virtual ~BaseConfig ()=default
 

Public Attributes

ExternalEncoderConfig externalEncoder
 
- Public Attributes inherited from rev::spark::SparkBaseConfig
AbsoluteEncoderConfig absoluteEncoder
 
AnalogSensorConfig analogSensor
 
ClosedLoopConfig closedLoop
 
EncoderConfig encoder
 
LimitSwitchConfig limitSwitch
 
SignalsConfig signals
 
SoftLimitConfig softLimit
 

Additional Inherited Members

- Public Types inherited from rev::spark::SparkBaseConfig
enum  IdleMode : uint32_t { kCoast = 0 , kBrake = 1 }
 
- Protected Types inherited from rev::spark::BaseConfig
using SparkConfig_t = std::variant< int32_t, uint32_t, float, bool >
 
- Protected Member Functions inherited from rev::spark::BaseConfig
 BaseConfig ()=default
 
 BaseConfig (const BaseConfig &)=delete
 
BaseConfigoperator= (const BaseConfig &)=delete
 
 BaseConfig (BaseConfig &&) noexcept=delete
 
BaseConfigoperator= (BaseConfig &&) noexcept=delete
 
template<typename ConfigType >
void PutParameter (uint8_t parameterId, ConfigType value)
 
std::optional< SparkConfig_tGetParameter (uint8_t parameterId)
 
std::optional< SparkConfig_tGetParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
void RemoveParameter (uint8_t parameterId)
 
void RemoveParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
void Apply (BaseConfig &config)
 

Constructor & Destructor Documentation

◆ SparkFlexConfig() [1/3]

rev::spark::SparkFlexConfig::SparkFlexConfig ( )
default

◆ ~SparkFlexConfig()

rev::spark::SparkFlexConfig::~SparkFlexConfig ( )
overridedefault

◆ SparkFlexConfig() [2/3]

rev::spark::SparkFlexConfig::SparkFlexConfig ( const SparkFlexConfig )
delete

◆ SparkFlexConfig() [3/3]

rev::spark::SparkFlexConfig::SparkFlexConfig ( SparkFlexConfig &&  )
deletenoexcept

Member Function Documentation

◆ operator=() [1/2]

SparkFlexConfig & rev::spark::SparkFlexConfig::operator= ( const SparkFlexConfig )
delete

◆ operator=() [2/2]

SparkFlexConfig & rev::spark::SparkFlexConfig::operator= ( SparkFlexConfig &&  )
deletenoexcept

◆ Apply() [1/10]

SparkFlexConfig & SparkFlexConfig::Apply ( SparkFlexConfig config)

Applies settings from another SparkFlexConfig to this one, including all of its nested configurations.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe SparkFlexConfig to copy settings from
Returns
The updated SparkFlexConfig for method chaining

◆ Apply() [2/10]

SparkFlexConfig & SparkFlexConfig::Apply ( ExternalEncoderConfig config)

Applies settings from an ExternalEncoderConfig to this SparkFlexConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe ExternalEncoderConfig to copy settings from
Returns
The updated SparkFlexConfig for method chaining

◆ Flatten()

std::string SparkFlexConfig::Flatten ( )
overridevirtual

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [3/10]

SparkBaseConfig & SparkBaseConfig::Apply ( SparkBaseConfig config)
virtual

Applies settings from another SparkBaseConfig to this one, including all of its nested configurations.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe SparkBaseConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [4/10]

SparkBaseConfig & SparkBaseConfig::Apply ( AbsoluteEncoderConfig config)
virtual

Applies settings from an AbsoluteEncoderConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe AbsoluteEncoderConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [5/10]

SparkBaseConfig & SparkBaseConfig::Apply ( AnalogSensorConfig config)
virtual

Applies settings from an AnalogSensorConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe AnalogSensorConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [6/10]

SparkBaseConfig & SparkBaseConfig::Apply ( EncoderConfig config)
virtual

Applies settings from an EncoderConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe EncoderConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [7/10]

SparkBaseConfig & SparkBaseConfig::Apply ( LimitSwitchConfig config)
virtual

Applies settings from a LimitSwitchConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe LimitSwitchConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [8/10]

SparkBaseConfig & SparkBaseConfig::Apply ( SoftLimitConfig config)
virtual

Applies settings from a SoftLimitConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe SoftLimitConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [9/10]

SparkBaseConfig & SparkBaseConfig::Apply ( ClosedLoopConfig config)
virtual

Applies settings from a ClosedLoopConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe ClosedLoopConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

◆ Apply() [10/10]

SparkBaseConfig & SparkBaseConfig::Apply ( SignalsConfig config)
virtual

Applies settings from a SignalsConfig to this SparkBaseConfig.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe SignalsConfig to copy settings from
Returns
The updated SparkBaseConfig for method chaining

Reimplemented from rev::spark::SparkBaseConfig.

Member Data Documentation

◆ externalEncoder

ExternalEncoderConfig rev::spark::SparkFlexConfig::externalEncoder

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