Fawkes API  Fawkes Development Version
fawkes::Configuration Class Referenceabstract

Interface for configuration handling. More...

#include <>>

Inheritance diagram for fawkes::Configuration:

Classes

class  ValueIterator
 Iterator interface to iterate over config values. More...
 

Public Member Functions

virtual ~Configuration ()
 Virtual empty destructor. More...
 
virtual void copy (Configuration *copyconf)=0
 Copies all values from the given configuration. More...
 
virtual void add_change_handler (ConfigurationChangeHandler *h)
 Add a configuration change handler. More...
 
virtual void rem_change_handler (ConfigurationChangeHandler *h)
 Remove a configuration change handler. More...
 
virtual void load (const char *file_path)=0
 Load configuration. More...
 
virtual bool exists (const char *path)=0
 Check if a given value exists. More...
 
virtual bool is_float (const char *path)=0
 Check if a value is of type float. More...
 
virtual bool is_uint (const char *path)=0
 Check if a value is of type unsigned int. More...
 
virtual bool is_int (const char *path)=0
 Check if a value is of type int. More...
 
virtual bool is_bool (const char *path)=0
 Check if a value is of type bool. More...
 
virtual bool is_string (const char *path)=0
 Check if a value is of type string. More...
 
virtual bool is_list (const char *path)=0
 Check if a value is a list. More...
 
virtual bool is_default (const char *path)=0
 Check if a value was read from the default config. More...
 
virtual float get_float (const char *path)=0
 Get value from configuration which is of type float. More...
 
virtual unsigned int get_uint (const char *path)=0
 Get value from configuration which is of type unsigned int. More...
 
virtual int get_int (const char *path)=0
 Get value from configuration which is of type int. More...
 
virtual bool get_bool (const char *path)=0
 Get value from configuration which is of type bool. More...
 
virtual std::string get_string (const char *path)=0
 Get value from configuration which is of type string. More...
 
virtual std::vector< float > get_floats (const char *path)=0
 Get list of values from configuration which is of type float. More...
 
virtual std::vector< unsigned int > get_uints (const char *path)=0
 Get list of values from configuration which is of type unsigned int. More...
 
virtual std::vector< int > get_ints (const char *path)=0
 Get list of values from configuration which is of type int. More...
 
virtual std::vector< bool > get_bools (const char *path)=0
 Get list of values from configuration which is of type bool. More...
 
virtual std::vector< std::string > get_strings (const char *path)=0
 Get list of values from configuration which is of type string. More...
 
virtual ValueIteratorget_value (const char *path)=0
 Get value from configuration. More...
 
virtual std::string get_type (const char *path)=0
 Get type of value at given path. More...
 
virtual std::string get_comment (const char *path)=0
 Get comment of value at given path. More...
 
virtual std::string get_default_comment (const char *path)=0
 Get comment of value at given path. More...
 
virtual void set_float (const char *path, float f)=0
 Set new value in configuration of type float. More...
 
virtual void set_uint (const char *path, unsigned int uint)=0
 Set new value in configuration of type unsigned int. More...
 
virtual void set_int (const char *path, int i)=0
 Set new value in configuration of type int. More...
 
virtual void set_bool (const char *path, bool b)=0
 Set new value in configuration of type bool. More...
 
virtual void set_string (const char *path, std::string &s)=0
 Set new value in configuration of type string. More...
 
virtual void set_string (const char *path, const char *s)=0
 Set new value in configuration of type string. More...
 
virtual void set_floats (const char *path, std::vector< float > &f)=0
 Set new value in configuration of type float. More...
 
virtual void set_uints (const char *path, std::vector< unsigned int > &uint)=0
 Set new value in configuration of type unsigned int. More...
 
virtual void set_ints (const char *path, std::vector< int > &i)=0
 Set new value in configuration of type int. More...
 
virtual void set_bools (const char *path, std::vector< bool > &b)=0
 Set new value in configuration of type bool. More...
 
virtual void set_strings (const char *path, std::vector< std::string > &s)=0
 Set new value in configuration of type string. More...
 
virtual void set_strings (const char *path, std::vector< const char *> &s)=0
 Set new value in configuration of type string. More...
 
virtual void set_comment (const char *path, const char *comment)=0
 Set new comment for existing value. More...
 
virtual void set_comment (const char *path, std::string &comment)=0
 Set new comment for existing value. More...
 
virtual void erase (const char *path)=0
 Erase the given value from the configuration. More...
 
virtual void set_default_float (const char *path, float f)=0
 Set new default value in configuration of type float. More...
 
virtual void set_default_uint (const char *path, unsigned int uint)=0
 Set new default value in configuration of type unsigned int. More...
 
virtual void set_default_int (const char *path, int i)=0
 Set new default value in configuration of type int. More...
 
virtual void set_default_bool (const char *path, bool b)=0
 Set new default value in configuration of type bool. More...
 
virtual void set_default_string (const char *path, std::string &s)=0
 Set new default value in configuration of type string. More...
 
virtual void set_default_string (const char *path, const char *s)=0
 Set new default value in configuration of type string. More...
 
virtual void set_default_comment (const char *path, const char *comment)=0
 Set new default comment for existing default configuration value. More...
 
virtual void set_default_comment (const char *path, std::string &comment)=0
 Set new default comment for existing default configuration value. More...
 
virtual void erase_default (const char *path)=0
 Erase the given default value from the configuration. More...
 
virtual ValueIteratoriterator ()=0
 Iterator for all values. More...
 
virtual ValueIteratorsearch (const char *path)=0
 Iterator with search results. More...
 
virtual void lock ()=0
 Lock the config. More...
 
virtual bool try_lock ()=0
 Try to lock the config. More...
 
virtual void unlock ()=0
 Unlock the config. More...
 
virtual void try_dump ()=0
 Try to dump configuration. More...
 

Protected Types

typedef std::list< ConfigurationChangeHandler * > ChangeHandlerList
 List that contains pointers to ConfigurationChangeHandler. More...
 
typedef std::multimap< const char *, ConfigurationChangeHandler *, StringLessChangeHandlerMultimap
 Multimap string to config change handlers. More...
 
typedef std::pair< ChangeHandlerMultimap::iterator, ChangeHandlerMultimap::iterator > ChangeHandlerMultimapRange
 Config change handler multimap range. More...
 

Protected Member Functions

ChangeHandlerListfind_handlers (const char *path)
 Find handlers for given path. More...
 
void notify_handlers (const char *path, bool comment_changed=false)
 Notify handlers for given path. More...
 

Protected Attributes

ChangeHandlerMultimap _change_handlers
 Registered change handlers. More...
 
ChangeHandlerMultimapRange _ch_range
 Change handler range. More...
 

Detailed Description

Interface for configuration handling.

We know that half of robotics is about parameter tuning. The Configuration interface defines a unified way of storing parameters and other configuration options no matter of how the database is implemented. This is mainly done to allow for testing different solutions for ticket #10.

Definition at line 67 of file config.h.

Member Typedef Documentation

◆ ChangeHandlerList

List that contains pointers to ConfigurationChangeHandler.

Definition at line 283 of file config.h.

◆ ChangeHandlerMultimap

typedef std::multimap<const char *, ConfigurationChangeHandler *, StringLess > fawkes::Configuration::ChangeHandlerMultimap
protected

Multimap string to config change handlers.

Definition at line 287 of file config.h.

◆ ChangeHandlerMultimapRange

typedef std::pair<ChangeHandlerMultimap::iterator, ChangeHandlerMultimap::iterator> fawkes::Configuration::ChangeHandlerMultimapRange
protected

Config change handler multimap range.

Definition at line 292 of file config.h.

Constructor & Destructor Documentation

◆ ~Configuration()

fawkes::Configuration::~Configuration ( )
inlinevirtual

Virtual empty destructor.

Definition at line 70 of file config.h.

Member Function Documentation

◆ add_change_handler()

void fawkes::Configuration::add_change_handler ( ConfigurationChangeHandler h)
virtual

Add a configuration change handler.

The added handler is called whenever a value changes and the handler desires to get notified for the given component.

Parameters
hconfiguration change handler

Reimplemented in fawkes::NetworkConfiguration.

Definition at line 547 of file config.cpp.

References fawkes::ConfigurationChangeHandler::config_monitor_prefix().

