17 #ifndef GAZEBO_UTIL_INTROSPECTION_MANAGER_HH_ 18 #define GAZEBO_UTIL_INTROSPECTION_MANAGER_HH_ 26 #include "gazebo/msgs/any.pb.h" 27 #include "gazebo/msgs/empty.pb.h" 28 #include "gazebo/msgs/gz_string.pb.h" 30 #include "gazebo/msgs/param.pb.h" 31 #include "gazebo/msgs/param_v.pb.h" 42 class IntrospectionManagerPrivate;
54 public: std::string Id()
const;
61 public:
template<
typename T>
63 const std::function<T()> &_cb)
70 return this->Register(_item, func);
77 public:
bool Unregister(
const std::string &_item);
84 public: std::set<std::string> Items()
const;
93 public:
void Update();
98 public:
void NotifyUpdates();
111 private:
bool Register(
const std::string &_item,
112 const std::function <gazebo::msgs::Any()> &_cb);
123 private:
bool NewFilterImpl(
const std::set<std::string> &_newItems,
124 std::string &_filterId);
130 private:
bool UpdateFilterImpl(
const std::string &_filterId,
131 const std::set<std::string> &_newItems);
136 private:
bool RemoveFilterImpl(
const std::string &_filterId);
147 gazebo::msgs::GzString &_rep);
159 gazebo::msgs::Empty &_rep);
169 gazebo::msgs::Empty &_rep);
178 private:
bool Items(
const gazebo::msgs::Empty &_req,
185 private: std::string CreateRandomId(
const unsigned int &_size)
const;
193 private:
bool ValidateParameter(
const gazebo::msgs::Param &_msg,
194 const std::set<std::string> &_allowedValues)
const;
201 private: std::unique_ptr<IntrospectionManagerPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
std::vector< common::Param * > Param_V
Definition: CommonTypes.hh:97
addtogroup gazebo_util
Definition: IntrospectionManager.hh:49
bool Register(const std::string &_item, const std::function< T()> &_cb)
Register a new item in the introspection manager.
Definition: IntrospectionManager.hh:62
Singleton template class.
Definition: SingletonT.hh:33
util
Definition: IntrospectionManager.hh:35
GAZEBO_VISIBLE msgs::Any ConvertAny(const double _v)
Convert a double to a msgs::Any.
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition: SingletonT.hh:61