A class that is used to store information about an advertised publisher.
More...
#include <Node.hh>
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::Publisher::Publish calls.
Pseudo code example
auto pub = myNode.Advertise<MsgType>("topic_name"); if (pub) { MsgType msg; pub.Publish(msg); }
ignition::transport::Node::Publisher::Publisher |
( |
| ) |
|
ignition::transport::Node::Publisher::Publisher |
( |
const MessagePublisher & |
_publisher | ) |
|
|
explicit |
Constructor.
- Parameters
-
[in] | _publisher | A message publisher. |
virtual ignition::transport::Node::Publisher::~Publisher |
( |
| ) |
|
|
virtual |
bool ignition::transport::Node::Publisher::HasConnections |
( |
| ) |
const |
Return true if this publisher has subscribers.
- Returns
- True if subscribers have connected to this publisher.
ignition::transport::Node::Publisher::operator bool |
( |
| ) |
|
Allows this class to be evaluated as a boolean.
- Returns
- True if valid
- See Also
- Valid
bool ignition::transport::Node::Publisher::Publish |
( |
const ProtoMsg & |
_msg | ) |
|
Publish a message.
- Parameters
-
[in] | _msg | A google::protobuf message. |
- Returns
- true when success.
bool ignition::transport::Node::Publisher::Valid |
( |
| ) |
const |
Return true if valid information, such as a non-empty topic name, is present.
- Returns
- True if this object can be used in Publish() calls.
The documentation for this class was generated from the following file: