YARP
Yet Another Robot Platform
Robot.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7
11
12#include <yarp/os/LogStream.h>
13
14#include <yarp/dev/PolyDriver.h>
16
17#include <algorithm>
18#include <iostream>
19#include <string>
20#include <unordered_set>
21
22
24{
25 dbg << "(name = \"" << t.name() << "\"";
26 if (!t.params().empty()) {
27 dbg << ", params = [";
28 dbg << t.params();
29 dbg << "]";
30 }
31 if (!t.devices().empty()) {
32 dbg << ", devices = [";
33 dbg << t.devices();
34 dbg << "]";
35 }
36 dbg << ")";
37 return dbg;
38}
39
40
42{
43public:
44 Private(Robot* /*parent*/)
45 {
46 }
47
48 // return true if a device with the given name exists
49 bool hasDevice(const std::string& name) const;
50
51 // return the device with the given name or <fatal error> if not found
52 Device* findDevice(const std::string& name);
53
54 // return true if a device with the given name exists
55 // considering also the provided external devices
56 bool hasDeviceIncludingExternal(const std::string& name) const;
57
58 // return the device with the given name or nullptr if not found,
59 // considering also the provided external devices
61
62 // check if there is no external devices that has the same name of an internal device
63 // return true if there is a conflict, false otherwise
65
66 // open all the devices and return true if all the open calls were successful
67 bool openDevices();
68
69 // close all the devices and return true if all the close calls were successful
70 bool closeDevices();
71
72 // return a vector of levels that have actions in the requested phase
73 std::vector<unsigned int> getLevels(ActionPhase phase) const;
74
75 // return a vector of actions for that phase and that level
76 std::vector<std::pair<Device, Action>> getActions(ActionPhase phase, unsigned int level) const;
77
78
79 // run configure action on one device
80 bool configure(const Device& device, const ParamList& params);
81
82 // run calibrate action on one device
83 bool calibrate(const Device& device, const ParamList& params);
84
85 // run attach action on one device
86 bool attach(const Device& device, const ParamList& params);
87
88 // run abort action on one device
89 bool abort(const Device& device, const ParamList& params);
90
91 // run detach action on one device
92 bool detach(const Device& device, const ParamList& params);
93
94 // run park action on one device
95 bool park(const Device& device, const ParamList& params);
96
97 // run custom action on one device
98 bool custom(const Device& device, const ParamList& params);
99
100 std::string name;
101 unsigned int build {0};
102 std::string portprefix;
107 unsigned int currentLevel {0};
108 bool dryrun {false};
110}; // class yarp::robotinterface::Robot::Private
111
112bool yarp::robotinterface::Robot::Private::hasDevice(const std::string& name) const
113{
114 for (const auto& device : devices) {
115 if (name == device.name()) {
116 return true;
117 }
118 }
119 return false;
120}
121
123{
124 for (auto& device : devices) {
125 if (name == device.name()) {
126 return &device;
127 }
128 }
129 return nullptr;
130}
131
133{
134 if (hasDevice(name)) {
135 return true;
136 } else {
137 for (int i = 0; i < externalDevices.size(); i++) {
138 const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
139 if (name == externalDevice->key) {
140 return true;
141 }
142 }
143 }
144 return false;
145}
146
149{
151 deviceFound.poly = nullptr;
152 deviceFound.key = "";
153
154 for (auto& device : devices) {
155 if (name == device.name()) {
156 deviceFound.poly = device.driver();
157 deviceFound.key = device.name();
158 return deviceFound;
159 }
160 }
161
162 for (int i = 0; i < externalDevices.size(); i++) {
163 const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
164 if (name == externalDevice->key) {
165 deviceFound = *externalDevice;
166 }
167 }
168
169 return deviceFound;
170}
171
173{
174 std::unordered_set<std::string> externalDevicesNames;
175
176 for (int i = 0; i < externalDevicesList.size(); i++) {
177 const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevicesList[i];
178 externalDevicesNames.insert(externalDevice->key);
179 }
180
181 for (auto& device : devices) {
182 if (externalDevicesNames.find(device.name()) != externalDevicesNames.end()) {
183 yError() << "Device name " << device.name() << " is used for both an internal and external device.";
184 return true;
185 }
186 }
187
188 return false;
189}
190
191
193{
194 bool ret = true;
195 for (auto& device : devices) {
196 yInfo() << "Opening device" << device.name() << "with parameters" << device.params();
197
198 if (dryrun) {
199 continue;
200 }
201
202 if (!device.open()) {
203 yWarning() << "Cannot open device" << device.name();
204 ret = false;
205 }
206 }
207 if (ret) {
208 // yDebug() << "All devices opened.";
209 } else {
210 yWarning() << "There was some problem opening one or more devices. Please check the log and your configuration";
211 }
212
213 return ret;
214}
215
217{
218 bool ret = true;
219 for (auto it = devices.rbegin(); it != devices.rend(); ++it) {
221
222 yInfo() << "Closing device" << device.name();
223
224 if (dryrun) {
225 continue;
226 }
227
228 // yDebug() << device;
229
230 if (!device.close()) {
231 yWarning() << "Cannot close device" << device.name();
232 ret = false;
233 }
234 }
235 if (ret) {
236 // yDebug() << "All devices closed.";
237 } else {
238 yWarning() << "There was some problem closing one or more devices. Please check the log and your configuration";
239 }
240
241 return ret;
242}
243
245{
246 std::vector<unsigned int> levels;
247 for (const auto& device : devices) {
248 if (device.actions().empty()) {
249 continue;
250 }
251
252 for (const auto& action : device.actions()) {
253 if (action.phase() == phase) {
254 levels.push_back(action.level());
255 }
256 }
257 }
258
259 std::sort(levels.begin(), levels.end());
260 auto it = std::unique(levels.begin(), levels.end());
261 levels.resize(it - levels.begin());
262
263 return levels;
264}
265
266
267std::vector<std::pair<yarp::robotinterface::Device, yarp::robotinterface::Action>> yarp::robotinterface::Robot::Private::getActions(yarp::robotinterface::ActionPhase phase, unsigned int level) const
268{
269 std::vector<std::pair<yarp::robotinterface::Device, yarp::robotinterface::Action>> actions;
270 for (const auto& device : devices) {
271 if (device.actions().empty()) {
272 continue;
273 }
274
275 for (const auto& action : device.actions()) {
276 if (action.phase() == phase && action.level() == level) {
277 actions.emplace_back(device, action);
278 }
279 }
280 }
281 return actions;
282}
283
284
286{
287 YARP_FIXME_NOTIMPLEMENTED("configure action")
288 return true;
289}
290
293{
294 if (!yarp::robotinterface::hasParam(params, "target")) {
295 yError() << "Action \"" << ActionTypeToString(ActionTypeCalibrate) << R"(" requires "target" parameter)";
296 return false;
297 }
298 std::string targetDeviceName = yarp::robotinterface::findParam(params, "target");
299
300 if (!hasDeviceIncludingExternal(targetDeviceName)) {
301 yError() << "Target device" << targetDeviceName << "does not exist.";
302 return false;
303 }
304
305 if (dryrun) {
306 return true;
307 }
308
309 yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
310
311 return device.calibrate(targetDevice);
312}
313
316{
317 int check = 0;
318 if (yarp::robotinterface::hasParam(params, "network")) {
319 check++;
320 }
321 if (yarp::robotinterface::hasParam(params, "networks")) {
322 check++;
323 }
325 check++;
326 }
327
328 if (check > 1) {
329 yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << R"(" : you can have only one option: "network" , "networks" or "all" )";
330 return false;
331 }
332
334
335 if (yarp::robotinterface::hasParam(params, "device")) {
336 std::string targetDeviceName = yarp::robotinterface::findParam(params, "device");
337
338 std::string targetNetwork = "...";
339 if (yarp::robotinterface::hasParam(params, "network")) {
340 targetNetwork = yarp::robotinterface::findParam(params, "network");
341 }
342
343 if (!hasDeviceIncludingExternal(targetDeviceName)) {
344 yError() << "Target device" << targetDeviceName << "(network =" << targetNetwork << ") does not exist.";
345 return false;
346 }
347
348 if (!dryrun) {
349 yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
350
351 // yDebug() << "Attach device" << device.name() << "to" << targetDevice.name() << "as" << targetNetwork;
352 drivers.push(targetDevice.poly, targetNetwork.c_str());
353 }
354
355 } else if (yarp::robotinterface::hasParam(params, "all")) {
356 if (!dryrun) {
357 for (auto& device : devices) {
358 drivers.push(device.driver(), "all");
359 }
360
361 for (int i = 0; i < externalDevices.size(); i++) {
362 const yarp::dev::PolyDriverDescriptor* externalDevice = externalDevices[i];
363 drivers.push(externalDevice->poly, "all");
364 }
365 }
366 } else if (yarp::robotinterface::hasParam(params, "networks")) {
368 v.fromString(yarp::robotinterface::findParam(params, "networks").c_str());
369 yarp::os::Bottle& targetNetworks = *(v.asList());
370
371 for (size_t i = 0; i < targetNetworks.size(); ++i) {
372 std::string targetNetwork = targetNetworks.get(i).toString();
373
374 if (!yarp::robotinterface::hasParam(params, targetNetwork)) {
375 yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << "\" requires one parameter per network. \"" << targetNetwork << "\" parameter is missing.";
376 return false;
377 }
378 std::string targetDeviceName = yarp::robotinterface::findParam(params, targetNetwork);
379 if (!hasDeviceIncludingExternal(targetDeviceName)) {
380 yError() << "Target device" << targetDeviceName << "(network =" << targetNetwork << ") does not exist.";
381 return false;
382 }
383
384 if (!dryrun) {
385 yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
386
387 // yDebug() << "Attach device" << device.name() << "to" << targetDevice.name() << "as" << targetNetwork;
388 drivers.push(targetDevice.poly, targetNetwork.c_str());
389 }
390 }
391 } else {
392 yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << R"(" requires either "network" or "networks" parameter)";
393 return false;
394 }
395
396 if (dryrun) {
397 return true;
398 }
399
400 if (!drivers.size()) {
401 yError() << "Action \"" << ActionTypeToString(ActionTypeAttach) << "\" couldn't find any device.";
402 return false;
403 }
404
405 return device.attach(drivers);
406}
407
409{
410 YARP_FIXME_NOTIMPLEMENTED("abort action")
411 return true;
412}
413
414
416{
417
418 if (!params.empty()) {
419 yWarning() << "Action \"" << ActionTypeToString(ActionTypeDetach) << "\" cannot have any parameter. Ignoring them.";
420 }
421
422 if (dryrun) {
423 return true;
424 }
425
426 return device.detach();
427}
428
431{
432 if (!yarp::robotinterface::hasParam(params, "target")) {
433 yError() << "Action \"" << ActionTypeToString(ActionTypePark) << R"(" requires "target" parameter)";
434 return false;
435 }
436 std::string targetDeviceName = yarp::robotinterface::findParam(params, "target");
437
438 if (!hasDeviceIncludingExternal(targetDeviceName)) {
439 yError() << "Target device" << targetDeviceName << "does not exist.";
440 return false;
441 }
442
443 if (dryrun) {
444 return true;
445 }
446
447 yarp::dev::PolyDriverDescriptor targetDevice = findDeviceIncludingExternal(targetDeviceName);
448
449 return device.park(targetDevice);
450}
451
453{
454 YARP_FIXME_NOTIMPLEMENTED("custom action")
455 return true;
456}
457
459 mPriv(new Private(this))
460{
461}
462
464 mPriv(new Private(this))
465{
466 mPriv->name = name;
467 mPriv->devices = devices;
468}
469
471 mPriv(new Private(this))
472{
473 mPriv->name = other.mPriv->name;
474 mPriv->build = other.mPriv->build;
475 mPriv->portprefix = other.mPriv->portprefix;
476 mPriv->currentPhase = other.mPriv->currentPhase;
477 mPriv->currentLevel = other.mPriv->currentLevel;
478 mPriv->dryrun = other.mPriv->dryrun;
480 mPriv->devices = other.mPriv->devices;
481 mPriv->params = other.mPriv->params;
482}
483
485{
486 if (&other != this) {
487 mPriv->name = other.mPriv->name;
488 mPriv->build = other.mPriv->build;
489 mPriv->portprefix = other.mPriv->portprefix;
490 mPriv->currentPhase = other.mPriv->currentPhase;
491 mPriv->currentLevel = other.mPriv->currentLevel;
492 mPriv->dryrun = other.mPriv->dryrun;
493 mPriv->reverseShutdownActionOrder = other.mPriv->reverseShutdownActionOrder;
494
495 mPriv->devices.clear();
496 mPriv->devices = other.mPriv->devices;
497
498 mPriv->params.clear();
499 mPriv->params = other.mPriv->params;
500 }
501
502 return *this;
503}
504
506{
507 delete mPriv;
508}
509
511{
512 return mPriv->name;
513}
514
516{
517 return mPriv->build;
518}
519
521{
522 return mPriv->portprefix;
523}
524
526{
527 for (auto& device : devices()) {
528 ParamList& params = device.params();
529 // Do not override "verbose" param if explicitly set in the xml
530 if (verbose && !yarp::robotinterface::hasParam(params, "verbose")) {
531 device.params().push_back(Param("verbose", "1"));
532 }
533 }
534}
535
537{
538 for (auto& device : devices()) {
539 ParamList& params = device.params();
540 // Do not override "allow-deprecated-devices" param if explicitly set in the xml
541 if (allowDeprecatedDevices && !yarp::robotinterface::hasParam(params, "allow-deprecated-devices")) {
542 device.params().push_back(Param("allow-deprecated-devices", "1"));
543 }
544 }
545}
546
548{
549 mPriv->dryrun = dryrun;
550}
551
553{
554 mPriv->reverseShutdownActionOrder = reverseShutdownActionOrder;
555}
556
558{
559 return mPriv->params;
560}
561
563{
564 return mPriv->devices;
565}
566
568{
569 return *mPriv->findDevice(name);
570}
571
572const std::string& yarp::robotinterface::Robot::name() const
573{
574 return mPriv->name;
575}
576
577const unsigned int& yarp::robotinterface::Robot::build() const
578{
579 return mPriv->build;
580}
581
583{
584 return mPriv->portprefix;
585}
586
588{
589 return mPriv->params;
590}
591
593{
594 return mPriv->devices;
595}
596
597bool yarp::robotinterface::Robot::hasDevice(const std::string& name) const
598{
599 return mPriv->hasDevice(name);
600}
601
603{
604 return *mPriv->findDevice(name);
605}
606
608{
609 yInfo() << "Interrupt received. Stopping all running threads.";
610
611 // If we received an interrupt we send a stop signal to all threads
612 // from previous phases
613 for (auto& device : devices()) {
614 device.stopThreads();
615 }
616}
617
619{
620 bool nameConflict = mPriv->checkForNamingConflictsInExternalDevices(list);
621 if (nameConflict) {
622 return false;
623 }
624
625 mPriv->externalDevices = list;
626 return true;
627}
628
630{
631 yInfo() << ActionPhaseToString(phase) << "phase starting...";
632
633 mPriv->currentPhase = phase;
634 mPriv->currentLevel = 0;
635
636 // Open all devices
637 if (phase == ActionPhaseStartup) {
638 if (!mPriv->openDevices()) {
639 yError() << "One or more devices failed opening... see previous log messages for more info";
640 if (!mPriv->closeDevices()) {
641 yError() << "One or more devices failed closing";
642 }
643 return false;
644 }
645 }
646
647 // run phase does not accept actions
648 if (phase == ActionPhaseRun) {
649 if (mPriv->getLevels(phase).size() != 0) {
650 yWarning() << "Phase" << ActionPhaseToString(phase) << "does not accept actions. Skipping all actions for this phase";
651 }
652 return true;
653 }
654
655 // Before starting any action we ensure that there are no other
656 // threads running from prevoius phases.
657 // In interrupt 2 and 3 and this is called by the interrupt callback,
658 // and therefore main thread will be blocked and join will never
659 // return. Therefore, since we want to start the abort actions we
660 // skip this check.
661 if (phase != ActionPhaseInterrupt2 && phase != ActionPhaseInterrupt3) {
662 for (auto& device : devices()) {
663 device.joinThreads();
664 }
665 }
666
667 std::vector<unsigned int> levels = mPriv->getLevels(phase);
668 if (mPriv->reverseShutdownActionOrder && (phase == ActionPhaseShutdown ||
669 phase == ActionPhaseInterrupt1 ||
670 phase == ActionPhaseInterrupt2 ||
671 phase == ActionPhaseInterrupt3)) {
672 std::reverse(levels.begin(), levels.end());
673 }
674
675 bool ret = true;
676 for (unsigned int level : levels) {
677 // for each level
678 yInfo() << "Entering action level" << level << "of phase" << ActionPhaseToString(phase);
679 mPriv->currentLevel = level;
680
681 // If current phase was changed by some other thread, we should
682 // exit the loop and avoid starting further actions.
683 if (mPriv->currentPhase != phase) {
684 ret = false;
685 break;
686 }
687
688 std::vector<std::pair<Device, Action>> actions = mPriv->getActions(phase, level);
689
690 for (auto& ait : actions) {
691 // for each action in that level
692 Device& device = ait.first;
693 Action& action = ait.second;
694
695 // If current phase was changed by some other thread, we should
696 // exit the loop and avoid starting further actions.
697 if (mPriv->currentPhase != phase) {
698 ret = false;
699 break;
700 }
701
702 yInfo() << "Executing" << ActionTypeToString(action.type()) << "action, level" << action.level() << "on device" << device.name() << "with parameters" << action.params();
703
704 switch (action.type()) {
706 if (!mPriv->configure(device, action.params())) {
707 yError() << "Cannot run configure action on device" << device.name();
708 ret = false;
709 }
710 break;
712 if (!mPriv->calibrate(device, action.params())) {
713 yError() << "Cannot run calibrate action on device" << device.name();
714 ret = false;
715 }
716 break;
717 case ActionTypeAttach:
718 if (!mPriv->attach(device, action.params())) {
719 yError() << "Cannot run attach action on device" << device.name();
720 ret = false;
721 }
722 break;
723 case ActionTypeAbort:
724 if (!mPriv->abort(device, action.params())) {
725 yError() << "Cannot run abort action on device" << device.name();
726 ret = false;
727 }
728 break;
729 case ActionTypeDetach:
730 if (!mPriv->detach(device, action.params())) {
731 yError() << "Cannot run detach action on device" << device.name();
732 ret = false;
733 }
734 break;
735 case ActionTypePark:
736 if (!mPriv->park(device, action.params())) {
737 yError() << "Cannot run park action on device" << device.name();
738 ret = false;
739 }
740 break;
741 case ActionTypeCustom:
742 if (!mPriv->custom(device, action.params())) {
743 yError() << "Cannot run custom action on device" << device.name();
744 ret = false;
745 }
746 break;
747 default:
748 yWarning() << "Unhandled action" << ActionTypeToString(action.type());
749 ret = false;
750 break;
751 }
752 }
753
754 yInfo() << "All actions for action level" << level << "of" << ActionPhaseToString(phase) << "phase started. Waiting for unfinished actions.";
755
756 // Join parallel threads
757 for (auto& device : devices()) {
758 device.joinThreads();
759 // yDebug() << "All actions for device" << device.name() << "at level()" << level << "finished";
760 }
761
762 yInfo() << "All actions for action level" << level << "of" << ActionPhaseToString(phase) << "phase finished.";
763 }
764
765 if (!ret) {
766 yWarning() << "There was some problem running actions for" << ActionPhaseToString(phase) << "phase . Please check the log and your configuration";
767 }
768
769 if (phase == ActionPhaseShutdown) {
770 if (!mPriv->closeDevices()) {
771 yError() << "One or more devices failed closing";
772 return false;
773 }
774 }
775
776 yInfo() << ActionPhaseToString(phase) << "phase finished.";
777
778 return ret;
779}
780
782{
783 return mPriv->currentPhase;
784}
785
787{
788 return mPriv->currentLevel;
789}
790
791bool yarp::robotinterface::Robot::hasParam(const std::string& name) const
792{
793 return yarp::robotinterface::hasParam(mPriv->params, name);
794}
795
796std::string yarp::robotinterface::Robot::findParam(const std::string& name) const
797{
798 return yarp::robotinterface::findParam(mPriv->params, name);
799}
float t
bool ret
#define yInfo(...)
Definition: Log.h:314
#define yError(...)
Definition: Log.h:356
#define YARP_FIXME_NOTIMPLEMENTED(what)
Definition: Log.h:406
#define yWarning(...)
Definition: Log.h:335
yarp::os::LogStream operator<<(yarp::os::LogStream dbg, const yarp::robotinterface::Robot &t)
Definition: Robot.cpp:23
void push(PolyDriver *p, const char *k)
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
A single value (typically within a Bottle).
Definition: Value.h:43
virtual Bottle * asList() const
Get list value.
Definition: Value.cpp:240
std::string toString() const override
Return a standard text representation of the content of the object.
Definition: Value.cpp:356
void fromString(const char *str)
Set value to correspond to a textual representation.
Definition: Value.cpp:351
unsigned int & level()
Definition: Action.cpp:102
ActionList & actions()
Definition: Device.cpp:270
bool attach(const yarp::dev::PolyDriverList &drivers) const
Definition: Device.cpp:416
bool park(const yarp::dev::PolyDriverDescriptor &target) const
Definition: Device.cpp:489
yarp::dev::PolyDriver * driver() const
Definition: Device.cpp:336
std::string & name()
Definition: Device.cpp:255
bool calibrate(const yarp::dev::PolyDriverDescriptor &target) const
Definition: Device.cpp:356
bool detach(const Device &device, const ParamList &params)
Definition: Robot.cpp:415
std::vector< unsigned int > getLevels(ActionPhase phase) const
Definition: Robot.cpp:244
Device * findDevice(const std::string &name)
Definition: Robot.cpp:122
bool park(const Device &device, const ParamList &params)
Definition: Robot.cpp:429
bool custom(const Device &device, const ParamList &params)
Definition: Robot.cpp:452
bool hasDevice(const std::string &name) const
Definition: Robot.cpp:112
bool calibrate(const Device &device, const ParamList &params)
Definition: Robot.cpp:291
bool hasDeviceIncludingExternal(const std::string &name) const
Definition: Robot.cpp:132
bool attach(const Device &device, const ParamList &params)
Definition: Robot.cpp:314
bool checkForNamingConflictsInExternalDevices(const yarp::dev::PolyDriverList &newExternalDevicesList)
Definition: Robot.cpp:172
yarp::robotinterface::ActionPhase currentPhase
Definition: Robot.cpp:106
yarp::dev::PolyDriverDescriptor findDeviceIncludingExternal(const std::string &name)
Definition: Robot.cpp:148
bool configure(const Device &device, const ParamList &params)
Definition: Robot.cpp:285
std::vector< std::pair< Device, Action > > getActions(ActionPhase phase, unsigned int level) const
Definition: Robot.cpp:267
yarp::dev::PolyDriverList externalDevices
Definition: Robot.cpp:105
bool abort(const Device &device, const ParamList &params)
Definition: Robot.cpp:408
bool hasParam(const std::string &name) const
Definition: Robot.cpp:791
void setAllowDeprecatedDevices(bool allowDeprecatedDevices)
Definition: Robot.cpp:536
bool hasDevice(const std::string &name) const
Definition: Robot.cpp:597
yarp::robotinterface::ActionPhase currentPhase() const
Definition: Robot.cpp:781
std::string & portprefix()
Definition: Robot.cpp:520
DeviceList & devices()
Definition: Robot.cpp:562
ParamList & params()
Definition: Robot.cpp:557
void setVerbose(bool verbose)
Definition: Robot.cpp:525
bool enterPhase(yarp::robotinterface::ActionPhase phase)
Definition: Robot.cpp:629
bool setExternalDevices(const yarp::dev::PolyDriverList &list)
Definition: Robot.cpp:618
void setReverseShutdownActionOrder(bool reverseShutdownActionOrder)
Definition: Robot.cpp:552
std::string & name()
Definition: Robot.cpp:510
Robot & operator=(const Robot &other)
Definition: Robot.cpp:484
unsigned int & build()
Definition: Robot.cpp:515
int currentLevel() const
Definition: Robot.cpp:786
std::string findParam(const std::string &name) const
Definition: Robot.cpp:796
Device & device(const std::string &name)
Definition: Robot.cpp:567
void setDryRun(bool dryrun)
Definition: Robot.cpp:547
yarp::robotinterface::Param Param
Definition: Param.h:26
std::string ActionTypeToString(robotinterface::ActionType actiontype)
Definition: Types.cpp:147
bool hasParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:16
std::vector< robotinterface::Param > ParamList
Definition: Types.h:30
std::string findParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:26
std::vector< robotinterface::Device > DeviceList
Definition: Types.h:32
std::string ActionPhaseToString(robotinterface::ActionPhase actionphase)
Definition: Types.cpp:99