DeviceConfigBase Class Reference

A base class that does not have Subdevices or Slaves but can be used for Subdevices or DeviceProfiles. More...

#include <armarx/control/hardware_config/DeviceConfig.h>

+ Inheritance diagram for DeviceConfigBase:

Public Member Functions

 DeviceConfigBase (std::string type, std::string name)
 
 DeviceConfigBase (std::string type, std::string name, std::shared_ptr< DeviceConfigBase > profile)
 
std::string getName () const
 
std::string getType () const
 
void print (std::stringstream &s, int indention) const override
 Print this configuration. More...
 
 ~DeviceConfigBase ()=default
 
- Public Member Functions inherited from Config
virtual bool checkAllItemsRead (std::vector< std::string > &errors) const
 This method is called once the device has read the configuration data it needs. More...
 
 Config ()
 
bool getBool (const std::string name)
 Get a Bool typed Config attribute by name. More...
 
std::list< bool > getBoolList (const std::string name)
 Get a BoolList (std::list<bool>) typed Config attribute by name. More...
 
float getFloat (const std::string name)
 Get a Float typed Config attribute by name. More...
 
std::list< floatgetFloatList (const std::string name)
 Get a FloatList (std::list<float>) typed Config attribute by name. More...
 
std::int32_t getInt (const std::string name)
 Get a Int (std::int32_t) typed Config attribute by name. More...
 
std::list< std::int32_t > getIntList (const std::string name)
 Get a IntList (std::list<std::int32_t>) typed Config attribute by name. More...
 
types::LinearConfig getLinearConfig (const std::string name)
 Get a LinearConvertedValue typed Config attribute by name. More...
 
template<typename Type , int Rows, int Columns>
Eigen::Matrix< Type, Rows, Columns > getMatrix (const std::string name)
 Get a Matrix by name. More...
 
types::ModularConvertedValueConfig getModularConvertedValueConfig (const std::string &name)
 Get a ModularConvertedValue typed Config attribute by name. More...
 
std::string getString (const std::string name)
 Get a String typed Config attribute by name. More...
 
std::uint32_t getUint (const std::string name)
 Get a Uint (std::uint32_t) typed Config attribute by name. More...
 
std::list< std::uint32_t > getUintList (const std::string name)
 Get a UIntList (std::list<std::uint32_t>) typed Config attribute by name. More...
 
virtual void onParsingFinished ()
 This method is called when the config is completely read form the HardwareConfig file. More...
 
virtual ~Config ()=default
 
- Public Member Functions inherited from ControllerConfig
 ControllerConfig ()
 
ConfiggetControllerConfig (const std::string controllerName)
 

Friends

class ConfigParser
 
class DeviceConfig
 

Additional Inherited Members

- Protected Member Functions inherited from Config
template<typename T >
T get (const std::string name)
 
template<typename T >
std::optional< Tget_nothrow (const std::string name)
 
template<class T >
void set (const std::string name, T value, ConfigTag tag)
 
void setBool (const std::string name, bool value, ConfigTag tag)
 
void setBoolList (const std::string name, std::list< bool > value, ConfigTag tag)
 
void setFloat (const std::string name, float value, ConfigTag tag)
 
void setFloatList (const std::string name, std::list< float > value, ConfigTag tag)
 
void setInt (const std::string name, std::int32_t value, ConfigTag tag)
 
void setIntList (const std::string name, std::list< std::int32_t > value, ConfigTag tag)
 
void setLinearConfig (const std::string name, types::LinearConfig &&value, ConfigTag tag)
 
void setModularConvertedValueConfig (const std::string name, types::ModularConvertedValueConfig &&value, ConfigTag tag)
 
void setString (const std::string name, std::string value, ConfigTag tag)
 
void setUint (const std::string name, std::uint32_t value, ConfigTag tag)
 
void setUintList (const std::string name, std::list< std::uint32_t > value, ConfigTag tag)
 
- Protected Member Functions inherited from ControllerConfig
void addControllerConfig (const std::string controllerName, std::shared_ptr< Config > controllerConfig)
 Add a Config for a controller with name. More...
 
 ControllerConfig (const ControllerConfig &orig)
 
- Protected Attributes inherited from Config
std::map< std::string, ConfigItemWithMetadataitems
 
- Protected Attributes inherited from ControllerConfig
std::map< std::string, std::shared_ptr< Config > > controllerConfigs
 

Detailed Description

A base class that does not have Subdevices or Slaves but can be used for Subdevices or DeviceProfiles.

Definition at line 17 of file DeviceConfig.h.

Constructor & Destructor Documentation

◆ DeviceConfigBase() [1/2]

DeviceConfigBase ( std::string  type,
std::string  name 
)

Definition at line 16 of file DeviceConfig.cpp.

◆ DeviceConfigBase() [2/2]

DeviceConfigBase ( std::string  type,
std::string  name,
std::shared_ptr< DeviceConfigBase profile 
)

Definition at line 20 of file DeviceConfig.cpp.

◆ ~DeviceConfigBase()

~DeviceConfigBase ( )
default

Member Function Documentation

◆ getName()

std::string getName ( ) const

Definition at line 108 of file DeviceConfig.cpp.

+ Here is the caller graph for this function:

◆ getType()

std::string getType ( ) const

Definition at line 102 of file DeviceConfig.cpp.

+ Here is the caller graph for this function:

◆ print()

void print ( std::stringstream &  s,
int  indention 
) const
overridevirtual

Print this configuration.

Works recursively.

Parameters
sthe stream to append the output to
indentionthe indentation (=level of recursion)

Reimplemented from Config.

Reimplemented in DeviceConfig.

Definition at line 202 of file DeviceConfig.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ ConfigParser

friend class ConfigParser
friend

Definition at line 19 of file DeviceConfig.h.

◆ DeviceConfig

friend class DeviceConfig
friend

Definition at line 20 of file DeviceConfig.h.


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