Publisher.hh
friend std::ostream & operator<<(std::ostream &_out, const Publisher &_msg)
Stream insertion operator.
Definition: Publisher.hh:148
bool operator!=(const MessagePublisher &_pub) const
Inequality operator. This function checks if the given message publisher does not have identical Topi...
bool operator==(const MessagePublisher &_pub) const
Equality operator. This function checks if the given message publisher has identical Topic,...
size_t PackInternal(char *_buffer) const
Serialize all fields except the advertise options. This is useful when we are serializing a derived c...
virtual const AdvertiseOptions & Options() const
Get the advertised options.
virtual size_t Pack(char *_buffer) const
Serialize the publisher. The caller has ownership of the buffer and is responsible for its [de]alloca...
Definition: AdvertiseOptions.hh:28
STL class.
std::string ReqTypeName() const
Get the name of the request's protobuf message advertised.
void SetReqTypeName(const std::string &_reqTypeName)
Set the name of the request's protobuf message advertised.
This class stores all the information about a publisher. It stores the topic name that publishes,...
Definition: Publisher.hh:38
virtual const AdvertiseServiceOptions & Options() const
Get the advertised options.
virtual ~ServicePublisher()=default
Destructor.
std::string addr
ZeroMQ address of the publisher.
Definition: Publisher.hh:182
std::string PUuid() const
Get the process UUID of the publisher. return Process UUID.
size_t Unpack(const char *_buffer)
Unserialize the publisher.
MessagePublisher(const MessagePublisher &_other)
Copy constructor.
virtual size_t Pack(char *_buffer) const
Serialize the publisher. The caller has ownership of the buffer and is responsible for its [de]alloca...
virtual ~MessagePublisher()=default
Destructor.
size_t MsgLengthInternal() const
Get the total length of the message without counting the advertised options. This is useful when [un]...
bool operator==(const Publisher &_pub) const
Equality operator. This function checks if the given publisher has identical Topic,...
void SetNUuid(const std::string &_nUuid)
Set the node UUID of the publisher.
void SetCtrl(const std::string &_ctrl)
Set the ZeroMQ control address of the publisher.
This class stores all the information about a message publisher.
Definition: Publisher.hh:199
A class for customizing the publication options for a topic or service advertised....
Definition: AdvertiseOptions.hh:55
std::string Topic() const
Get the topic published by this publisher.
std::string Addr() const
Get the ZeroMQ address of the publisher.
std::string SocketId() const
Get the ZeroMQ socket ID used by this publisher.
friend std::ostream & operator<<(std::ostream &_out, const ServicePublisher &_msg)
Stream insertion operator.
Definition: Publisher.hh:396
bool operator!=(const ServicePublisher &_srv) const
Inequality operator. This function checks if the given service does not have identical Topic,...
A class for customizing the publication options for a topic advertised. E.g.: Set the rate of message...
Definition: AdvertiseOptions.hh:138
void SetMsgTypeName(const std::string &_msgTypeName)
Set the message type advertised by this publisher.
bool operator==(const ServicePublisher &_srv) const
Equality operator. This function checks if the given service has identical Topic, Addr,...
size_t MsgLength() const
Get the total length of the message.
std::string pUuid
Process UUID of the publisher.
Definition: Publisher.hh:185
Publisher(const std::string &_topic, const std::string &_addr, const std::string &_pUuid, const std::string &_nUuid, const AdvertiseOptions &_opts)
Constructor.
STL class.
Publisher & operator=(const Publisher &_other)
Assignment operator.
std::string nUuid
Node UUID of the publisher.
Definition: Publisher.hh:188
void SetOptions(const AdvertiseServiceOptions &_opts)
Set the advertised options.
bool operator!=(const Publisher &_pub) const
Inequality operator. This function checks if the given publisher does not have identical Topic,...
void SetOptions(const AdvertiseOptions &_opts)
Set the advertised options.
std::string MsgTypeName() const
Get the message type advertised by this publisher.
size_t Pack(char *_buffer) const
Serialize the publisher. The caller has ownership of the buffer and is responsible for its [de]alloca...
MessagePublisher & operator=(const MessagePublisher &_other)
Assignment operator.
virtual size_t MsgLength() const
Get the total length of the message.
virtual const AdvertiseMessageOptions & Options() const
Get the advertised options.
void SetSocketId(const std::string &_socketId)
Set the ZeroMQ socket ID for this publisher.
ServicePublisher(const ServicePublisher &_other)
Copy constructor.
ServicePublisher()=default
Default constructor.
void SetOptions(const AdvertiseMessageOptions &_opts)
Set the advertised options.
virtual size_t Unpack(const char *_buffer)
Unserialize the publisher.
void SetTopic(const std::string &_topic)
Set the topic name published by this publisher.
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void(*) const AdvertiseServiceOptions ReplyT const std::string _topic)
Definition: Node.hh:558
void SetRepTypeName(const std::string &_repTypeName)
Set the name of the response's protobuf message advertised.
T endl(T... args)
void SetAddr(const std::string &_addr)
Set ZeroMQ address of the publisher.
size_t UnpackInternal(const char *_buffer)
Unserialize all fields except the advertise options. This is useful when we are unserializing a deriv...
This class stores all the information about a service publisher.
Definition: Publisher.hh:315
MessagePublisher(const std::string &_topic, const std::string &_addr, const std::string &_ctrl, const std::string &_pUuid, const std::string &_nUuid, const std::string &_msgTypeName, const AdvertiseMessageOptions &_opts)
Constructor.
MessagePublisher()=default
Default constructor.
A class for customizing the publication options for a service advertised.
Definition: AdvertiseOptions.hh:226
virtual size_t Unpack(const char *_buffer)
Unserialize the publisher.
virtual size_t MsgLength() const
Get the total length of the message.
std::string Ctrl() const
Get the ZeroMQ control address. This address is used by the subscribers to notify the publisher about...
std::string RepTypeName() const
Get the name of the response's protobuf message advertised.
friend std::ostream & operator<<(std::ostream &_out, const MessagePublisher &_msg)
Stream insertion operator.
Definition: Publisher.hh:268
ServicePublisher(const std::string &_topic, const std::string &_addr, const std::string &_id, const std::string &_pUuid, const std::string &_nUuid, const std::string &_reqType, const std::string &_repType, const AdvertiseServiceOptions &_opts)
Constructor.
void SetPUuid(const std::string &_pUuid)
Set the process UUID of the publisher.