19 YARP_LOG_COMPONENT(ControlBoardRemapperParamsCOMPONENT,
"yarp.device.ControlBoardRemapper")
30 std::vector<std::string> params;
31 params.push_back(
"axesNames");
32 params.push_back(
"networkNames");
33 params.push_back(
"verbose");
40 if (paramName ==
"axesNames")
42 std::ostringstream oss;
49 paramValue = oss.str();
52 if (paramName ==
"networkNames")
54 std::ostringstream oss;
61 paramValue = oss.str();
64 if (paramName ==
"verbose")
67 else paramValue =
"false";
71 yError() <<
"parameter '" << paramName <<
"' was not found";
90 if (config.
check(
"help"))
99 if (config.
check(
"axesNames"))
106 std::string tempBots = tempBot->
toString();
107 for (
size_t i=0; i<tempBot->
size(); i++)
114 yCError(ControlBoardRemapperParamsCOMPONENT) <<
"parameter 'axesNames' is not a properly formatted bottle";
117 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'axesNames' using value:" <<
m_axesNames;
121 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'axesNames' using DEFAULT value:" <<
m_axesNames;
123 prop_check.
unput(
"axesNames");
128 if (config.
check(
"networkNames"))
135 std::string tempBots = tempBot->
toString();
136 for (
size_t i=0; i<tempBot->
size(); i++)
143 yCError(ControlBoardRemapperParamsCOMPONENT) <<
"parameter 'networkNames' is not a properly formatted bottle";
146 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'networkNames' using value:" <<
m_networkNames;
150 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'networkNames' using DEFAULT value:" <<
m_networkNames;
152 prop_check.
unput(
"networkNames");
157 if (config.
check(
"verbose"))
160 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'verbose' using value:" <<
m_verbose;
164 yCInfo(ControlBoardRemapperParamsCOMPONENT) <<
"Parameter 'verbose' using DEFAULT value:" <<
m_verbose;
166 prop_check.
unput(
"verbose");
201 doc = doc + std::string(
"\n=============================================\n");
202 doc = doc + std::string(
"This is the help for device: ControlBoardRemapper\n");
203 doc = doc + std::string(
"\n");
204 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
205 doc = doc + std::string(
"'axesNames': Ordered list of the axes that are part of the remapped device. e.g.(/joint0 /joint1)\n");
206 doc = doc + std::string(
"'networkNames': List of the robot parts to be used in remapped device. e.g.(/partA /partB)\n");
207 doc = doc + std::string(
"'verbose': print additional output if enabled\n");
208 doc = doc + std::string(
"\n");
209 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
210 doc = doc +
" yarpdev --device controlboardremapper --axesNames <optional_value> --networkNames <optional_value> --verbose false\n";
211 doc = doc + std::string(
"Using only mandatory params:\n");
212 doc = doc +
" yarpdev --device controlboardremapper\n";
213 doc = doc + std::string(
"=============================================\n\n");
return doc;
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::vector< std::string > m_networkNames
std::string m_provided_configuration
std::string getConfiguration() const override
Return the configuration of the device.
std::vector< std::string > m_axesNames
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
ControlBoardRemapper_ParamsParser()
A simple collection of objects that can be described and transmitted in a portable way.
size_type size() const
Gets the number of elements in the bottle.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
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 std::string asString() const
Get string value.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)