YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeFrameGrabber_ParamsParser.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6
7// Generated by yarpDeviceParamParserGenerator (2.0)
8// This is an automatically generated file. Please do not edit it.
9// It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
10
11// Generated on: Thu May 22 11:32:33 2025
12
13
15#include <yarp/os/LogStream.h>
16#include <yarp/os/Value.h>
17
18namespace {
19 YARP_LOG_COMPONENT(FakeFrameGrabberParamsCOMPONENT, "yarp.device.FakeFrameGrabber")
20}
21
22
24{
25 //Default value of parameterrectificationMatrix
26 {
28 yarp::os::Value tempVal;
30 yarp::os::Bottle* tempBot = tempVal.asList();
31 if (tempBot && tempBot->size()!=0)
32 {
33 for (size_t i=0; i<tempBot->size(); i++)
34 {
35 m_rectificationMatrix.push_back(tempBot->get(i).asFloat64());
36 }
37 }
38 else
39 {
40 yError() <<"parameter 'rectificationMatrix' is not a properly formatted bottle";
41 }
42 }
43
44}
45
46
47std::vector<std::string> FakeFrameGrabber_ParamsParser::getListOfParams() const
48{
49 std::vector<std::string> params;
50 params.push_back("width");
51 params.push_back("height");
52 params.push_back("horizontalFov");
53 params.push_back("verticalFov");
54 params.push_back("fakeFrameGrabber_rpc_port");
55 params.push_back("mirror");
56 params.push_back("syncro");
57 params.push_back("physFocalLength");
58 params.push_back("focalLengthX");
59 params.push_back("focalLengthY");
60 params.push_back("principalPointX");
61 params.push_back("principalPointY");
62 params.push_back("distortionModel");
63 params.push_back("k1");
64 params.push_back("k2");
65 params.push_back("k3");
66 params.push_back("t1");
67 params.push_back("t2");
68 params.push_back("freq");
69 params.push_back("period");
70 params.push_back("mode");
71 params.push_back("src");
72 params.push_back("add_timestamp");
73 params.push_back("add_noise");
74 params.push_back("bayer");
75 params.push_back("mono");
76 params.push_back("snr");
77 params.push_back("rectificationMatrix");
78 return params;
79}
80
81
82bool FakeFrameGrabber_ParamsParser::getParamValue(const std::string& paramName, std::string& paramValue) const
83{
84 if (paramName =="width")
85 {
86 paramValue = std::to_string(m_width);
87 return true;
88 }
89 if (paramName =="height")
90 {
91 paramValue = std::to_string(m_height);
92 return true;
93 }
94 if (paramName =="horizontalFov")
95 {
96 paramValue = std::to_string(m_horizontalFov);
97 return true;
98 }
99 if (paramName =="verticalFov")
100 {
101 paramValue = std::to_string(m_verticalFov);
102 return true;
103 }
104 if (paramName =="fakeFrameGrabber_rpc_port")
105 {
106 paramValue = m_fakeFrameGrabber_rpc_port;
107 return true;
108 }
109 if (paramName =="mirror")
110 {
111 if (m_mirror==true) paramValue = "true";
112 else paramValue = "false";
113 return true;
114 }
115 if (paramName =="syncro")
116 {
117 if (m_syncro==true) paramValue = "true";
118 else paramValue = "false";
119 return true;
120 }
121 if (paramName =="physFocalLength")
122 {
123 paramValue = std::to_string(m_physFocalLength);
124 return true;
125 }
126 if (paramName =="focalLengthX")
127 {
128 paramValue = std::to_string(m_focalLengthX);
129 return true;
130 }
131 if (paramName =="focalLengthY")
132 {
133 paramValue = std::to_string(m_focalLengthY);
134 return true;
135 }
136 if (paramName =="principalPointX")
137 {
138 paramValue = std::to_string(m_principalPointX);
139 return true;
140 }
141 if (paramName =="principalPointY")
142 {
143 paramValue = std::to_string(m_principalPointY);
144 return true;
145 }
146 if (paramName =="distortionModel")
147 {
148 paramValue = m_distortionModel;
149 return true;
150 }
151 if (paramName =="k1")
152 {
153 paramValue = std::to_string(m_k1);
154 return true;
155 }
156 if (paramName =="k2")
157 {
158 paramValue = std::to_string(m_k2);
159 return true;
160 }
161 if (paramName =="k3")
162 {
163 paramValue = std::to_string(m_k3);
164 return true;
165 }
166 if (paramName =="t1")
167 {
168 paramValue = std::to_string(m_t1);
169 return true;
170 }
171 if (paramName =="t2")
172 {
173 paramValue = std::to_string(m_t2);
174 return true;
175 }
176 if (paramName =="freq")
177 {
178 paramValue = std::to_string(m_freq);
179 return true;
180 }
181 if (paramName =="period")
182 {
183 paramValue = std::to_string(m_period);
184 return true;
185 }
186 if (paramName =="mode")
187 {
188 paramValue = m_mode;
189 return true;
190 }
191 if (paramName =="src")
192 {
193 paramValue = m_src;
194 return true;
195 }
196 if (paramName =="add_timestamp")
197 {
198 if (m_add_timestamp==true) paramValue = "true";
199 else paramValue = "false";
200 return true;
201 }
202 if (paramName =="add_noise")
203 {
204 if (m_add_noise==true) paramValue = "true";
205 else paramValue = "false";
206 return true;
207 }
208 if (paramName =="bayer")
209 {
210 if (m_bayer==true) paramValue = "true";
211 else paramValue = "false";
212 return true;
213 }
214 if (paramName =="mono")
215 {
216 if (m_mono==true) paramValue = "true";
217 else paramValue = "false";
218 return true;
219 }
220 if (paramName =="snr")
221 {
222 paramValue = std::to_string(m_snr);
223 return true;
224 }
225 if (paramName =="rectificationMatrix")
226 {
227 return false;
228 }
229
230 yError() <<"parameter '" << paramName << "' was not found";
231 return false;
232
233}
234
235
237{
238 //This is a sub-optimal solution.
239 //Ideally getConfiguration() should return all parameters but it is currently
240 //returning only user provided parameters (excluding default values)
241 //This behaviour will be fixed in the near future.
242 std::string s_cfg = m_provided_configuration;
243 return s_cfg;
244}
245
247{
248 //Check for --help option
249 if (config.check("help"))
250 {
251 yCInfo(FakeFrameGrabberParamsCOMPONENT) << getDocumentationOfDeviceParams();
252 }
253
256 //Parser of parameter width
257 {
258 if (config.check("width"))
259 {
260 m_width = config.find("width").asInt64();
261 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'width' using value:" << m_width;
262 }
263 else
264 {
265 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'width' using DEFAULT value:" << m_width;
266 }
267 prop_check.unput("width");
268 }
269
270 //Parser of parameter height
271 {
272 if (config.check("height"))
273 {
274 m_height = config.find("height").asInt64();
275 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'height' using value:" << m_height;
276 }
277 else
278 {
279 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'height' using DEFAULT value:" << m_height;
280 }
281 prop_check.unput("height");
282 }
283
284 //Parser of parameter horizontalFov
285 {
286 if (config.check("horizontalFov"))
287 {
288 m_horizontalFov = config.find("horizontalFov").asFloat64();
289 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'horizontalFov' using value:" << m_horizontalFov;
290 }
291 else
292 {
293 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'horizontalFov' using DEFAULT value:" << m_horizontalFov;
294 }
295 prop_check.unput("horizontalFov");
296 }
297
298 //Parser of parameter verticalFov
299 {
300 if (config.check("verticalFov"))
301 {
302 m_verticalFov = config.find("verticalFov").asFloat64();
303 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'verticalFov' using value:" << m_verticalFov;
304 }
305 else
306 {
307 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'verticalFov' using DEFAULT value:" << m_verticalFov;
308 }
309 prop_check.unput("verticalFov");
310 }
311
312 //Parser of parameter fakeFrameGrabber_rpc_port
313 {
314 if (config.check("fakeFrameGrabber_rpc_port"))
315 {
316 m_fakeFrameGrabber_rpc_port = config.find("fakeFrameGrabber_rpc_port").asString();
317 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'fakeFrameGrabber_rpc_port' using value:" << m_fakeFrameGrabber_rpc_port;
318 }
319 else
320 {
321 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'fakeFrameGrabber_rpc_port' using DEFAULT value:" << m_fakeFrameGrabber_rpc_port;
322 }
323 prop_check.unput("fakeFrameGrabber_rpc_port");
324 }
325
326 //Parser of parameter mirror
327 {
328 if (config.check("mirror"))
329 {
330 m_mirror = config.find("mirror").asBool();
331 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mirror' using value:" << m_mirror;
332 }
333 else
334 {
335 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mirror' using DEFAULT value:" << m_mirror;
336 }
337 prop_check.unput("mirror");
338 }
339
340 //Parser of parameter syncro
341 {
342 if (config.check("syncro"))
343 {
344 m_syncro = config.find("syncro").asBool();
345 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'syncro' using value:" << m_syncro;
346 }
347 else
348 {
349 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'syncro' using DEFAULT value:" << m_syncro;
350 }
351 prop_check.unput("syncro");
352 }
353
354 //Parser of parameter physFocalLength
355 {
356 if (config.check("physFocalLength"))
357 {
358 m_physFocalLength = config.find("physFocalLength").asFloat64();
359 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'physFocalLength' using value:" << m_physFocalLength;
360 }
361 else
362 {
363 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'physFocalLength' using DEFAULT value:" << m_physFocalLength;
364 }
365 prop_check.unput("physFocalLength");
366 }
367
368 //Parser of parameter focalLengthX
369 {
370 if (config.check("focalLengthX"))
371 {
372 m_focalLengthX = config.find("focalLengthX").asFloat64();
373 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthX' using value:" << m_focalLengthX;
374 }
375 else
376 {
377 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthX' using DEFAULT value:" << m_focalLengthX;
378 }
379 prop_check.unput("focalLengthX");
380 }
381
382 //Parser of parameter focalLengthY
383 {
384 if (config.check("focalLengthY"))
385 {
386 m_focalLengthY = config.find("focalLengthY").asFloat64();
387 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthY' using value:" << m_focalLengthY;
388 }
389 else
390 {
391 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthY' using DEFAULT value:" << m_focalLengthY;
392 }
393 prop_check.unput("focalLengthY");
394 }
395
396 //Parser of parameter principalPointX
397 {
398 if (config.check("principalPointX"))
399 {
400 m_principalPointX = config.find("principalPointX").asFloat64();
401 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointX' using value:" << m_principalPointX;
402 }
403 else
404 {
405 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointX' using DEFAULT value:" << m_principalPointX;
406 }
407 prop_check.unput("principalPointX");
408 }
409
410 //Parser of parameter principalPointY
411 {
412 if (config.check("principalPointY"))
413 {
414 m_principalPointY = config.find("principalPointY").asFloat64();
415 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointY' using value:" << m_principalPointY;
416 }
417 else
418 {
419 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointY' using DEFAULT value:" << m_principalPointY;
420 }
421 prop_check.unput("principalPointY");
422 }
423
424 //Parser of parameter distortionModel
425 {
426 if (config.check("distortionModel"))
427 {
428 m_distortionModel = config.find("distortionModel").asString();
429 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'distortionModel' using value:" << m_distortionModel;
430 }
431 else
432 {
433 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'distortionModel' using DEFAULT value:" << m_distortionModel;
434 }
435 prop_check.unput("distortionModel");
436 }
437
438 //Parser of parameter k1
439 {
440 if (config.check("k1"))
441 {
442 m_k1 = config.find("k1").asFloat64();
443 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k1' using value:" << m_k1;
444 }
445 else
446 {
447 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k1' using DEFAULT value:" << m_k1;
448 }
449 prop_check.unput("k1");
450 }
451
452 //Parser of parameter k2
453 {
454 if (config.check("k2"))
455 {
456 m_k2 = config.find("k2").asFloat64();
457 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k2' using value:" << m_k2;
458 }
459 else
460 {
461 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k2' using DEFAULT value:" << m_k2;
462 }
463 prop_check.unput("k2");
464 }
465
466 //Parser of parameter k3
467 {
468 if (config.check("k3"))
469 {
470 m_k3 = config.find("k3").asFloat64();
471 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k3' using value:" << m_k3;
472 }
473 else
474 {
475 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k3' using DEFAULT value:" << m_k3;
476 }
477 prop_check.unput("k3");
478 }
479
480 //Parser of parameter t1
481 {
482 if (config.check("t1"))
483 {
484 m_t1 = config.find("t1").asFloat64();
485 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't1' using value:" << m_t1;
486 }
487 else
488 {
489 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't1' using DEFAULT value:" << m_t1;
490 }
491 prop_check.unput("t1");
492 }
493
494 //Parser of parameter t2
495 {
496 if (config.check("t2"))
497 {
498 m_t2 = config.find("t2").asFloat64();
499 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't2' using value:" << m_t2;
500 }
501 else
502 {
503 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't2' using DEFAULT value:" << m_t2;
504 }
505 prop_check.unput("t2");
506 }
507
508 //Parser of parameter freq
509 {
510 if (config.check("freq"))
511 {
512 m_freq = config.find("freq").asFloat64();
513 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'freq' using value:" << m_freq;
514 }
515 else
516 {
517 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'freq' using DEFAULT value:" << m_freq;
518 }
519 prop_check.unput("freq");
520 }
521
522 //Parser of parameter period
523 {
524 if (config.check("period"))
525 {
526 m_period = config.find("period").asFloat64();
527 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'period' using value:" << m_period;
528 }
529 else
530 {
531 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'period' using DEFAULT value:" << m_period;
532 }
533 prop_check.unput("period");
534 }
535
536 //Parser of parameter mode
537 {
538 if (config.check("mode"))
539 {
540 m_mode = config.find("mode").asString();
541 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mode' using value:" << m_mode;
542 }
543 else
544 {
545 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mode' using DEFAULT value:" << m_mode;
546 }
547 prop_check.unput("mode");
548 }
549
550 //Parser of parameter src
551 {
552 if (config.check("src"))
553 {
554 m_src = config.find("src").asString();
555 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'src' using value:" << m_src;
556 }
557 else
558 {
559 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'src' using DEFAULT value:" << m_src;
560 }
561 prop_check.unput("src");
562 }
563
564 //Parser of parameter add_timestamp
565 {
566 if (config.check("add_timestamp"))
567 {
568 m_add_timestamp = config.find("add_timestamp").asBool();
569 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_timestamp' using value:" << m_add_timestamp;
570 }
571 else
572 {
573 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_timestamp' using DEFAULT value:" << m_add_timestamp;
574 }
575 prop_check.unput("add_timestamp");
576 }
577
578 //Parser of parameter add_noise
579 {
580 if (config.check("add_noise"))
581 {
582 m_add_noise = config.find("add_noise").asBool();
583 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_noise' using value:" << m_add_noise;
584 }
585 else
586 {
587 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_noise' using DEFAULT value:" << m_add_noise;
588 }
589 prop_check.unput("add_noise");
590 }
591
592 //Parser of parameter bayer
593 {
594 if (config.check("bayer"))
595 {
596 m_bayer = config.find("bayer").asBool();
597 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'bayer' using value:" << m_bayer;
598 }
599 else
600 {
601 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'bayer' using DEFAULT value:" << m_bayer;
602 }
603 prop_check.unput("bayer");
604 }
605
606 //Parser of parameter mono
607 {
608 if (config.check("mono"))
609 {
610 m_mono = config.find("mono").asBool();
611 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mono' using value:" << m_mono;
612 }
613 else
614 {
615 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mono' using DEFAULT value:" << m_mono;
616 }
617 prop_check.unput("mono");
618 }
619
620 //Parser of parameter snr
621 {
622 if (config.check("snr"))
623 {
624 m_snr = config.find("snr").asFloat64();
625 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'snr' using value:" << m_snr;
626 }
627 else
628 {
629 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'snr' using DEFAULT value:" << m_snr;
630 }
631 prop_check.unput("snr");
632 }
633
634 //Parser of parameter rectificationMatrix
635 {
636 if (config.check("rectificationMatrix"))
637 {
638 {
639 m_rectificationMatrix.clear();
640 yarp::os::Bottle* tempBot = config.find("rectificationMatrix").asList();
641 if (tempBot)
642 {
643 std::string tempBots = tempBot->toString();
644 for (size_t i=0; i<tempBot->size(); i++)
645 {
646 m_rectificationMatrix.push_back(tempBot->get(i).asFloat64());
647 }
648 }
649 else
650 {
651 yCError(FakeFrameGrabberParamsCOMPONENT) <<"parameter 'rectificationMatrix' is not a properly formatted bottle";
652 }
653 }
654 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'rectificationMatrix' using value:" << m_rectificationMatrix;
655 }
656 else
657 {
658 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'rectificationMatrix' using DEFAULT value:" << m_rectificationMatrix;
659 }
660 prop_check.unput("rectificationMatrix");
661 }
662
663 /*
664 //This code check if the user set some parameter which are not check by the parser
665 //If the parser is set in strict mode, this will generate an error
666 if (prop_check.size() > 0)
667 {
668 bool extra_params_found = false;
669 for (auto it=prop_check.begin(); it!=prop_check.end(); it++)
670 {
671 if (m_parser_is_strict)
672 {
673 yCError(FakeFrameGrabberParamsCOMPONENT) << "User asking for parameter: "<<it->name <<" which is unknown to this parser!";
674 extra_params_found = true;
675 }
676 else
677 {
678 yCWarning(FakeFrameGrabberParamsCOMPONENT) << "User asking for parameter: "<< it->name <<" which is unknown to this parser!";
679 }
680 }
681
682 if (m_parser_is_strict && extra_params_found)
683 {
684 return false;
685 }
686 }
687 */
688 return true;
689}
690
691
693{
694 std::string doc;
695 doc = doc + std::string("\n=============================================\n");
696 doc = doc + std::string("This is the help for device: FakeFrameGrabber\n");
697 doc = doc + std::string("\n");
698 doc = doc + std::string("This is the list of the parameters accepted by the device:\n");
699 doc = doc + std::string("'width': desired width of test image\n");
700 doc = doc + std::string("'height': desired height of test image\n");
701 doc = doc + std::string("'horizontalFov': desired horizontal fov of test image\n");
702 doc = doc + std::string("'verticalFov': desired horizontal fov of test image\n");
703 doc = doc + std::string("'fakeFrameGrabber_rpc_port': rpc port for the fakeFrameGrabber\n");
704 doc = doc + std::string("'mirror': mirror height of test image\n");
705 doc = doc + std::string("'syncro': synchronize producer and consumer, so that all images are used once and only once\n");
706 doc = doc + std::string("'physFocalLength': Physical focal length\n");
707 doc = doc + std::string("'focalLengthX': Horizontal component of the focal length\n");
708 doc = doc + std::string("'focalLengthY': Vertical component of the focal length\n");
709 doc = doc + std::string("'principalPointX': X coordinate of the principal point\n");
710 doc = doc + std::string("'principalPointY': Y coordinate of the principal point\n");
711 doc = doc + std::string("'distortionModel': Reference to group of parameters describing the distortion model of the camera\n");
712 doc = doc + std::string("'k1': Radial distortion coefficient of the lens(fake\n");
713 doc = doc + std::string("'k2': Radial distortion coefficient of the lens(fake)\n");
714 doc = doc + std::string("'k3': Radial distortion coefficient of the lens(fake)\n");
715 doc = doc + std::string("'t1': Tangential distortion of the lens(fake)\n");
716 doc = doc + std::string("'t2': Tangential distortion of the lens(fake)\n");
717 doc = doc + std::string("'freq': rate of test images in Hz\n");
718 doc = doc + std::string("'period': period of test images in seconds\n");
719 doc = doc + std::string("'mode': bouncy [ball], scrolly [line], grid [grid], grid multisize [size], random [rand], none [none], time test[time]\n");
720 doc = doc + std::string("'src': background image to use, if any\n");
721 doc = doc + std::string("'add_timestamp': should write the timestamp in the first bytes of the image\n");
722 doc = doc + std::string("'add_noise': should add noise to the image (uses snr parameter)\n");
723 doc = doc + std::string("'bayer': should emit bayer test image\n");
724 doc = doc + std::string("'mono': should emit a monochrome image\n");
725 doc = doc + std::string("'snr': Signal noise ratio ([0.0-1.0]\n");
726 doc = doc + std::string("'rectificationMatrix': Matrix that describes the lens' distortion\n");
727 doc = doc + std::string("\n");
728 doc = doc + std::string("Here are some examples of invocation command with yarpdev, with all params:\n");
729 doc = doc + " yarpdev --device fakeFrameGrabber --width 320 --height 240 --horizontalFov 1.0 --verticalFov 2.0 --fakeFrameGrabber_rpc_port /fakeFrameGrabber/rpc --mirror false --syncro false --physFocalLength 3.0 --focalLengthX 4.0 --focalLengthY 5.0 --principalPointX 6.0 --principalPointY 7.0 --distortionModel FishEye --k1 8.0 --k2 9.0 --k3 10.0 --t1 11.0 --t2 12.0 --freq 0 --period 0 --mode [line] --src <optional_value> --add_timestamp false --add_noise false --bayer false --mono false --snr 0.5 --rectificationMatrix \" (1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0) \"\n";
730 doc = doc + std::string("Using only mandatory params:\n");
731 doc = doc + " yarpdev --device fakeFrameGrabber\n";
732 doc = doc + std::string("=============================================\n\n"); return doc;
733}
#define yError(...)
Definition Log.h:361
bool getParamValue(const std::string &paramName, std::string &paramValue) 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.
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.
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
A simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
size_type size() const
Gets the number of elements in the bottle.
Definition Bottle.cpp:251
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition Bottle.cpp:246
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition Bottle.cpp:211
A class for storing options and configuration information.
Definition Property.h:33
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.
Definition Searchable.h:31
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.
A single value (typically within a Bottle).
Definition Value.h:43
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
Definition Value.cpp:222
virtual Bottle * asList() const
Get list value.
Definition Value.cpp:240
void fromString(const char *str)
Set value to correspond to a textual representation.
Definition Value.cpp:351
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)