YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
xHandControlBoard_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: Fri Apr 3 12:52:14 2026
12
13
15#include <yarp/os/LogStream.h>
16#include <yarp/os/Value.h>
17
18namespace {
19 YARP_LOG_COMPONENT(xHandControlBoardParamsCOMPONENT, "yarp.device.xHandControlBoard")
20}
21
22
24{
25 //Default value of parameterLIMITS_jntPosMin
26 {
27 m_LIMITS_jntPosMin.clear();
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_LIMITS_jntPosMin.push_back(tempBot->get(i).asFloat64());
36 }
37 }
38 else
39 {
40 yError() <<"parameter 'LIMITS_jntPosMin' is not a properly formatted bottle";
41 }
42 }
43
44 //Default value of parameterLIMITS_jntPosMax
45 {
46 m_LIMITS_jntPosMax.clear();
47 yarp::os::Value tempVal;
49 yarp::os::Bottle* tempBot = tempVal.asList();
50 if (tempBot && tempBot->size()!=0)
51 {
52 for (size_t i=0; i<tempBot->size(); i++)
53 {
54 m_LIMITS_jntPosMax.push_back(tempBot->get(i).asFloat64());
55 }
56 }
57 else
58 {
59 yError() <<"parameter 'LIMITS_jntPosMax' is not a properly formatted bottle";
60 }
61 }
62
63 //Default value of parameterLIMITS_jntVelMin
64 {
65 m_LIMITS_jntVelMin.clear();
66 yarp::os::Value tempVal;
68 yarp::os::Bottle* tempBot = tempVal.asList();
69 if (tempBot && tempBot->size()!=0)
70 {
71 for (size_t i=0; i<tempBot->size(); i++)
72 {
73 m_LIMITS_jntVelMin.push_back(tempBot->get(i).asFloat64());
74 }
75 }
76 else
77 {
78 yError() <<"parameter 'LIMITS_jntVelMin' is not a properly formatted bottle";
79 }
80 }
81
82 //Default value of parameterLIMITS_jntVelMax
83 {
84 m_LIMITS_jntVelMax.clear();
85 yarp::os::Value tempVal;
87 yarp::os::Bottle* tempBot = tempVal.asList();
88 if (tempBot && tempBot->size()!=0)
89 {
90 for (size_t i=0; i<tempBot->size(); i++)
91 {
92 m_LIMITS_jntVelMax.push_back(tempBot->get(i).asFloat64());
93 }
94 }
95 else
96 {
97 yError() <<"parameter 'LIMITS_jntVelMax' is not a properly formatted bottle";
98 }
99 }
100
101 //Default value of parameterGENERAL_AxisName
102 {
103 m_GENERAL_AxisName.clear();
104 yarp::os::Value tempVal;
106 yarp::os::Bottle* tempBot = tempVal.asList();
107 if (tempBot && tempBot->size()!=0)
108 {
109 for (size_t i=0; i<tempBot->size(); i++)
110 {
111 m_GENERAL_AxisName.push_back(tempBot->get(i).asString());
112 }
113 }
114 else
115 {
116 yError() <<"parameter 'GENERAL_AxisName' is not a properly formatted bottle";
117 }
118 }
119
120 //Default value of parameterGENERAL_AxisType
121 {
122 m_GENERAL_AxisType.clear();
123 yarp::os::Value tempVal;
125 yarp::os::Bottle* tempBot = tempVal.asList();
126 if (tempBot && tempBot->size()!=0)
127 {
128 for (size_t i=0; i<tempBot->size(); i++)
129 {
130 m_GENERAL_AxisType.push_back(tempBot->get(i).asString());
131 }
132 }
133 else
134 {
135 yError() <<"parameter 'GENERAL_AxisType' is not a properly formatted bottle";
136 }
137 }
138
139 //Default value of parameterGENERAL_AxisMap
140 {
141 m_GENERAL_AxisMap.clear();
142 yarp::os::Value tempVal;
144 yarp::os::Bottle* tempBot = tempVal.asList();
145 if (tempBot && tempBot->size()!=0)
146 {
147 for (size_t i=0; i<tempBot->size(); i++)
148 {
149 m_GENERAL_AxisMap.push_back(tempBot->get(i).asInt64());
150 }
151 }
152 else
153 {
154 yError() <<"parameter 'GENERAL_AxisMap' is not a properly formatted bottle";
155 }
156 }
157
158}
159
160
162{
163 std::vector<std::string> params;
164 params.push_back("connection_type");
165 params.push_back("RS485::port");
166 params.push_back("RS485::baudrate");
167 params.push_back("ETHERCAT::eth_ifname");
168 params.push_back("PID::kp");
169 params.push_back("PID::ki");
170 params.push_back("PID::kd");
171 params.push_back("TORQUE::tor_max");
172 params.push_back("MODE::mode");
173 params.push_back("LIMITS::jntPosMin");
174 params.push_back("LIMITS::jntPosMax");
175 params.push_back("LIMITS::jntVelMin");
176 params.push_back("LIMITS::jntVelMax");
177 params.push_back("GENERAL::AxisName");
178 params.push_back("GENERAL::AxisType");
179 params.push_back("GENERAL::AxisMap");
180 return params;
181}
182
183
184bool xHandControlBoard_ParamsParser::getParamValue(const std::string& paramName, std::string& paramValue) const
185{
186 if (paramName =="connection_type")
187 {
188 paramValue = m_connection_type;
189 return true;
190 }
191 if (paramName =="RS485::port")
192 {
193 paramValue = m_RS485_port;
194 return true;
195 }
196 if (paramName =="RS485::baudrate")
197 {
198 paramValue = std::to_string(m_RS485_baudrate);
199 return true;
200 }
201 if (paramName =="ETHERCAT::eth_ifname")
202 {
203 paramValue = m_ETHERCAT_eth_ifname;
204 return true;
205 }
206 if (paramName =="PID::kp")
207 {
208 paramValue = std::to_string(m_PID_kp);
209 return true;
210 }
211 if (paramName =="PID::ki")
212 {
213 paramValue = std::to_string(m_PID_ki);
214 return true;
215 }
216 if (paramName =="PID::kd")
217 {
218 paramValue = std::to_string(m_PID_kd);
219 return true;
220 }
221 if (paramName =="TORQUE::tor_max")
222 {
223 paramValue = std::to_string(m_TORQUE_tor_max);
224 return true;
225 }
226 if (paramName =="MODE::mode")
227 {
228 paramValue = std::to_string(m_MODE_mode);
229 return true;
230 }
231 if (paramName =="LIMITS::jntPosMin")
232 {
233 return false;
234 }
235 if (paramName =="LIMITS::jntPosMax")
236 {
237 return false;
238 }
239 if (paramName =="LIMITS::jntVelMin")
240 {
241 return false;
242 }
243 if (paramName =="LIMITS::jntVelMax")
244 {
245 return false;
246 }
247 if (paramName =="GENERAL::AxisName")
248 {
249 return false;
250 }
251 if (paramName =="GENERAL::AxisType")
252 {
253 return false;
254 }
255 if (paramName =="GENERAL::AxisMap")
256 {
257 return false;
258 }
259
260 yError() <<"parameter '" << paramName << "' was not found";
261 return false;
262
263}
264
265
267{
268 //This is a sub-optimal solution.
269 //Ideally getConfiguration() should return all parameters but it is currently
270 //returning only user provided parameters (excluding default values)
271 //This behaviour will be fixed in the near future.
272 std::string s_cfg = m_provided_configuration;
273 return s_cfg;
274}
275
277{
278 //Check for --help option
279 if (config.check("help"))
280 {
281 yCInfo(xHandControlBoardParamsCOMPONENT) << getDocumentationOfDeviceParams();
282 }
283
286 //Parser of parameter connection_type
287 {
288 if (config.check("connection_type"))
289 {
290 m_connection_type = config.find("connection_type").asString();
291 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'connection_type' using value:" << m_connection_type;
292 }
293 else
294 {
295 yCError(xHandControlBoardParamsCOMPONENT) << "Mandatory parameter 'connection_type' not found!";
296 yCError(xHandControlBoardParamsCOMPONENT) << "Description of the parameter: Specify the connection type";
297 return false;
298 }
299 prop_check.unput("connection_type");
300 }
301
302 //Parser of parameter RS485::port
303 {
304 yarp::os::Bottle sectionp;
305 sectionp = config.findGroup("RS485");
306 if (sectionp.check("port"))
307 {
308 m_RS485_port = sectionp.find("port").asString();
309 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'RS485::port' using value:" << m_RS485_port;
310 }
311 else
312 {
313 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'RS485::port' using DEFAULT value:" << m_RS485_port;
314 }
315 prop_check.unput("RS485::port");
316 }
317
318 //Parser of parameter RS485::baudrate
319 {
320 yarp::os::Bottle sectionp;
321 sectionp = config.findGroup("RS485");
322 if (sectionp.check("baudrate"))
323 {
324 m_RS485_baudrate = sectionp.find("baudrate").asInt64();
325 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'RS485::baudrate' using value:" << m_RS485_baudrate;
326 }
327 else
328 {
329 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'RS485::baudrate' using DEFAULT value:" << m_RS485_baudrate;
330 }
331 prop_check.unput("RS485::baudrate");
332 }
333
334 //Parser of parameter ETHERCAT::eth_ifname
335 {
336 yarp::os::Bottle sectionp;
337 sectionp = config.findGroup("ETHERCAT");
338 if (sectionp.check("eth_ifname"))
339 {
340 m_ETHERCAT_eth_ifname = sectionp.find("eth_ifname").asString();
341 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'ETHERCAT::eth_ifname' using value:" << m_ETHERCAT_eth_ifname;
342 }
343 else
344 {
345 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'ETHERCAT::eth_ifname' using DEFAULT value:" << m_ETHERCAT_eth_ifname;
346 }
347 prop_check.unput("ETHERCAT::eth_ifname");
348 }
349
350 //Parser of parameter PID::kp
351 {
352 yarp::os::Bottle sectionp;
353 sectionp = config.findGroup("PID");
354 if (sectionp.check("kp"))
355 {
356 m_PID_kp = sectionp.find("kp").asInt64();
357 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::kp' using value:" << m_PID_kp;
358 }
359 else
360 {
361 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::kp' using DEFAULT value:" << m_PID_kp;
362 }
363 prop_check.unput("PID::kp");
364 }
365
366 //Parser of parameter PID::ki
367 {
368 yarp::os::Bottle sectionp;
369 sectionp = config.findGroup("PID");
370 if (sectionp.check("ki"))
371 {
372 m_PID_ki = sectionp.find("ki").asInt64();
373 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::ki' using value:" << m_PID_ki;
374 }
375 else
376 {
377 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::ki' using DEFAULT value:" << m_PID_ki;
378 }
379 prop_check.unput("PID::ki");
380 }
381
382 //Parser of parameter PID::kd
383 {
384 yarp::os::Bottle sectionp;
385 sectionp = config.findGroup("PID");
386 if (sectionp.check("kd"))
387 {
388 m_PID_kd = sectionp.find("kd").asInt64();
389 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::kd' using value:" << m_PID_kd;
390 }
391 else
392 {
393 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'PID::kd' using DEFAULT value:" << m_PID_kd;
394 }
395 prop_check.unput("PID::kd");
396 }
397
398 //Parser of parameter TORQUE::tor_max
399 {
400 yarp::os::Bottle sectionp;
401 sectionp = config.findGroup("TORQUE");
402 if (sectionp.check("tor_max"))
403 {
404 m_TORQUE_tor_max = sectionp.find("tor_max").asInt64();
405 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'TORQUE::tor_max' using value:" << m_TORQUE_tor_max;
406 }
407 else
408 {
409 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'TORQUE::tor_max' using DEFAULT value:" << m_TORQUE_tor_max;
410 }
411 prop_check.unput("TORQUE::tor_max");
412 }
413
414 //Parser of parameter MODE::mode
415 {
416 yarp::os::Bottle sectionp;
417 sectionp = config.findGroup("MODE");
418 if (sectionp.check("mode"))
419 {
420 m_MODE_mode = sectionp.find("mode").asInt64();
421 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'MODE::mode' using value:" << m_MODE_mode;
422 }
423 else
424 {
425 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'MODE::mode' using DEFAULT value:" << m_MODE_mode;
426 }
427 prop_check.unput("MODE::mode");
428 }
429
430 //Parser of parameter LIMITS::jntPosMin
431 {
432 yarp::os::Bottle sectionp;
433 sectionp = config.findGroup("LIMITS");
434 if (sectionp.check("jntPosMin"))
435 {
436 {
437 m_LIMITS_jntPosMin.clear();
438 yarp::os::Bottle* tempBot = sectionp.find("jntPosMin").asList();
439 if (tempBot)
440 {
441 std::string tempBots = tempBot->toString();
442 for (size_t i=0; i<tempBot->size(); i++)
443 {
444 m_LIMITS_jntPosMin.push_back(tempBot->get(i).asFloat64());
445 }
446 }
447 else
448 {
449 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'LIMITS_jntPosMin' is not a properly formatted bottle";
450 }
451 }
452 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntPosMin' using value:" << m_LIMITS_jntPosMin;
453 }
454 else
455 {
456 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntPosMin' using DEFAULT value:" << m_LIMITS_jntPosMin;
457 }
458 prop_check.unput("LIMITS::jntPosMin");
459 }
460
461 //Parser of parameter LIMITS::jntPosMax
462 {
463 yarp::os::Bottle sectionp;
464 sectionp = config.findGroup("LIMITS");
465 if (sectionp.check("jntPosMax"))
466 {
467 {
468 m_LIMITS_jntPosMax.clear();
469 yarp::os::Bottle* tempBot = sectionp.find("jntPosMax").asList();
470 if (tempBot)
471 {
472 std::string tempBots = tempBot->toString();
473 for (size_t i=0; i<tempBot->size(); i++)
474 {
475 m_LIMITS_jntPosMax.push_back(tempBot->get(i).asFloat64());
476 }
477 }
478 else
479 {
480 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'LIMITS_jntPosMax' is not a properly formatted bottle";
481 }
482 }
483 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntPosMax' using value:" << m_LIMITS_jntPosMax;
484 }
485 else
486 {
487 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntPosMax' using DEFAULT value:" << m_LIMITS_jntPosMax;
488 }
489 prop_check.unput("LIMITS::jntPosMax");
490 }
491
492 //Parser of parameter LIMITS::jntVelMin
493 {
494 yarp::os::Bottle sectionp;
495 sectionp = config.findGroup("LIMITS");
496 if (sectionp.check("jntVelMin"))
497 {
498 {
499 m_LIMITS_jntVelMin.clear();
500 yarp::os::Bottle* tempBot = sectionp.find("jntVelMin").asList();
501 if (tempBot)
502 {
503 std::string tempBots = tempBot->toString();
504 for (size_t i=0; i<tempBot->size(); i++)
505 {
506 m_LIMITS_jntVelMin.push_back(tempBot->get(i).asFloat64());
507 }
508 }
509 else
510 {
511 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'LIMITS_jntVelMin' is not a properly formatted bottle";
512 }
513 }
514 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntVelMin' using value:" << m_LIMITS_jntVelMin;
515 }
516 else
517 {
518 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntVelMin' using DEFAULT value:" << m_LIMITS_jntVelMin;
519 }
520 prop_check.unput("LIMITS::jntVelMin");
521 }
522
523 //Parser of parameter LIMITS::jntVelMax
524 {
525 yarp::os::Bottle sectionp;
526 sectionp = config.findGroup("LIMITS");
527 if (sectionp.check("jntVelMax"))
528 {
529 {
530 m_LIMITS_jntVelMax.clear();
531 yarp::os::Bottle* tempBot = sectionp.find("jntVelMax").asList();
532 if (tempBot)
533 {
534 std::string tempBots = tempBot->toString();
535 for (size_t i=0; i<tempBot->size(); i++)
536 {
537 m_LIMITS_jntVelMax.push_back(tempBot->get(i).asFloat64());
538 }
539 }
540 else
541 {
542 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'LIMITS_jntVelMax' is not a properly formatted bottle";
543 }
544 }
545 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntVelMax' using value:" << m_LIMITS_jntVelMax;
546 }
547 else
548 {
549 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'LIMITS::jntVelMax' using DEFAULT value:" << m_LIMITS_jntVelMax;
550 }
551 prop_check.unput("LIMITS::jntVelMax");
552 }
553
554 //Parser of parameter GENERAL::AxisName
555 {
556 yarp::os::Bottle sectionp;
557 sectionp = config.findGroup("GENERAL");
558 if (sectionp.check("AxisName"))
559 {
560 {
561 m_GENERAL_AxisName.clear();
562 yarp::os::Bottle* tempBot = sectionp.find("AxisName").asList();
563 if (tempBot)
564 {
565 std::string tempBots = tempBot->toString();
566 for (size_t i=0; i<tempBot->size(); i++)
567 {
568 m_GENERAL_AxisName.push_back(tempBot->get(i).asString());
569 }
570 }
571 else
572 {
573 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'GENERAL_AxisName' is not a properly formatted bottle";
574 }
575 }
576 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisName' using value:" << m_GENERAL_AxisName;
577 }
578 else
579 {
580 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisName' using DEFAULT value:" << m_GENERAL_AxisName;
581 }
582 prop_check.unput("GENERAL::AxisName");
583 }
584
585 //Parser of parameter GENERAL::AxisType
586 {
587 yarp::os::Bottle sectionp;
588 sectionp = config.findGroup("GENERAL");
589 if (sectionp.check("AxisType"))
590 {
591 {
592 m_GENERAL_AxisType.clear();
593 yarp::os::Bottle* tempBot = sectionp.find("AxisType").asList();
594 if (tempBot)
595 {
596 std::string tempBots = tempBot->toString();
597 for (size_t i=0; i<tempBot->size(); i++)
598 {
599 m_GENERAL_AxisType.push_back(tempBot->get(i).asString());
600 }
601 }
602 else
603 {
604 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'GENERAL_AxisType' is not a properly formatted bottle";
605 }
606 }
607 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisType' using value:" << m_GENERAL_AxisType;
608 }
609 else
610 {
611 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisType' using DEFAULT value:" << m_GENERAL_AxisType;
612 }
613 prop_check.unput("GENERAL::AxisType");
614 }
615
616 //Parser of parameter GENERAL::AxisMap
617 {
618 yarp::os::Bottle sectionp;
619 sectionp = config.findGroup("GENERAL");
620 if (sectionp.check("AxisMap"))
621 {
622 {
623 m_GENERAL_AxisMap.clear();
624 yarp::os::Bottle* tempBot = sectionp.find("AxisMap").asList();
625 if (tempBot)
626 {
627 std::string tempBots = tempBot->toString();
628 for (size_t i=0; i<tempBot->size(); i++)
629 {
630 m_GENERAL_AxisMap.push_back(tempBot->get(i).asInt64());
631 }
632 }
633 else
634 {
635 yCError(xHandControlBoardParamsCOMPONENT) <<"parameter 'GENERAL_AxisMap' is not a properly formatted bottle";
636 }
637 }
638 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisMap' using value:" << m_GENERAL_AxisMap;
639 }
640 else
641 {
642 yCInfo(xHandControlBoardParamsCOMPONENT) << "Parameter 'GENERAL::AxisMap' using DEFAULT value:" << m_GENERAL_AxisMap;
643 }
644 prop_check.unput("GENERAL::AxisMap");
645 }
646
647 /*
648 //This code check if the user set some parameter which are not check by the parser
649 //If the parser is set in strict mode, this will generate an error
650 if (prop_check.size() > 0)
651 {
652 bool extra_params_found = false;
653 for (auto it=prop_check.begin(); it!=prop_check.end(); it++)
654 {
655 if (m_parser_is_strict)
656 {
657 yCError(xHandControlBoardParamsCOMPONENT) << "User asking for parameter: "<<it->name <<" which is unknown to this parser!";
658 extra_params_found = true;
659 }
660 else
661 {
662 yCWarning(xHandControlBoardParamsCOMPONENT) << "User asking for parameter: "<< it->name <<" which is unknown to this parser!";
663 }
664 }
665
666 if (m_parser_is_strict && extra_params_found)
667 {
668 return false;
669 }
670 }
671 */
672 return true;
673}
674
675
677{
678 std::string doc;
679 doc = doc + std::string("\n=============================================\n");
680 doc = doc + std::string("This is the help for device: xHandControlBoard\n");
681 doc = doc + std::string("\n");
682 doc = doc + std::string("This is the list of the parameters accepted by the device:\n");
683 doc = doc + std::string("'connection_type': Specify the connection type\n");
684 doc = doc + std::string("'RS485::port': Specify the port to use for the serial connection\n");
685 doc = doc + std::string("'RS485::baudrate': Specify the baudrate for the serial connection\n");
686 doc = doc + std::string("'ETHERCAT::eth_ifname': Specify the interface name for the ethercat connection\n");
687 doc = doc + std::string("'PID::kp': Finger motors P gain\n");
688 doc = doc + std::string("'PID::ki': Finger motors I gain\n");
689 doc = doc + std::string("'PID::kd': Finger motors D gain\n");
690 doc = doc + std::string("'TORQUE::tor_max': Note: 350 is the value from their ethercat_test\n");
691 doc = doc + std::string("'MODE::mode': Powerless = 0; Powerfull = 3; Check the manual for others\n");
692 doc = doc + std::string("'LIMITS::jntPosMin': \n");
693 doc = doc + std::string("'LIMITS::jntPosMax': \n");
694 doc = doc + std::string("'LIMITS::jntVelMin': \n");
695 doc = doc + std::string("'LIMITS::jntVelMax': \n");
696 doc = doc + std::string("'GENERAL::AxisName': \n");
697 doc = doc + std::string("'GENERAL::AxisType': \n");
698 doc = doc + std::string("'GENERAL::AxisMap': \n");
699 doc = doc + std::string("\n");
700 doc = doc + std::string("Here are some examples of invocation command with yarpdev, with all params:\n");
701 doc = doc + " yarpdev --device xHandControlBoard --connection_type EtherCAT --RS485::port /dev/ttyUSB0 --RS485::baudrate 3000000 --ETHERCAT::eth_ifname <optional_value> --PID::kp 225 --PID::ki 0 --PID::kd 12000 --TORQUE::tor_max 350 --MODE::mode 3 --LIMITS::jntPosMin \" (0.0 -60.0 -0.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) \" --LIMITS::jntPosMax \" (90.0 90.0 90.0 17.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0) \" --LIMITS::jntVelMin \" (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) \" --LIMITS::jntVelMax \" (100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0) \" --GENERAL::AxisName \" (a a a a a a a a a a a a) \" --GENERAL::AxisType \" (a a a a a a a a a a a a) \" --GENERAL::AxisMap \" (0 0 0 0 0 0 0 0 0 0 0 0) \"\n";
702 doc = doc + std::string("Using only mandatory params:\n");
703 doc = doc + " yarpdev --device xHandControlBoard --connection_type EtherCAT\n";
704 doc = doc + std::string("=============================================\n\n"); return doc;
705}
#define yError(...)
Definition Log.h:361
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string getConfiguration() const override
Return the configuration of the device.
std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
bool getParamValue(const std::string &paramName, std::string &paramValue) const override
Return the value (represented as a string) of the requested parameter.
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
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Definition Bottle.cpp:278
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition Bottle.cpp:212
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
Definition Bottle.cpp:288
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.
virtual Bottle & findGroup(const std::string &key) const =0
Gets a list 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 std::int64_t asInt64() const
Get 64-bit integer value.
Definition Value.cpp:210
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
virtual std::string asString() const
Get string value.
Definition Value.cpp:240
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)