Fawkes API
Fawkes Development Version
|
Interface for configuration handling. More...
#include <>>
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 float | get_float_or_default (const char *path, const float &default_val) |
Get value from configuration which is of type float, or the given default if the path does not exist. More... | |
virtual unsigned int | get_uint_or_default (const char *path, const unsigned int &default_val) |
Get value from configuration which is of type unsigned int, or the given default if the path does not exist. More... | |
virtual int | get_int_or_default (const char *path, const int &default_val) |
Get value from configuration which is of type int, or the given default if the path does not exist. More... | |
virtual bool | get_bool_or_default (const char *path, const bool &default_val) |
Get value from configuration which is of type bool, or the given default if the path does not exist. More... | |
virtual std::string | get_string_or_default (const char *path, const std::string &default_val) |
Get value from configuration which is of type string, or the given default if the path does not exist. 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 std::vector< float > | get_floats_or_defaults (const char *path, const std::vector< float > &default_val) |
Get list of values from configuration which is of type float, or the given default if the path does not exist. More... | |
virtual std::vector< unsigned int > | get_uints_or_defaults (const char *path, const std::vector< unsigned int > &default_val) |
Get list of values from configuration which is of type unsigned int, or the given default if the path does not exist. More... | |
virtual std::vector< int > | get_ints_or_defaults (const char *path, const std::vector< int > &default_val) |
Get list of values from configuration which is of type int, or the given default if the path does not exist. More... | |
virtual std::vector< bool > | get_bools_or_defaults (const char *path, const std::vector< bool > &default_val) |
Get list of values from configuration which is of type bool, or the given default if the path does not exist. More... | |
virtual std::vector< std::string > | get_strings_or_defaults (const char *path, const std::vector< std::string > &default_val) |
Get list of values from configuration which is of type string, or the given default if the path does not exist. More... | |
virtual ValueIterator * | get_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 ValueIterator * | iterator ()=0 |
Iterator for all values. More... | |
virtual ValueIterator * | search (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 *, StringLess > | ChangeHandlerMultimap |
Multimap string to config change handlers. More... | |
typedef std::pair< ChangeHandlerMultimap::iterator, ChangeHandlerMultimap::iterator > | ChangeHandlerMultimapRange |
Config change handler multimap range. More... | |
Protected Member Functions | |
ChangeHandlerList * | find_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... | |
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.
|
protected |
List that contains pointers to ConfigurationChangeHandler.
|
protected |
|
protected |
|
inlinevirtual |
|
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.
h | configuration change handler |
Reimplemented in fawkes::NetworkConfiguration.
Definition at line 603 of file config.cpp.
References _change_handlers, and fawkes::ConfigurationChangeHandler::config_monitor_prefix().
Referenced by fawkes::NetworkConfiguration::add_change_handler(), ConfigChangeWatcherTool::ConfigChangeWatcherTool(), fawkes::ConfigNetworkHandler::ConfigNetworkHandler(), LaserLinesThread::init(), MongoRRDThread::init(), ProcRRDThread::init(), StaticTransformsThread::init(), fawkes::PluginManager::PluginManager(), and SickTiM55xCommonAcquisitionThread::pre_init().
|
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.
copyconf | configuration to copy |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Erase the given value from the configuration.
It is not an error if the value does not exists before deletion.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Erase the given default value from the configuration.
It is not an error if the value does not exists before deletion.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Check if a given value exists.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigExecutionTimeEstimator::can_provide_exec_time(), HardwareModelsThread::clips_context_init(), EventTriggerManager::EventTriggerManager(), RobotinoSimThread::init(), GossipThread::init(), HardwareModelsThread::init(), NavGraphGeneratorThread::init(), NavGraphThread::init(), PddlRobotMemoryThread::init(), ROSOdometryThread::init(), GlobalStatePlexilAdapter::initialize(), and try_dump().
|
protected |
Find handlers for given path.
path | path to get handlers for |
Definition at line 651 of file config.cpp.
References _ch_range, and _change_handlers.
Referenced by notify_handlers().
|
pure virtual |
Get value from configuration which is of type bool.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by AmclPlugin::AmclPlugin(), BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), BlackBoardSynchronizationPlugin::BlackBoardSynchronizationPlugin(), HardwareModelsThread::clips_context_init(), DynamixelPlugin::DynamixelPlugin(), fawkes::EscapePotentialFieldDriveModule::EscapePotentialFieldDriveModule(), fawkes::EscapePotentialFieldOmniDriveModule::EscapePotentialFieldOmniDriveModule(), EventTriggerManager::EventTriggerManager(), fawkes::FawkesMainThread::FawkesMainThread(), PanTiltSonyEviD100PThread::finalize(), FvRetrieverPlugin::FvRetrieverPlugin(), get_bool_or_default(), IMUPlugin::IMUPlugin(), fawkes::FawkesTimingThread::init(), AmclThread::init(), MapLaserGenThread::init(), Bumblebee2Thread::init(), CedarThread::init(), ClipsAgentThread::init(), ClipsExecutiveThread::init(), ClipsTFThread::init(), CLIPSThread::init(), ColliActThread::init(), ColliThread::init(), DynamixelDriverThread::init(), AgentControlThread::init(), EclipseAgentThread::init(), GazsimCommThread::init(), RobotinoSimThread::init(), GossipThread::init(), JacoActThread::init(), JacoOpenraveBaseThread::init(), JoystickAcquisitionThread::init(), JoystickTeleOpThread::init(), KatanaActThread::init(), LaserClusterThread::init(), LaserLinesThread::init(), LaserSensorThread::init(), LuaAgentContinuousExecutionThread::init(), LuaAgentPeriodicExecutionThread::init(), MongoDBReplicaSetConfig::init(), NaoQiButtonThread::init(), NaoQiLedThread::init(), NavGraphGeneratorThread::init(), NavGraphThread::init(), OpenNiContextThread::init(), OpenNiPointCloudThread::init(), OpenPRSThread::init(), PanTiltRX28Thread::init(), PanTiltSonyEviD100PThread::init(), PddlRobotMemoryThread::init(), FountainThread::init(), FvRetrieverThread::init(), TabletopObjectsThread::init(), TabletopVisualizationThread::init(), RefBoxCommThread::init(), RobotinoActThread::init(), DirectRobotinoComThread::init(), OpenRobotinoComThread::init(), RobotinoSensorThread::init(), Roomba500Thread::init(), ROSNodeThread::init(), RosTfThread::init(), SkillerExecutionThread::init(), StnGeneratorThread::init(), WebviewThread::init(), XmlRpcThread::init(), GlobalStatePlexilAdapter::initialize(), JacoPlugin::JacoPlugin(), LaserClusterPlugin::LaserClusterPlugin(), LaserFilterPlugin::LaserFilterPlugin(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), LaserPlugin::LaserPlugin(), LuaAgentPlugin::LuaAgentPlugin(), MongoDBClientConfig::MongoDBClientConfig(), MongoDBInstanceConfig::MongoDBInstanceConfig(), MongoLogPlugin::MongoLogPlugin(), NavGraphGeneratorPlugin::NavGraphGeneratorPlugin(), NavGraphPlugin::NavGraphPlugin(), OpenPRSAgentPlugin::OpenPRSAgentPlugin(), PanTiltPlugin::PanTiltPlugin(), PointCloudDBMergePipeline< PointType >::PointCloudDBMergePipeline(), LaseEdlAcquisitionThread::pre_init(), fawkes::ExecutionTimeEstimator::Property< T >::Property(), LaserLinesThread::read_config(), SkillerPlugin::SkillerPlugin(), and WebviewPlugin::WebviewPlugin().
|
virtual |
Get value from configuration which is of type bool, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 726 of file config.cpp.
References get_bool().
Referenced by fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend(), PlexilExecutiveThread::init(), RealsenseThread::init(), Realsense2Thread::init(), and fawkes::gpp::GologppThread::init().
|
pure virtual |
Get list of values from configuration which is of type bool.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by get_bools_or_defaults().
|
virtual |
Get list of values from configuration which is of type bool, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 776 of file config.cpp.
References get_bools().
|
pure virtual |
Get comment of value at given path.
The value at the given path must exist in the host-specific configuration.
path | path to value |
ConfigEntryNotFoundException | shall be thrown if value does not exist |
ConfigurationException | shall be thrown on any other error |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Get comment of value at given path.
The value at the given path must exist in the default configuration.
path | path to value |
ConfigEntryNotFoundException | shall be thrown if value does not exist |
ConfigurationException | shall be thrown on any other error |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Get value from configuration which is of type float.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::AbstractDriveMode::AbstractDriveMode(), fawkes::BackwardDriveModule::BackwardDriveModule(), fawkes::BaseMotorInstruct::BaseMotorInstruct(), fawkes::BiwardDriveModule::BiwardDriveModule(), BlackboardComputable::BlackboardComputable(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), fawkes::EscapeDriveModule::EscapeDriveModule(), fawkes::EscapePotentialFieldDriveModule::EscapePotentialFieldDriveModule(), fawkes::EscapePotentialFieldOmniDriveModule::EscapePotentialFieldOmniDriveModule(), fawkes::ForwardDriveModule::ForwardDriveModule(), fawkes::ForwardOmniDriveModule::ForwardOmniDriveModule(), GazsimWebcam::GazsimWebcam(), get_float_or_default(), AmclThread::init(), MapLaserGenThread::init(), Bumblebee2Thread::init(), ClipsAgentThread::init(), ColliActThread::init(), ColliThread::init(), DynamixelDriverThread::init(), GazsimCommThread::init(), DepthcamSimThread::init(), LaserSimThread::init(), LocalizationSimThread::init(), RobotinoSimThread::init(), VisLocalizationThread::init(), JacoOpenraveBaseThread::init(), JoystickAcquisitionThread::init(), JoystickTeleOpThread::init(), KatanaActThread::init(), LaserClusterThread::init(), HokuyoUrgAcquisitionThread::init(), MongoDBReplicaSetConfig::init(), MongoLogImagesThread::init(), MongoLogPointCloudThread::init(), MongoLogTransformsThread::init(), NavGraphClustersThread::init(), NavGraphGeneratorThread::init(), NavGraphThread::init(), NavGraphVisualizationThread::init(), OpenPRSThread::init(), PanTiltRX28Thread::init(), TabletopObjectsThread::init(), TabletopVisualizationThread::init(), RefBoxCommThread::init(), RobotMemoryThread::init(), RobotStatePublisherThread::init(), RobotinoActThread::init(), DirectRobotinoComThread::init(), RosPointCloudThread::init(), RosTfThread::init(), RRDThread::init(), GlobalStatePlexilAdapter::initialize(), LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), MongoDBInstanceConfig::MongoDBInstanceConfig(), PointCloudDBMergePipeline< PointType >::PointCloudDBMergePipeline(), PointCloudDBPipeline< PointType >::PointCloudDBPipeline(), LaseEdlAcquisitionThread::pre_init(), fawkes::ExecutionTimeEstimator::Property< T >::Property(), SickTiM55xCommonAcquisitionThread::read_common_config(), LaserLinesThread::read_config(), fawkes::RoboShape::RoboShape(), and TransformComputable::TransformComputable().
|
virtual |
Get value from configuration which is of type float, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 696 of file config.cpp.
References get_float().
Referenced by RealsenseThread::init(), Realsense2Thread::init(), and fawkes::NavGraphEstimator::NavGraphEstimator().
|
pure virtual |
Get list of values from configuration which is of type float.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by get_floats_or_defaults(), MetricsThread::init(), ROSOdometryThread::init(), PointCloudDBMergePipeline< PointType >::PointCloudDBMergePipeline(), and PointCloudDBPipeline< PointType >::PointCloudDBPipeline().
|
virtual |
Get list of values from configuration which is of type float, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 746 of file config.cpp.
References get_floats().
|
pure virtual |
Get value from configuration which is of type int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::AbstractDriveMode::AbstractDriveMode(), fawkes::AStarColli::AStarColli(), BlackboardComputable::BlackboardComputable(), get_int_or_default(), Bumblebee2Thread::init(), ColliThread::init(), RobotinoSimThread::init(), MongoDBReplicaSetConfig::init(), NavGraphClustersThread::init(), RealsenseThread::init(), RobotMemoryThread::init(), GlobalStatePlexilAdapter::initialize(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), fawkes::RoboShape::RoboShape(), fawkes::Search::Search(), and TransformComputable::TransformComputable().
|
virtual |
Get value from configuration which is of type int, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 716 of file config.cpp.
References get_int().
Referenced by ExecutionTimeEstimatorLookupEstimatorThread::init(), ExecutionTimeEstimatorNavgraphThread::init(), ExecutionTimeEstimatorsThread::init(), and LaserMapFilterDataFilter::LaserMapFilterDataFilter().
|
pure virtual |
Get list of values from configuration which is of type int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by get_ints_or_defaults().
|
virtual |
Get list of values from configuration which is of type int, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 766 of file config.cpp.
References get_ints().
|
pure virtual |
Get value from configuration which is of type string.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), HardwareModelsThread::clips_context_init(), ComputablesManager::ComputablesManager(), fawkes::OpenPRSKernelManager::create_kernel(), EventTriggerManager::EventTriggerManager(), FvRetrieverPlugin::FvRetrieverPlugin(), GazsimWebcam::GazsimWebcam(), fawkes::PluginManager::get_meta_plugin_children(), get_string_or_default(), IMUPlugin::IMUPlugin(), AmclThread::init(), MapLaserGenThread::init(), BlackBoardSynchronizationThread::init(), Bumblebee2Thread::init(), ClipsExecutiveThread::init(), CLIPSThread::init(), ColliActThread::init(), ColliThread::init(), DynamixelDriverThread::init(), AgentControlThread::init(), EclipseAgentThread::init(), FestivalSynthThread::init(), FliteSynthThread::init(), DepthcamSimThread::init(), LaserSimThread::init(), LocalizationSimThread::init(), RobotinoSimThread::init(), GazsimTimesourceThread::init(), VisLocalizationThread::init(), GazeboNodeThread::init(), GossipThread::init(), HardwareModelsThread::init(), IMUAcquisitionThread::init(), CruizCoreXG1010AcquisitionThread::init(), IMUSensorThread::init(), JacoActThread::init(), JoystickAcquisitionThread::init(), JoystickTeleOpThread::init(), KatanaActThread::init(), LaserClusterThread::init(), LaserSensorThread::init(), SickTiM55xEthernetAcquisitionThread::init(), SickTiM55xUSBAcquisitionThread::init(), HokuyoUrgAcquisitionThread::init(), HokuyoUrgGbxAcquisitionThread::init(), LuaAgentContinuousExecutionThread::init(), LuaAgentPeriodicExecutionThread::init(), MongoDBReplicaSetConfig::init(), MongoLogBlackboardThread::init(), MongoLogImagesThread::init(), MongoLogPointCloudThread::init(), MongoLogTransformsThread::init(), NavGraphClustersThread::init(), NavGraphGeneratorThread::init(), NavGraphGeneratorVisualizationThread::init(), NavGraphInteractiveThread::init(), NavGraphThread::init(), NavGraphROSPubThread::init(), NavGraphVisualizationThread::init(), OpenNiContextThread::init(), OpenNiImageThread::init(), OpenNiPclOnlyThread::init(), OpenNiPointCloudThread::init(), OpenPRSAgentThread::init(), OpenPRSThread::init(), OpenraveRobotMemoryThread::init(), PanTiltDirectedPerceptionThread::init(), PanTiltRX28Thread::init(), PanTiltSonyEviD100PThread::init(), PddlPlannerThread::init(), PddlRobotMemoryThread::init(), FountainThread::init(), PointCloudDBMergeThread::init(), PointCloudDBRetrieveThread::init(), PointCloudDBStoreThread::init(), PointCloudDBROSCommThread::init(), FvRetrieverThread::init(), TabletopObjectsThread::init(), TabletopVisualizationThread::init(), PlayerClientThread::init(), PlexilExecutiveThread::init(), ProcRRDThread::init(), RealsenseThread::init(), RefBoxCommThread::init(), RobotStatePublisherThread::init(), RobotinoActThread::init(), DirectRobotinoComThread::init(), RobotinoIrPclThread::init(), OpenRobotinoComThread::init(), RobotinoSensorThread::init(), Roomba500Thread::init(), ROSCmdVelThread::init(), RosIMUThread::init(), RosMoveBaseThread::init(), RosNavgraphBreakoutThread::init(), ROSNodeThread::init(), ROSOdometryThread::init(), RosPosition3DThread::init(), ROSRobotDescriptionThread::init(), SkillerExecutionThread::init(), StnGeneratorThread::init(), BackendInfoRestApi::init(), WebviewThread::init(), fawkes::gpp::GologppThread::init(), BehaviorEnginePlexilAdapter::initialize(), GlobalStatePlexilAdapter::initialize(), LaserBoxFilterDataFilter::LaserBoxFilterDataFilter(), LaserMapFilterDataFilter::LaserMapFilterDataFilter(), fawkes::LaserOccupancyGrid::LaserOccupancyGrid(), LaserPlugin::LaserPlugin(), fawkes::PluginManager::load(), MongoDBClientConfig::MongoDBClientConfig(), MongoDBInstanceConfig::MongoDBInstanceConfig(), MongoLogPlugin::MongoLogPlugin(), OpenPRSAgentPlugin::OpenPRSAgentPlugin(), PanTiltPlugin::PanTiltPlugin(), PointCloudDBMergePipeline< PointType >::PointCloudDBMergePipeline(), PointCloudDBRetrievePipeline< PointType >::PointCloudDBRetrievePipeline(), LaseEdlAcquisitionThread::pre_init(), fawkes::ExecutionTimeEstimator::Property< T >::Property(), LaserLinesThread::read_config(), RobotinoPlugin::RobotinoPlugin(), fawkes::SelectDriveMode::SelectDriveMode(), and WebviewUserVerifier::verify_user().
|
virtual |
Get value from configuration which is of type string, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 736 of file config.cpp.
References get_string().
Referenced by MongoLogBlackboardThread::bb_interface_created(), fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend(), MongoLogBlackboardThread::init(), MongoLogLoggerThread::init(), PlexilExecutiveThread::init(), Realsense2Thread::init(), and MongoDBInstanceConfig::MongoDBInstanceConfig().
|
pure virtual |
Get list of values from configuration which is of type string.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by HardwareModelsThread::clips_context_init(), fawkes::OpenPRSKernelManager::create_kernel(), EventTriggerManager::EventTriggerManager(), get_strings_or_defaults(), ClipsAgentThread::init(), ClipsExecutiveThread::init(), ClipsProtobufThread::init(), EclipseAgentThread::init(), GazsimCommThread::init(), WebcamSimThread::init(), MongoDBReplicaSetConfig::init(), MongoLogBlackboardThread::init(), MongoLogImagesThread::init(), MongoLogPointCloudThread::init(), NavGraphStaticConstraintsThread::init(), WebviewThread::init(), fawkes::PluginManager::load(), MongoDBClientConfig::MongoDBClientConfig(), and TransformComputable::TransformComputable().
|
virtual |
Get list of values from configuration which is of type string, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 786 of file config.cpp.
References get_strings().
Referenced by fawkes::gpp::ExogManager::ExogManager(), fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend(), and PlexilExecutiveThread::init().
|
pure virtual |
Get type of value at given path.
path | path to value |
ConfigurationException | shall be thrown if value does not exist or on any other error. |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Get value from configuration which is of type unsigned int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::FawkesMainThread::FawkesMainThread(), get_uint_or_default(), fawkes::FawkesTimingThread::init(), AmclThread::init(), BlackBoardSynchronizationThread::init(), Bumblebee2Thread::init(), DynamixelDriverThread::init(), BallPosLogThread::init(), GossipThread::init(), CruizCoreXG1010AcquisitionThread::init(), JoystickAcquisitionThread::init(), JoystickTeleOpThread::init(), KatanaActThread::init(), LaserClusterThread::init(), HokuyoUrgAcquisitionThread::init(), MongoLogImagesThread::init(), MongoLogPointCloudThread::init(), NavGraphGeneratorThread::init(), OpenPRSThread::init(), PanTiltDirectedPerceptionThread::init(), PanTiltRX28Thread::init(), PanTiltSonyEviD100PThread::init(), FountainThread::init(), TabletopObjectsThread::init(), TabletopVisualizationThread::init(), PlayerClientThread::init(), ProcRRDThread::init(), RefBoxCommThread::init(), RobotinoActThread::init(), DirectRobotinoComThread::init(), OpenRobotinoComThread::init(), RoombaJoystickThread::init(), RosClockThread::init(), ROSNodeThread::init(), TimeTrackerMainLoopThread::init(), WebviewThread::init(), XmlRpcThread::init(), MongoDBClientConfig::MongoDBClientConfig(), MongoDBInstanceConfig::MongoDBInstanceConfig(), PointCloudDBMergePipeline< PointType >::PointCloudDBMergePipeline(), LaseEdlAcquisitionThread::pre_init(), and LaserLinesThread::read_config().
|
virtual |
Get value from configuration which is of type unsigned int, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 706 of file config.cpp.
References get_uint().
Referenced by fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend(), RealsenseThread::init(), and Realsense2Thread::init().
|
pure virtual |
Get list of values from configuration which is of type unsigned int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by get_uints_or_defaults(), DynamixelDriverThread::init(), and GazsimCommThread::init().
|
virtual |
Get list of values from configuration which is of type unsigned int, or the given default if the path does not exist.
path | path to value |
default_val | the default value |
Definition at line 756 of file config.cpp.
References get_uints().
|
pure virtual |
Get value from configuration.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop(), and notify_handlers().
|
pure virtual |
Check if a value is of type bool.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Check if a value was read from the default config.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Check if a value is of type float.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Check if a value is of type int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Check if a value is a list.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by HardwareModelsThread::clips_context_init(), fawkes::OpenPRSKernelManager::create_kernel(), PlexilExecutiveThread::init(), and fawkes::PluginManager::load().
|
pure virtual |
Check if a value is of type string.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::PluginManager::is_meta_plugin().
|
pure virtual |
Check if a value is of type unsigned int.
path | path to value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
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.
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::NetworkConfiguration::copy(), fawkes::SQLiteConfiguration::copy(), and fawkes::ConfigNetworkHandler::loop().
|
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.
file_path | path of the configuration file. |
Implemented in fawkes::SQLiteConfiguration, fawkes::YamlConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
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::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::NetworkConfiguration::copy(), fawkes::SQLiteConfiguration::copy(), fawkes::ConfigNetworkHandler::loop(), and AmclThread::loop().
|
protected |
Notify handlers for given path.
path | path to notify handlers for |
comment_changed | true if the change is about a comment change, false otherwise |
Definition at line 674 of file config.cpp.
References find_handlers(), get_value(), and fawkes::Configuration::ValueIterator::next().
Referenced by fawkes::SQLiteConfiguration::erase(), fawkes::SQLiteConfiguration::erase_default(), fawkes::YamlConfiguration::fam_event(), fawkes::SQLiteConfiguration::set_bool(), fawkes::YamlConfiguration::set_bool(), fawkes::YamlConfiguration::set_bools(), fawkes::SQLiteConfiguration::set_comment(), fawkes::SQLiteConfiguration::set_default_bool(), fawkes::SQLiteConfiguration::set_default_comment(), fawkes::SQLiteConfiguration::set_default_float(), fawkes::SQLiteConfiguration::set_default_int(), fawkes::SQLiteConfiguration::set_default_string(), fawkes::SQLiteConfiguration::set_default_uint(), fawkes::SQLiteConfiguration::set_float(), fawkes::YamlConfiguration::set_float(), fawkes::YamlConfiguration::set_floats(), fawkes::SQLiteConfiguration::set_int(), fawkes::YamlConfiguration::set_int(), fawkes::YamlConfiguration::set_ints(), fawkes::SQLiteConfiguration::set_string(), fawkes::YamlConfiguration::set_string(), fawkes::YamlConfiguration::set_strings(), fawkes::SQLiteConfiguration::set_uint(), fawkes::YamlConfiguration::set_uint(), and fawkes::YamlConfiguration::set_uints().
|
virtual |
Remove a configuration change handler.
The handler is removed from the change handler list and no longer called on config changes.
h | configuration change handler |
Reimplemented in fawkes::NetworkConfiguration.
Definition at line 619 of file config.cpp.
References _ch_range, _change_handlers, and fawkes::ConfigurationChangeHandler::config_monitor_prefix().
Referenced by MongoRRDThread::finalize(), ProcRRDThread::finalize(), StaticTransformsThread::finalize(), ConfigChangeWatcherTool::handle_signal(), fawkes::NetworkConfiguration::rem_change_handler(), fawkes::ConfigNetworkHandler::~ConfigNetworkHandler(), and fawkes::PluginManager::~PluginManager().
|
pure virtual |
Iterator with search results.
Returns an iterator that can be used to iterate over the search results. All values whose path start with the given strings are returned. A call like
is effectively the same as a call to iterator().
path | start of path |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), BlackBoardSynchronizationPlugin::BlackBoardSynchronizationPlugin(), DynamixelPlugin::DynamixelPlugin(), FvRetrieverPlugin::FvRetrieverPlugin(), fawkes::ExecutionTimeEstimator::get_skills_from_config(), IMUPlugin::IMUPlugin(), ClipsExecutiveThread::init(), GossipThread::init(), LaserFilterThread::init(), MongoRRDThread::init(), ProcRRDThread::init(), BackendInfoRestApi::init(), fawkes::PluginManager::init_pinfo_cache(), BehaviorEnginePlexilAdapter::initialize(), GlobalStatePlexilAdapter::initialize(), LaserClusterPlugin::LaserClusterPlugin(), LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter(), LaserFilterPlugin::LaserFilterPlugin(), LaserPlugin::LaserPlugin(), PanTiltPlugin::PanTiltPlugin(), and fawkes::ExecutionTimeEstimator::Property< T >::Property().
|
pure virtual |
Set new value in configuration of type bool.
path | path to value |
b | new bool value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type bool.
path | path to value |
b | new bool values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
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.
path | path to value |
comment | new comment string |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new comment for existing value.
path | path to value |
comment | new comment string |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new default value in configuration of type bool.
path | path to value |
b | new bool value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
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.
path | path to value |
comment | new comment string |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new default comment for existing default configuration value.
path | path to value |
comment | new comment string |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new default value in configuration of type float.
path | path to value |
f | new float value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new default value in configuration of type int.
path | path to value |
i | new int value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
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.
path | path to value |
s | new string value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new default value in configuration of type string.
path | path to value |
s | new string value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new default value in configuration of type unsigned int.
path | path to value |
uint | new unsigned int value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type float.
path | path to value |
f | new float value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop(), and AmclThread::loop().
|
pure virtual |
Set new value in configuration of type float.
path | path to value |
f | new float values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type int.
path | path to value |
i | new int value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type int.
path | path to value |
i | new int values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
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.
path | path to value |
s | new string value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new value in configuration of type string.
path | path to value |
s | new string value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), Roomba500Thread::init(), fawkes::ConfigNetworkHandler::loop(), and MongoLogPlugin::MongoLogPlugin().
|
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.
path | path to value |
s | new string values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Set new value in configuration of type string.
path | path to value |
s | new string values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type unsigned int.
path | path to value |
uint | new unsigned int value |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
pure virtual |
Set new value in configuration of type unsigned int.
path | path to value |
uint | new unsigned int values |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::ConfigNetworkHandler::loop().
|
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.
Exception | thrown if dumping fails |
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
References exists().
|
pure virtual |
Try to lock the config.
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
|
pure virtual |
Unlock the config.
Modifications and queries are possible again.
Implemented in fawkes::YamlConfiguration, fawkes::SQLiteConfiguration, fawkes::NetworkConfiguration, and fawkes::MemoryConfiguration.
Referenced by fawkes::NetworkConfiguration::copy(), fawkes::SQLiteConfiguration::copy(), fawkes::ConfigNetworkHandler::loop(), and AmclThread::loop().
|
protected |
Change handler range.
Definition at line 456 of file config.h.
Referenced by find_handlers(), and rem_change_handler().
|
protected |
Registered change handlers.
Definition at line 454 of file config.h.
Referenced by add_change_handler(), find_handlers(), and rem_change_handler().