Advertise packet used in the discovery protocol to broadcast information about the node advertising a topic. More...
#include <ignition/transport/Packet.hh>
Public Member Functions | |
AdvertiseMessage ()=default | |
Constructor. More... | |
AdvertiseMessage (const Header &_header, const T &_publisher) | |
Constructor. More... | |
transport::Header | Header () const |
Get the message header. More... | |
size_t | MsgLength () const |
Get the total length of the message. More... | |
size_t | Pack (char *_buffer) const |
Serialize the advertise message. More... | |
T & | Publisher () |
Get the publisher of this message. More... | |
void | SetHeader (const transport::Header &_header) |
Set the header of the message. More... | |
void | SetPublisher (const T &_publisher) |
Set the publisher of this message. More... | |
size_t | Unpack (const char *_buffer) |
Unserialize a stream of bytes into an AdvertiseMessage. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const AdvertiseMessage &_msg) |
Stream insertion operator. More... | |
Advertise packet used in the discovery protocol to broadcast information about the node advertising a topic.
The information sent contains the name of the protobuf message type advertised. This message is used for advertising messages and services. 'T' is the Publisher type used inside this AdvertiseMessage object.
|
default |
Constructor.
|
inline |
Constructor.
[in] | _header | Message header. |
[in] | _publisher | Contains the topic name, UUIDs, addresses. |
|
inline |
|
inline |
Get the total length of the message.
|
inline |
Serialize the advertise message.
[out] | _buffer | Buffer where the message will be serialized. |
|
inline |
|
inline |
|
inline |
|
inline |
Unserialize a stream of bytes into an AdvertiseMessage.
[out] | _buffer | Unpack the body from the buffer. |
|
friend |
Stream insertion operator.
[out] | _out | The output stream. |
[in] | _msg | AdvertiseMsg to write to the stream. |