Public Member Functions | Friends
ddynamic_reconfigure::DDParam Class Reference

The DDParam class is the abstraction of all parameter types, and is the template for creating them. At this point, not much is known about the parameter, but the following: More...

#include <dd_param.h>

Inheritance diagram for ddynamic_reconfigure::DDParam:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int getLevel () const =0
 fetches the level of the parameter
virtual string getName () const =0
 gets the name of the parameter, that is, the ID used in the program when requesting it.
virtual Value getValue () const =0
 gets the value of this parameter.
virtual void prepConfig (Config &conf)=0
 updates a config message according to this param's info.
virtual void prepConfigDescription (ConfigDescription &conf_desc)=0
 updates a config description message according to this param's info.
virtual void prepGroup (Group &group)=0
 updates a group message according to this param's info.
virtual bool sameType (Value val)=0
 checks whether or not the raw value stored in the value is compatible with the given parameter. Compatible is a very broad word in this scenario. It means that the value can be placed in the parameter regardless of other limitations.
virtual bool sameValue (Value val)=0
 checks whether or not the value stored in the value object, when converted to the type of the internal value, are equal. This acts regardless of type.
virtual void setValue (Value val)=0
 sets the value of this parameter as this one.

Friends

ostream & operator<< (ostream &os, const DDParam &param)
 the operator taking care of streaming the param values

Detailed Description

The DDParam class is the abstraction of all parameter types, and is the template for creating them. At this point, not much is known about the parameter, but the following:

Other than storing data, the parameter also has specialised methods to interact with DDynamicReconfigure in order to apply changes and send them. These methods should not be touched by the user.

Since this class is abstract, the class has multiple implementations whicch are not directly exposed but are used, so its worth checking out their descriptions.

While this class is abstract, it does have one implemented thing, and that is its stream operator (`<<`) which can be freely used.

While DDParam is abstract, all of its concrete implementations should follow this guideline: DD<Type>(const string &name, unsigned int level, const string &description, <type> def, <extra-args>) Where:

You may then include extra arguments as you wish, required or optional.

Definition at line 48 of file dd_param.h.


Member Function Documentation

virtual int ddynamic_reconfigure::DDParam::getLevel ( ) const [pure virtual]

fetches the level of the parameter

Returns:
the level of the param.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual string ddynamic_reconfigure::DDParam::getName ( ) const [pure virtual]

gets the name of the parameter, that is, the ID used in the program when requesting it.

Returns:
the unique string name of the parameter.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual Value ddynamic_reconfigure::DDParam::getValue ( ) const [pure virtual]

gets the value of this parameter.

Returns:
the value stored in this param.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual void ddynamic_reconfigure::DDParam::prepConfig ( Config &  conf) [pure virtual]

updates a config message according to this param's info.

Parameters:
confthe group to update.
Note:
this is an internal method. It is recommended not to use it.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual void ddynamic_reconfigure::DDParam::prepConfigDescription ( ConfigDescription &  conf_desc) [pure virtual]

updates a config description message according to this param's info.

Parameters:
conf_descthe config description to update.
Note:
this is an internal method. It is recommended not to use it.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual void ddynamic_reconfigure::DDParam::prepGroup ( Group &  group) [pure virtual]

updates a group message according to this param's info.

Parameters:
groupthe group to update.
Note:
this is an internal method. It is recommended not to use it.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDEnum, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, and ddynamic_reconfigure::DDString.

virtual bool ddynamic_reconfigure::DDParam::sameType ( Value  val) [pure virtual]

checks whether or not the raw value stored in the value is compatible with the given parameter. Compatible is a very broad word in this scenario. It means that the value can be placed in the parameter regardless of other limitations.

Parameters:
valthe value to test
Returns:
true is this parameter can handle the original value, false otherwise.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, ddynamic_reconfigure::DDString, and ddynamic_reconfigure::DDEnum.

virtual bool ddynamic_reconfigure::DDParam::sameValue ( Value  val) [pure virtual]

checks whether or not the value stored in the value object, when converted to the type of the internal value, are equal. This acts regardless of type.

Parameters:
valthe value to test
Returns:
true is this parameter can is the same as the original value, false otherwise.

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, ddynamic_reconfigure::DDString, and ddynamic_reconfigure::DDEnum.

virtual void ddynamic_reconfigure::DDParam::setValue ( Value  val) [pure virtual]

sets the value of this parameter as this one.

Parameters:
valthe value to use

Implemented in ddynamic_reconfigure::DDDouble, ddynamic_reconfigure::DDInt, ddynamic_reconfigure::DDBool, ddynamic_reconfigure::DDString, and ddynamic_reconfigure::DDEnum.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const DDParam param 
) [friend]

the operator taking care of streaming the param values

Parameters:
osthe stream to place the param into
paramthe param you want to place into the stream
Returns:
os, but with param added.

Definition at line 8 of file dd_param.cpp.


The documentation for this class was generated from the following file:


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