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"
39 class IntrospectionManagerPrivate;
51 public: std::string Id()
const;
58 public:
template<
typename T>
60 const std::function<T()> &_cb)
67 return this->Register(_item, func);
74 public:
bool Unregister(
const std::string &_item);
81 public: std::set<std::string> Items()
const;
90 public:
void Update();
95 public:
void NotifyUpdates();
108 private:
bool Register(
const std::string &_item,
109 const std::function <gazebo::msgs::Any()> &_cb);
120 private:
bool NewFilter(
const std::set<std::string> &_newItems,
121 std::string &_filterId);
127 private:
bool UpdateFilter(
const std::string &_filterId,
128 const std::set<std::string> &_newItems);
133 private:
bool RemoveFilter(
const std::string &_filterId);
144 gazebo::msgs::GzString &_rep,
157 gazebo::msgs::Empty &_rep,
168 gazebo::msgs::Empty &_rep,
178 private:
void Items(
const gazebo::msgs::Empty &_req,
186 private: std::string CreateRandomId(
const unsigned int &_size)
const;
194 private:
bool ValidateParameter(
const gazebo::msgs::Param &_msg,
195 const std::set<std::string> &_allowedValues)
const;
202 private: std::unique_ptr<IntrospectionManagerPrivate> dataPtr;
std::vector< common::Param * > Param_V
Definition: CommonTypes.hh:97
addtogroup gazebo_util
Definition: IntrospectionManager.hh:46
bool Register(const std::string &_item, const std::function< T()> &_cb)
Register a new item in the introspection manager.
Definition: IntrospectionManager.hh:59
Singleton template class.
Definition: SingletonT.hh:33
GAZEBO_VISIBLE msgs::Any ConvertAny(const double _v)
Convert a double to a msgs::Any.