ignition/transport/Publisher.hh
More...
#include <Publisher.hh>
ignition/transport/Publisher.hh
This class stores all the information about a publisher. It stores the topic name that publishes, addresses, UUIDs, scope, etc.
◆ Publisher() [1/2]
ignition::transport::Publisher::Publisher |
( |
| ) |
|
|
default |
◆ Publisher() [2/2]
ignition::transport::Publisher::Publisher |
( |
const std::string & |
_topic, |
|
|
const std::string & |
_addr, |
|
|
const std::string & |
_pUuid, |
|
|
const std::string & |
_nUuid, |
|
|
const Scope_t & |
_scope |
|
) |
| |
Constructor.
- Parameters
-
[in] | _topic | Topic name. |
[in] | _addr | ZeroMQ address. |
[in] | _pUuid | Process UUID. |
[in] | _nUUID | node UUID. |
[in] | _scope | Scope. |
◆ ~Publisher()
virtual ignition::transport::Publisher::~Publisher |
( |
| ) |
|
|
virtualdefault |
◆ Addr()
std::string ignition::transport::Publisher::Addr |
( |
| ) |
const |
Get the ZeroMQ address of the publisher.
- Returns
- ZeroMQ address.
- See also
- SetAddr.
◆ MsgLength()
size_t ignition::transport::Publisher::MsgLength |
( |
| ) |
const |
Get the total length of the message.
- Returns
- Return the length of the message in bytes.
◆ NUuid()
std::string ignition::transport::Publisher::NUuid |
( |
| ) |
const |
Get the node UUID of the publisher.
- Returns
- Node UUID.
- See also
- SetNUuid.
◆ operator!=()
bool ignition::transport::Publisher::operator!= |
( |
const Publisher & |
_srv | ) |
const |
Inequality operator.
This function checks if the given publisher does not have identical Topic, Addr, PUuid, NUuid, and Scope strings to this object.
- Parameters
-
[in] | _pub | The publisher to compare against. |
- Returns
- True if this object does not match the provided object.
◆ operator==()
bool ignition::transport::Publisher::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.
- Parameters
-
[in] | _pub | The publisher to compare against. |
- Returns
- True if this object matches the provided object.
◆ Pack()
size_t ignition::transport::Publisher::Pack |
( |
char * |
_buffer | ) |
const |
Serialize the publisher.
The caller has ownership of the buffer and is responsible for its [de]allocation.
- Parameters
-
[out] | _buffer | Destination buffer in which the publisher will be serialized. |
- Returns
- Number of bytes serialized.
◆ PUuid()
std::string ignition::transport::Publisher::PUuid |
( |
| ) |
const |
Get the process UUID of the publisher.
return Process UUID.
- See also
- SetPUuid.
◆ Scope()
Scope_t ignition::transport::Publisher::Scope |
( |
| ) |
const |
Get the scope of the publisher's topic.
- Returns
- Scope of the topic advertised by the publisher.
- See also
- SetScope.
◆ SetAddr()
void ignition::transport::Publisher::SetAddr |
( |
const std::string & |
_addr | ) |
|
Set ZeroMQ address of the publisher.
- Parameters
-
- See also
- Addr.
◆ SetNUuid()
void ignition::transport::Publisher::SetNUuid |
( |
const std::string & |
_nUuid | ) |
|
Set the node UUID of the publisher.
- Parameters
-
- See also
- NUuid.
◆ SetPUuid()
void ignition::transport::Publisher::SetPUuid |
( |
const std::string & |
_pUuid | ) |
|
Set the process UUID of the publisher.
- Parameters
-
[in] | _pUuid | New process UUID. |
- See also
- PUuid.
◆ SetScope()
void ignition::transport::Publisher::SetScope |
( |
const Scope_t & |
_scope | ) |
|
Set the scope of the topic advertised by this publisher.
- Parameters
-
- See also
- Scope.
◆ SetTopic()
void ignition::transport::Publisher::SetTopic |
( |
const std::string & |
_topic | ) |
|
Set the topic name published by this publisher.
- Parameters
-
[in] | _topic | New topic name. |
- See also
- Topic.
◆ Topic()
std::string ignition::transport::Publisher::Topic |
( |
| ) |
const |
Get the topic published by this publisher.
- Returns
- Topic name.
- See also
- SetTopic.
◆ Unpack()
size_t ignition::transport::Publisher::Unpack |
( |
char * |
_buffer | ) |
|
Unserialize the publisher.
- Parameters
-
[in] | _buffer | Input buffer with the data to be unserialized. |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const Publisher & |
_msg |
|
) |
| |
|
friend |
Stream insertion operator.
- Parameters
-
[out] | _out | The output stream. |
[in] | _msg | Publisher to write to the stream. |
◆ addr
std::string ignition::transport::Publisher::addr |
|
protected |
ZeroMQ address of the publisher.
◆ nUuid
std::string ignition::transport::Publisher::nUuid |
|
protected |
Node UUID of the publisher.
◆ pUuid
std::string ignition::transport::Publisher::pUuid |
|
protected |
Process UUID of the publisher.
◆ scope
Scope of the topic advertised by this publisher.
◆ topic
std::string ignition::transport::Publisher::topic |
|
protected |
The documentation for this class was generated from the following file: