dd_int_param.cpp
Go to the documentation of this file.
00001 //
00002 // Created by Noam Dori on 19/06/18.
00003 //
00004 
00005 #include <ddynamic_reconfigure/param/dd_int_param.h>
00006 
00007 namespace ddynamic_reconfigure {
00008     string DDInt::getName() const {
00009         return name_;
00010     }
00011 
00012     void DDInt::prepGroup(Group &group) {
00013         ParamDescription desc;
00014         desc.name  = name_;
00015         desc.level = level_;
00016         desc.description = desc_;
00017         desc.type = "int";
00018         group.parameters.push_back(desc);
00019     }
00020 
00021     void DDInt::prepConfig(Config &conf) {
00022         IntParameter param;
00023         param.name = name_;
00024         param.value = val_;
00025         conf.ints.push_back(param);
00026     }
00027 
00028     void DDInt::prepConfigDescription(ConfigDescription &conf_desc) {
00029         IntParameter param;
00030         param.name = name_;
00031         param.value = def_;
00032         conf_desc.dflt.ints.push_back(param);
00033         param.value = max_;
00034         conf_desc.max.ints.push_back(param);
00035         param.value = min_;
00036         conf_desc.min.ints.push_back(param);
00037     }
00038 
00039     int DDInt::getLevel() const {
00040         return level_;
00041     }
00042 
00043     bool DDInt::sameType(Value val) {
00044         return val.getType() == "int";
00045     }
00046 
00047     bool DDInt::sameValue(Value val) {
00048         return val.toInt() == val_;
00049     }
00050 
00051     void DDInt::setValue(Value val) {
00052         val_ = val.toInt();
00053     }
00054 
00055     Value DDInt::getValue() const {
00056         return Value(val_);
00057     }
00058 }


ddynamic_reconfigure
Author(s): Noam Dori
autogenerated on Wed May 15 2019 04:39:27