Packet.hh
Go to the documentation of this file.
T at(T... args)
Advertise packet used in the discovery protocol to broadcast information about the node advertising a...
Definition Packet.hh:231
size_t MsgLength() const
Get the total length of the message.
Definition Packet.hh:279
void SetHeader(const transport::Header &_header)
Set the header of the message.
Definition Packet.hh:264
transport::Header Header() const
Get the message header.
Definition Packet.hh:248
friend std::ostream & operator<<(std::ostream &_out, const AdvertiseMessage &_msg)
Stream insertion operator.
Definition Packet.hh:318
T & Publisher()
Get the publisher of this message.
Definition Packet.hh:256
AdvertiseMessage(const Header &_header, const T &_publisher)
Constructor.
Definition Packet.hh:238
size_t Pack(char *_buffer) const
Serialize the advertise message.
Definition Packet.hh:287
size_t Unpack(const char *_buffer)
Unserialize a stream of bytes into an AdvertiseMessage.
Definition Packet.hh:306
void SetPublisher(const T &_publisher)
Set the publisher of this message.
Definition Packet.hh:272
Header included in each discovery message containing the version of the discovery protocol,...
Definition Packet.hh:55
friend std::ostream & operator<<(std::ostream &_out, const Header &_header)
Stream insertion operator.
Definition Packet.hh:130
Header(const uint16_t _version, const std::string &_pUuid, const uint8_t _type, const uint16_t _flags=0)
Constructor.
void SetVersion(const uint16_t _version)
Set the discovery protocol version.
size_t Pack(char *_buffer) const
Serialize the header. The caller has ownership of the buffer and is responsible for its [de]allocatio...
Subscription packet used in the discovery protocol for requesting information about a given topic.
Definition Packet.hh:159
size_t MsgLength() const
Get the total length of the message.
friend std::ostream & operator<<(std::ostream &_out, const SubscriptionMsg &_msg)
Stream insertion operator.
Definition Packet.hh:196
void SetHeader(const transport::Header &_header)
Set the header of the message.
void SetTopic(const std::string &_topic)
Set the topic.
size_t Pack(char *_buffer) const
Serialize the subscription message.
SubscriptionMsg(const transport::Header &_header, const std::string &_topic)
Constructor.
size_t Unpack(const char *_buffer)
Unserialize a stream of bytes into a Sub.
T endl(T... args)
static const std::vector< std::string > MsgTypesStr
Used for debugging the message type received/send.
Definition Packet.hh:44
Definition AdvertiseOptions.hh:28