Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
ParameterServer Class Reference

Getting values from parameter server. This class is used for getting the parameters from the parameter server. More...

#include <parameter_server.h>

List of all members.

Public Member Functions

template<typename T >
T get (const std::string param)
std::map< std::string,
boost::any > & 
getConfigData ()
std::string getDescription (std::string param_name)
void getValues ()
template<typename T >
void set (const std::string param, T value)

Static Public Member Functions

static ParameterServerinstance ()

Private Member Functions

void addOption (std::string name, boost::any value, std::string description)
void checkValues ()
void defaultConfig ()
template<typename T >
T getFromParameterServer (const std::string param, T def)
 ParameterServer ()
template<typename T >
void setOnParameterServer (const std::string param, T new_val)

Private Attributes

std::map< std::string, boost::any > config
std::map< std::string,
std::string > 
descriptions
ros::NodeHandle handle
std::string pre

Static Private Attributes

static ParameterServer_instance = NULL

Detailed Description

Getting values from parameter server. This class is used for getting the parameters from the parameter server.

Definition at line 53 of file parameter_server.h.


Constructor & Destructor Documentation

Default constructor private, because of singleton

Definition at line 176 of file parameter_server.cpp.


Member Function Documentation

void ParameterServer::addOption ( std::string  name,
boost::any  value,
std::string  description 
) [private]

Definition at line 191 of file parameter_server.cpp.

void ParameterServer::checkValues ( ) [private]

Checks, whether the parameters are ok

Definition at line 226 of file parameter_server.cpp.

void ParameterServer::defaultConfig ( ) [private]

Loads the default configuration

Definition at line 22 of file parameter_server.cpp.

template<typename T >
T ParameterServer::get ( const std::string  param) [inline]

The method returns a value from the local cache. You can use bool, int, double and std::string for T

Parameters:
paramthe name of the parameter
Returns:
the parameter value

Definition at line 87 of file parameter_server.h.

std::map<std::string, boost::any>& ParameterServer::getConfigData ( ) [inline]

Provides access to the raw config data

Definition at line 111 of file parameter_server.h.

std::string ParameterServer::getDescription ( std::string  param_name)

Returns the description text for the named option

Definition at line 197 of file parameter_server.cpp.

template<typename T >
T ParameterServer::getFromParameterServer ( const std::string  param,
T  def 
) [inline, private]

Returns a value from the parameter server Will only be used by getValue()

Parameters:
paramname of the parameter
defdefault value (get through defaultConfig())
Returns:
the parameter value

Definition at line 156 of file parameter_server.h.

Receives all values from the parameter server and store them in the map 'config'. Will be called in the constructor

Definition at line 201 of file parameter_server.cpp.

Returns the singleton instance

Definition at line 184 of file parameter_server.cpp.

template<typename T >
void ParameterServer::set ( const std::string  param,
T  value 
) [inline]

The method sets a value in the local cache and on the Parameter Server. You can use bool, int, double and std::string for T

Parameters:
paramthe name of the parameter the new parameter value

Definition at line 68 of file parameter_server.h.

template<typename T >
void ParameterServer::setOnParameterServer ( const std::string  param,
T  new_val 
) [inline, private]

Definition at line 163 of file parameter_server.h.


Member Data Documentation

ParameterServer * ParameterServer::_instance = NULL [static, private]

Definition at line 126 of file parameter_server.h.

std::map<std::string, boost::any> ParameterServer::config [private]

Definition at line 123 of file parameter_server.h.

std::map<std::string, std::string> ParameterServer::descriptions [private]

Definition at line 124 of file parameter_server.h.

Definition at line 128 of file parameter_server.h.

std::string ParameterServer::pre [private]

Definition at line 127 of file parameter_server.h.


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


rgbdslam_v2
Author(s): Felix Endres, Juergen Hess, Nikolas Engelhard
autogenerated on Thu Jun 6 2019 21:49:45