51 #include <ros/node_handle.h>
64 template <
class ConfigType>
84 typedef std::function<void(ConfigType &, uint32_t level)>
CallbackType;
88 boost::recursive_mutex::scoped_lock lock(
mutex_);
96 boost::recursive_mutex::scoped_lock lock(
mutex_);
104 ROS_WARN(
"updateConfig() called on a dynamic_reconfigure::Server that provides its own mutex. This can lead to deadlocks if updateConfig() is called during an update. Providing a mutex to the constructor is highly recommended in this case. Please forward this message to the node author.");
163 boost::recursive_mutex::scoped_lock lock(
mutex_);
167 max_.__toMessage__(description_message.
max, ConfigType::__getParamDescriptions__(),ConfigType::__getGroupDescriptions__());
168 min_.__toMessage__(description_message.
min,ConfigType::__getParamDescriptions__(),ConfigType::__getGroupDescriptions__());
169 default_.__toMessage__(description_message.
dflt,ConfigType::__getParamDescriptions__(),ConfigType::__getGroupDescriptions__());
178 min_ = ConfigType::__getMin__();
179 max_ = ConfigType::__getMax__();
180 default_ = ConfigType::__getDefault__();
182 boost::recursive_mutex::scoped_lock lock(
mutex_);
190 ConfigType init_config = ConfigType::__getDefault__();
192 init_config.__clamp__();
202 catch (std::exception &e)
204 ROS_WARN(
"Reconfigure callback failed with exception %s: ", e.what());
208 ROS_WARN(
"Reconfigure callback failed with unprintable exception.");
211 ROS_DEBUG(
"setCallback did not call callback because it was zero.");
217 boost::recursive_mutex::scoped_lock lock(
mutex_);
219 ConfigType new_config =
config_;
220 new_config.__fromMessage__(req.
config);
221 new_config.__clamp__();
222 uint32_t level =
config_.__level__(new_config);
227 new_config.__toMessage__(rsp.
config);
233 boost::recursive_mutex::scoped_lock lock(
mutex_);