Fawkes API  Fawkes Development Version
dynamic_reconfigure_thread.h
1 
2 /***************************************************************************
3  * dynamic_reconfigure_thread.h - Robotino ROS Dynamic Reconfigure Thread
4  *
5  * Created: Fri May 05 20:07:27 2017
6  * Copyright 2017 Christoph Henke
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef _ROS_DYNAMIC_RECONFIGURE_THREAD_H_
23 #define _ROS_DYNAMIC_RECONFIGURE_THREAD_H_
24 
25 #include <aspect/blackboard.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <core/threading/thread.h>
30 #include <interfaces/DynamicReconfigureInterface.h>
31 #include <plugins/ros/aspect/ros.h>
32 #include <ros/ros.h>
33 
34 namespace fawkes {
35 class DynamicReconfigureInterface;
36 }
37 
40  public fawkes::LoggingAspect,
43  public fawkes::ROSAspect
44 {
45 public:
47 
48  virtual void init();
49  virtual void finalize();
50  virtual void loop();
51 
52  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
53 protected:
54  virtual void
55  run()
56  {
57  Thread::run();
58  }
59 
60 private:
61  // set methods for dynamic reconfiguration of different types
62  bool set_dynreconf_value(const std::string &service,
63  const std::string &parameter,
64  const std::string &value);
65  bool
66  set_dynreconf_value(const std::string &service, const std::string &parameter, const bool value);
67  bool
68  set_dynreconf_value(const std::string &service, const std::string &parameter, const int value);
69  bool
70  set_dynreconf_value(const std::string &service, const std::string &parameter, const double value);
71 
72  // method for resetting the dynamic reconfigure interface
73  void reset_dynamic_reconfigure_interface();
74 
75 private:
77 };
78 
79 #endif /* ROS_DYNAMIC_RECONFIGURE_THREAD_H__ */
RosDynamicReconfigureThread::RosDynamicReconfigureThread
RosDynamicReconfigureThread()
Contructor.
Definition: dynamic_reconfigure_thread.cpp:39
RosDynamicReconfigureThread::init
virtual void init()
Method for initialization.
Definition: dynamic_reconfigure_thread.cpp:48
RosDynamicReconfigureThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition: dynamic_reconfigure_thread.h:55
fawkes::BlockedTimingAspect
Definition: blocked_timing.h:56
RosDynamicReconfigureThread
Definition: dynamic_reconfigure_thread.h:38
fawkes::BlackBoardAspect
Definition: blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition: logging.h:38
fawkes::ROSAspect
Definition: ros.h:38
fawkes::Thread
Definition: thread.h:45
RosDynamicReconfigureThread::finalize
virtual void finalize()
Method for finalization.
Definition: dynamic_reconfigure_thread.cpp:75
fawkes::ConfigurableAspect
Definition: configurable.h:38
fawkes::DynamicReconfigureInterface
Definition: DynamicReconfigureInterface.h:39
RosDynamicReconfigureThread::loop
virtual void loop()
Code to execute in the thread.
Definition: dynamic_reconfigure_thread.cpp:302