ros::master Namespace Reference

Contains functions which allow you to query information about the master. More...

Classes

struct  TopicInfo
 Contains information retrieved from the master about a topic. More...

Typedefs

typedef std::vector< TopicInfoV_TopicInfo

Functions

bool check ()
 Check whether the master is up.
bool execute (const std::string &method, const XmlRpc::XmlRpcValue &request, XmlRpc::XmlRpcValue &response, XmlRpc::XmlRpcValue &payload, bool wait_for_master)
 Execute an XMLRPC call on the master.
const std::string & getHost ()
 Get the hostname where the master runs.
bool getNodes (V_string &nodes)
 Retreives the currently-known list of nodes from the master.
uint32_t getPort ()
 Get the port where the master runs.
bool getTopics (V_TopicInfo &topics)
 Get the list of topics that are being published by all nodes.
const std::string & getURI ()
 Get the full URI to the master (eg. http://host:port/).
void init (const M_string &remappings)
void setRetryTimeout (ros::WallDuration timeout)
 Set the max time this node should spend looping trying to connect to the master.

Variables

std::string g_host
uint32_t g_port = 0
ros::WallDuration g_retry_timeout
std::string g_uri

Detailed Description

Contains functions which allow you to query information about the master.


Typedef Documentation

typedef std::vector<TopicInfo> ros::master::V_TopicInfo

Definition at line 90 of file master.h.


Function Documentation

bool ros::master::check (  ) 

Check whether the master is up.

This method tries to contact the master. You can call it any time after ros::init has been called. The intended usage is to check whether the master is up before trying to make other requests (subscriptions, advertisements, etc.).

Returns:
true if the master is available, false otherwise.

Definition at line 104 of file master.cpp.

bool ros::master::execute ( const std::string &  method,
const XmlRpc::XmlRpcValue &  request,
XmlRpc::XmlRpcValue &  response,
XmlRpc::XmlRpcValue &  payload,
bool  wait_for_master 
)

Execute an XMLRPC call on the master.

Parameters:
method The RPC method to invoke
request The arguments to the RPC call
response [out] The resonse that was received.
payload [out] The payload that was received.
wait_for_master Whether or not this call should loop until it can contact the master
Returns:
true if call succeeds, false otherwise.

Definition at line 164 of file master.cpp.

const std::string & ros::master::getHost (  ) 

Get the hostname where the master runs.

Returns:
The master's hostname, as a string

Definition at line 84 of file master.cpp.

bool ros::master::getNodes ( V_string &  nodes  ) 

Retreives the currently-known list of nodes from the master.

Definition at line 131 of file master.cpp.

uint32_t ros::master::getPort (  ) 

Get the port where the master runs.

Returns:
The master's port.

Definition at line 89 of file master.cpp.

bool ros::master::getTopics ( V_TopicInfo &  topics  ) 

Get the list of topics that are being published by all nodes.

This method communicates with the master to retrieve the list of all currently advertised topics.

Parameters:
topics A place to store the resulting list. Each item in the list is a pair <string topic, string type>. The type is represented in the format "package_name/MessageName", and is also retrievable through message.__getDataType() or MessageName::__s_getDataType().
Returns:
true on success, false otherwise (topics not filled in)

Definition at line 111 of file master.cpp.

const std::string & ros::master::getURI (  ) 

Get the full URI to the master (eg. http://host:port/).

Definition at line 94 of file master.cpp.

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

Definition at line 50 of file master.cpp.

void ros::master::setRetryTimeout ( ros::WallDuration  timeout  ) 

Set the max time this node should spend looping trying to connect to the master.

Parameters:
The timeout. A negative value means infinite

Definition at line 99 of file master.cpp.


Variable Documentation

std::string ros::master::g_host

Definition at line 46 of file master.cpp.

uint32_t ros::master::g_port = 0

Definition at line 45 of file master.cpp.

ros::WallDuration ros::master::g_retry_timeout

Definition at line 48 of file master.cpp.

std::string ros::master::g_uri

Definition at line 47 of file master.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