A node can advertise and subscribe topics, publish on advertised topics and listen to subscribed topics. More...
#include <Node.hh>
Public Member Functions | |
| Node () | |
| Constructor. | |
| virtual | ~Node () |
| Destructor. | |
| void | Init (const std::string &_space="") |
| Init the node. | |
| void | Fini () |
| std::string | GetTopicNamespace () const |
| Get the topic namespace for this node. | |
| std::string | DecodeTopicName (const std::string &topic) |
| Decode a topic name. | |
| std::string | EncodeTopicName (const std::string &topic) |
| Encode a topic name. | |
| unsigned int | GetId () const |
| Get the unique ID of the node. | |
| void | ProcessPublishers () |
| Process all publishers, which has each publisher send it's most recent message over the wire. | |
| void | ProcessIncoming () |
| template<typename M > | |
| transport::PublisherPtr | Advertise (const std::string &topic, unsigned int _queueLimit=10, bool _latch=false) |
| Adverise a topic. | |
| template<typename M , typename T > | |
| SubscriberPtr | Subscribe (const std::string &topic, void(T::*fp)(const boost::shared_ptr< 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 boost::shared_ptr< M const > &), bool _latching=false) |
| Subscribe to a topic, and return data on the callback. | |
| bool | HandleData (const std::string &_topic, const std::string &_msg) |
| std::string | GetMsgType (const std::string &_topic) const |
| Get the message type for a topic. | |
A node can advertise and subscribe topics, publish on advertised topics and listen to subscribed topics.
| std::string GetTopicNamespace | ( | ) | const |
Get the topic namespace for this node.
| void Init | ( | const std::string & | _space = "" | ) |
Init the node.
| space | Set the global namespace of all topics. If left blank, the topic will initialize to the first namespace on the Master |
| void ProcessPublishers | ( | ) |
Process all publishers, which has each publisher send it's most recent message over the wire.
This is for internal use only
1.7.5.1