Referenced by fawkes::NetworkConfiguration::add_change_handler(), ConfigChangeWatcherTool::ConfigChangeWatcherTool(), fawkes::ConfigNetworkHandler::ConfigNetworkHandler(), ProcRRDThread::init(), MongoRRDThread::init(), StaticTransformsThread::init(), and fawkes::PluginManager::PluginManager().

◆ copy()

void fawkes::Configuration::copy ( Configuration copyconf)
pure virtual

Copies all values from the given configuration.

All values from the given configuration are copied. Old values are not erased so that the copied values will overwrite existing values, new values are created, but values existent in current config but not in the copied config will remain unchanged.

Parameters
copyconfconfiguration to copy

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ erase()

void fawkes::Configuration::erase ( const char *  path)
pure virtual

Erase the given value from the configuration.

It is not an error if the value does not exists before deletion.

Parameters
pathpath to value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop(), and MongoLogPlugin::MongoLogPlugin().

◆ erase_default()

void fawkes::Configuration::erase_default ( const char *  path)
pure virtual

Erase the given default value from the configuration.

It is not an error if the value does not exists before deletion.

Parameters
pathpath to value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ exists()

bool fawkes::Configuration::exists ( const char *  path)
pure virtual

Check if a given value exists.

Parameters
pathpath to value
Returns
true if the value exists, false otherwise

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by StaticTransformsThread::finalize(), GossipThread::init(), NavGraphGeneratorThread::init(), RobotinoSimThread::init(), and NavGraphThread::init().

◆ find_handlers()

Configuration::ChangeHandlerList * fawkes::Configuration::find_handlers ( const char *  path)
protected

Find handlers for given path.

Parameters
pathpath to get handlers for
Returns
list with config change handlers.

Definition at line 593 of file config.cpp.

◆ get_bool()

bool fawkes::Configuration::get_bool ( const char *  path)
pure virtual

Get value from configuration which is of type bool.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by AmclPlugin::AmclPlugin(), BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), BlackBoardSynchronizationPlugin::BlackBoardSynchronizationPlugin(), MongoDBThread::ClientConf::ClientConf(), fawkes::EclExternalConfig::config_instance(), DynamixelPlugin::DynamixelPlugin(), fawkes::EscapePotentialFieldDriveModule::EscapePotentialFieldDriveModule(), fawkes::EscapePotentialFieldOmniDriveModule::EscapePotentialFieldOmniDriveModule(), fawkes::FawkesMainThread::FawkesMainThread(), StaticTransformsThread::finalize(), PanTiltSonyEviD100PThread::finalize(), FvRetrieverPlugin::FvRetrieverPlugin(), IMUPlugin::IMUPlugin(), JacoActThread::init(), GossipThread::init(), JoystickTeleOpThread::init(), TabletopVisualizationThread::init(), EclipseAgentThread::init(), FountainThread::init(), WebviewPtzCamThread::init(), LaserSensorThread::init(), GazsimCommThread::init(), PanTiltSonyEviD100PThread::init(), JoystickAcquisitionThread::init(), MapLaserGenThread::init(), DirectRobotinoComThread::init(), ROSNodeThread::init(), RefBoxCommThread::init(), Roomba500Thread::init(), NavGraphGeneratorThread::init(), FvRetrieverThread::init(), RobotinoSensorThread::init(), OpenNiContextThread::init(), NaoQiLedThread::init(), ClipsAgentThread::init(), OpenPRSThread::init(), ColliActThread::init(), RobotinoActThread::init(), XmlRpcThread::init(), NaoQiButtonThread::init(), PanTiltRX28Thread::init(), DynamixelDriverThread::init(), LaserClusterThread::init(), RosTfThread::init(), LuaAgentPeriodicExecutionThread::init(), RobotinoSimThread::init(), JacoOpenraveBaseThread::init(), LuaAgentContinuousExecutionThread::init(), NavGraphThread::init(), ColliThread::init(), Bumblebee2Thread::init(), SkillerExecutionThread::init(), OpenNiPointCloudThread::init(), KatanaActThread::init(), LaserLinesThread::init(), OpenRobotinoComThread::init(), WebviewThread::init(), AmclThread::init(), TabletopObjectsThread::init(), JacoPlugin::JacoPlugin(), LaserClusterPlugin::LaserClusterPlugin(), LaserFilterPlugin::LaserFilterPlugin(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), LaserPlugin::LaserPlugin(), LuaAgentPlugin::LuaAgentPlugin(), MongoLogPlugin::MongoLogPlugin(), NavGraphGeneratorPlugin::NavGraphGeneratorPlugin(), NavGraphPlugin::NavGraphPlugin(), OpenPRSAgentPlugin::OpenPRSAgentPlugin(), PanTiltPlugin::PanTiltPlugin(), PointCloudDBMergePipeline< pcl::PointXYZ >::PointCloudDBMergePipeline(), LaseEdlAcquisitionThread::pre_init(), SkillerPlugin::SkillerPlugin(), and LaserFilterThread::wait_done().

◆ get_bools()

std::vector< bool > fawkes::Configuration::get_bools ( const char *  path)
pure virtual

Get list of values from configuration which is of type bool.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ get_comment()

std::string fawkes::Configuration::get_comment ( const char *  path)
pure virtual

Get comment of value at given path.

The value at the given path must exist in the host-specific configuration.

Parameters
pathpath to value
Returns
comment
Exceptions
ConfigEntryNotFoundExceptionshall be thrown if value does not exist
ConfigurationExceptionshall be thrown on any other error

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ get_default_comment()

std::string fawkes::Configuration::get_default_comment ( const char *  path)
pure virtual

Get comment of value at given path.

The value at the given path must exist in the default configuration.

Parameters
pathpath to value
Returns
comment
Exceptions
ConfigEntryNotFoundExceptionshall be thrown if value does not exist
ConfigurationExceptionshall be thrown on any other error

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ get_float()

float fawkes::Configuration::get_float ( const char *  path)
pure virtual

Get value from configuration which is of type float.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::AbstractDriveMode::AbstractDriveMode(), fawkes::BackwardDriveModule::BackwardDriveModule(), fawkes::BaseMotorInstruct::BaseMotorInstruct(), fawkes::BiwardDriveModule::BiwardDriveModule(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), fawkes::EclExternalConfig::config_instance(), fawkes::EscapeDriveModule::EscapeDriveModule(), fawkes::EscapePotentialFieldDriveModule::EscapePotentialFieldDriveModule(), fawkes::EscapePotentialFieldOmniDriveModule::EscapePotentialFieldOmniDriveModule(), StaticTransformsThread::finalize(), fawkes::ForwardDriveModule::ForwardDriveModule(), fawkes::ForwardOmniDriveModule::ForwardOmniDriveModule(), GazsimWebcam::GazsimWebcam(), HokuyoUrgAcquisitionThread::init(), NavGraphVisualizationThread::init(), RRDThread::init(), JoystickTeleOpThread::init(), TabletopVisualizationThread::init(), WebviewPtzCamThread::init(), GazsimCommThread::init(), JoystickAcquisitionThread::init(), MongoLogTransformsThread::init(), MapLaserGenThread::init(), LaserSimThread::init(), DirectRobotinoComThread::init(), NavGraphGeneratorThread::init(), RefBoxCommThread::init(), VisLocalizationThread::init(), LocalizationSimThread::init(), DepthcamSimThread::init(), ClipsAgentThread::init(), OpenPRSThread::init(), ColliActThread::init(), RobotinoActThread::init(), RosPointCloudThread::init(), PanTiltRX28Thread::init(), NavGraphClustersThread::init(), DynamixelDriverThread::init(), LaserClusterThread::init(), MongoLogImagesThread::init(), RosTfThread::init(), JacoOpenraveBaseThread::init(), RobotinoSimThread::init(), NavGraphThread::init(), MongoLogPointCloudThread::init(), ColliThread::init(), Bumblebee2Thread::init(), KatanaActThread::init(), LaserLinesThread::init(), AmclThread::init(), RobotStatePublisherThread::init(), TabletopObjectsThread::init(), LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), PointCloudDBMergePipeline< pcl::PointXYZ >::PointCloudDBMergePipeline(), PointCloudDBPipeline< pcl::PointXYZ >::PointCloudDBPipeline(), LaseEdlAcquisitionThread::pre_init(), SickTiM55xCommonAcquisitionThread::read_common_config(), fawkes::RoboShape::RoboShape(), and LaserFilterThread::wait_done().

◆ get_floats()

std::vector< float > fawkes::Configuration::get_floats ( const char *  path)
pure virtual

◆ get_int()

◆ get_ints()

std::vector< int > fawkes::Configuration::get_ints ( const char *  path)
pure virtual

Get list of values from configuration which is of type int.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ get_string()

std::string fawkes::Configuration::get_string ( const char *  path)
pure virtual

Get value from configuration which is of type string.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), MongoDBThread::ClientConf::ClientConf(), fawkes::EclExternalConfig::config_instance(), fawkes::OpenPRSKernelManager::create_kernel(), MongoDBThread::delete_client(), StaticTransformsThread::finalize(), FvRetrieverPlugin::FvRetrieverPlugin(), GazsimWebcam::GazsimWebcam(), IMUPlugin::IMUPlugin(), SickTiM55xEthernetAcquisitionThread::init(), SickTiM55xUSBAcquisitionThread::init(), ROSRobotDescriptionThread::init(), NavGraphGeneratorVisualizationThread::init(), OpenPRSAgentThread::init(), JacoActThread::init(), GossipThread::init(), HokuyoUrgAcquisitionThread::init(), NavGraphVisualizationThread::init(), ProcRRDThread::init(), ROSCmdVelThread::init(), ROSOdometryThread::init(), JoystickTeleOpThread::init(), TabletopVisualizationThread::init(), IMUSensorThread::init(), CruizCoreXG1010AcquisitionThread::init(), FountainThread::init(), EclipseAgentThread::init(), FestivalSynthThread::init(), HokuyoUrgGbxAcquisitionThread::init(), PanTiltDirectedPerceptionThread::init(), RosNavgraphBreakoutThread::init(), WebviewPtzCamThread::init(), MongoLogLoggerThread::init(), GazsimTimesourceThread::init(), PanTiltSonyEviD100PThread::init(), LaserSensorThread::init(), RobotinoIrPclThread::init(), FliteSynthThread::init(), MongoLogTransformsThread::init(), JoystickAcquisitionThread::init(), MongoLogBlackboardThread::init(), ROSNodeThread::init(), RosPosition3DThread::init(), IMUAcquisitionThread::init(), MapLaserGenThread::init(), PointCloudDBStoreThread::init(), DirectRobotinoComThread::init(), LaserSimThread::init(), NavGraphGeneratorThread::init(), GazeboNodeThread::init(), FvRetrieverThread::init(), RefBoxCommThread::init(), Roomba500Thread::init(), BlackBoardSynchronizationThread::init(), VisLocalizationThread::init(), OpenNiContextThread::init(), RobotinoSensorThread::init(), DepthcamSimThread::init(), LocalizationSimThread::init(), CLIPSThread::init(), OpenNiImageThread::init(), OpenNiPclOnlyThread::init(), OpenPRSThread::init(), PointCloudDBRetrieveThread::init(), RosMoveBaseThread::init(), ColliActThread::init(), RobotinoActThread::init(), PanTiltRX28Thread::init(), PointCloudDBMergeThread::init(), NavGraphClustersThread::init(), PointCloudDBROSCommThread::init(), DynamixelDriverThread::init(), LaserClusterThread::init(), MongoLogImagesThread::init(), LuaAgentPeriodicExecutionThread::init(), RobotinoSimThread::init(), LuaAgentContinuousExecutionThread::init(), NavGraphThread::init(), MongoLogPointCloudThread::init(), PlayerClientThread::init(), ColliThread::init(), Bumblebee2Thread::init(), SkillerExecutionThread::init(), OpenNiPointCloudThread::init(), KatanaActThread::init(), NavGraphInteractiveThread::init(), LaserLinesThread::init(), OpenRobotinoComThread::init(), WebviewThread::init(), AmclThread::init(), RobotStatePublisherThread::init(), TabletopObjectsThread::init(), JacoBimanualOpenraveThread::JacoBimanualOpenraveThread(), JacoOpenraveThread::JacoOpenraveThread(), LaserMapFilterDataFilter::LaserMapFilterDataFilter(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), LaserPlugin::LaserPlugin(), fawkes::PluginManager::load(), MongoLogPlugin::MongoLogPlugin(), OpenPRSAgentPlugin::OpenPRSAgentPlugin(), PanTiltPlugin::PanTiltPlugin(), PointCloudDBMergePipeline< pcl::PointXYZ >::PointCloudDBMergePipeline(), PointCloudDBRetrievePipeline< pcl::PointXYZ >::PointCloudDBRetrievePipeline(), LaseEdlAcquisitionThread::pre_init(), RobotinoPlugin::RobotinoPlugin(), fawkes::SelectDriveMode::SelectDriveMode(), WebviewUserVerifier::verify_user(), and LaserFilterThread::wait_done().

◆ get_strings()

◆ get_type()

std::string fawkes::Configuration::get_type ( const char *  path)
pure virtual

Get type of value at given path.

Parameters
pathpath to value
Returns
string representation of type, one of float, unsigned int, int, bool, or string
Exceptions
ConfigurationExceptionshall be thrown if value does not exist or on any other error.

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ get_uint()

unsigned int fawkes::Configuration::get_uint ( const char *  path)
pure virtual

Get value from configuration which is of type unsigned int.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance(), fawkes::FawkesMainThread::FawkesMainThread(), RosClockThread::init(), HokuyoUrgAcquisitionThread::init(), GossipThread::init(), ProcRRDThread::init(), RoombaJoystickThread::init(), TimeTrackerMainLoopThread::init(), JoystickTeleOpThread::init(), TabletopVisualizationThread::init(), FountainThread::init(), CruizCoreXG1010AcquisitionThread::init(), WebviewPtzCamThread::init(), PanTiltDirectedPerceptionThread::init(), PanTiltSonyEviD100PThread::init(), JoystickAcquisitionThread::init(), DirectRobotinoComThread::init(), ROSNodeThread::init(), BlackBoardSynchronizationThread::init(), RefBoxCommThread::init(), NavGraphGeneratorThread::init(), OpenPRSThread::init(), RobotinoActThread::init(), XmlRpcThread::init(), PanTiltRX28Thread::init(), DynamixelDriverThread::init(), MongoLogImagesThread::init(), LaserClusterThread::init(), MongoLogPointCloudThread::init(), PlayerClientThread::init(), Bumblebee2Thread::init(), KatanaActThread::init(), LaserLinesThread::init(), OpenRobotinoComThread::init(), WebviewThread::init(), AmclThread::init(), TabletopObjectsThread::init(), RoombaJoystickThread::loop(), PointCloudDBMergePipeline< pcl::PointXYZ >::PointCloudDBMergePipeline(), LaseEdlAcquisitionThread::pre_init(), and LaserFilterThread::wait_done().

◆ get_uints()

std::vector< unsigned int > fawkes::Configuration::get_uints ( const char *  path)
pure virtual

Get list of values from configuration which is of type unsigned int.

Parameters
pathpath to value
Returns
value

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance(), GazsimCommThread::init(), and DynamixelDriverThread::init().

◆ get_value()

Configuration::ValueIterator * fawkes::Configuration::get_value ( const char *  path)
pure virtual

Get value from configuration.

Parameters
pathpath to value
Returns
value iterator for just this one value, maybe invalid if value does not exists.

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ is_bool()

bool fawkes::Configuration::is_bool ( const char *  path)
pure virtual

Check if a value is of type bool.

Parameters
pathpath to value
Returns
true if the value exists and is of type bool

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ is_default()

bool fawkes::Configuration::is_default ( const char *  path)
pure virtual

Check if a value was read from the default config.

Parameters
pathpath to value
Returns
true if the value exists and is only stored in the default config

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ is_float()

bool fawkes::Configuration::is_float ( const char *  path)
pure virtual

Check if a value is of type float.

Parameters
pathpath to value
Returns
true if the value exists and is of type float

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ is_int()

bool fawkes::Configuration::is_int ( const char *  path)
pure virtual

Check if a value is of type int.

Parameters
pathpath to value
Returns
true if the value exists and is of type int

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ is_list()

