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. |
References Header().
◆ Header()
◆ MsgLength()
template<class T>
size_t MsgLength |
( |
| ) |
const |
|
inline |
Get the total length of the message.
- Returns
- Return the length of the message in bytes.
Referenced by Pack().
◆ Pack()
template<class T>
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.
References MsgLength().
◆ Publisher()
◆ SetHeader()
Set the header of the message.
- Parameters
-
[in] | _header | Message header. |
- See also
- Header.
◆ SetPublisher()
template<class T>
void SetPublisher |
( |
const T & | _publisher | ) |
|
|
inline |
Set the publisher of this message.
- Parameters
-
[in] | _publisher | New publisher. |
- See also
- Publisher.
◆ Unpack()
template<class T>
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.
The documentation for this class was generated from the following file: