dd_double_param.h
Go to the documentation of this file.
1 //
2 // Created by Noam Dori on 19/06/18.
3 //
4 
5 #ifndef DDYNAMIC_RECONFIGURE_DD_DOUBLE_PARAM_H
6 #define DDYNAMIC_RECONFIGURE_DD_DOUBLE_PARAM_H
7 
9 
10 
11 namespace ddynamic_reconfigure {
12  typedef numeric_limits<double> d_limit;
18  class DDDouble : virtual public DDParam {
19  public:
20  string getName() const;
21 
22  void prepGroup(Group &group);
23 
24  void prepConfig(Config &conf);
25 
26  void prepConfigDescription(ConfigDescription &conf_desc);
27 
28  int getLevel() const;
29 
30  bool sameType(Value val);
31 
32  bool sameValue(Value val);
33 
34  void setValue(Value val);
35 
36  Value getValue() const;
37 
47  DDDouble(const string &name, unsigned int level, const string &description, double def,
48  double min = -d_limit::infinity(), double max = d_limit::infinity())
49  : max_(), min_() {
50  name_ = name;
51  level_ = level;
52  desc_ = description;
53  def_ = def;
54  val_ = def;
55  max_ = max;
56  min_ = min;
57  }
58  protected:
63  unsigned int level_;
70  double def_,max_,min_,val_;
75  string name_, desc_;
76  };
77 }
78 
79 
80 #endif //DDYNAMIC_RECONFIGURE_DD_DOUBLE_PARAM_H
Value getValue() const
gets the value of this parameter.
unsigned int level_
the level of the parameter: the degree in which things need to be shut down if this param changes ...
double def_
the default value (def_), the current value (val_), the minimum allowed value (min_), and the maximum allowed value (max_)
int getLevel() const
fetches the level of the parameter
The DDParam class is the abstraction of all parameter types, and is the template for creating them...
Definition: dd_param.h:48
numeric_limits< double > d_limit
void setValue(Value val)
sets the value of this parameter as this one.
a double implementation of the parameter. This is used to handle double-precision floating point numb...
string name_
the name of the parameter (name_), and its description (desc_)
string getName() const
gets the name of the parameter, that is, the ID used in the program when requesting it...
The Value class is used to wrap all basic data-types (bool,int,double,string) in something generic...
Definition: dd_value.h:29
DDDouble(const string &name, unsigned int level, const string &description, double def, double min=-d_limit::infinity(), double max=d_limit::infinity())
bool sameValue(Value val)
checks whether or not the value stored in the value object, when converted to the type of the interna...
int min(int a, int b)
void prepConfigDescription(ConfigDescription &conf_desc)
updates a config description message according to this param&#39;s info.
void prepConfig(Config &conf)
updates a config message according to this param&#39;s info.
bool sameType(Value val)
checks whether or not the raw value stored in the value is compatible with the given parameter...
void prepGroup(Group &group)
updates a group message according to this param&#39;s info.


ddynamic_reconfigure
Author(s): Noam Dori
autogenerated on Thu May 16 2019 02:46:37