19 YARP_LOG_COMPONENT(MultipleAnalogSensorsServerParamsCOMPONENT,
"yarp.device.MultipleAnalogSensorsServer")
30 std::vector<std::string> params;
31 params.push_back(
"name");
32 params.push_back(
"period");
39 if (paramName ==
"name")
44 if (paramName ==
"period")
46 paramValue = std::to_string(
m_period);
50 yError() <<
"parameter '" << paramName <<
"' was not found";
69 if (config.
check(
"help"))
78 if (config.
check(
"name"))
81 yCInfo(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Parameter 'name' using value:" <<
m_name;
85 yCError(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Mandatory parameter 'name' not found!";
86 yCError(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Description of the parameter: Prefix of the port opened by this device";
89 prop_check.
unput(
"name");
94 if (config.
check(
"period"))
97 yCInfo(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Parameter 'period' using value:" <<
m_period;
101 yCError(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Mandatory parameter 'period' not found!";
102 yCError(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Description of the parameter: Refresh period of the broadcasted values in ms";
103 yCError(MultipleAnalogSensorsServerParamsCOMPONENT) <<
"Remember: Units for this parameter are: 'ms'";
106 prop_check.
unput(
"period");
141 doc = doc + std::string(
"\n=============================================\n");
142 doc = doc + std::string(
"This is the help for device: MultipleAnalogSensorsServer\n");
143 doc = doc + std::string(
"\n");
144 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
145 doc = doc + std::string(
"'name': Prefix of the port opened by this device\n");
146 doc = doc + std::string(
"'period': Refresh period of the broadcasted values in ms\n");
147 doc = doc + std::string(
"\n");
148 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
149 doc = doc +
" yarpdev --device multipleanalogsensorsserver --name <mandatory_value> --period <mandatory_value>\n";
150 doc = doc + std::string(
"Using only mandatory params:\n");
151 doc = doc +
" yarpdev --device multipleanalogsensorsserver --name <mandatory_value> --period <mandatory_value>\n";
152 doc = doc + std::string(
"=============================================\n\n");
return doc;
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.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)