dd_int_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_INT_PARAM_H
6 #define DDYNAMIC_RECONFIGURE_DD_INT_PARAM_H
7 
9 
10 namespace ddynamic_reconfigure {
17  class DDInt : virtual public DDParam {
18  public:
19  string getName() const;
20 
21  void prepGroup(Group &group);
22 
23  void prepConfig(Config &conf);
24 
25  void prepConfigDescription(ConfigDescription &conf_desc);
26 
27  int getLevel() const;
28 
29  bool sameType(Value val);
30 
31  bool sameValue(Value val);
32 
33  void setValue(Value val);
34 
35  Value getValue() const;
36 
46  inline DDInt(const string &name, unsigned int level, const string &description,
47  int def, int min = INT32_MIN, int max = INT32_MAX) {
48  name_ = name;
49  level_ = level;
50  desc_ = description;
51  def_ = def;
52  val_ = def;
53  max_ = max;
54  min_ = min;
55  }
56 
57  protected:
62  unsigned int level_;
74  string name_, desc_;
75  };
76 }
77 
78 #endif //DDYNAMIC_RECONFIGURE_DD_INT_PARAM_H
int def_
the default value (def_), the current value (val_), the minimum allowed value (min_), and the maximum allowed value (max_)
Definition: dd_int_param.h:69
DDInt(const string &name, unsigned int level, const string &description, int def, int min=INT32_MIN, int max=INT32_MAX)
Definition: dd_int_param.h:46
bool sameType(Value val)
checks whether or not the raw value stored in the value is compatible with the given parameter...
unsigned int level_
the level of the parameter: the degree in which things need to be shut down if this param changes ...
Definition: dd_int_param.h:62
string name_
the name of the parameter (name_), and its description (desc_)
Definition: dd_int_param.h:74
void prepGroup(Group &group)
updates a group message according to this param's info.
string getName() const
gets the name of the parameter, that is, the ID used in the program when requesting it...
Definition: dd_int_param.cpp:8
The DDParam class is the abstraction of all parameter types, and is the template for creating them...
Definition: dd_param.h:48
Value getValue() const
gets the value of this parameter.
bool sameValue(Value val)
checks whether or not the value stored in the value object, when converted to the type of the interna...
The Value class is used to wrap all basic data-types (bool,int,double,string) in something generic...
Definition: dd_value.h:29
void prepConfig(Config &conf)
updates a config message according to this param's info.
void setValue(Value val)
sets the value of this parameter as this one.
void prepConfigDescription(ConfigDescription &conf_desc)
updates a config description message according to this param's info.
int getLevel() const
fetches the level of the parameter
int min(int a, int b)
an integer implementation of the parameter. This is used to 32 bit signed integral numbers...
Definition: dd_int_param.h:17


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