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.2)
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_GENERATION is ON.
10
11// Generated on: Fri Aug 28 15:24:21 2026
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 std::ostringstream oss;
228 oss << "( ";
229 for (auto x : m_rectificationMatrix)
230 {
231 oss << x << " ";
232 }
233 oss << " )";
234 paramValue = oss.str();
235 return true;
236 }
237
238 yError() <<"parameter '" << paramName << "' was not found";
239 return false;
240
241}
242
243
245{
246 //This is a sub-optimal solution.
247 //Ideally getConfiguration() should return all parameters but it is currently
248 //returning only user provided parameters (excluding default values)
249 //This behaviour will be fixed in the near future.
250 std::string s_cfg = m_provided_configuration;
251 return s_cfg;
252}
253
255{
256 //Check for --help option
257 if (config.check("help"))
258 {
259 yCInfo(FakeFrameGrabberParamsCOMPONENT) << getDocumentationOfDeviceParams();
260 }
261
264 //Parser of parameter width
265 {
266 if (config.check("width"))
267 {
268 m_width = config.find("width").asInt64();
269 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'width' using value:" << m_width;
270 }
271 else
272 {
273 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'width' using DEFAULT value:" << m_width;
274 }
275 prop_check.unput("width");
276 }
277
278 //Parser of parameter height
279 {
280 if (config.check("height"))
281 {
282 m_height = config.find("height").asInt64();
283 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'height' using value:" << m_height;
284 }
285 else
286 {
287 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'height' using DEFAULT value:" << m_height;
288 }
289 prop_check.unput("height");
290 }
291
292 //Parser of parameter horizontalFov
293 {
294 if (config.check("horizontalFov"))
295 {
296 m_horizontalFov = config.find("horizontalFov").asFloat64();
297 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'horizontalFov' using value:" << m_horizontalFov;
298 }
299 else
300 {
301 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'horizontalFov' using DEFAULT value:" << m_horizontalFov;
302 }
303 prop_check.unput("horizontalFov");
304 }
305
306 //Parser of parameter verticalFov
307 {
308 if (config.check("verticalFov"))
309 {
310 m_verticalFov = config.find("verticalFov").asFloat64();
311 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'verticalFov' using value:" << m_verticalFov;
312 }
313 else
314 {
315 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'verticalFov' using DEFAULT value:" << m_verticalFov;
316 }
317 prop_check.unput("verticalFov");
318 }
319
320 //Parser of parameter fakeFrameGrabber_rpc_port
321 {
322 if (config.check("fakeFrameGrabber_rpc_port"))
323 {
324 m_fakeFrameGrabber_rpc_port = config.find("fakeFrameGrabber_rpc_port").asString();
325 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'fakeFrameGrabber_rpc_port' using value:" << m_fakeFrameGrabber_rpc_port;
326 }
327 else
328 {
329 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'fakeFrameGrabber_rpc_port' using DEFAULT value:" << m_fakeFrameGrabber_rpc_port;
330 }
331 prop_check.unput("fakeFrameGrabber_rpc_port");
332 }
333
334 //Parser of parameter mirror
335 {
336 if (config.check("mirror"))
337 {
338 m_mirror = config.find("mirror").asBool();
339 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mirror' using value:" << m_mirror;
340 }
341 else
342 {
343 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mirror' using DEFAULT value:" << m_mirror;
344 }
345 prop_check.unput("mirror");
346 }
347
348 //Parser of parameter syncro
349 {
350 if (config.check("syncro"))
351 {
352 m_syncro = config.find("syncro").asBool();
353 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'syncro' using value:" << m_syncro;
354 }
355 else
356 {
357 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'syncro' using DEFAULT value:" << m_syncro;
358 }
359 prop_check.unput("syncro");
360 }
361
362 //Parser of parameter physFocalLength
363 {
364 if (config.check("physFocalLength"))
365 {
366 m_physFocalLength = config.find("physFocalLength").asFloat64();
367 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'physFocalLength' using value:" << m_physFocalLength;
368 }
369 else
370 {
371 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'physFocalLength' using DEFAULT value:" << m_physFocalLength;
372 }
373 prop_check.unput("physFocalLength");
374 }
375
376 //Parser of parameter focalLengthX
377 {
378 if (config.check("focalLengthX"))
379 {
380 m_focalLengthX = config.find("focalLengthX").asFloat64();
381 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthX' using value:" << m_focalLengthX;
382 }
383 else
384 {
385 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthX' using DEFAULT value:" << m_focalLengthX;
386 }
387 prop_check.unput("focalLengthX");
388 }
389
390 //Parser of parameter focalLengthY
391 {
392 if (config.check("focalLengthY"))
393 {
394 m_focalLengthY = config.find("focalLengthY").asFloat64();
395 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthY' using value:" << m_focalLengthY;
396 }
397 else
398 {
399 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'focalLengthY' using DEFAULT value:" << m_focalLengthY;
400 }
401 prop_check.unput("focalLengthY");
402 }
403
404 //Parser of parameter principalPointX
405 {
406 if (config.check("principalPointX"))
407 {
408 m_principalPointX = config.find("principalPointX").asFloat64();
409 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointX' using value:" << m_principalPointX;
410 }
411 else
412 {
413 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointX' using DEFAULT value:" << m_principalPointX;
414 }
415 prop_check.unput("principalPointX");
416 }
417
418 //Parser of parameter principalPointY
419 {
420 if (config.check("principalPointY"))
421 {
422 m_principalPointY = config.find("principalPointY").asFloat64();
423 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointY' using value:" << m_principalPointY;
424 }
425 else
426 {
427 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'principalPointY' using DEFAULT value:" << m_principalPointY;
428 }
429 prop_check.unput("principalPointY");
430 }
431
432 //Parser of parameter distortionModel
433 {
434 if (config.check("distortionModel"))
435 {
436 m_distortionModel = config.find("distortionModel").asString();
437 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'distortionModel' using value:" << m_distortionModel;
438 }
439 else
440 {
441 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'distortionModel' using DEFAULT value:" << m_distortionModel;
442 }
443 prop_check.unput("distortionModel");
444 }
445
446 //Parser of parameter k1
447 {
448 if (config.check("k1"))
449 {
450 m_k1 = config.find("k1").asFloat64();
451 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k1' using value:" << m_k1;
452 }
453 else
454 {
455 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k1' using DEFAULT value:" << m_k1;
456 }
457 prop_check.unput("k1");
458 }
459
460 //Parser of parameter k2
461 {
462 if (config.check("k2"))
463 {
464 m_k2 = config.find("k2").asFloat64();
465 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k2' using value:" << m_k2;
466 }
467 else
468 {
469 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k2' using DEFAULT value:" << m_k2;
470 }
471 prop_check.unput("k2");
472 }
473
474 //Parser of parameter k3
475 {
476 if (config.check("k3"))
477 {
478 m_k3 = config.find("k3").asFloat64();
479 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k3' using value:" << m_k3;
480 }
481 else
482 {
483 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'k3' using DEFAULT value:" << m_k3;
484 }
485 prop_check.unput("k3");
486 }
487
488 //Parser of parameter t1
489 {
490 if (config.check("t1"))
491 {
492 m_t1 = config.find("t1").asFloat64();
493 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't1' using value:" << m_t1;
494 }
495 else
496 {
497 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't1' using DEFAULT value:" << m_t1;
498 }
499 prop_check.unput("t1");
500 }
501
502 //Parser of parameter t2
503 {
504 if (config.check("t2"))
505 {
506 m_t2 = config.find("t2").asFloat64();
507 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't2' using value:" << m_t2;
508 }
509 else
510 {
511 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 't2' using DEFAULT value:" << m_t2;
512 }
513 prop_check.unput("t2");
514 }
515
516 //Parser of parameter freq
517 {
518 if (config.check("freq"))
519 {
520 m_freq = config.find("freq").asFloat64();
521 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'freq' using value:" << m_freq;
522 }
523 else
524 {
525 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'freq' using DEFAULT value:" << m_freq;
526 }
527 prop_check.unput("freq");
528 }
529
530 //Parser of parameter period
531 {
532 if (config.check("period"))
533 {
534 m_period = config.find("period").asFloat64();
535 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'period' using value:" << m_period;
536 }
537 else
538 {
539 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'period' using DEFAULT value:" << m_period;
540 }
541 prop_check.unput("period");
542 }
543
544 //Parser of parameter mode
545 {
546 if (config.check("mode"))
547 {
548 m_mode = config.find("mode").asString();
549 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mode' using value:" << m_mode;
550 }
551 else
552 {
553 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mode' using DEFAULT value:" << m_mode;
554 }
555 prop_check.unput("mode");
556 }
557
558 //Parser of parameter src
559 {
560 if (config.check("src"))
561 {
562 m_src = config.find("src").asString();
563 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'src' using value:" << m_src;
564 }
565 else
566 {
567 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'src' using DEFAULT value:" << m_src;
568 }
569 prop_check.unput("src");
570 }
571
572 //Parser of parameter add_timestamp
573 {
574 if (config.check("add_timestamp"))
575 {
576 m_add_timestamp = config.find("add_timestamp").asBool();
577 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_timestamp' using value:" << m_add_timestamp;
578 }
579 else
580 {
581 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_timestamp' using DEFAULT value:" << m_add_timestamp;
582 }
583 prop_check.unput("add_timestamp");
584 }
585
586 //Parser of parameter add_noise
587 {
588 if (config.check("add_noise"))
589 {
590 m_add_noise = config.find("add_noise").asBool();
591 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_noise' using value:" << m_add_noise;
592 }
593 else
594 {
595 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'add_noise' using DEFAULT value:" << m_add_noise;
596 }
597 prop_check.unput("add_noise");
598 }
599
600 //Parser of parameter bayer
601 {
602 if (config.check("bayer"))
603 {
604 m_bayer = config.find("bayer").asBool();
605 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'bayer' using value:" << m_bayer;
606 }
607 else
608 {
609 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'bayer' using DEFAULT value:" << m_bayer;
610 }
611 prop_check.unput("bayer");
612 }
613
614 //Parser of parameter mono
615 {
616 if (config.check("mono"))
617 {
618 m_mono = config.find("mono").asBool();
619 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mono' using value:" << m_mono;
620 }
621 else
622 {
623 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'mono' using DEFAULT value:" << m_mono;
624 }
625 prop_check.unput("mono");
626 }
627
628 //Parser of parameter snr
629 {
630 if (config.check("snr"))
631 {
632 m_snr = config.find("snr").asFloat64();
633 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'snr' using value:" << m_snr;
634 }
635 else
636 {
637 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'snr' using DEFAULT value:" << m_snr;
638 }
639 prop_check.unput("snr");
640 }
641
642 //Parser of parameter rectificationMatrix
643 {
644 if (config.check("rectificationMatrix"))
645 {
646 {
647 m_rectificationMatrix.clear();
648 yarp::os::Bottle* tempBot = config.find("rectificationMatrix").asList();
649 if (tempBot)
650 {
651 std::string tempBots = tempBot->toString();
652 for (size_t i=0; i<tempBot->size(); i++)
653 {
654 m_rectificationMatrix.push_back(tempBot->get(i).asFloat64());
655 }
656 }
657 else
658 {
659 yCError(FakeFrameGrabberParamsCOMPONENT) <<"parameter 'rectificationMatrix' is not a properly formatted bottle";
660 }
661 }
662 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'rectificationMatrix' using value:" << m_rectificationMatrix;
663 }
664 else
665 {
666 yCInfo(FakeFrameGrabberParamsCOMPONENT) << "Parameter 'rectificationMatrix' using DEFAULT value:" << m_rectificationMatrix;
667 }
668 prop_check.unput("rectificationMatrix");
669 }
670
671 /*
672 //This code check if the user set some parameter which are not check by the parser
673 //If the parser is set in strict mode, this will generate an error
674 if (prop_check.size() > 0)
675 {
676 bool extra_params_found = false;
677 for (auto it=prop_check.begin(); it!=prop_check.end(); it++)
678 {
679 if (m_parser_is_strict)
680 {
681 yCError(FakeFrameGrabberParamsCOMPONENT) << "User asking for parameter: "<<it->name <<" which is unknown to this parser!";
682 extra_params_found = true;
683 }
684 else
685 {
686 yCWarning(FakeFrameGrabberParamsCOMPONENT) << "User asking for parameter: "<< it->name <<" which is unknown to this parser!";
687 }
688 }
689
690 if (m_parser_is_strict && extra_params_found)
691 {
692 return false;
693 }
694 }
695 */
696 return true;
697}
698
699
701{
702 std::string doc;
703 doc = doc + std::string("\n=============================================\n");
704 doc = doc + std::string("This is the help for device: FakeFrameGrabber\n");
705 doc = doc + std::string("\n");
706 doc = doc + std::string("This is the list of the parameters accepted by the device:\n");
707 doc = doc + std::string("'width': desired width of test image\n");
708 doc = doc + std::string("'height': desired height of test image\n");
709 doc = doc + std::string("'horizontalFov': desired horizontal fov of test image\n");
710 doc = doc + std::string("'verticalFov': desired horizontal fov of test image\n");
711 doc = doc + std::string("'fakeFrameGrabber_rpc_port': rpc port for the fakeFrameGrabber\n");
712 doc = doc + std::string("'mirror': mirror height of test image\n");
713 doc = doc + std::string("'syncro': synchronize producer and consumer, so that all images are used once and only once\n");
714 doc = doc + std::string("'physFocalLength': Physical focal length\n");
715 doc = doc + std::string("'focalLengthX': Horizontal component of the focal length\n");
716 doc = doc + std::string("'focalLengthY': Vertical component of the focal length\n");
717 doc = doc + std::string("'principalPointX': X coordinate of the principal point\n");
718 doc = doc + std::string("'principalPointY': Y coordinate of the principal point\n");
719 doc = doc + std::string("'distortionModel': Reference to group of parameters describing the distortion model of the camera\n");
720 doc = doc + std::string("'k1': Radial distortion coefficient of the lens(fake\n");
721 doc = doc + std::string("'k2': Radial distortion coefficient of the lens(fake)\n");
722 doc = doc + std::string("'k3': Radial distortion coefficient of the lens(fake)\n");
723 doc = doc + std::string("'t1': Tangential distortion of the lens(fake)\n");
724 doc = doc + std::string("'t2': Tangential distortion of the lens(fake)\n");
725 doc = doc + std::string("'freq': rate of test images in Hz\n");
726 doc = doc + std::string("'period': period of test images in seconds\n");
727 doc = doc + std::string("'mode': ball, line, grid, size, rand, none, time\n");
728 doc = doc + std::string("'src': background image to use, if any\n");
729 doc = doc + std::string("'add_timestamp': should write the timestamp in the first bytes of the image\n");
730 doc = doc + std::string("'add_noise': should add noise to the image (uses snr parameter)\n");
731 doc = doc + std::string("'bayer': should emit bayer test image\n");
732 doc = doc + std::string("'mono': should emit a monochrome image\n");
733 doc = doc + std::string("'snr': Signal noise ratio ([0.0-1.0]\n");
734 doc = doc + std::string("'rectificationMatrix': Matrix that describes the lens' distortion\n");
735 doc = doc + std::string("\n");
736 doc = doc + std::string("Here are some examples of invocation command with yarpdev, with all params:\n");
737 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 YARP_FISH_EYE --k1 8.0 --k2 9.0 --k3 10.0 --t1 11.0 --t2 12.0 --freq 0 --period 0.033 --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";
738 doc = doc + std::string("Using only mandatory params:\n");
739 doc = doc + " yarpdev --device fakeFrameGrabber\n";
740 doc = doc + std::string("=============================================\n\n"); return doc;
741}
#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:252
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition Bottle.cpp:247
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition Bottle.cpp:212
A class for storing options and configuration information.
Definition Property.h:32
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:44
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:246
void fromString(const char *str)
Set value to correspond to a textual representation.
Definition Value.cpp:342
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)