ros::param Namespace Reference

Contains functions which allow you to query the parameter server. More...

Typedefs

typedef std::map< std::string,
XmlRpc::XmlRpcValue > 
M_Param

Functions

bool del (const std::string &key)
 Delete a parameter from the parameter server.
bool get (const std::string &key, XmlRpc::XmlRpcValue &v)
 Get an arbitrary XML/RPC value from the parameter server.
bool get (const std::string &key, bool &b)
 Get a boolean value from the parameter server.
bool get (const std::string &key, int &i)
 Get a integer value from the parameter server.
bool get (const std::string &key, double &d)
 Get a double value from the parameter server.
bool get (const std::string &key, std::string &s)
 Get a string value from the parameter server.
bool getCached (const std::string &key, XmlRpc::XmlRpcValue &v)
 Get an arbitrary XML/RPC value from the parameter server, with local caching.
bool getCached (const std::string &key, bool &b)
 Get a boolean value from the parameter server, with local caching.
bool getCached (const std::string &key, int &i)
 Get a integer value from the parameter server, with local caching.
bool getCached (const std::string &key, double &d)
 Get a double value from the parameter server, with local caching.
bool getCached (const std::string &key, std::string &s)
 Get a string value from the parameter server, with local caching.
bool getImpl (const std::string &key, bool &b, bool use_cache)
bool getImpl (const std::string &key, int &i, bool use_cache)
bool getImpl (const std::string &key, double &d, bool use_cache)
bool getImpl (const std::string &key, std::string &s, bool use_cache)
bool getImpl (const std::string &key, XmlRpc::XmlRpcValue &v, bool use_cache)
bool has (const std::string &key)
 Check whether a parameter exists on the parameter server.
void init (const M_string &remappings)
template<typename T >
void param (const std::string &param_name, T &param_val, const T &default_val)
 Assign value from parameter server, with default.
void paramUpdateCallback (XmlRpc::XmlRpcValue &params, XmlRpc::XmlRpcValue &result)
bool search (const std::string &key, std::string &result)
 Search up the tree for a parameter with a given key. This version defaults to starting in the current node's name.
bool search (const std::string &ns, const std::string &key, std::string &result)
 Search up the tree for a parameter with a given key.
void set (const std::string &key, bool b)
 Set a integer value on the parameter server.
void set (const std::string &key, int i)
 Set a integer value on the parameter server.
void set (const std::string &key, double d)
 Set a double value on the parameter server.
void set (const std::string &key, const char *s)
 Set a string value on the parameter server.
void set (const std::string &key, const std::string &s)
 Set a string value on the parameter server.
void set (const std::string &key, const XmlRpc::XmlRpcValue &v)
 Set an arbitrary XML/RPC value on the parameter server.
void update (const std::string &key, const XmlRpc::XmlRpcValue &v)

Variables

M_Param g_params
boost::mutex g_params_mutex
S_string g_subscribed_params

Detailed Description

Contains functions which allow you to query the parameter server.


Typedef Documentation

typedef std::map<std::string, XmlRpc::XmlRpcValue> ros::param::M_Param

Definition at line 45 of file param.cpp.


Function Documentation

bool ros::param::del ( const std::string &  key  ) 

Delete a parameter from the parameter server.

Parameters:
key The key to delete.
Returns:
true if the deletion succeeded, false otherwise.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 128 of file param.cpp.

bool ros::param::get ( const std::string &  key,
XmlRpc::XmlRpcValue &  v 
)

Get an arbitrary XML/RPC value from the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
[out] v Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 334 of file param.cpp.

bool ros::param::get ( const std::string &  key,
bool &  b 
)

Get a boolean value from the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
[out] b Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 329 of file param.cpp.

bool ros::param::get ( const std::string &  key,
int &  i 
)

Get a integer value from the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
[out] i Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 324 of file param.cpp.

bool ros::param::get ( const std::string &  key,
double &  d 
)

Get a double value from the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
[out] d Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 319 of file param.cpp.

bool ros::param::get ( const std::string &  key,
std::string &  s 
)

Get a string value from the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
[out] s Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 314 of file param.cpp.

bool ros::param::getCached ( const std::string &  key,
XmlRpc::XmlRpcValue &  v 
)

Get an arbitrary XML/RPC value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master -- they will instead look up in the local cache.

Parameters:
key The key to be used in the parameter server's dictionary
[out] v Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 359 of file param.cpp.

bool ros::param::getCached ( const std::string &  key,
bool &  b 
)

Get a boolean value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master -- they will instead look up in the local cache.

Parameters:
key The key to be used in the parameter server's dictionary
[out] b Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 354 of file param.cpp.

bool ros::param::getCached ( const std::string &  key,
int &  i 
)

Get a integer value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master -- they will instead look up in the local cache.

Parameters:
key The key to be used in the parameter server's dictionary
[out] i Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 349 of file param.cpp.

bool ros::param::getCached ( const std::string &  key,
double &  d 
)

Get a double value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master -- they will instead look up in the local cache.

Parameters:
key The key to be used in the parameter server's dictionary
[out] d Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 344 of file param.cpp.

bool ros::param::getCached ( const std::string &  key,
std::string &  s 
)

Get a string value from the parameter server, with local caching.

This function will cache parameters locally, and subscribe for updates from the parameter server. Once the parameter is retrieved for the first time no subsequent getCached() calls with the same key will query the master -- they will instead look up in the local cache.

Parameters:
key The key to be used in the parameter server's dictionary
[out] s Storage for the retrieved value.
Returns:
true if the parameter value was retrieved, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 339 of file param.cpp.

bool ros::param::getImpl ( const std::string &  key,
bool &  b,
bool  use_cache 
)

Definition at line 303 of file param.cpp.

bool ros::param::getImpl ( const std::string &  key,
int &  i,
bool  use_cache 
)

Definition at line 268 of file param.cpp.

bool ros::param::getImpl ( const std::string &  key,
double &  d,
bool  use_cache 
)

Definition at line 244 of file param.cpp.

bool ros::param::getImpl ( const std::string &  key,
std::string &  s,
bool  use_cache 
)

Definition at line 233 of file param.cpp.

bool ros::param::getImpl ( const std::string &  key,
XmlRpc::XmlRpcValue &  v,
bool  use_cache 
)

Definition at line 162 of file param.cpp.

bool ros::param::has ( const std::string &  key  ) 

Check whether a parameter exists on the parameter server.

Parameters:
key The key to check.
Returns:
true if the parameter exists, false otherwise
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 111 of file param.cpp.

void ros::param::init ( const M_string &  remappings  ) 

Definition at line 417 of file param.cpp.

template<typename T >
void ros::param::param ( const std::string &  param_name,
T &  param_val,
const T &  default_val 
) [inline]

Assign value from parameter server, with default.

This method tries to retrieve the indicated parameter value from the parameter server, storing the result in param_val. If the value cannot be retrieved from the server, default_val is used instead.

Parameters:
param_name The key to be searched on the parameter server.
[out] param_val Storage for the retrieved value.
default_val Value to use if the server doesn't contain this parameter.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 265 of file param.h.

void ros::param::paramUpdateCallback ( XmlRpc::XmlRpcValue &  params,
XmlRpc::XmlRpcValue &  result 
)

Definition at line 408 of file param.cpp.

bool ros::param::search ( const std::string &  key,
std::string &  result 
)

Search up the tree for a parameter with a given key. This version defaults to starting in the current node's name.

This function parameter server's searchParam feature to search up the tree for a parameter. For example, if the parameter server has a parameter [/a/b] and you specify the namespace [/a/c/d], searching for the parameter "b" will yield [/a/b]. If [/a/c/d/b] existed, that parameter would be returned instead.

Parameters:
key the parameter to search for
[out] result the found value (if any)
Returns:
true if the parameter was found, false otherwise.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 364 of file param.cpp.

bool ros::param::search ( const std::string &  ns,
const std::string &  key,
std::string &  result 
)

Search up the tree for a parameter with a given key.

This function parameter server's searchParam feature to search up the tree for a parameter. For example, if the parameter server has a parameter [/a/b] and you specify the namespace [/a/c/d], searching for the parameter "b" will yield [/a/b]. If [/a/c/d/b] existed, that parameter would be returned instead.

Parameters:
ns The namespace to begin the search in
key the parameter to search for
[out] result the found value (if any)
Returns:
true if the parameter was found, false otherwise.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 369 of file param.cpp.

void ros::param::set ( const std::string &  key,
bool  b 
)

Set a integer value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
b The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 105 of file param.cpp.

void ros::param::set ( const std::string &  key,
int  i 
)

Set a integer value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
i The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 99 of file param.cpp.

void ros::param::set ( const std::string &  key,
double  d 
)

Set a double value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
d The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 93 of file param.cpp.

void ros::param::set ( const std::string &  key,
const char *  s 
)

Set a string value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
s The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 84 of file param.cpp.

void ros::param::set ( const std::string &  key,
const std::string &  s 
)

Set a string value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
s The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 76 of file param.cpp.

void ros::param::set ( const std::string &  key,
const XmlRpc::XmlRpcValue &  v 
)

Set an arbitrary XML/RPC value on the parameter server.

Parameters:
key The key to be used in the parameter server's dictionary
v The value to be inserted.
Exceptions:
InvalidNameException if the key is not a valid graph resource name

Definition at line 50 of file param.cpp.

void ros::param::update ( const std::string &  key,
const XmlRpc::XmlRpcValue &  v 
)

Definition at line 398 of file param.cpp.


Variable Documentation

Definition at line 46 of file param.cpp.

Definition at line 47 of file param.cpp.

Definition at line 48 of file param.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


roscpp
Author(s): Morgan Quigley mquigley@cs.stanford.edu, Josh Faust jfaust@willowgarage.com, Brian Gerkey gerkey@willowgarage.com
autogenerated on Fri Jan 11 10:08:42 2013