bool fawkes::Configuration::is_list ( const char *  path)
pure virtual

Check if a value is a list.

Parameters
pathpath to value
Returns
true if the value exists and is a list

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance(), and fawkes::OpenPRSKernelManager::create_kernel().

◆ is_string()

bool fawkes::Configuration::is_string ( const char *  path)
pure virtual

Check if a value is of type string.

Parameters
pathpath to value
Returns
true if the value exists and is of type string

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ is_uint()

bool fawkes::Configuration::is_uint ( const char *  path)
pure virtual

Check if a value is of type unsigned int.

Parameters
pathpath to value
Returns
true if the value exists and is of type unsigned int

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::EclExternalConfig::config_instance().

◆ iterator()

Configuration::ValueIterator * fawkes::Configuration::iterator ( )
pure virtual

Iterator for all values.

Returns an iterator that can be used to iterate over all values in the current configuration, it will value the overlay. If a default and a host-specific value exists you will only see the host-specific value.

Returns
iterator over all values

Implemented in fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, fawkes::YamlConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), and fawkes::ConfigNetworkHandler::loop().

◆ load()

void fawkes::Configuration::load ( const char *  file_path)
pure virtual

Load configuration.

Loads configuration data, or opens a file, depending on the implementation. After this call access to all other methods shall be possible.

Parameters
file_pathpath of the configuration file.

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ lock()

void fawkes::Configuration::lock ( )
pure virtual

Lock the config.

No further changes or queries can be executed on the configuration and will block until the config is unlocked.

Implemented in fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, fawkes::YamlConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), fawkes::ConfigNetworkHandler::loop(), and AmclThread::loop().

◆ notify_handlers()

◆ rem_change_handler()

void fawkes::Configuration::rem_change_handler ( ConfigurationChangeHandler h)
virtual

Remove a configuration change handler.

The handler is removed from the change handler list and no longer called on config changes.

Parameters
hconfiguration change handler

Reimplemented in fawkes::NetworkConfiguration.

Definition at line 564 of file config.cpp.

References fawkes::ConfigurationChangeHandler::config_monitor_prefix().

Referenced by ProcRRDThread::finalize(), MongoRRDThread::finalize(), StaticTransformsThread::finalize(), ConfigChangeWatcherTool::handle_signal(), fawkes::NetworkConfiguration::rem_change_handler(), fawkes::ConfigNetworkHandler::~ConfigNetworkHandler(), and fawkes::PluginManager::~PluginManager().

◆ search()

Configuration::ValueIterator * fawkes::Configuration::search ( const char *  path)
pure virtual

◆ set_bool()

void fawkes::Configuration::set_bool ( const char *  path,
bool  b 
)
pure virtual

Set new value in configuration of type bool.

Parameters
pathpath to value
bnew bool value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_bools()

void fawkes::Configuration::set_bools ( const char *  path,
std::vector< bool > &  b 
)
pure virtual

Set new value in configuration of type bool.

Parameters
pathpath to value
bnew bool values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_comment() [1/2]

void fawkes::Configuration::set_comment ( const char *  path,
const char *  comment 
)
pure virtual

Set new comment for existing value.

Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
commentnew comment string

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_comment() [2/2]

void fawkes::Configuration::set_comment ( const char *  path,
std::string &  comment 
)
pure virtual

Set new comment for existing value.

Parameters
pathpath to value
commentnew comment string

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_default_bool()

void fawkes::Configuration::set_default_bool ( const char *  path,
bool  b 
)
pure virtual

Set new default value in configuration of type bool.

Parameters
pathpath to value
bnew bool value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_default_comment() [1/2]

void fawkes::Configuration::set_default_comment ( const char *  path,
const char *  comment 
)
pure virtual

Set new default comment for existing default configuration value.

Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
commentnew comment string

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_default_comment() [2/2]

void fawkes::Configuration::set_default_comment ( const char *  path,
std::string &  comment 
)
pure virtual

Set new default comment for existing default configuration value.

Parameters
pathpath to value
commentnew comment string

Implemented in fawkes::YamlConfiguration, fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_default_float()

void fawkes::Configuration::set_default_float ( const char *  path,
float  f 
)
pure virtual

