17 #ifndef _GAZEBO_TRANSPORTIFACE_HH_
18 #define _GAZEBO_TRANSPORTIFACE_HH_
20 #include <boost/bind.hpp>
45 bool get_master_uri(std::string &_master_host,
unsigned int &_master_port);
56 bool init(
const std::string &_masterHost =
"",
57 unsigned int _masterPort = 0,
58 uint32_t _timeoutIterations = 30);
102 boost::shared_ptr<msgs::Response>
request(
const std::string &_worldName,
103 const std::string &_request,
104 const std::string &_data =
"");
114 const std::string &_request,
115 const std::string &_data =
"");
124 const std::string &_data =
"");
135 const google::protobuf::Message &_message)
139 node->Publish<M>(_topic, _message);
GAZEBO_VISIBLE void pause_incoming(bool _pause)
Pause or unpause incoming messages.
bool is_stopped()
Is the transport system stopped?
boost::shared_ptr< Connection > ConnectionPtr
Definition: Connection.hh:50
GAZEBO_VISIBLE std::map< std::string, std::list< std::string > > getAdvertisedTopics()
Get a list of all the topics and their message types.
GAZEBO_VISIBLE void setMinimalComms(bool _enabled)
Set whether minimal comms should be used.
GAZEBO_VISIBLE void publish(const std::string &_topic, const google::protobuf::Message &_message)
A convenience function for a one-time publication of a message.
Definition: TransportIface.hh:134
Forward declarations for transport.
GAZEBO_VISIBLE transport::ConnectionPtr connectToMaster()
Create a connection to master.
GAZEBO_VISIBLE void clear_buffers()
Clear any remaining communication buffers.
GAZEBO_VISIBLE std::string getTopicMsgType(const std::string &_topicName)
Get the message typename that is published on the given topic.
GAZEBO_VISIBLE boost::shared_ptr< msgs::Response > request(const std::string &_worldName, const std::string &_request, const std::string &_data="")
Send a request and receive a response.
A node can advertise and subscribe topics, publish on advertised topics and listen to subscribed topi...
Definition: Node.hh:77
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
GAZEBO_VISIBLE bool waitForNamespaces(const gazebo::common::Time &_maxWait)
Blocks while waiting for topic namespaces from the Master.
GAZEBO_VISIBLE bool getMinimalComms()
Get whether minimal comms has been enabled.
GAZEBO_VISIBLE void run()
Run the transport component.
GAZEBO_VISIBLE void stop()
Stop the transport component from running.
GAZEBO_VISIBLE void fini()
Cleanup the transport component.
GAZEBO_VISIBLE void get_topic_namespaces(std::list< std::string > &_namespaces)
Return all the namespace (world names) on the master.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
GAZEBO_VISIBLE void requestNoReply(const std::string &_worldName, const std::string &_request, const std::string &_data="")
Send a request and don't wait for a response.
GAZEBO_VISIBLE bool get_master_uri(std::string &_master_host, unsigned int &_master_port)
Get the hostname and port of the master from the GAZEBO_MASTER_URI environment variable.
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:43
GAZEBO_VISIBLE bool init(const std::string &_masterHost="", unsigned int _masterPort=0, uint32_t _timeoutIterations=30)
Initialize the transport system.