26 std::vector<std::string> params;
27 params.push_back(
"dummy_group::dummy_param1");
28 params.push_back(
"dummy_param2");
35 std::string config_string = config.
toString();
40 sectionp = config.
findGroup(
"dummy_group");
41 if (sectionp.
check(
"dummy_param1"))
48 yCError(DeviceTemplateParamsCOMPONENT) <<
"Mandatory parameter 'dummy_group::dummy_param1' not found!";
49 yCError(DeviceTemplateParamsCOMPONENT) <<
"Description of the parameter: This is the description of dummy_param1";
52 prop_check.
unput(
"dummy_group::dummy_param1");
57 if (config.
check(
"dummy_param2"))
60 yCInfo(DeviceTemplateParamsCOMPONENT) <<
"Parameter 'dummy_param2' using value:" <<
m_dummy_param2;
64 yCInfo(DeviceTemplateParamsCOMPONENT) <<
"Parameter 'dummy_param2' using DEFAULT value:" <<
m_dummy_param2;
66 prop_check.
unput(
"dummy_param2");
101 doc = doc + std::string(
"'dummy_group::dummy_param1': This is the description of dummy_param1\n");
102 doc = doc + std::string(
"'dummy_param2': This is the description of dummy_param2\n");
103 doc = doc + std::string(
"\n");
104 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
105 doc = doc +
" yarpdev --device DeviceTemplate --dummy_group::dummy_param1 dummy_default_value --dummy_param2 9.81\n";
106 doc = doc + std::string(
"Using only mandatory params:\n");
107 doc = doc +
" yarpdev --device DeviceTemplate --dummy_group::dummy_param1 dummy_default_value\n";
108 doc = doc + std::string(
"\n");
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string m_dummy_group_dummy_param1
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
A simple collection of objects that can be described and transmitted in a portable way.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
A class for storing options and configuration information.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
virtual Bottle & findGroup(const std::string &key) const =0
Gets a list corresponding to a given keyword.
virtual std::string asString() const
Get string value.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)