Set new default value in configuration of type float.

Parameters
pathpath to value
fnew float value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_default_int()

void fawkes::Configuration::set_default_int ( const char *  path,
int  i 
)
pure virtual

Set new default value in configuration of type int.

Parameters
pathpath to value
inew int value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_default_string() [1/2]

void fawkes::Configuration::set_default_string ( const char *  path,
std::string &  s 
)
pure virtual

Set new default value in configuration of type string.

Parameters
pathpath to value
snew string value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_default_string() [2/2]

void fawkes::Configuration::set_default_string ( const char *  path,
const char *  s 
)
pure virtual

Set new default value in configuration of type string.

Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_default_uint()

void fawkes::Configuration::set_default_uint ( const char *  path,
unsigned int  uint 
)
pure virtual

Set new default value in configuration of type unsigned int.

Parameters
pathpath to value
uintnew unsigned int value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_float()

void fawkes::Configuration::set_float ( const char *  path,
float  f 
)
pure virtual

Set new value in configuration of type float.

Parameters
pathpath to value
fnew float value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop(), and AmclThread::loop().

◆ set_floats()

void fawkes::Configuration::set_floats ( const char *  path,
std::vector< float > &  f 
)
pure virtual

Set new value in configuration of type float.

Parameters
pathpath to value
fnew float values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_int()

void fawkes::Configuration::set_int ( const char *  path,
int  i 
)
pure virtual

Set new value in configuration of type int.

Parameters
pathpath to value
inew int value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_ints()

void fawkes::Configuration::set_ints ( const char *  path,
std::vector< int > &  i 
)
pure virtual

Set new value in configuration of type int.

Parameters
pathpath to value
inew int values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_string() [1/2]

void fawkes::Configuration::set_string ( const char *  path,
std::string &  s 
)
pure virtual

◆ set_string() [2/2]

void fawkes::Configuration::set_string ( const char *  path,
const char *  s 
)
pure virtual

Set new value in configuration of type string.

Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_strings() [1/2]

void fawkes::Configuration::set_strings ( const char *  path,
std::vector< std::string > &  s 
)
pure virtual

Set new value in configuration of type string.

Parameters
pathpath to value
snew string values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_strings() [2/2]

void fawkes::Configuration::set_strings ( const char *  path,
std::vector< const char *> &  s 
)
pure virtual

Set new value in configuration of type string.

Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

◆ set_uint()

void fawkes::Configuration::set_uint ( const char *  path,
unsigned int  uint 
)
pure virtual

Set new value in configuration of type unsigned int.

Parameters
pathpath to value
uintnew unsigned int value

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ set_uints()

void fawkes::Configuration::set_uints ( const char *  path,
std::vector< unsigned int > &  uint 
)
pure virtual

Set new value in configuration of type unsigned int.

Parameters
pathpath to value
uintnew unsigned int values

Implemented in fawkes::NetworkConfiguration, fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::ConfigNetworkHandler::loop().

◆ try_dump()

void fawkes::Configuration::try_dump ( )
pure virtual

Try to dump configuration.

For configuration methods that transform configuration files in a binary format this can be used to write out the text representation on shutdown of Fawkes.

Exceptions
Exceptionthrown if dumping fails

Implemented in fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, fawkes::YamlConfiguration, and fawkes::MemoryConfiguration.

Referenced by fawkes::FawkesMainThread::~FawkesMainThread().

◆ try_lock()

bool fawkes::Configuration::try_lock ( )
pure virtual

Try to lock the config.

See also
Configuration::lock()
Returns
true, if the lock has been aquired, false otherwise

Implemented in fawkes::NetworkConfiguration, fawkes::SQLiteConfiguration, fawkes::YamlConfiguration, and fawkes::MemoryConfiguration.

◆ unlock()

void fawkes::Configuration::unlock ( )
pure virtual

Member Data Documentation

◆ _ch_range

ChangeHandlerMultimapRange fawkes::Configuration::_ch_range
protected

Change handler range.

Definition at line 297 of file config.h.

◆ _change_handlers

ChangeHandlerMultimap fawkes::Configuration::_change_handlers
protected

Registered change handlers.

Definition at line 295 of file config.h.


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