dd_bool_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_BOOL_PARAM_H
6 #define DDYNAMIC_RECONFIGURE_DD_BOOL_PARAM_H
7 
9 
10 namespace ddynamic_reconfigure {
16  class DDBool : virtual public DDParam {
17  public:
18  string getName() const;
19 
20  void prepGroup(Group &group);
21 
22  void prepConfig(Config &conf);
23 
24  void prepConfigDescription(ConfigDescription &conf_desc);
25 
26  int getLevel() const;
27 
28  bool sameType(Value val);
29 
30  bool sameValue(Value val);
31 
32  void setValue(Value val);
33 
34  Value getValue() const;
35 
43  DDBool(const string &name, unsigned int level, const string &description, bool def) {
44  name_ = name;
45  level_ = level;
46  desc_ = description;
47  def_ = def;
48  val_ = def;
49  }
50  protected:
55  unsigned int level_;
60  bool def_,val_;
65  string name_, desc_;
66  };
67 }
68 
69 
70 #endif //DDYNAMIC_RECONFIGURE_DD_BOOL_PARAM_H
void prepGroup(Group &group)
updates a group message according to this param's info.
void prepConfigDescription(ConfigDescription &conf_desc)
updates a config description message according to this param's info.
DDBool(const string &name, unsigned int level, const string &description, bool def)
creates a new bool param
Definition: dd_bool_param.h:43
a boolean implementation of the parameter. These are used to handle true/false values, or bit quantities if needed. In ROS, booleans are handled as u-bytes (u-int8), so be careful with these!
Definition: dd_bool_param.h:16
int getLevel() const
fetches the level of the 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_bool_param.h:55
string getName() const
gets the name of the parameter, that is, the ID used in the program when requesting it...
bool sameValue(Value val)
checks whether or not the value stored in the value object, when converted to the type of the interna...
string name_
the name of the parameter (name_), and its description (desc_)
Definition: dd_bool_param.h:65
bool sameType(Value val)
checks whether or not the raw value stored in the value is compatible with the given parameter...
void setValue(Value val)
sets the value of this parameter as this one.
bool def_
the default value (def_), and the current value (val_)
Definition: dd_bool_param.h:60
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.
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.


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