REVLib - C++
rev::servohub::ServoHubConfig Class Reference

#include <ServoHubConfig.h>

Inherits rev::BaseConfig.

Public Member Functions

 ServoHubConfig ()=default
 
 ~ServoHubConfig () override=default
 
 ServoHubConfig (const ServoHubConfig &)=delete
 
ServoHubConfigoperator= (const ServoHubConfig &)=delete
 
 ServoHubConfig (ServoHubConfig &&) noexcept=delete
 
ServoHubConfigoperator= (ServoHubConfig &&) noexcept=delete
 
ServoHubConfigApply (ServoHubConfig &config)
 
ServoHubConfigApply (ServoChannel::ChannelId channelId, ServoChannelConfig &config)
 
std::string Flatten () override
 
- Public Member Functions inherited from rev::BaseConfig
virtual ~BaseConfig ()=default
 

Public Attributes

ServoChannelConfig channel0 {ServoChannel::ChannelId::kChannelId0}
 
ServoChannelConfig channel1 {ServoChannel::ChannelId::kChannelId1}
 
ServoChannelConfig channel2 {ServoChannel::ChannelId::kChannelId2}
 
ServoChannelConfig channel3 {ServoChannel::ChannelId::kChannelId3}
 
ServoChannelConfig channel4 {ServoChannel::ChannelId::kChannelId4}
 
ServoChannelConfig channel5 {ServoChannel::ChannelId::kChannelId5}
 

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
 
BaseConfigoperator= (const BaseConfig &)=delete
 
 BaseConfig (BaseConfig &&) noexcept=delete
 
BaseConfigoperator= (BaseConfig &&) noexcept=delete
 
template<typename ConfigType >
void PutParameter (uint8_t parameterId, ConfigType value)
 
std::optional< REVLibConfig_tGetParameter (uint8_t parameterId)
 
void RemoveParameter (uint8_t parameterId)
 
void Apply (BaseConfig &config)
 
- Static Protected Member Functions inherited from rev::BaseConfig
static std::optional< REVLibConfig_tGetParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
static void RemoveParameter (BaseConfig &fromConfig, uint8_t parameterId)
 

Constructor & Destructor Documentation

◆ ServoHubConfig() [1/3]

rev::servohub::ServoHubConfig::ServoHubConfig ( )
default

◆ ~ServoHubConfig()

rev::servohub::ServoHubConfig::~ServoHubConfig ( )
overridedefault

◆ ServoHubConfig() [2/3]

rev::servohub::ServoHubConfig::ServoHubConfig ( const ServoHubConfig )
delete

◆ ServoHubConfig() [3/3]

rev::servohub::ServoHubConfig::ServoHubConfig ( ServoHubConfig &&  )
deletenoexcept

Member Function Documentation

◆ operator=() [1/2]

ServoHubConfig & rev::servohub::ServoHubConfig::operator= ( const ServoHubConfig )
delete

◆ operator=() [2/2]

ServoHubConfig & rev::servohub::ServoHubConfig::operator= ( ServoHubConfig &&  )
deletenoexcept

◆ Apply() [1/2]

ServoHubConfig & ServoHubConfig::Apply ( ServoHubConfig config)

Applies settings from another ServoHubConfig to this one.

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

Parameters
channelIdThe channel to apply the settings to
configThe ServoChannelConfig to apply settings from
Returns
The updated ServoHubConfig for method chaining

◆ Apply() [2/2]

ServoHubConfig & ServoHubConfig::Apply ( ServoChannel::ChannelId  channelId,
ServoChannelConfig config 
)

Applies settings from a ServoChannelConfig to this ServoHubConfig.

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

Parameters
channelIdThe channel to apply the settings to
configThe ServoChannelConfig to apply settings from
Returns
The updated ServoHubConfig for method chaining

◆ Flatten()

std::string ServoHubConfig::Flatten ( )
overridevirtual

Reimplemented from rev::BaseConfig.

Member Data Documentation

◆ channel0

ServoChannelConfig rev::servohub::ServoHubConfig::channel0 {ServoChannel::ChannelId::kChannelId0}

◆ channel1

ServoChannelConfig rev::servohub::ServoHubConfig::channel1 {ServoChannel::ChannelId::kChannelId1}

◆ channel2

ServoChannelConfig rev::servohub::ServoHubConfig::channel2 {ServoChannel::ChannelId::kChannelId2}

◆ channel3

ServoChannelConfig rev::servohub::ServoHubConfig::channel3 {ServoChannel::ChannelId::kChannelId3}

◆ channel4

ServoChannelConfig rev::servohub::ServoHubConfig::channel4 {ServoChannel::ChannelId::kChannelId4}

◆ channel5

ServoChannelConfig rev::servohub::ServoHubConfig::channel5 {ServoChannel::ChannelId::kChannelId5}

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