|
| Config (const char *conf_name, VarType &var, const char *def_val, TransFunc trans=coil::stringTo) |
| Constructor.
|
|
| ~Config () override=default |
| Virtual Destructor.
|
|
bool | update (const char *val) override |
| Update a bind parameter value.
|
|
| ConfigBase (const char *name_, const char *def_val) |
| Constructer.
|
|
virtual | ~ConfigBase ()=default |
| Virtual Destructor.
|
|
void | setCallback (ConfigAdmin *cadmin, CallbackFunc cbf) |
| Setting callback.
|
|
void | notifyUpdate (const char *key, const char *val) |
| Observer function to notify variable changed.
|
|
template<typename VarType, typename TransFunc = bool (*)(VarType&, const char*)>
class RTC::Config< VarType, TransFunc >
Config class.
Class to hold the configuration parameter information. Specify the data type of the configuration as <VarType> Specify transformation function to convert data type set as <TransFunc> into string format.
- Parameters
-
VarType | Cariable to hold configuration parameter |
TransFunc | Transformation function to transform the stored data type into string format. |
- Since
- 0.4.0
template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
bool RTC::Config< VarType, TransFunc >::update |
( |
const char * | val | ) |
|
|
inlineoverridevirtual |
Update a bind parameter value.
Update configuration paramater by the configuration value.
- Parameters
-
val | The parameter values converted into character string format |
- Returns
- Update result (Successful:true, Failed:false)
Implements RTC::ConfigBase.