server.h
Go to the documentation of this file.
1 /*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2009-2010, Willow Garage, Inc.
5 * Copyright (c) 2014, Intermodalics BVBA
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials provided
17 * with the distribution.
18 * * Neither the name of the Willow Garage nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *********************************************************************/
35 
36 #ifndef RTT_DYNAMIC_RECONFIGURE_SERVER_H
37 #define RTT_DYNAMIC_RECONFIGURE_SERVER_H
38 
39 #include <rtt/Service.hpp>
40 #include <rtt/TaskContext.hpp>
41 #include <rtt/os/Mutex.hpp>
42 #include <rtt/Logger.hpp>
43 #include <rtt/Operation.hpp>
44 #include <rtt/OperationCaller.hpp>
45 
48 
49 #include <ros/ros.h>
50 
51 #include <dynamic_reconfigure/Reconfigure.h>
52 #include <dynamic_reconfigure/Config.h>
53 #include <dynamic_reconfigure/ConfigDescription.h>
54 
55 #include <rtt/rtt-config.h>
56 #if !defined(RTT_VERSION_GTE)
57  #define RTT_VERSION_GTE(major,minor,patch) \
58  ((RTT_VERSION_MAJOR > major) || (RTT_VERSION_MAJOR == major && \
59  (RTT_VERSION_MINOR > minor) || (RTT_VERSION_MINOR == minor && \
60  (RTT_VERSION_PATCH >= patch))))
61 #endif
62 
63 namespace rtt_dynamic_reconfigure {
64 
65 template <class ConfigType> class Server;
66 typedef bool (UpdateCallbackSignature)(RTT::PropertyBag &bag, uint32_t level);
67 typedef bool (UpdateCallbackConstSignature)(const RTT::PropertyBag &bag, uint32_t level);
68 typedef void (NotifyCallbackSignature)(uint32_t level);
69 
75 template <class ConfigType>
76 struct Updater {
77  virtual bool propertiesFromConfig(ConfigType &, uint32_t, RTT::PropertyBag &) { return false; }
78  virtual bool configFromProperties(ConfigType &, const RTT::PropertyBag &) { return false; }
79 };
80 
81 template <class ConfigType>
84 
91  static void getMin(ConfigType &min, const ServerType *) { min = ConfigType::__getMin__(); }
92 
99  static void getMax(ConfigType &max, const ServerType *) { max = ConfigType::__getMax__(); }
100 
107  static void getDefault(ConfigType &dflt, const ServerType *) { dflt = ConfigType::__getDefault__(); }
108 
115  static dynamic_reconfigure::ConfigDescriptionPtr getDescriptionMessage(const ServerType *) { return dynamic_reconfigure::ConfigDescriptionPtr(new dynamic_reconfigure::ConfigDescription(ConfigType::__getDescriptionMessage__())); }
116 
120  static const bool canRefresh = false;
121 
127  static void refreshDescription(const ServerType *) {}
128 
136  static void toMessage(ConfigType &config, dynamic_reconfigure::Config &message, const ServerType *) { config.__toMessage__(message); }
137 
145  static void fromMessage(ConfigType &config, dynamic_reconfigure::Config &message, const ServerType *) { config.__fromMessage__(message); }
146 
153  static void clamp(ConfigType &config, const ServerType *) { config.__clamp__(); }
154 
161  static RTT::internal::AssignableDataSource<RTT::PropertyBag>::shared_ptr getDataSource(ConfigType &config, const ServerType *server) {
163  if (!server->updater()->propertiesFromConfig(config, ~0, ds->set()))
164  ds.reset();
165  return ds;
166  }
167 };
168 
169 namespace {
170  struct null_deleter {
171  void operator()(const void *) const {}
172  };
173 }
174 
175 // Forward declaration of class DynamicReconfigureTestComponent
176 class DynamicReconfigureTestComponent;
177 
182 template <class ConfigType>
183 class Server : public RTT::Service
184 {
185 private:
189 
195 
196  ConfigType config_;
197  ConfigType min_;
198  ConfigType max_;
199  ConfigType default_;
200 
203 
208 
209 public:
216  Server(const std::string &name, RTT::TaskContext *owner)
217  : RTT::Service(name, owner)
218  , node_handle_(0)
219  , update_callback_default_impl_("updateProperties", &Server<ConfigType>::updatePropertiesDefaultImpl, this, RTT::OwnThread, owner->engine())
220  {
221  construct();
222  }
223 
230  : RTT::Service("reconfigure", owner)
231  , node_handle_(0)
232  , update_callback_default_impl_("updateProperties", &Server<ConfigType>::updatePropertiesDefaultImpl, this, RTT::OwnThread, owner->engine())
233  {
234  construct();
235  }
236 
241  virtual ~Server() {
242  shutdown();
243  }
244 
250  const ConfigType &getConfig() const { return config_; }
251 
257  void updateConfig(const ConfigType &config)
258  {
259  updateConfigInternal(config);
260  }
261 
267  void getConfigMax(ConfigType &max) const
268  {
269  max = max_;
270  }
271 
277  const ConfigType &getConfigMax() const { return max_; }
278 
284  ConfigType &getConfigMax() { return max_; }
285 
291  void getConfigMin(ConfigType &min) const
292  {
293  min = min_;
294  }
295 
301  const ConfigType &getConfigMin() const { return min_; }
302 
308  ConfigType &getConfigMin() { return min_; }
309 
315  void getConfigDefault(ConfigType &config) const
316  {
317  config = default_;
318  }
319 
325  const ConfigType &getConfigDefault() const { return default_; }
326 
332  ConfigType &getConfigDefault() { return default_; }
333 
339  void setConfigMax(const ConfigType &config)
340  {
341  max_ = config;
342  PublishDescription();
343  }
344 
350  void setConfigMin(const ConfigType &config)
351  {
352  min_ = config;
353  PublishDescription();
354  }
355 
361  void setConfigDefault(const ConfigType &config)
362  {
363  default_ = config;
364  PublishDescription();
365  }
366 
372  dynamic_reconfigure::ConfigDescriptionPtr getDescriptionMessage() {
373  dynamic_reconfigure::ConfigDescriptionPtr description_message = traits::getDescriptionMessage(this);
374 
375  // Copy over min_ max_ default_
376  traits::toMessage(max_, description_message->max, this);
377  traits::toMessage(min_, description_message->min, this);
378  traits::toMessage(default_, description_message->dflt, this);
379 
380  return description_message;
381  }
382 
389  void advertise(std::string ns = std::string())
390  {
391  // shutdown publishers/service servers from previous runs
392  shutdown();
393 
394  // set default namespace
395  if (ns.empty()) {
396  if (getOwner()->getName() == "Deployer")
397  ns = "~";
398  else
399  ns = "~" + getOwner()->getName();
400  }
401 
402  // create NodeHandle
403  node_handle_ = new ros::NodeHandle(ns);
404 
405  // advertise service server and publishers
406  set_service_ = node_handle_->advertiseService("set_parameters", &Server<ConfigType>::setConfigCallback, this);
407  descr_pub_ = node_handle_->advertise<dynamic_reconfigure::ConfigDescription>("parameter_descriptions", 1, true);
408  update_pub_ = node_handle_->advertise<dynamic_reconfigure::Config>("parameter_updates", 1, true);
409 
410  // publish update once
411  PublishDescription();
412  updateConfigInternal(config_);
413  }
414 
419  void shutdown()
420  {
421  if (node_handle_) {
422  node_handle_->shutdown();
423  delete node_handle_;
424  node_handle_ = 0;
425  }
426  }
427 
433  bool updated()
434  {
435  ConfigType new_config = config_;
436  if (!updater()->configFromProperties(new_config, *(getOwner()->properties()))) return false;
437  updateConfig(new_config);
438  return true;
439  }
440 
445  void refresh()
446  {
447  RTT::os::MutexLock lock(mutex_);
448 
449  // Refresh config description (no-op unless for AutoConfig)
450  traits::refreshDescription(this);
451 
452  // Grab copys of the data from the config files. These are declared in the generated config file.
453  traits::getMin(min_, this);
454  traits::getMax(max_, this);
455  traits::getDefault(default_, this);
456 
457  // Publish the description
458  PublishDescription();
459 
460  // Add/replace min/max/default properties
461  this->properties()->remove(this->properties()->getProperty("min"));
462  this->properties()->remove(this->properties()->getProperty("max"));
463  this->properties()->remove(this->properties()->getProperty("default"));
464  this->properties()->ownProperty(new RTT::Property<RTT::PropertyBag>("min", "Minimum values as published to dynamic_reconfigure clients", traits::getDataSource(min_, this)));
465  this->properties()->ownProperty(new RTT::Property<RTT::PropertyBag>("max", "Maximum values as published to dynamic_reconfigure clients", traits::getDataSource(max_, this)));
466  this->properties()->ownProperty(new RTT::Property<RTT::PropertyBag>("default", "Default values as published to dynamic_reconfigure clients", traits::getDataSource(default_, this)));
467 
468  // Get initial values from current property settings
469  config_ = ConfigType();
470  traits::getDefault(config_, this);
471  updater()->configFromProperties(config_, *(getOwner()->properties()));
472  if (node_handle_)
473  config_.__fromServer__(*node_handle_);
474  traits::clamp(config_, this);
475 
476  // At startup we need to load the configuration with all level bits set (everything has changed).
477  RTT::PropertyBag init_config;
478  updater()->propertiesFromConfig(config_, ~0, init_config);
479 
480  // Invoke update and notification callback
481 #if !RTT_VERSION_GTE(2,8,99)
482  // Additional check for RTT < 2.9:
483  // ===============================
484  // We do not know for sure which thread is calling this method/operation, but we can check if the current
485  // thread is the same as the thread that will process the update/notify operation. If yes, we clone the
486  // underlying OperationCaller implementation and set the caller to the processing engine. In this case
487  // RTT < 2.9 should always call the operation directly as if it would be a ClientThread operation:
488  // https://github.com/orocos-toolchain/rtt/blob/toolchain-2.8/rtt/base/OperationCallerInterface.hpp#L79
489  //
490  // RTT 2.9 and above already checks the caller thread internally and therefore does not require this hack.
491  //
493  if (update_callback_impl) {
494  RTT::ExecutionEngine *engine = update_callback_impl->getMessageProcessor();
495  if (update_callback_impl->isSend() && engine && engine->getThread() && engine->getThread()->isSelf()) {
496  RTT::Logger::In in(this->getOwner()->getName() + "." + this->getName());
497  RTT::log(RTT::Debug) << "calling my own updateProperties operation from refresh()" << RTT::endlog();
498  update_callback_impl.reset(update_callback_impl->cloneI(engine));
499  update_callback_impl->call(init_config, ~0);
500  } else {
501  update_callback_(init_config, ~0);
502  }
503  }
504  RTT::base::OperationCallerBase<UpdateCallbackConstSignature>::shared_ptr update_callback_const_impl = update_callback_const_.getOperationCallerImpl();
505  if (update_callback_const_impl) {
506  RTT::ExecutionEngine *engine = update_callback_const_impl->getMessageProcessor();
507  if (update_callback_const_impl->isSend() && engine && engine->getThread() && engine->getThread()->isSelf()) {
508  RTT::Logger::In in(this->getOwner()->getName() + "." + this->getName());
509  RTT::log(RTT::Debug) << "calling my own updateProperties operation from refresh()" << RTT::endlog();
510  update_callback_const_impl.reset(update_callback_const_impl->cloneI(engine));
511  update_callback_const_impl->call(init_config, ~0);
512  } else {
513  update_callback_const_(init_config, ~0);
514  }
515  }
517  if (notify_callback_impl) {
518  RTT::ExecutionEngine *engine = notify_callback_impl->getMessageProcessor();
519  if (notify_callback_impl->isSend() && engine && engine->getThread() && engine->getThread()->isSelf()) {
520  RTT::Logger::In in(this->getOwner()->getName() + "." + this->getName());
521  RTT::log(RTT::Debug) << "calling my own notifyPropertiesUpdate operation from refresh()" << RTT::endlog();
522  notify_callback_impl.reset(notify_callback_impl->cloneI(engine));
523  notify_callback_impl->call(~0);
524  } else {
525  notify_callback_(~0);
526  }
527  }
528 #else
529  if (update_callback_.ready()) {
530  update_callback_(init_config, ~0);
531  } else if (update_callback_const_.ready()) {
532  update_callback_const_(init_config, ~0);
533  }
534  if (notify_callback_.ready()) {
535  notify_callback_(~0);
536  }
537 #endif
538 
539  updateConfigInternal(config_);
540  }
541 
547  UpdaterType *updater() const
548  {
549  if (!updater_) updater_.reset(new UpdaterType());
550  return updater_.get();
551  }
552 
558  void setUpdater(UpdaterType *updater)
559  {
560  updater_.reset(updater, null_deleter());
561  }
562 
569  {
570  update_callback_ = impl;
571  }
572 
579  {
580  notify_callback_ = impl;
581  }
582 
583 private:
584  void construct()
585  {
586  this->addOperation("advertise", &Server<ConfigType>::advertise, this)
587  .doc("Advertise this dynamic_reconfigure server at the master.")
588  .arg("namespace", "The namespace this server should be advertised in. Defaults to ~component.");
589  this->addOperation("shutdown", &Server<ConfigType>::shutdown, this)
590  .doc("Shutdown this dynamic_reconfigure server.");
591  this->addOperation("updated", &Server<ConfigType>::updated, this)
592  .doc("Notify the dynamic_reconfigure server that properties have been updated. This will update the GUI.");
593 
594  this->addOperation("refresh", &Server<ConfigType>::refresh, this)
595  .doc("Rediscover the owner's properties or update advertised min/max/default values. Call this operation after having added properties.");
596 
597  // check if owner implements the Updater interface
598  UpdaterType *updater = dynamic_cast<UpdaterType *>(getOwner());
599  if (updater) setUpdater(updater);
600 
601  // check if owner provides the updateProperties operation
602  if (getOwner() && getOwner()->provides()->hasMember("updateProperties")) {
603  RTT::OperationInterfacePart *op = getOwner()->provides()->getPart("updateProperties");
604  if (boost::dynamic_pointer_cast< RTT::base::OperationCallerBase<UpdateCallbackSignature> >(op->getLocalOperation())) {
605  update_callback_ = op;
606  } else {
607  update_callback_const_ = op;
608  }
609  } else {
610  update_callback_const_ = update_callback_default_impl_.getOperationCaller();
611  }
612 
613  // check if owner provides the notifyPropertiesUpdate operation
614  if (getOwner() && getOwner()->provides()->hasMember("notifyPropertiesUpdate")) {
615  notify_callback_ = getOwner()->provides()->getPart("notifyPropertiesUpdate");
616  }
617 
618  // update_callback_ and notify_callback_ are called from the ROS spinner thread -> set GlobalEngine as caller engine
620  update_callback_const_.setCaller(RTT::internal::GlobalEngine::Instance());
622 
623  // refresh once
624  refresh();
625  }
626 
628  if (!descr_pub_) return;
629  descr_pub_.publish(getDescriptionMessage());
630  }
631 
632  friend class DynamicReconfigureTestComponent;
633  bool setConfigCallback(dynamic_reconfigure::Reconfigure::Request &req,
634  dynamic_reconfigure::Reconfigure::Response &rsp)
635  {
636  RTT::os::MutexLock lock(mutex_);
637 
638  ConfigType new_config = config_;
639  traits::fromMessage(new_config, req.config, this);
640  traits::clamp(new_config, this);
641  uint32_t level = config_.__level__(new_config);
642 
643  RTT::PropertyBag bag;
644  if (!updater()->propertiesFromConfig(new_config, level, bag)) return false;
645  if (update_callback_.ready()) {
646  if (!update_callback_(bag, level)) return false;
647  updater()->configFromProperties(new_config, bag);
648  } else if (update_callback_const_.ready()) {
649  if (!update_callback_const_(bag, level)) return false;
650  } else {
651  return false;
652  }
653  if (notify_callback_.ready()) notify_callback_(level);
654 
655  updateConfigInternal(new_config);
656  new_config.__toMessage__(rsp.config);
657  return true;
658  }
659 
660  void updateConfigInternal(const ConfigType &config)
661  {
662  RTT::os::MutexLock lock(mutex_);
663  config_ = config;
664  if (node_handle_)
665  config_.__toServer__(*node_handle_);
666  dynamic_reconfigure::Config msg;
667  config_.__toMessage__(msg);
668 
669  if (update_pub_)
670  update_pub_.publish(msg);
671  }
672 
674  {
675  return RTT::updateProperties(*(getOwner()->properties()), bag);
676  }
677 };
678 
689 template <typename T, typename ValueType>
690 bool setProperty(const std::string &name, RTT::PropertyBag &bag, ValueType &value)
691 {
692  if (bag.getProperty(name)) {
693  RTT::Property<T> *prop = bag.getPropertyType<T>(name);
694  if (!prop) {
695  RTT::log(RTT::Error) << "Could not assign property '" << name << "': Property exists with a different type." << RTT::endlog();
696  return false;
697  }
698 
699  prop->set() = value;
700 
701  } else {
702  if (boost::is_same<T,ValueType>::value) {
703  bag.addProperty(name, value);
704  } else {
705  bag.ownProperty(new RTT::Property<T>(name, std::string(), value));
706  }
707  }
708 
709  return true;
710 }
711 
722 template <typename T, typename ValueType>
723 bool getProperty(const std::string &name, const RTT::PropertyBag &bag, ValueType &value)
724 {
725  RTT::Property<T> *prop = bag.getPropertyType<T>(name);
726  if (!prop) {
727  RTT::log(RTT::Error) << "Could not get property '" << name << "': No such property in the bag." << RTT::endlog();
728  return false;
729  }
730 
731  value = prop->rvalue();
732  return true;
733 }
734 
735 } // namespace rtt_dynamic_reconfigure
736 
737 #define RTT_DYNAMIC_RECONFIGURE_SERVICE_PLUGIN(CONFIG, NAME) \
738  extern "C" {\
739  RTT_EXPORT bool loadRTTPlugin(RTT::TaskContext* tc); \
740  bool loadRTTPlugin(RTT::TaskContext* tc) { \
741  if (tc == 0) return true; \
742  RTT::Service::shared_ptr sp( new rtt_dynamic_reconfigure::Server<CONFIG>(NAME, tc ) ); \
743  return tc->provides()->addService( sp ); \
744  } \
745  RTT_EXPORT RTT::Service::shared_ptr createService(); \
746  RTT::Service::shared_ptr createService() { \
747  RTT::Service::shared_ptr sp( new rtt_dynamic_reconfigure::Server<CONFIG>( 0 ) ); \
748  return sp; \
749  } \
750  RTT_EXPORT std::string getRTTPluginName(); \
751  std::string getRTTPluginName() { \
752  return NAME; \
753  } \
754  RTT_EXPORT std::string getRTTTargetName(); \
755  std::string getRTTTargetName() { \
756  return OROCOS_TARGET_NAME; \
757  } \
758  }
759 
760 #endif // RTT_DYNAMIC_RECONFIGURE_SERVER_H
Server(RTT::TaskContext *owner)
Definition: server.h:229
bool updatePropertiesDefaultImpl(const RTT::PropertyBag &bag, uint32_t)
Definition: server.h:673
static RTT::internal::AssignableDataSource< RTT::PropertyBag >::shared_ptr getDataSource(ConfigType &config, const ServerType *server)
Definition: server.h:161
ConfigType & getConfigDefault()
Definition: server.h:332
bool( UpdateCallbackSignature)(RTT::PropertyBag &bag, uint32_t level)
Definition: server.h:66
void getConfigMin(ConfigType &min) const
Definition: server.h:291
virtual base::OperationCallerBase< Signature >::shared_ptr getOperationCaller()
bool getProperty(const std::string &name, const RTT::PropertyBag &bag, ValueType &value)
Definition: server.h:723
Property< T > * getPropertyType(const std::string &name) const
void setConfigMin(const ConfigType &config)
Definition: server.h:350
void getConfigMax(ConfigType &max) const
Definition: server.h:267
void publish(const boost::shared_ptr< M > &message) const
bool updateProperties(PropertyBag &target, const PropertyBag &source)
const OperationCallerBasePtr getOperationCallerImpl() const
RTT::OperationCaller< UpdateCallbackConstSignature > update_callback_const_
Definition: server.h:205
bool ready() const
ros::Publisher update_pub_
Definition: server.h:193
Variable opBinary s not applicable to op
virtual void set(param_t t)=0
bool setProperty(const std::string &name, RTT::PropertyBag &bag, ValueType &value)
Definition: server.h:690
void setConfigMax(const ConfigType &config)
Definition: server.h:339
std::string getName(void *handle)
static void getMin(ConfigType &min, const ServerType *)
Definition: server.h:91
void setConfigDefault(const ConfigType &config)
Definition: server.h:361
static void clamp(ConfigType &config, const ServerType *)
Definition: server.h:153
Server(const std::string &name, RTT::TaskContext *owner)
Definition: server.h:216
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
const_reference_t rvalue() const
void setCaller(ExecutionEngine *caller)
virtual bool propertiesFromConfig(ConfigType &, uint32_t, RTT::PropertyBag &)
Definition: server.h:77
boost::shared_ptr< UpdaterType > updater_
Definition: server.h:201
RTT::OperationCaller< NotifyCallbackSignature > notify_callback_
Definition: server.h:207
ros::ServiceServer set_service_
Definition: server.h:192
UpdaterType * updater() const
Definition: server.h:547
static void getMax(ConfigType &max, const ServerType *)
Definition: server.h:99
bool ownProperty(base::PropertyBase *p)
const ConfigType & getConfigDefault() const
Definition: server.h:325
boost::shared_ptr< Server< ConfigType > > shared_ptr
Definition: server.h:188
static void getDefault(ConfigType &dflt, const ServerType *)
Definition: server.h:107
static dynamic_reconfigure::ConfigDescriptionPtr getDescriptionMessage(const ServerType *)
Definition: server.h:115
const ConfigType & getConfig() const
Definition: server.h:250
static void refreshDescription(const ServerType *)
Definition: server.h:127
Property< T > & addProperty(const std::string &name, T &attr)
ConfigType & getConfigMax()
Definition: server.h:284
const ConfigType & getConfigMin() const
Definition: server.h:301
static RTT_API ExecutionEngine * Instance()
const ConfigType & getConfigMax() const
Definition: server.h:277
void setUpdateCallback(RTT::OperationInterfacePart *impl)
Definition: server.h:568
RTT::OperationCaller< UpdateCallbackSignature > update_callback_
Definition: server.h:204
void setNotificationCallback(RTT::OperationInterfacePart *impl)
Definition: server.h:578
ros::NodeHandle * node_handle_
Definition: server.h:191
virtual os::ThreadInterface * getThread() const
bool setConfigCallback(dynamic_reconfigure::Reconfigure::Request &req, dynamic_reconfigure::Reconfigure::Response &rsp)
Definition: server.h:633
static void toMessage(ConfigType &config, dynamic_reconfigure::Config &message, const ServerType *)
Definition: server.h:136
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
Updater< ConfigType > UpdaterType
Definition: server.h:186
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
virtual RTT_API boost::shared_ptr< base::DisposableInterface > getLocalOperation() const
RTT::os::MutexRecursive mutex_
Definition: server.h:190
bool( UpdateCallbackConstSignature)(const RTT::PropertyBag &bag, uint32_t level)
Definition: server.h:67
base::PropertyBase * getProperty(const std::string &name) const
void( NotifyCallbackSignature)(uint32_t level)
Definition: server.h:68
dynamic_reconfigure_traits< ConfigType > traits
Definition: server.h:187
ROSCONSOLE_DECL void shutdown()
virtual bool configFromProperties(ConfigType &, const RTT::PropertyBag &)
Definition: server.h:78
void setUpdater(UpdaterType *updater)
Definition: server.h:558
void getConfigDefault(ConfigType &config) const
Definition: server.h:315
reference_t set()
void advertise(std::string ns=std::string())
Definition: server.h:389
RTT::Operation< UpdateCallbackConstSignature > update_callback_default_impl_
Definition: server.h:206
void updateConfigInternal(const ConfigType &config)
Definition: server.h:660
ConfigType & getConfigMin()
Definition: server.h:308
static void fromMessage(ConfigType &config, dynamic_reconfigure::Config &message, const ServerType *)
Definition: server.h:145
dynamic_reconfigure::ConfigDescriptionPtr getDescriptionMessage()
Definition: server.h:372
static Logger & log()
void updateConfig(const ConfigType &config)
Definition: server.h:257
static Logger::LogFunction endlog()
ros::Publisher descr_pub_
Definition: server.h:194


rtt_dynamic_reconfigure
Author(s): Johannes Meyer
autogenerated on Sat Jun 8 2019 18:05:06