A node can advertise and subscribe topics, publish on advertised topics and listen to subscribed topics.
More...
#include <Node.hh>
|
| | Node () |
| | Constructor.
|
| |
| virtual | ~Node () |
| | Destructor.
|
| |
| template<typename M > |
| transport::PublisherPtr | Advertise (const std::string &topic, unsigned int _queueLimit=1000, bool _latch=false) |
| | Adverise a topic.
|
| |
| std::string | DecodeTopicName (const std::string &topic) |
| | Decode a topic name.
|
| |
| std::string | EncodeTopicName (const std::string &topic) |
| | Encode a topic name.
|
| |
| void | Fini () |
| |
| unsigned int | GetId () const |
| | Get the unique ID of the node.
|
| |
| std::string | GetMsgType (const std::string &_topic) const |
| | Get the message type for a topic.
|
| |
| std::string | GetTopicNamespace () const |
| | Get the topic namespace for this node.
|
| |
| bool | HandleData (const std::string &_topic, const std::string &_msg) |
| |
| void | Init (const std::string &_space="") |
| | Init the node.
|
| |
| void | InsertLatchedMsg (const std::string &_topic, const std::string &_msg) |
| | Add a latched message to the node for publication.
|
| |
| void | ProcessIncoming () |
| |
| void | ProcessPublishers () |
| | Process all publishers, which has each publisher send it's most recent message over the wire.
|
| |
| template<typename M , typename T > |
| SubscriberPtr | Subscribe (const std::string &topic, void(T::*fp)(const M const *&), T *obj, bool _latching=false) |
| | Subscribe to a topic, and return data on the callback.
|
| |
| template<typename M > |
| SubscriberPtr | Subscribe (const std::string &topic, void(*fp)(const M const *&), bool _latching=false) |
| | Subscribe to a topic, and return data on the callback.
|
| |
A node can advertise and subscribe topics, publish on advertised topics and listen to subscribed topics.
| gazebo::transport::Node::Node |
( |
| ) |
|
| virtual gazebo::transport::Node::~Node |
( |
| ) |
|
|
virtual |
template<typename M >
| transport::PublisherPtr gazebo::transport::Node::Advertise |
( |
const std::string & |
topic, |
|
|
unsigned int |
_queueLimit = 1000, |
|
|
bool |
_latch = false |
|
) |
| |
|
inline |
| std::string gazebo::transport::Node::DecodeTopicName |
( |
const std::string & |
topic | ) |
|
| std::string gazebo::transport::Node::EncodeTopicName |
( |
const std::string & |
topic | ) |
|
| void gazebo::transport::Node::Fini |
( |
| ) |
|
| unsigned int gazebo::transport::Node::GetId |
( |
| ) |
const |
Get the unique ID of the node.
| std::string gazebo::transport::Node::GetMsgType |
( |
const std::string & |
_topic | ) |
const |
Get the message type for a topic.
| std::string gazebo::transport::Node::GetTopicNamespace |
( |
| ) |
const |
Get the topic namespace for this node.
- Returns
- The namespace
| bool gazebo::transport::Node::HandleData |
( |
const std::string & |
_topic, |
|
|
const std::string & |
_msg |
|
) |
| |
| void gazebo::transport::Node::Init |
( |
const std::string & |
_space = "" | ) |
|
Init the node.
- Parameters
-
| space | Set the global namespace of all topics. If left blank, the topic will initialize to the first namespace on the Master |
| void gazebo::transport::Node::InsertLatchedMsg |
( |
const std::string & |
_topic, |
|
|
const std::string & |
_msg |
|
) |
| |
Add a latched message to the node for publication.
This is called when a subscription is connected to a publication.
- Parameters
-
| [in] | _topic | Name of the topic to publish data on. |
| [in] | _msg | The message to publish. |
| void gazebo::transport::Node::ProcessIncoming |
( |
| ) |
|
| void gazebo::transport::Node::ProcessPublishers |
( |
| ) |
|
Process all publishers, which has each publisher send it's most recent message over the wire.
This is for internal use only
template<typename M , typename T >
| SubscriberPtr gazebo::transport::Node::Subscribe |
( |
const std::string & |
topic, |
|
|
void(T::*)(const M const *&) |
fp, |
|
|
T * |
obj, |
|
|
bool |
_latching = false |
|
) |
| |
|
inline |
template<typename M >
| SubscriberPtr gazebo::transport::Node::Subscribe |
( |
const std::string & |
topic, |
|
|
void(*)(const M const *&) |
fp, |
|
|
bool |
_latching = false |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: