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 NewFilterImpl(
const std::set<std::string> &_newItems,
121 std::string &_filterId);
127 private:
bool UpdateFilterImpl(
const std::string &_filterId,
128 const std::set<std::string> &_newItems);
133 private:
bool RemoveFilterImpl(
const std::string &_filterId);
144 gazebo::msgs::GzString &_rep);
156 gazebo::msgs::Empty &_rep);
166 gazebo::msgs::Empty &_rep);
175 private:
bool Items(
const gazebo::msgs::Empty &_req,
182 private: std::string CreateRandomId(
const unsigned int &_size)
const;
190 private:
bool ValidateParameter(
const gazebo::msgs::Param &_msg,
191 const std::set<std::string> &_allowedValues)
const;
198 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: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.