30 std::vector<std::string> params;
31 params.push_back(
"d");
32 params.push_back(
"period");
33 params.push_back(
"rotation");
34 params.push_back(
"width");
35 params.push_back(
"height");
36 params.push_back(
"rotation_with_crop");
45 paramValue = std::to_string(
m_d);
48 if (paramName ==
"period")
50 paramValue = std::to_string(
m_period);
53 if (paramName ==
"rotation")
58 if (paramName ==
"width")
60 paramValue = std::to_string(
m_width);
63 if (paramName ==
"height")
65 paramValue = std::to_string(
m_height);
68 if (paramName ==
"rotation_with_crop")
71 else paramValue =
"false";
75 yError() <<
"parameter '" << paramName <<
"' was not found";
94 if (config.
check(
"help"))
103 if (config.
check(
"d"))
105 m_d = config.
find(
"d").asInt64();
106 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'd' using value:" <<
m_d;
110 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'd' using DEFAULT value:" <<
m_d;
112 prop_check.
unput(
"d");
117 if (config.
check(
"period"))
120 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'period' using value:" <<
m_period;
124 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'period' using DEFAULT value:" <<
m_period;
126 prop_check.
unput(
"period");
131 if (config.
check(
"rotation"))
134 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'rotation' using value:" <<
m_rotation;
138 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'rotation' using DEFAULT value:" <<
m_rotation;
140 prop_check.
unput(
"rotation");
145 if (config.
check(
"width"))
148 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'width' using value:" <<
m_width;
152 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'width' using DEFAULT value:" <<
m_width;
154 prop_check.
unput(
"width");
159 if (config.
check(
"height"))
162 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'height' using value:" <<
m_height;
166 yCInfo(argusCameraDriverParamsCOMPONENT) <<
"Parameter 'height' using DEFAULT value:" <<
m_height;
168 prop_check.
unput(
"height");
173 if (config.
check(
"rotation_with_crop"))
182 prop_check.
unput(
"rotation_with_crop");
217 doc = doc + std::string(
"\n=============================================\n");
218 doc = doc + std::string(
"This is the help for device: argusCameraDriver\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(
"'d': Enumeration of the camera device\n");
222 doc = doc + std::string(
"'period': Refresh period of acquistion of the camera in s\n");
223 doc = doc + std::string(
"'rotation': Rotation applied from the center of the image\n");
224 doc = doc + std::string(
"'width': Width of the images requested to the camera\n");
225 doc = doc + std::string(
"'height': Height of the images requested to the camera\n");
226 doc = doc + std::string(
"'rotation_with_crop': The rotation, if the param is true, is obtained swapping x with y\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 argusCamera --d 0 --period 0.033 --rotation 0.0 --width 640 --height 480 --rotation_with_crop false\n";
230 doc = doc + std::string(
"Using only mandatory params:\n");
231 doc = doc +
" yarpdev --device argusCamera\n";
232 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.
argusCameraDriver_ParamsParser()
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
bool m_rotation_with_crop
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
std::string getConfiguration() const override
Return the configuration of the device.
std::string m_provided_configuration
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,...)