REVLib - C++
|
#include <SignalsConfig.h>
Inherits rev::BaseConfig.
Additional Inherited Members | |
Protected Types inherited from rev::BaseConfig | |
using | REVLibConfig_t = std::variant< int32_t, uint32_t, float, bool > |
Protected Member Functions inherited from rev::BaseConfig | |
BaseConfig ()=default | |
BaseConfig (const BaseConfig &)=delete | |
BaseConfig & | operator= (const BaseConfig &)=delete |
BaseConfig (BaseConfig &&) noexcept=delete | |
BaseConfig & | operator= (BaseConfig &&) noexcept=delete |
template<typename ConfigType > | |
void | PutParameter (uint8_t parameterId, ConfigType value) |
std::optional< REVLibConfig_t > | GetParameter (uint8_t parameterId) |
void | RemoveParameter (uint8_t parameterId) |
void | Apply (BaseConfig &config) |
Static Protected Member Functions inherited from rev::BaseConfig | |
static std::optional< REVLibConfig_t > | GetParameter (BaseConfig &fromConfig, uint8_t parameterId) |
static void | RemoveParameter (BaseConfig &fromConfig, uint8_t parameterId) |
|
default |
|
overridedefault |
|
delete |
|
deletenoexcept |
|
delete |
|
deletenoexcept |
SignalsConfig & SignalsConfig::Apply | ( | SignalsConfig & | config | ) |
Applies settings from another SignalsConfig to this one.
Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
config | The SignalsConfig to copy settings from |
SignalsConfig & SignalsConfig::AppliedOutputPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::GetAppliedOutput(). The default period is 10ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
NOTE: Applied output is used by other SPARK devices in follower mode. Setting too long of a period should be avoided if this SPARK device is the leader, as it can degrade follower mode performance.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AppliedOutputAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::GetAppliedOutput().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::BusVoltagePeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::getBusVoltage(). The default period is 10ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
NOTE: This signal shares a status frame with applied output which is used by other SPARK devices in follower mode. Setting too long of a period should be avoided if this SPARK device is the leader, as it can degrade follower mode performance.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::BusVoltageAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::getBusVoltage().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::OutputCurrentPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::GetOutputCurrent(). The default period is 10ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
NOTE: This signal shares a status frame with applied output which is used by other SPARK devices in follower mode. Setting too long of a period should be avoided if this SPARK device is the leader, as it can degrade follower mode performance.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::OutputCurrentAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::GetOutputCurrent().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::MotorTemperaturePeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::GetMotorTemperature(). The default period is 10ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
NOTE: This signal shares a status frame with applied output which is used by other SPARK devices in follower mode. Setting too long of a period should be avoided if this SPARK device is the leader, as it can degrade follower mode performance.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::MotorTemperatureAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::GetMotorTemperature().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::LimitsPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkLimitSwitch::IsPressed(). The default period is 10ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
NOTE: This signal shares a status frame with applied output which is used by other SPARK devices in follower mode. Setting too long of a period should be avoided if this SPARK device is the leader, as it can degrade follower mode performance.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::LimitsAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkLimitSwitch::IsPressed().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::FaultsPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::GetFaults() and SparkBase::GetStickyFaults(). The default period is 250ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::FaultsAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::GetFaults() and SparkBase::GetStickyFaults().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::WarningsPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkBase::GetWarnings() and SparkBase::GetStickyWarnings(). The default period is 250ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::WarningsAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkBase::GetWarnings() and SparkBase::GetStickyWarnings().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::PrimaryEncoderVelocityPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkRelativeEncoder::GetVelocity(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::PrimaryEncoderVelocityAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkRelativeEncoder::GetVelocity().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::PrimaryEncoderPositionPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkRelativeEncoder::GetPosition(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::PrimaryEncoderPositionAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkRelativeEncoder::GetPosition().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::AnalogVoltagePeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkAnalogSensor::GetVoltage(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AnalogVoltageAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkAnalogSensor::GetVoltage().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::AnalogVelocityPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkAnalogSensor::GetVelocity(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AnalogVelocityAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkAnalogSensor::GetVelocity().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::AnalogPositionPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkAnalogSensor::GetPosition(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AnalogPositionAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkAnalogSensor::GetPosition().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::ExternalOrAltEncoderVelocity | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkFlexExternalEncoder::GetVelocity() or SparkMaxAlternateEncoder::GetVelocity(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::ExternalOrAltEncoderVelocityAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkFlexExternalEncoder::GetVelocity() or SparkMaxAlternateEncoder::GetVelocity().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::ExternalOrAltEncoderPosition | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkFlexExternalEncoder::GetPosition() or SparkMaxAlternateEncoder::GetPosition(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::ExternalOrAltEncoderPositionAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkFlexExternalEncoder::GetPosition() or SparkMaxAlternateEncoder::GetPosition().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::AbsoluteEncoderVelocityPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkAbsoluteEncoder::GetVelocity(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AbsoluteEncoderVelocityAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkAbsoluteEncoder::GetVelocity().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::AbsoluteEncoderPositionPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkAbsoluteEncoder::GetPosition(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::AbsoluteEncoderPositionAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkAbsoluteEncoder::GetPosition().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |
SignalsConfig & SignalsConfig::IAccumulationPeriodMs | ( | int | periodMs | ) |
Set the period (ms) of the status frame that provides the signal returned by SparkClosedLoopController::GetIAccum(). The default period is 20ms.
If multiple periods are set for signals within the same status frame, the minimum given value will be used.
periodMs | The period in milliseconds |
SignalsConfig & SignalsConfig::IAccumulationAlwaysOn | ( | bool | enabled | ) |
Set whether to always enable the status frame that provides the signal returned by SparkClosedLoopController::GetIAccum().
Status frames are only enabled when a signal is requested via its respective getter method, and there may be a small period of time where the signal's data is unavailable due to waiting for the SPARK to receive the command to enable the status frame. Use this method to enable the status frame at all times.
If multiple alwaysOn values are set for signals within the same status frame, the result from OR'ing the values will be used.
enabled | True to always enable the status frame |