Store address information about topics and provide convenient methods for adding new topics, removing them, etc.
More...
#include <ignition/transport/TopicStorage.hh>
|
| TopicStorage ()=default |
| Constructor. More...
|
|
virtual | ~TopicStorage ()=default |
| Destructor. More...
|
|
bool | AddPublisher (const T &_publisher) |
| Add a new address associated to a given topic and node UUID. More...
|
|
bool | DelPublisherByNode (const std::string &_topic, const std::string &_pUuid, const std::string &_nUuid) |
| Remove a publisher associated to a given topic and UUID pair. More...
|
|
bool | DelPublishersByProc (const std::string &_pUuid) |
| Remove all the publishers associated to a given process. More...
|
|
bool | HasAnyPublishers (const std::string &_topic, const std::string &_pUuid) const |
| Return if there is any publisher stored for the given topic and process UUID. More...
|
|
bool | HasPublisher (const std::string &_addr) const |
| Return if the requested publisher's address is stored. More...
|
|
bool | HasTopic (const std::string &_topic) const |
| Return if there is any publisher stored for the given topic. More...
|
|
void | Print () const |
| Print all the information for debugging purposes. More...
|
|
bool | Publisher (const std::string &_topic, const std::string &_pUuid, const std::string &_nUuid, T &_publisher) const |
| Get the address information for a given topic and node UUID. More...
|
|
bool | Publishers (const std::string &_topic, std::map< std::string, std::vector< T >> &_info) const |
| Get the map of publishers stored for a given topic. More...
|
|
void | PublishersByProc (const std::string &_pUuid, std::map< std::string, std::vector< T >> &_pubs) const |
| Given a process UUID, the function returns the list of publishers contained in this process UUID with its address information. More...
|
|
void | TopicList (std::vector< std::string > &_topics) const |
| Get the list of topics currently stored. More...
|
|
template<typename T>
class ignition::transport::TopicStorage< T >
Store address information about topics and provide convenient methods for adding new topics, removing them, etc.
◆ TopicStorage()
◆ ~TopicStorage()
◆ AddPublisher()
Add a new address associated to a given topic and node UUID.
- Parameters
-
[in] | _publisher | New publisher. |
- Returns
- true if the new entry is added or false if not (because it was already stored).
◆ DelPublisherByNode()
Remove a publisher associated to a given topic and UUID pair.
- Parameters
-
[in] | _topic | Topic name |
[in] | _pUuid | Process UUID of the publisher. |
[in] | _nUuid | Node UUID of the publisher. |
- Returns
- True when the publisher was removed or false otherwise.
◆ DelPublishersByProc()
Remove all the publishers associated to a given process.
- Parameters
-
[in] | _pUuid | Process' UUID of the publisher. |
- Returns
- True when at least one address was removed or false otherwise.
◆ HasAnyPublishers()
Return if there is any publisher stored for the given topic and process UUID.
- Parameters
-
[in] | _topic | Topic name. |
[in] | _pUuid | Process UUID of the publisher. |
- Returns
- True if there is at least one address stored for the topic and process UUID.
◆ HasPublisher()
Return if the requested publisher's address is stored.
- Parameters
-
- Returns
- true if the publisher's address is stored.
◆ HasTopic()
Return if there is any publisher stored for the given topic.
- Parameters
-
- Returns
- True if there is at least one entry stored for the topic.
◆ Print()
Print all the information for debugging purposes.
◆ Publisher()
Get the address information for a given topic and node UUID.
- Parameters
-
[in] | _topic | Topic name. |
[in] | _pUuid | Process UUID of the publisher. |
[in] | _nUuid | Node UUID of the publisher. |
[out] | _publisher | Publisher's information requested. |
- Returns
- true if a publisher is found for the given topic and UUID pair
◆ Publishers()
Get the map of publishers stored for a given topic.
- Parameters
-
[in] | _topic | Topic name. |
[out] | _info | Map of publishers requested. |
- Returns
- true if at least there is one publisher stored.
◆ PublishersByProc()
Given a process UUID, the function returns the list of publishers contained in this process UUID with its address information.
- Parameters
-
_pUuid | Process UUID. |
_pubs | Map of publishers where the keys are the node UUIDs and the value is its address information. |
◆ TopicList()
Get the list of topics currently stored.
- Parameters
-
[out] | _topics | List of stored topics. |
The documentation for this class was generated from the following file: