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.
More...
#include <ignition/transport/Packet.hh>
template<class T>
class ignition::transport::AdvertiseMessage< T >
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.
◆ AdvertiseMessage() [1/2]
◆ AdvertiseMessage() [2/2]
Constructor.
- Parameters
-
[in] | _header | Message header. |
[in] | _publisher | Contains the topic name, UUIDs, addresses. |
◆ Header()
Get the message header.
- Returns
- Reference to the message header.
- See also
- SetHeader.
◆ MsgLength()
size_t MsgLength |
( |
| ) |
const |
|
inline |
◆ Pack()
size_t Pack |
( |
char * |
_buffer | ) |
const |
|
inline |
Serialize the advertise message.
- Parameters
-
[out] | _buffer | Buffer where the message will be serialized. |
- Returns
- The length of the serialized message in bytes.
Referenced by Discovery< Pub >::WaitForInit().
◆ Publisher()
◆ SetHeader()
Set the header of the message.
- Parameters
-
[in] | _header | Message header. |
- See also
- Header.
◆ SetPublisher()
void SetPublisher |
( |
const T & |
_publisher | ) |
|
|
inline |
Set the publisher of this message.
- Parameters
-
[in] | _publisher | New publisher. |
- See also
- Publisher.
◆ Unpack()
size_t Unpack |
( |
const char * |
_buffer | ) |
|
|
inline |
◆ operator<<
Stream insertion operator.
- Parameters
-
[out] | _out | The output stream. |
[in] | _msg | AdvertiseMsg to write to the stream. |
The documentation for this class was generated from the following file: