30 std::vector<std::string> params;
31 params.push_back(
"period");
32 params.push_back(
"localImagePort");
33 params.push_back(
"localDepthPort");
34 params.push_back(
"remoteImagePort");
35 params.push_back(
"remoteDepthPort");
36 params.push_back(
"localRpcPort");
37 params.push_back(
"remoteRpcPort");
38 params.push_back(
"ImageCarrier");
39 params.push_back(
"DepthCarrier");
47 if (config.
check(
"help"))
52 std::string config_string = config.
toString();
56 if (config.
check(
"period"))
59 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'period' using value:" <<
m_period;
63 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'period' using DEFAULT value:" <<
m_period;
65 prop_check.
unput(
"period");
70 if (config.
check(
"localImagePort"))
77 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'localImagePort' not found!";
78 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the local image streaming port to open";
81 prop_check.
unput(
"localImagePort");
86 if (config.
check(
"localDepthPort"))
93 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'localDepthPort' not found!";
94 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the local depth streaming port to open";
97 prop_check.
unput(
"localDepthPort");
102 if (config.
check(
"remoteImagePort"))
109 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'remoteImagePort' not found!";
110 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the remote image port to connect to";
113 prop_check.
unput(
"remoteImagePort");
118 if (config.
check(
"remoteDepthPort"))
125 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'remoteDepthPort' not found!";
126 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the remote depth port to connect to";
129 prop_check.
unput(
"remoteDepthPort");
134 if (config.
check(
"localRpcPort"))
137 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'localRpcPort' using value:" <<
m_localRpcPort;
141 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'localRpcPort' not found!";
142 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the local rpc port to open";
145 prop_check.
unput(
"localRpcPort");
150 if (config.
check(
"remoteRpcPort"))
153 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'remoteRpcPort' using value:" <<
m_remoteRpcPort;
157 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Mandatory parameter 'remoteRpcPort' not found!";
158 yCError(RGBDSensorClientParamsCOMPONENT) <<
"Description of the parameter: Full name of the remote rpc port to connect to";
161 prop_check.
unput(
"remoteRpcPort");
166 if (config.
check(
"ImageCarrier"))
169 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'ImageCarrier' using value:" <<
m_ImageCarrier;
173 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'ImageCarrier' using DEFAULT value:" <<
m_ImageCarrier;
175 prop_check.
unput(
"ImageCarrier");
180 if (config.
check(
"DepthCarrier"))
183 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'DepthCarrier' using value:" <<
m_DepthCarrier;
187 yCInfo(RGBDSensorClientParamsCOMPONENT) <<
"Parameter 'DepthCarrier' using DEFAULT value:" <<
m_DepthCarrier;
189 prop_check.
unput(
"DepthCarrier");
224 doc = doc + std::string(
"\n=============================================\n");
225 doc = doc + std::string(
"This is the help for device: RGBDSensorClient\n");
226 doc = doc + std::string(
"\n");
227 doc = doc + std::string(
"This is the list of the parameters accepted by the device:\n");
228 doc = doc + std::string(
"'period': refresh period (in s) of the broadcasted values through yarp ports\n");
229 doc = doc + std::string(
"'localImagePort': Full name of the local image streaming port to open\n");
230 doc = doc + std::string(
"'localDepthPort': Full name of the local depth streaming port to open\n");
231 doc = doc + std::string(
"'remoteImagePort': Full name of the remote image port to connect to\n");
232 doc = doc + std::string(
"'remoteDepthPort': Full name of the remote depth port to connect to\n");
233 doc = doc + std::string(
"'localRpcPort': Full name of the local rpc port to open\n");
234 doc = doc + std::string(
"'remoteRpcPort': Full name of the remote rpc port to connect to\n");
235 doc = doc + std::string(
"'ImageCarrier': Carrier for the image stream\n");
236 doc = doc + std::string(
"'DepthCarrier': Carrier for the depth stream\n");
237 doc = doc + std::string(
"\n");
238 doc = doc + std::string(
"Here are some examples of invocation command with yarpdev, with all params:\n");
239 doc = doc +
" yarpdev --device RGBDSensorClient --period 0.03 --localImagePort /RGBD_nwc/Image:o --localDepthPort /RGBD_nwc/Depth:o --remoteImagePort /RGBD_nws/Image:o --remoteDepthPort /RGBD_nws/Depth:i --localRpcPort /RGBD_nwc/rpc:o --remoteRpcPort /RGBD_nws/rpc:i --ImageCarrier udp --DepthCarrier udp\n";
240 doc = doc + std::string(
"Using only mandatory params:\n");
241 doc = doc +
" yarpdev --device RGBDSensorClient --localImagePort /RGBD_nwc/Image:o --localDepthPort /RGBD_nwc/Depth:o --remoteImagePort /RGBD_nws/Image:o --remoteDepthPort /RGBD_nws/Depth:i --localRpcPort /RGBD_nwc/rpc:o --remoteRpcPort /RGBD_nws/rpc:i\n";
242 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::string m_localRpcPort
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_DepthCarrier
std::string m_remoteDepthPort
std::string m_localImagePort
std::string m_remoteRpcPort
std::string m_localDepthPort
RGBDSensorClient_ParamsParser()
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
std::string m_remoteImagePort
std::string m_ImageCarrier
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,...)