19 YARP_LOG_COMPONENT(FrameGrabber_nwc_yarpParamsCOMPONENT,
"yarp.device.FrameGrabber_nwc_yarp")
30 std::vector<std::string> params;
31 params.push_back(
"local");
32 params.push_back(
"remote");
33 params.push_back(
"carrier");
34 params.push_back(
"no_stream");
41 if (paramName ==
"local")
46 if (paramName ==
"remote")
51 if (paramName ==
"carrier")
56 if (paramName ==
"no_stream")
59 else paramValue =
"false";
63 yError() <<
"parameter '" << paramName <<
"' was not found";
82 if (config.
check(
"help"))
91 if (config.
check(
"local"))
94 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'local' using value:" <<
m_local;
98 yCError(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'local' not found!";
99 yCError(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Prefix of the ports opened locally by the nwc for streaming and rpc operations";
102 prop_check.
unput(
"local");
107 if (config.
check(
"remote"))
110 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'remote' using value:" <<
m_remote;
114 yCError(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Mandatory parameter 'remote' not found!";
115 yCError(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Description of the parameter: Name of the remote rpc port opened by the nws";
118 prop_check.
unput(
"remote");
123 if (config.
check(
"carrier"))
126 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'carrier' using value:" <<
m_carrier;
130 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'carrier' using DEFAULT value:" <<
m_carrier;
132 prop_check.
unput(
"carrier");
137 if (config.
check(
"no_stream"))
140 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'no_stream' using value:" <<
m_no_stream;
144 yCInfo(FrameGrabber_nwc_yarpParamsCOMPONENT) <<
"Parameter 'no_stream' using DEFAULT value:" <<
m_no_stream;
146 prop_check.
unput(
"no_stream");
181 doc = doc + std::string(
"\n=============================================\n");
182 doc = doc + std::string(
"This is the help for device: FrameGrabber_nwc_yarp\n");
183 doc = doc + std::string(
"\n");
184 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
185 doc = doc + std::string(
"'local': Prefix of the ports opened locally by the nwc for streaming and rpc operations\n");
186 doc = doc + std::string(
"'remote': Name of the remote rpc port opened by the nws\n");
187 doc = doc + std::string(
"'carrier': Protocol used for connection with the nws streaming port\n");
188 doc = doc + std::string(
"'no_stream': Full port name of the port remotely opened by the Navigation server, to which the Navigation2D_nwc_yarp connects to.\n");
189 doc = doc + std::string(
"\n");
190 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
191 doc = doc +
" yarpdev --device frameGrabber_nwc_yarp --local <mandatory_value> --remote <mandatory_value> --carrier fast_tcp --no_stream false\n";
192 doc = doc + std::string(
"Using only mandatory params:\n");
193 doc = doc +
" yarpdev --device frameGrabber_nwc_yarp --local <mandatory_value> --remote <mandatory_value>\n";
194 doc = doc + std::string(
"=============================================\n\n");
return doc;
bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
std::string getConfiguration() const override
Return the configuration of the device.
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
std::string m_provided_configuration
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
FrameGrabber_nwc_yarp_ParamsParser()
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,...)