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.
- Deprecated:
- This class is deprecated. Discovery uses the ignition::msgs::Discovery message.
◆ 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 |
Get the total length of the message.
- Returns
- Return the length of the message in bytes.
◆ 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.
◆ Publisher()
◆ SetFromDiscovery()
void SetFromDiscovery |
( |
const msgs::Discovery & |
_msg | ) |
|
|
inline |
Set from discovery message.
- Parameters
-
◆ 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 |
Unserialize a stream of bytes into an AdvertiseMessage.
- Parameters
-
[out] | _buffer | Unpack the body from the buffer. |
- Returns
- The number of bytes from the body.
◆ 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: