19 YARP_LOG_COMPONENT(Navigation2D_nwc_yarpParamsCOMPONENT,
"yarp.device.Navigation2D_nwc_yarp")
30 std::vector<std::string> params;
31 params.push_back(
"local");
32 params.push_back(
"navigation_server");
33 params.push_back(
"map_locations_server");
34 params.push_back(
"localization_server");
41 if (paramName ==
"local")
46 if (paramName ==
"navigation_server")
51 if (paramName ==
"map_locations_server")
56 if (paramName ==
"localization_server")
62 yError() <<
"parameter '" << paramName <<
"' was not found";
81 if (config.
check(
"help"))
90 if (config.
check(
"local"))
93 yCInfo(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Parameter 'local' using value:" <<
m_local;
97 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'local' not found!";
98 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name opened by the Navigation2D_nwc_yarp device.";
101 prop_check.
unput(
"local");
106 if (config.
check(
"navigation_server"))
113 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'navigation_server' not found!";
114 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name of the port remotely opened by the Navigation server, to which the Navigation2D_nwc_yarp connects to.";
117 prop_check.
unput(
"navigation_server");
122 if (config.
check(
"map_locations_server"))
129 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'map_locations_server' not found!";
130 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name of the port remotely opened by the Map2DServer, to which the Navigation2D_nwc_yarp connects to.";
133 prop_check.
unput(
"map_locations_server");
138 if (config.
check(
"localization_server"))
145 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'localization_server' not found!";
146 yCError(Navigation2D_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Full port name of the port remotely opened by the Localization server, to which the Navigation2D_nwc_yarp connects to.";
149 prop_check.
unput(
"localization_server");
184 doc = doc + std::string(
"\n=============================================\n");
185 doc = doc + std::string(
"This is the help for device: Navigation2D_nwc_yarp\n");
186 doc = doc + std::string(
"\n");
187 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
188 doc = doc + std::string(
"'local': Full port name opened by the Navigation2D_nwc_yarp device.\n");
189 doc = doc + std::string(
"'navigation_server': Full port name of the port remotely opened by the Navigation server, to which the Navigation2D_nwc_yarp connects to.\n");
190 doc = doc + std::string(
"'map_locations_server': Full port name of the port remotely opened by the Map2DServer, to which the Navigation2D_nwc_yarp connects to.\n");
191 doc = doc + std::string(
"'localization_server': Full port name of the port remotely opened by the Localization server, to which the Navigation2D_nwc_yarp connects to.\n");
192 doc = doc + std::string(
"\n");
193 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
194 doc = doc +
" yarpdev --device navigation2D_nwc_yarp --local <mandatory_value> --navigation_server <mandatory_value> --map_locations_server <mandatory_value> --localization_server <mandatory_value>\n";
195 doc = doc + std::string(
"Using only mandatory params:\n");
196 doc = doc +
" yarpdev --device navigation2D_nwc_yarp --local <mandatory_value> --navigation_server <mandatory_value> --map_locations_server <mandatory_value> --localization_server <mandatory_value>\n";
197 doc = doc + std::string(
"=============================================\n\n");
return doc;
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_provided_configuration
std::string m_map_locations_server
std::string getConfiguration() const override
Return the configuration of the device.
Navigation2D_nwc_yarp_ParamsParser()
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string m_localization_server
std::string m_navigation_server
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
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,...)