This class stores all the information about a service publisher. More...
#include <Publisher.hh>
Public Member Functions | |
ServicePublisher ()=default | |
Default constructor. More... | |
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. More... | |
virtual | ~ServicePublisher ()=default |
Destructor. More... | |
virtual void | FillDiscovery (msgs::Discovery &_msg) const final |
Populate a discovery message. More... | |
bool | operator!= (const ServicePublisher &_srv) const |
Inequality operator. This function checks if the given service does not have identical Topic, Addr, PUuid, NUuid, Scope, SocketId, ReqTypeName, RepTypeName strings to this object. More... | |
bool | operator== (const ServicePublisher &_srv) const |
Equality operator. This function checks if the given service has identical Topic, Addr, PUuid, NUuid, Scope, SocketId, ReqTypeName, RepTypeName strings to this object. More... | |
virtual const AdvertiseServiceOptions & | Options () const |
Get the advertised options. More... | |
std::string | RepTypeName () const |
Get the name of the response's protobuf message advertised. More... | |
std::string | ReqTypeName () const |
Get the name of the request's protobuf message advertised. More... | |
virtual void | SetFromDiscovery (const msgs::Discovery &_msg) |
Populate a discovery message. More... | |
void | SetOptions (const AdvertiseServiceOptions &_opts) |
Set the advertised options. More... | |
void | SetRepTypeName (const std::string &_repTypeName) |
Set the name of the response's protobuf message advertised. More... | |
void | SetReqTypeName (const std::string &_reqTypeName) |
Set the name of the request's protobuf message advertised. More... | |
void | SetSocketId (const std::string &_socketId) |
Set the ZeroMQ socket ID for this publisher. More... | |
std::string | SocketId () const |
Get the ZeroMQ socket ID used by this publisher. More... | |
Public Member Functions inherited from Publisher | |
Publisher ()=default | |
Default constructor. More... | |
Publisher (const std::string &_topic, const std::string &_addr, const std::string &_pUuid, const std::string &_nUuid, const AdvertiseOptions &_opts) | |
Constructor. More... | |
virtual | ~Publisher ()=default |
Destructor. More... | |
std::string | Addr () const |
Get the ZeroMQ address of the publisher. More... | |
std::string | NUuid () const |
Get the node UUID of the publisher. More... | |
bool | operator!= (const Publisher &_pub) const |
Inequality operator. This function checks if the given publisher does not have identical Topic, Addr, PUuid, NUuid, and Scope strings to this object. More... | |
bool | operator== (const Publisher &_pub) const |
Equality operator. This function checks if the given publisher has identical Topic, Addr, PUuid, NUuid, and Scope strings to this object. More... | |
std::string | PUuid () const |
Get the process UUID of the publisher. return Process UUID. More... | |
void | SetAddr (const std::string &_addr) |
Set ZeroMQ address of the publisher. More... | |
void | SetNUuid (const std::string &_nUuid) |
Set the node UUID of the publisher. More... | |
void | SetOptions (const AdvertiseOptions &_opts) |
Set the advertised options. More... | |
void | SetPUuid (const std::string &_pUuid) |
Set the process UUID of the publisher. More... | |
void | SetTopic (const std::string &_topic) |
Set the topic name published by this publisher. More... | |
std::string | Topic () const |
Get the topic published by this publisher. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Publisher | |
std::string | addr |
ZeroMQ address of the publisher. More... | |
std::string | nUuid |
Node UUID of the publisher. More... | |
std::string | pUuid |
Process UUID of the publisher. More... | |
std::string | topic |
Topic name. More... | |
Detailed Description
This class stores all the information about a service publisher.
Constructor & Destructor Documentation
◆ ServicePublisher() [1/2]
|
default |
Default constructor.
◆ ServicePublisher() [2/2]
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.
- Parameters
-
[in] _topic Topic name. [in] _addr ZeroMQ address. [in] _id ZeroMQ socket ID. [in] _pUuid Process UUID. [in] _nUuid node UUID. [in] _reqType Message type used in the service request. [in] _repType Message type used in the service response. [in] _opts Advertise options.
◆ ~ServicePublisher()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ FillDiscovery()
|
finalvirtual |
◆ operator!=()
bool operator!= | ( | const ServicePublisher & | _srv | ) | const |
Inequality operator. This function checks if the given service does not have identical Topic, Addr, PUuid, NUuid, Scope, SocketId, ReqTypeName, RepTypeName strings to this object.
- Parameters
-
[in] _srv The service publisher to compare against.
- Returns
- True if this object does not match the provided object.
◆ operator==()
bool operator== | ( | const ServicePublisher & | _srv | ) | const |
Equality operator. This function checks if the given service has identical Topic, Addr, PUuid, NUuid, Scope, SocketId, ReqTypeName, RepTypeName strings to this object.
- Parameters
-
[in] _srv The service publisher to compare against.
- Returns
- True if this object matches the provided object.
◆ Options()
|
virtual |
Get the advertised options.
- Returns
- The advertised options.
- See also
- SetOptions.
Reimplemented from Publisher.
◆ RepTypeName()
std::string RepTypeName | ( | ) | const |
Get the name of the response's protobuf message advertised.
- Returns
- The protobuf message type.
- See also
- SetRepTypeName.
◆ ReqTypeName()
std::string ReqTypeName | ( | ) | const |
Get the name of the request's protobuf message advertised.
- Returns
- The protobuf message type.
- See also
- SetReqTypeName.
◆ SetFromDiscovery()
|
virtual |
◆ SetOptions()
void SetOptions | ( | const AdvertiseServiceOptions & | _opts | ) |
◆ SetRepTypeName()
void SetRepTypeName | ( | const std::string & | _repTypeName | ) |
Set the name of the response's protobuf message advertised.
- Parameters
-
[in] _repTypeName The protobuf message type.
- See also
- RepTypeName.
◆ SetReqTypeName()
void SetReqTypeName | ( | const std::string & | _reqTypeName | ) |
Set the name of the request's protobuf message advertised.
- Parameters
-
[in] _reqTypeName The protobuf message type.
- See also
- ReqTypeName.
◆ SetSocketId()
void SetSocketId | ( | const std::string & | _socketId | ) |
Set the ZeroMQ socket ID for this publisher.
- Parameters
-
[in] _socketId New socket ID.
- See also
- SocketId.
◆ SocketId()
std::string SocketId | ( | ) | const |
The documentation for this class was generated from the following file: