service.cpp
Go to the documentation of this file.
00001 /*********************************************************************
00002  *
00003  *  Copyright (c) 2014, Intermodalics BVBA
00004  *  All rights reserved.
00005  *
00006  *********************************************************************/
00007 
00008 #include <rtt_dynamic_reconfigure/server.h>
00009 #include <rtt_dynamic_reconfigure_tests/TestConfig.h>
00010 
00011 using namespace rtt_dynamic_reconfigure_tests;
00012 
00013 namespace rtt_dynamic_reconfigure {
00014 
00015 template <>
00016 struct Updater<TestConfig> {
00017   static bool propertiesFromConfig(TestConfig &config, uint32_t level, RTT::PropertyBag &bag) {
00018     setProperty<int>("int_param", bag, config.int_param);
00019     setProperty<double>("double_param", bag, config.double_param);
00020     setProperty<std::string>("str_param", bag, config.str_param);
00021     setProperty<bool>("bool_param", bag, config.bool_param);
00022     setProperty<double>("non_existent", bag, config.non_existent);
00023     return true;
00024   }
00025   static bool configFromProperties(TestConfig &config, const RTT::PropertyBag &bag) {
00026     getProperty<int>("int_param", bag, config.int_param);
00027     getProperty<double>("double_param", bag, config.double_param);
00028     getProperty<std::string>("str_param", bag, config.str_param);
00029     getProperty<bool>("bool_param", bag, config.bool_param);
00030     getProperty<double>("non_existent", bag, config.non_existent);
00031     return true;
00032   }
00033 };
00034 
00035 } // namespace rtt_dynamic_reconfigure
00036 
00037 RTT_DYNAMIC_RECONFIGURE_SERVICE_PLUGIN(TestConfig, "test_reconfigure")


rtt_dynamic_reconfigure_tests
Author(s): Johannes Meyer
autogenerated on Thu Jun 6 2019 18:06:30