19 YARP_LOG_COMPONENT(FrameTransformServerParamsCOMPONENT,
"yarp.device.FrameTransformServer")
30 std::vector<std::string> params;
31 params.push_back(
"custom_config_from");
32 params.push_back(
"custom_config_context");
33 params.push_back(
"config_name");
34 params.push_back(
"local_rpc");
35 params.push_back(
"FrameTransform_verbose_debug");
36 params.push_back(
"period");
43 if (paramName ==
"custom_config_from")
48 if (paramName ==
"custom_config_context")
53 if (paramName ==
"config_name")
58 if (paramName ==
"local_rpc")
63 if (paramName ==
"FrameTransform_verbose_debug")
66 else paramValue =
"false";
69 if (paramName ==
"period")
71 paramValue = std::to_string(
m_period);
75 yError() <<
"parameter '" << paramName <<
"' was not found";
94 if (config.
check(
"help"))
103 if (config.
check(
"custom_config_from"))
112 prop_check.
unput(
"custom_config_from");
117 if (config.
check(
"custom_config_context"))
126 prop_check.
unput(
"custom_config_context");
131 if (config.
check(
"config_name"))
134 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'config_name' using value:" <<
m_config_name;
138 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'config_name' using DEFAULT value:" <<
m_config_name;
140 prop_check.
unput(
"config_name");
145 if (config.
check(
"local_rpc"))
148 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'local_rpc' using value:" <<
m_local_rpc;
152 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'local_rpc' using DEFAULT value:" <<
m_local_rpc;
154 prop_check.
unput(
"local_rpc");
159 if (config.
check(
"FrameTransform_verbose_debug"))
168 prop_check.
unput(
"FrameTransform_verbose_debug");
173 if (config.
check(
"period"))
176 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'period' using value:" <<
m_period;
180 yCInfo(FrameTransformServerParamsCOMPONENT) <<
"Parameter 'period' using DEFAULT value:" <<
m_period;
182 prop_check.
unput(
"period");
217 doc = doc + std::string(
"\n=============================================\n");
218 doc = doc + std::string(
"This is the help for device: FrameTransformServer\n");
219 doc = doc + std::string(
"\n");
220 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
221 doc = doc + std::string(
"'custom_config_from': xml configuration file name\n");
222 doc = doc + std::string(
"'custom_config_context': xml configuration file context\n");
223 doc = doc + std::string(
"'config_name': The name of the xml file containing the needed configuration. if used, the name will be appended to config_xml/\n");
224 doc = doc + std::string(
"'local_rpc': Full name of the rpc port\n");
225 doc = doc + std::string(
"'FrameTransform_verbose_debug': Enable debug prints\n");
226 doc = doc + std::string(
"'period': thread period\n");
227 doc = doc + std::string(
"\n");
228 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
229 doc = doc +
" yarpdev --device frameTransformServer --custom_config_from <optional_value> --custom_config_context <optional_value> --config_name fts_yarp_only.xml --local_rpc /ftServer/rpc --FrameTransform_verbose_debug false --period 0.10\n";
230 doc = doc + std::string(
"Using only mandatory params:\n");
231 doc = doc +
" yarpdev --device frameTransformServer\n";
232 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 YARP_LOG_COMPONENT(name,...)