A class that is used to store information about an advertised publisher. More...
#include <Node.hh>
Public Member Functions | |
| PublisherId () | |
| Default constructor. More... | |
| PublisherId (const std::string &_topic) | |
| Constructor. More... | |
| operator bool () | |
| Allows this class to be evaluated as a boolean. More... | |
| std::string | Topic () const |
| Return the name of the topic. More... | |
| bool | Valid () const |
| Return true if valid information, such as a non-empty topic name, is present. More... | |
A class that is used to store information about an advertised publisher.
An instance of this class is returned from Node::Advertise, and should be used in subsequent Node::Publish calls.
auto pubId = myNode.Advertise<MsgType>("topic_name");
MsgType msg; myNode.Publish(pubId, msg);
| ignition::transport::Node::PublisherId::PublisherId | ( | ) |
Default constructor.
|
explicit |
Constructor.
| [in] | _topic | Name of the topic on which messages could be published. |
| ignition::transport::Node::PublisherId::operator bool | ( | ) |
| std::string ignition::transport::Node::PublisherId::Topic | ( | ) | const |
Return the name of the topic.
| bool ignition::transport::Node::PublisherId::Valid | ( | ) | const |
Return true if valid information, such as a non-empty topic name, is present.