Header included in each discovery message containing the version of the discovery protocol, the process UUID of the sender node, the type.
More...
#include <ignition/transport/Packet.hh>
Header included in each discovery message containing the version of the discovery protocol, the process UUID of the sender node, the type.
§ Header() [1/2]
ignition::transport::Header::Header |
( |
| ) |
|
|
default |
§ Header() [2/2]
ignition::transport::Header::Header |
( |
const uint16_t |
_version, |
|
|
const std::string & |
_pUuid, |
|
|
const uint8_t |
_type, |
|
|
const uint16_t |
_flags = 0 |
|
) |
| |
Constructor.
- Parameters
-
[in] | _version | Version of the discovery protocol. |
[in] | _pUuid | Every process has a unique UUID. |
[in] | _type | Message type (ADVERTISE, SUBSCRIPTION, ...) |
[in] | _flags | Optional flags included in the header. |
§ ~Header()
virtual ignition::transport::Header::~Header |
( |
| ) |
|
|
virtualdefault |
§ Flags()
uint16_t ignition::transport::Header::Flags |
( |
| ) |
const |
Get the message flags.
- Returns
- Message flags used for compression or other optional features.
- See also
- SetFlags.
§ HeaderLength()
int ignition::transport::Header::HeaderLength |
( |
| ) |
const |
§ Pack()
size_t ignition::transport::Header::Pack |
( |
char * |
_buffer | ) |
const |
Serialize the header.
The caller has ownership of the buffer and is responsible for its [de]allocation.
- Parameters
-
[out] | _buffer | Destination buffer in which the header will be serialized. |
- Returns
- Number of bytes serialized.
§ PUuid()
std::string ignition::transport::Header::PUuid |
( |
| ) |
const |
§ SetFlags()
void ignition::transport::Header::SetFlags |
( |
const uint16_t |
_flags | ) |
|
Set the message flags.
- Parameters
-
[in] | _flags | Used for enable optional features. |
- See also
- Flags.
§ SetPUuid()
void ignition::transport::Header::SetPUuid |
( |
const std::string & |
_pUuid | ) |
|
Set the process uuid.
- Parameters
-
[in] | _pUuid | A unique global identifier for every process. |
- See also
- PUuid.
§ SetType()
void ignition::transport::Header::SetType |
( |
const uint8_t |
_type | ) |
|
Set the message type.
- Parameters
-
[in] | _type | Message type (ADVERTISE, SUBSCRIPTION, ...). |
- See also
- Type.
§ SetVersion()
void ignition::transport::Header::SetVersion |
( |
const uint16_t |
_version | ) |
|
Set the discovery protocol version.
- Parameters
-
- See also
- Version.
§ Type()
uint8_t ignition::transport::Header::Type |
( |
| ) |
const |
§ Unpack()
size_t ignition::transport::Header::Unpack |
( |
const char * |
_buffer | ) |
|
§ Version()
uint16_t ignition::transport::Header::Version |
( |
| ) |
const |
§ operator<<
std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const Header & |
_header |
|
) |
| |
|
friend |
Stream insertion operator.
- Parameters
-
[out] | _out | The output stream. |
[in] | _msg | Header to write to the stream. |
The documentation for this class was generated from the following file: