addtogroup gazebo_util
More...
#include <util/util.hh>
Inherits SingletonT< IntrospectionManager >.
|
void | Clear () |
| Unregister all items.
|
|
std::string | Id () const |
| Get the unique ID of this manager.
|
|
std::set< std::string > | Items () const |
| Get a copy of the items already registered in this manager.
|
|
void | NotifyUpdates () |
| If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update".
|
|
template<typename T > |
bool | Register (const std::string &_item, const std::function< T()> &_cb) |
| Register a new item in the introspection manager.
|
|
bool | Unregister (const std::string &_item) |
| Unregister an existing item from the introspection manager.
|
|
void | Update () |
| Update all the items under observation and publish updates through all the topics.
|
|
◆ Clear()
◆ Id()
Get the unique ID of this manager.
- Returns
- Manager ID.
◆ Instance()
Get an instance of the singleton.
◆ Items()
std::set< std::string > Items |
( |
| ) |
const |
Get a copy of the items already registered in this manager.
- Returns
- Set of registered items.
◆ NotifyUpdates()
If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update".
◆ Register()
template<typename T >
bool Register |
( |
const std::string & | _item, |
|
|
const std::function< T()> & | _cb ) |
|
inline |
Register a new item in the introspection manager.
- Parameters
-
[in] | _item | New item. E.g.: /default/world/model1/pose |
[in] | _cb | Callback used to get the last update for this item. |
- Returns
- True when the registration succeed or false otherwise (item already existing).
◆ Unregister()
bool Unregister |
( |
const std::string & | _item | ) |
|
Unregister an existing item from the introspection manager.
- Parameters
-
- Returns
- True if the unregistration succeed or false otherwise (the item was not previously registered).
◆ Update()
Update all the items under observation and publish updates through all the topics.
The message received in the update will contain the name and latest values of all the items specified in the filter. If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update".
The documentation for this class was generated from the following file: