service.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Copyright (c) 2014, Intermodalics BVBA
4  * All rights reserved.
5  *
6  *********************************************************************/
7 
9 #include <rtt_dynamic_reconfigure_tests/TestConfig.h>
10 
11 using namespace rtt_dynamic_reconfigure_tests;
12 
13 namespace rtt_dynamic_reconfigure {
14 
15 template <>
16 struct Updater<TestConfig> {
17  static bool propertiesFromConfig(TestConfig &config, uint32_t level, RTT::PropertyBag &bag) {
18  setProperty<int>("int_param", bag, config.int_param);
19  setProperty<double>("double_param", bag, config.double_param);
20  setProperty<std::string>("str_param", bag, config.str_param);
21  setProperty<bool>("bool_param", bag, config.bool_param);
22  setProperty<double>("non_existent", bag, config.non_existent);
23  return true;
24  }
25  static bool configFromProperties(TestConfig &config, const RTT::PropertyBag &bag) {
26  getProperty<int>("int_param", bag, config.int_param);
27  getProperty<double>("double_param", bag, config.double_param);
28  getProperty<std::string>("str_param", bag, config.str_param);
29  getProperty<bool>("bool_param", bag, config.bool_param);
30  getProperty<double>("non_existent", bag, config.non_existent);
31  return true;
32  }
33 };
34 
35 } // namespace rtt_dynamic_reconfigure
36 
37 RTT_DYNAMIC_RECONFIGURE_SERVICE_PLUGIN(TestConfig, "test_reconfigure")
static bool propertiesFromConfig(TestConfig &config, uint32_t level, RTT::PropertyBag &bag)
Definition: service.cpp:17
#define RTT_DYNAMIC_RECONFIGURE_SERVICE_PLUGIN(CONFIG, NAME)
static bool configFromProperties(TestConfig &config, const RTT::PropertyBag &bag)
Definition: service.cpp:25


rtt_dynamic_reconfigure_tests
Author(s): Johannes Meyer
autogenerated on Sat Jun 8 2019 18:05:50