Classes | Typedefs | Functions
roswrap::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

ROSCPP_DECL bool check ()
 Check whether the master is up. More...
 
ROSCPP_DECL 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. More...
 
const ROSCPP_DECL std::string & getHost ()
 Get the hostname where the master runs. More...
 
ROSCPP_DECL bool getNodes (V_string &nodes)
 Retreives the currently-known list of nodes from the master. More...
 
ROSCPP_DECL uint32_t getPort ()
 Get the port where the master runs. More...
 
ROSCPP_DECL bool getTopics (V_TopicInfo &topics)
 Get the list of topics that are being published by all nodes. More...
 
const ROSCPP_DECL std::string & getURI ()
 Get the full URI to the master (eg. http://host:port/) More...
 
ROSCPP_DECL void setRetryTimeout (ros::WallDuration timeout)
 Set the max time this node should spend looping trying to connect to the master. More...
 

Detailed Description

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

Typedef Documentation

◆ V_TopicInfo

Definition at line 100 of file master.h.

Function Documentation

◆ check()

ROSCPP_DECL bool roswrap::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.

◆ execute()

ROSCPP_DECL bool roswrap::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
methodThe RPC method to invoke
requestThe arguments to the RPC call
response[out] The resonse that was received.
payload[out] The payload that was received.
wait_for_masterWhether or not this call should loop until it can contact the master
Returns
true if call succeeds, false otherwise.

◆ getHost()

const ROSCPP_DECL std::string& roswrap::master::getHost ( )

Get the hostname where the master runs.

Returns
The master's hostname, as a string

◆ getNodes()

ROSCPP_DECL bool roswrap::master::getNodes ( V_string nodes)

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

◆ getPort()

ROSCPP_DECL uint32_t roswrap::master::getPort ( )

Get the port where the master runs.

Returns
The master's port.

◆ getTopics()

ROSCPP_DECL bool roswrap::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
topicsA 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)

◆ getURI()

const ROSCPP_DECL std::string& roswrap::master::getURI ( )

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

◆ setRetryTimeout()

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

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

Parameters
Thetimeout. A negative value means infinite


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15