YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ISimulatedWorldMsgs.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
6// Autogenerated by Thrift (based on compiler 0.14.1-yarped)
7// yarpidl_thrift version 2.0 - 11/11/2026
8// Protocol version: protocol_version=0, yarp_major=4, yarp_minor=0, yarp_patch=2
9// This is an automatically generated file.
10// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
11
12#include <yarp/conf/version.h>
13#include <ISimulatedWorldMsgs.h>
15#include <yarp/os/LogStream.h>
16
18
19#include <algorithm>
20
21namespace
22{
23 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "ISimulatedWorldMsgs")
24}
25
26//ISimulatedWorldMsgs_getRemoteProtocolVersion_helper declaration
37
39{
40 yarp::os::idl::WireWriter writer(connection);
41 if (!writer.writeListHeader(1)) {
42 return false;
43 }
44 if (!writer.writeString("getRemoteProtocolVersion")) {
45 return false;
46 }
47 return true;
48}
49
50bool ISimulatedWorldMsgs_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
51 {
52 yarp::os::idl::WireReader reader(connection);
53 if (!reader.readListHeader()) {
54 reader.fail();
55 return false;
56 }
57
58 if (!helper_proto.read(connection)) {
59 reader.fail();
60 return false;
61 }
62 return true;
63}
64
65//ProtocolVersion, client side
67 {
68 if(!yarp().canWrite()) {
69 yError(" Missing server method ISimulatedWorldMsgs::getRemoteProtocolVersion");
70 }
72 bool ok = yarp().write(helper, helper);
73 if (ok) {
74 return helper.helper_proto;}
75 else {
77 return failureproto;}
78}
79
80//ProtocolVersion, client side
82 {
83 auto locproto = this->getLocalProtocolVersion();
84 auto remproto = this->getRemoteProtocolVersion();
85 if (remproto.protocol_version != locproto.protocol_version)
86 {
87 yCError(SERVICE_LOG_COMPONENT) << "Invalid communication protocol.";
88 yCError(SERVICE_LOG_COMPONENT) << "Local Protocol Version: " << locproto.toString();
89 yCError(SERVICE_LOG_COMPONENT) << "Remote Protocol Version: " << remproto.toString();
90 return false;
91 }
92 return true;
93}
94
95//ProtocolVersion, server side
97{
99 //myproto.protocol_version using default value = 0
100 //to change this value add the following line to the .thrift file:
101 //const i16 protocol_version = <your_number_here>
102 myproto.protocol_version = 0;
106 return myproto;
107}
108
109// makeSphere helper class declaration
111 public yarp::os::Portable
112{
113public:
115 ISimulatedWorldMsgs_makeSphere_helper(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
116 bool write(yarp::os::ConnectionWriter& connection) const override;
117 bool read(yarp::os::ConnectionReader& connection) override;
118
119 class Command :
121 {
122 public:
123 Command() = default;
124 Command(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
125
126 ~Command() override = default;
127
128 bool write(yarp::os::ConnectionWriter& connection) const override;
129 bool read(yarp::os::ConnectionReader& connection) override;
130
131 bool write(const yarp::os::idl::WireWriter& writer) const override;
132 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
133 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
134
135 bool read(yarp::os::idl::WireReader& reader) override;
138
139 std::string id_name{};
140 double radius{0.0};
143 std::string frame_name{};
144 bool gravity_enable{false};
145 bool collision_enable{false};
146 };
147
148 class Reply :
150 {
151 public:
152 Reply() = default;
153 ~Reply() override = default;
154
155 bool write(yarp::os::ConnectionWriter& connection) const override;
156 bool read(yarp::os::ConnectionReader& connection) override;
157
158 bool write(const yarp::os::idl::WireWriter& writer) const override;
159 bool read(yarp::os::idl::WireReader& reader) override;
160
162 };
163
164 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const double, const yarp::sig::Pose6D&, const yarp::sig::ColorRGB&, const std::string&, const bool, const bool);
165 void call(ISimulatedWorldMsgs* ptr);
166
169
170 static constexpr const char* s_tag{"makeSphere"};
171 static constexpr size_t s_tag_len{1};
172 static constexpr size_t s_cmd_len{8};
173 static constexpr size_t s_reply_len{1};
174 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeSphere(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)"};
175 static constexpr const char* s_help{""};
176};
177
178// makeBox helper class declaration
180 public yarp::os::Portable
181{
182public:
184 ISimulatedWorldMsgs_makeBox_helper(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
185 bool write(yarp::os::ConnectionWriter& connection) const override;
186 bool read(yarp::os::ConnectionReader& connection) override;
187
188 class Command :
190 {
191 public:
192 Command() = default;
193 Command(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
194
195 ~Command() override = default;
196
197 bool write(yarp::os::ConnectionWriter& connection) const override;
198 bool read(yarp::os::ConnectionReader& connection) override;
199
200 bool write(const yarp::os::idl::WireWriter& writer) const override;
201 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
202 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
203
204 bool read(yarp::os::idl::WireReader& reader) override;
207
208 std::string id_name{};
209 double width{0.0};
210 double height{0.0};
211 double thickness{0.0};
214 std::string frame_name{};
215 bool gravity_enable{false};
216 bool collision_enable{false};
217 };
218
219 class Reply :
221 {
222 public:
223 Reply() = default;
224 ~Reply() override = default;
225
226 bool write(yarp::os::ConnectionWriter& connection) const override;
227 bool read(yarp::os::ConnectionReader& connection) override;
228
229 bool write(const yarp::os::idl::WireWriter& writer) const override;
230 bool read(yarp::os::idl::WireReader& reader) override;
231
233 };
234
235 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const double, const double, const double, const yarp::sig::Pose6D&, const yarp::sig::ColorRGB&, const std::string&, const bool, const bool);
236 void call(ISimulatedWorldMsgs* ptr);
237
240
241 static constexpr const char* s_tag{"makeBox"};
242 static constexpr size_t s_tag_len{1};
243 static constexpr size_t s_cmd_len{10};
244 static constexpr size_t s_reply_len{1};
245 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeBox(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)"};
246 static constexpr const char* s_help{""};
247};
248
249// makeCylinder helper class declaration
251 public yarp::os::Portable
252{
253public:
255 ISimulatedWorldMsgs_makeCylinder_helper(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
256 bool write(yarp::os::ConnectionWriter& connection) const override;
257 bool read(yarp::os::ConnectionReader& connection) override;
258
259 class Command :
261 {
262 public:
263 Command() = default;
264 Command(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
265
266 ~Command() override = default;
267
268 bool write(yarp::os::ConnectionWriter& connection) const override;
269 bool read(yarp::os::ConnectionReader& connection) override;
270
271 bool write(const yarp::os::idl::WireWriter& writer) const override;
272 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
273 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
274
275 bool read(yarp::os::idl::WireReader& reader) override;
278
279 std::string id_name{};
280 double radius{0.0};
281 double length{0.0};
284 std::string frame_name{};
285 bool gravity_enable{false};
286 bool collision_enable{false};
287 };
288
289 class Reply :
291 {
292 public:
293 Reply() = default;
294 ~Reply() override = default;
295
296 bool write(yarp::os::ConnectionWriter& connection) const override;
297 bool read(yarp::os::ConnectionReader& connection) override;
298
299 bool write(const yarp::os::idl::WireWriter& writer) const override;
300 bool read(yarp::os::idl::WireReader& reader) override;
301
303 };
304
305 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const double, const double, const yarp::sig::Pose6D&, const yarp::sig::ColorRGB&, const std::string&, const bool, const bool);
306 void call(ISimulatedWorldMsgs* ptr);
307
310
311 static constexpr const char* s_tag{"makeCylinder"};
312 static constexpr size_t s_tag_len{1};
313 static constexpr size_t s_cmd_len{9};
314 static constexpr size_t s_reply_len{1};
315 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeCylinder(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)"};
316 static constexpr const char* s_help{""};
317};
318
319// makeFrame helper class declaration
321 public yarp::os::Portable
322{
323public:
325 ISimulatedWorldMsgs_makeFrame_helper(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
326 bool write(yarp::os::ConnectionWriter& connection) const override;
327 bool read(yarp::os::ConnectionReader& connection) override;
328
329 class Command :
331 {
332 public:
333 Command() = default;
334 Command(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
335
336 ~Command() override = default;
337
338 bool write(yarp::os::ConnectionWriter& connection) const override;
339 bool read(yarp::os::ConnectionReader& connection) override;
340
341 bool write(const yarp::os::idl::WireWriter& writer) const override;
342 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
343 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
344
345 bool read(yarp::os::idl::WireReader& reader) override;
348
349 std::string id_name{};
350 double size{0.0};
353 std::string frame_name{};
354 bool gravity_enable{false};
355 bool collision_enable{false};
356 };
357
358 class Reply :
360 {
361 public:
362 Reply() = default;
363 ~Reply() override = default;
364
365 bool write(yarp::os::ConnectionWriter& connection) const override;
366 bool read(yarp::os::ConnectionReader& connection) override;
367
368 bool write(const yarp::os::idl::WireWriter& writer) const override;
369 bool read(yarp::os::idl::WireReader& reader) override;
370
372 };
373
374 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const double, const yarp::sig::Pose6D&, const yarp::sig::ColorRGB&, const std::string&, const bool, const bool);
375 void call(ISimulatedWorldMsgs* ptr);
376
379
380 static constexpr const char* s_tag{"makeFrame"};
381 static constexpr size_t s_tag_len{1};
382 static constexpr size_t s_cmd_len{8};
383 static constexpr size_t s_reply_len{1};
384 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeFrame(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)"};
385 static constexpr const char* s_help{""};
386};
387
388// makeModel helper class declaration
390 public yarp::os::Portable
391{
392public:
394 ISimulatedWorldMsgs_makeModel_helper(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
395 bool write(yarp::os::ConnectionWriter& connection) const override;
396 bool read(yarp::os::ConnectionReader& connection) override;
397
398 class Command :
400 {
401 public:
402 Command() = default;
403 Command(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable);
404
405 ~Command() override = default;
406
407 bool write(yarp::os::ConnectionWriter& connection) const override;
408 bool read(yarp::os::ConnectionReader& connection) override;
409
410 bool write(const yarp::os::idl::WireWriter& writer) const override;
411 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
412 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
413
414 bool read(yarp::os::idl::WireReader& reader) override;
417
418 std::string id_name{};
419 std::string filename{};
421 std::string frame_name{};
422 bool gravity_enable{false};
423 bool collision_enable{false};
424 };
425
426 class Reply :
428 {
429 public:
430 Reply() = default;
431 ~Reply() override = default;
432
433 bool write(yarp::os::ConnectionWriter& connection) const override;
434 bool read(yarp::os::ConnectionReader& connection) override;
435
436 bool write(const yarp::os::idl::WireWriter& writer) const override;
437 bool read(yarp::os::idl::WireReader& reader) override;
438
440 };
441
442 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&, const yarp::sig::Pose6D&, const std::string&, const bool, const bool);
443 void call(ISimulatedWorldMsgs* ptr);
444
447
448 static constexpr const char* s_tag{"makeModel"};
449 static constexpr size_t s_tag_len{1};
450 static constexpr size_t s_cmd_len{7};
451 static constexpr size_t s_reply_len{1};
452 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeModel(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)"};
453 static constexpr const char* s_help{""};
454};
455
456// makeActor helper class declaration
458 public yarp::os::Portable
459{
460public:
462 ISimulatedWorldMsgs_makeActor_helper(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose);
463 bool write(yarp::os::ConnectionWriter& connection) const override;
464 bool read(yarp::os::ConnectionReader& connection) override;
465
466 class Command :
468 {
469 public:
470 Command() = default;
471 Command(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose);
472
473 ~Command() override = default;
474
475 bool write(yarp::os::ConnectionWriter& connection) const override;
476 bool read(yarp::os::ConnectionReader& connection) override;
477
478 bool write(const yarp::os::idl::WireWriter& writer) const override;
479 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
480 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
481
482 bool read(yarp::os::idl::WireReader& reader) override;
485
486 std::string id_name{};
487 std::string skinfile{};
488 std::string animfile{};
490 };
491
492 class Reply :
494 {
495 public:
496 Reply() = default;
497 ~Reply() override = default;
498
499 bool write(yarp::os::ConnectionWriter& connection) const override;
500 bool read(yarp::os::ConnectionReader& connection) override;
501
502 bool write(const yarp::os::idl::WireWriter& writer) const override;
503 bool read(yarp::os::idl::WireReader& reader) override;
504
506 };
507
508 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&, const std::string&, const yarp::sig::Pose6D&);
509 void call(ISimulatedWorldMsgs* ptr);
510
513
514 static constexpr const char* s_tag{"makeActor"};
515 static constexpr size_t s_tag_len{1};
516 static constexpr size_t s_cmd_len{5};
517 static constexpr size_t s_reply_len{1};
518 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::makeActor(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose)"};
519 static constexpr const char* s_help{""};
520};
521
522// changeColor helper class declaration
524 public yarp::os::Portable
525{
526public:
528 ISimulatedWorldMsgs_changeColor_helper(const std::string& id, const yarp::sig::ColorRGB& color);
529 bool write(yarp::os::ConnectionWriter& connection) const override;
530 bool read(yarp::os::ConnectionReader& connection) override;
531
532 class Command :
534 {
535 public:
536 Command() = default;
537 Command(const std::string& id, const yarp::sig::ColorRGB& color);
538
539 ~Command() override = default;
540
541 bool write(yarp::os::ConnectionWriter& connection) const override;
542 bool read(yarp::os::ConnectionReader& connection) override;
543
544 bool write(const yarp::os::idl::WireWriter& writer) const override;
545 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
546 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
547
548 bool read(yarp::os::idl::WireReader& reader) override;
551
552 std::string id{};
554 };
555
556 class Reply :
558 {
559 public:
560 Reply() = default;
561 ~Reply() override = default;
562
563 bool write(yarp::os::ConnectionWriter& connection) const override;
564 bool read(yarp::os::ConnectionReader& connection) override;
565
566 bool write(const yarp::os::idl::WireWriter& writer) const override;
567 bool read(yarp::os::idl::WireReader& reader) override;
568
570 };
571
572 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const yarp::sig::ColorRGB&);
573 void call(ISimulatedWorldMsgs* ptr);
574
577
578 static constexpr const char* s_tag{"changeColor"};
579 static constexpr size_t s_tag_len{1};
580 static constexpr size_t s_cmd_len{3};
581 static constexpr size_t s_reply_len{1};
582 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::changeColor(const std::string& id, const yarp::sig::ColorRGB& color)"};
583 static constexpr const char* s_help{""};
584};
585
586// setPose helper class declaration
588 public yarp::os::Portable
589{
590public:
592 ISimulatedWorldMsgs_setPose_helper(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name);
593 bool write(yarp::os::ConnectionWriter& connection) const override;
594 bool read(yarp::os::ConnectionReader& connection) override;
595
596 class Command :
598 {
599 public:
600 Command() = default;
601 Command(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name);
602
603 ~Command() override = default;
604
605 bool write(yarp::os::ConnectionWriter& connection) const override;
606 bool read(yarp::os::ConnectionReader& connection) override;
607
608 bool write(const yarp::os::idl::WireWriter& writer) const override;
609 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
610 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
611
612 bool read(yarp::os::idl::WireReader& reader) override;
615
616 std::string id{};
618 std::string frame_name{};
619 };
620
621 class Reply :
623 {
624 public:
625 Reply() = default;
626 ~Reply() override = default;
627
628 bool write(yarp::os::ConnectionWriter& connection) const override;
629 bool read(yarp::os::ConnectionReader& connection) override;
630
631 bool write(const yarp::os::idl::WireWriter& writer) const override;
632 bool read(yarp::os::idl::WireReader& reader) override;
633
635 };
636
637 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const yarp::sig::Pose6D&, const std::string&);
638 void call(ISimulatedWorldMsgs* ptr);
639
642
643 static constexpr const char* s_tag{"setPose"};
644 static constexpr size_t s_tag_len{1};
645 static constexpr size_t s_cmd_len{4};
646 static constexpr size_t s_reply_len{1};
647 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::setPose(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name)"};
648 static constexpr const char* s_help{""};
649};
650
651// enableGravity helper class declaration
653 public yarp::os::Portable
654{
655public:
657 ISimulatedWorldMsgs_enableGravity_helper(const std::string& id, const bool enable);
658 bool write(yarp::os::ConnectionWriter& connection) const override;
659 bool read(yarp::os::ConnectionReader& connection) override;
660
661 class Command :
663 {
664 public:
665 Command() = default;
666 Command(const std::string& id, const bool enable);
667
668 ~Command() override = default;
669
670 bool write(yarp::os::ConnectionWriter& connection) const override;
671 bool read(yarp::os::ConnectionReader& connection) override;
672
673 bool write(const yarp::os::idl::WireWriter& writer) const override;
674 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
675 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
676
677 bool read(yarp::os::idl::WireReader& reader) override;
680
681 std::string id{};
682 bool enable{false};
683 };
684
685 class Reply :
687 {
688 public:
689 Reply() = default;
690 ~Reply() override = default;
691
692 bool write(yarp::os::ConnectionWriter& connection) const override;
693 bool read(yarp::os::ConnectionReader& connection) override;
694
695 bool write(const yarp::os::idl::WireWriter& writer) const override;
696 bool read(yarp::os::idl::WireReader& reader) override;
697
699 };
700
701 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const bool);
702 void call(ISimulatedWorldMsgs* ptr);
703
706
707 static constexpr const char* s_tag{"enableGravity"};
708 static constexpr size_t s_tag_len{1};
709 static constexpr size_t s_cmd_len{3};
710 static constexpr size_t s_reply_len{1};
711 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::enableGravity(const std::string& id, const bool enable)"};
712 static constexpr const char* s_help{""};
713};
714
715// enableCollision helper class declaration
717 public yarp::os::Portable
718{
719public:
721 ISimulatedWorldMsgs_enableCollision_helper(const std::string& id, const bool enable);
722 bool write(yarp::os::ConnectionWriter& connection) const override;
723 bool read(yarp::os::ConnectionReader& connection) override;
724
725 class Command :
727 {
728 public:
729 Command() = default;
730 Command(const std::string& id, const bool enable);
731
732 ~Command() override = default;
733
734 bool write(yarp::os::ConnectionWriter& connection) const override;
735 bool read(yarp::os::ConnectionReader& connection) override;
736
737 bool write(const yarp::os::idl::WireWriter& writer) const override;
738 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
739 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
740
741 bool read(yarp::os::idl::WireReader& reader) override;
744
745 std::string id{};
746 bool enable{false};
747 };
748
749 class Reply :
751 {
752 public:
753 Reply() = default;
754 ~Reply() override = default;
755
756 bool write(yarp::os::ConnectionWriter& connection) const override;
757 bool read(yarp::os::ConnectionReader& connection) override;
758
759 bool write(const yarp::os::idl::WireWriter& writer) const override;
760 bool read(yarp::os::idl::WireReader& reader) override;
761
763 };
764
765 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const bool);
766 void call(ISimulatedWorldMsgs* ptr);
767
770
771 static constexpr const char* s_tag{"enableCollision"};
772 static constexpr size_t s_tag_len{1};
773 static constexpr size_t s_cmd_len{3};
774 static constexpr size_t s_reply_len{1};
775 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::enableCollision(const std::string& id, const bool enable)"};
776 static constexpr const char* s_help{""};
777};
778
779// getPose helper class declaration
781 public yarp::os::Portable
782{
783public:
785 ISimulatedWorldMsgs_getPose_helper(const std::string& id, const std::string& frame_name);
786 bool write(yarp::os::ConnectionWriter& connection) const override;
787 bool read(yarp::os::ConnectionReader& connection) override;
788
789 class Command :
791 {
792 public:
793 Command() = default;
794 Command(const std::string& id, const std::string& frame_name);
795
796 ~Command() override = default;
797
798 bool write(yarp::os::ConnectionWriter& connection) const override;
799 bool read(yarp::os::ConnectionReader& connection) override;
800
801 bool write(const yarp::os::idl::WireWriter& writer) const override;
802 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
803 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
804
805 bool read(yarp::os::idl::WireReader& reader) override;
808
809 std::string id{};
810 std::string frame_name{};
811 };
812
813 class Reply :
815 {
816 public:
817 Reply() = default;
818 ~Reply() override = default;
819
820 bool write(yarp::os::ConnectionWriter& connection) const override;
821 bool read(yarp::os::ConnectionReader& connection) override;
822
823 bool write(const yarp::os::idl::WireWriter& writer) const override;
824 bool read(yarp::os::idl::WireReader& reader) override;
825
827 };
828
829 using funcptr_t = getPoseReturnValue (*)(const std::string&, const std::string&);
830 void call(ISimulatedWorldMsgs* ptr);
831
834
835 static constexpr const char* s_tag{"getPose"};
836 static constexpr size_t s_tag_len{1};
837 static constexpr size_t s_cmd_len{3};
838 static constexpr size_t s_reply_len{2};
839 static constexpr const char* s_prototype{"getPoseReturnValue ISimulatedWorldMsgs::getPose(const std::string& id, const std::string& frame_name)"};
840 static constexpr const char* s_help{""};
841};
842
843// deleteObject helper class declaration
845 public yarp::os::Portable
846{
847public:
849 explicit ISimulatedWorldMsgs_deleteObject_helper(const std::string& id);
850 bool write(yarp::os::ConnectionWriter& connection) const override;
851 bool read(yarp::os::ConnectionReader& connection) override;
852
853 class Command :
855 {
856 public:
857 Command() = default;
858 explicit Command(const std::string& id);
859
860 ~Command() override = default;
861
862 bool write(yarp::os::ConnectionWriter& connection) const override;
863 bool read(yarp::os::ConnectionReader& connection) override;
864
865 bool write(const yarp::os::idl::WireWriter& writer) const override;
866 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
867 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
868
869 bool read(yarp::os::idl::WireReader& reader) override;
872
873 std::string id{};
874 };
875
876 class Reply :
878 {
879 public:
880 Reply() = default;
881 ~Reply() override = default;
882
883 bool write(yarp::os::ConnectionWriter& connection) const override;
884 bool read(yarp::os::ConnectionReader& connection) override;
885
886 bool write(const yarp::os::idl::WireWriter& writer) const override;
887 bool read(yarp::os::idl::WireReader& reader) override;
888
890 };
891
892 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&);
893 void call(ISimulatedWorldMsgs* ptr);
894
897
898 static constexpr const char* s_tag{"deleteObject"};
899 static constexpr size_t s_tag_len{1};
900 static constexpr size_t s_cmd_len{2};
901 static constexpr size_t s_reply_len{1};
902 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::deleteObject(const std::string& id)"};
903 static constexpr const char* s_help{""};
904};
905
906// deleteAll helper class declaration
908 public yarp::os::Portable
909{
910public:
912 bool write(yarp::os::ConnectionWriter& connection) const override;
913 bool read(yarp::os::ConnectionReader& connection) override;
914
915 class Command :
917 {
918 public:
919 Command() = default;
920 ~Command() override = default;
921
922 bool write(yarp::os::ConnectionWriter& connection) const override;
923 bool read(yarp::os::ConnectionReader& connection) override;
924
925 bool write(const yarp::os::idl::WireWriter& writer) const override;
926 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
927 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
928
929 bool read(yarp::os::idl::WireReader& reader) override;
932 };
933
934 class Reply :
936 {
937 public:
938 Reply() = default;
939 ~Reply() override = default;
940
941 bool write(yarp::os::ConnectionWriter& connection) const override;
942 bool read(yarp::os::ConnectionReader& connection) override;
943
944 bool write(const yarp::os::idl::WireWriter& writer) const override;
945 bool read(yarp::os::idl::WireReader& reader) override;
946
948 };
949
951 void call(ISimulatedWorldMsgs* ptr);
952
955
956 static constexpr const char* s_tag{"deleteAll"};
957 static constexpr size_t s_tag_len{1};
958 static constexpr size_t s_cmd_len{1};
959 static constexpr size_t s_reply_len{1};
960 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::deleteAll()"};
961 static constexpr const char* s_help{""};
962};
963
964// getList helper class declaration
966 public yarp::os::Portable
967{
968public:
970 bool write(yarp::os::ConnectionWriter& connection) const override;
971 bool read(yarp::os::ConnectionReader& connection) override;
972
973 class Command :
975 {
976 public:
977 Command() = default;
978 ~Command() override = default;
979
980 bool write(yarp::os::ConnectionWriter& connection) const override;
981 bool read(yarp::os::ConnectionReader& connection) override;
982
983 bool write(const yarp::os::idl::WireWriter& writer) const override;
984 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
985 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
986
987 bool read(yarp::os::idl::WireReader& reader) override;
990 };
991
992 class Reply :
994 {
995 public:
996 Reply() = default;
997 ~Reply() override = default;
998
999 bool write(yarp::os::ConnectionWriter& connection) const override;
1000 bool read(yarp::os::ConnectionReader& connection) override;
1001
1002 bool write(const yarp::os::idl::WireWriter& writer) const override;
1003 bool read(yarp::os::idl::WireReader& reader) override;
1004
1006 };
1007
1009 void call(ISimulatedWorldMsgs* ptr);
1010
1013
1014 static constexpr const char* s_tag{"getList"};
1015 static constexpr size_t s_tag_len{1};
1016 static constexpr size_t s_cmd_len{1};
1017 static constexpr size_t s_reply_len{2};
1018 static constexpr const char* s_prototype{"getListReturnValue ISimulatedWorldMsgs::getList()"};
1019 static constexpr const char* s_help{""};
1020};
1021
1022// attach helper class declaration
1024 public yarp::os::Portable
1025{
1026public:
1028 ISimulatedWorldMsgs_attach_helper(const std::string& id, const std::string& link_name);
1029 bool write(yarp::os::ConnectionWriter& connection) const override;
1030 bool read(yarp::os::ConnectionReader& connection) override;
1031
1032 class Command :
1034 {
1035 public:
1036 Command() = default;
1037 Command(const std::string& id, const std::string& link_name);
1038
1039 ~Command() override = default;
1040
1041 bool write(yarp::os::ConnectionWriter& connection) const override;
1042 bool read(yarp::os::ConnectionReader& connection) override;
1043
1044 bool write(const yarp::os::idl::WireWriter& writer) const override;
1045 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1046 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1047
1048 bool read(yarp::os::idl::WireReader& reader) override;
1049 bool readTag(yarp::os::idl::WireReader& reader);
1050 bool readArgs(yarp::os::idl::WireReader& reader);
1051
1052 std::string id{};
1053 std::string link_name{};
1054 };
1055
1056 class Reply :
1058 {
1059 public:
1060 Reply() = default;
1061 ~Reply() override = default;
1062
1063 bool write(yarp::os::ConnectionWriter& connection) const override;
1064 bool read(yarp::os::ConnectionReader& connection) override;
1065
1066 bool write(const yarp::os::idl::WireWriter& writer) const override;
1067 bool read(yarp::os::idl::WireReader& reader) override;
1068
1070 };
1071
1072 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&);
1073 void call(ISimulatedWorldMsgs* ptr);
1074
1077
1078 static constexpr const char* s_tag{"attach"};
1079 static constexpr size_t s_tag_len{1};
1080 static constexpr size_t s_cmd_len{3};
1081 static constexpr size_t s_reply_len{1};
1082 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::attach(const std::string& id, const std::string& link_name)"};
1083 static constexpr const char* s_help{""};
1084};
1085
1086// detach helper class declaration
1088 public yarp::os::Portable
1089{
1090public:
1092 explicit ISimulatedWorldMsgs_detach_helper(const std::string& id);
1093 bool write(yarp::os::ConnectionWriter& connection) const override;
1094 bool read(yarp::os::ConnectionReader& connection) override;
1095
1096 class Command :
1098 {
1099 public:
1100 Command() = default;
1101 explicit Command(const std::string& id);
1102
1103 ~Command() override = default;
1104
1105 bool write(yarp::os::ConnectionWriter& connection) const override;
1106 bool read(yarp::os::ConnectionReader& connection) override;
1107
1108 bool write(const yarp::os::idl::WireWriter& writer) const override;
1109 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1110 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1111
1112 bool read(yarp::os::idl::WireReader& reader) override;
1113 bool readTag(yarp::os::idl::WireReader& reader);
1114 bool readArgs(yarp::os::idl::WireReader& reader);
1115
1116 std::string id{};
1117 };
1118
1119 class Reply :
1121 {
1122 public:
1123 Reply() = default;
1124 ~Reply() override = default;
1125
1126 bool write(yarp::os::ConnectionWriter& connection) const override;
1127 bool read(yarp::os::ConnectionReader& connection) override;
1128
1129 bool write(const yarp::os::idl::WireWriter& writer) const override;
1130 bool read(yarp::os::idl::WireReader& reader) override;
1131
1133 };
1134
1135 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&);
1136 void call(ISimulatedWorldMsgs* ptr);
1137
1140
1141 static constexpr const char* s_tag{"detach"};
1142 static constexpr size_t s_tag_len{1};
1143 static constexpr size_t s_cmd_len{2};
1144 static constexpr size_t s_reply_len{1};
1145 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::detach(const std::string& id)"};
1146 static constexpr const char* s_help{""};
1147};
1148
1149// rename helper class declaration
1151 public yarp::os::Portable
1152{
1153public:
1155 ISimulatedWorldMsgs_rename_helper(const std::string& old_name, const std::string& new_name);
1156 bool write(yarp::os::ConnectionWriter& connection) const override;
1157 bool read(yarp::os::ConnectionReader& connection) override;
1158
1159 class Command :
1161 {
1162 public:
1163 Command() = default;
1164 Command(const std::string& old_name, const std::string& new_name);
1165
1166 ~Command() override = default;
1167
1168 bool write(yarp::os::ConnectionWriter& connection) const override;
1169 bool read(yarp::os::ConnectionReader& connection) override;
1170
1171 bool write(const yarp::os::idl::WireWriter& writer) const override;
1172 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1173 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1174
1175 bool read(yarp::os::idl::WireReader& reader) override;
1176 bool readTag(yarp::os::idl::WireReader& reader);
1177 bool readArgs(yarp::os::idl::WireReader& reader);
1178
1179 std::string old_name{};
1180 std::string new_name{};
1181 };
1182
1183 class Reply :
1185 {
1186 public:
1187 Reply() = default;
1188 ~Reply() override = default;
1189
1190 bool write(yarp::os::ConnectionWriter& connection) const override;
1191 bool read(yarp::os::ConnectionReader& connection) override;
1192
1193 bool write(const yarp::os::idl::WireWriter& writer) const override;
1194 bool read(yarp::os::idl::WireReader& reader) override;
1195
1197 };
1198
1199 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&);
1200 void call(ISimulatedWorldMsgs* ptr);
1201
1204
1205 static constexpr const char* s_tag{"rename"};
1206 static constexpr size_t s_tag_len{1};
1207 static constexpr size_t s_cmd_len{3};
1208 static constexpr size_t s_reply_len{1};
1209 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::rename(const std::string& old_name, const std::string& new_name)"};
1210 static constexpr const char* s_help{""};
1211};
1212
1213// makeSphere helper class implementation
1214ISimulatedWorldMsgs_makeSphere_helper::ISimulatedWorldMsgs_makeSphere_helper(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1215 cmd{id_name, radius, pose, color, frame_name, gravity_enable, collision_enable}
1216{
1217}
1218
1220{
1221 return cmd.write(connection);
1222}
1223
1225{
1226 return reply.read(connection);
1227}
1228
1229ISimulatedWorldMsgs_makeSphere_helper::Command::Command(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1230 id_name{id_name},
1231 radius{radius},
1232 pose{pose},
1233 color{color},
1234 frame_name{frame_name},
1235 gravity_enable{gravity_enable},
1236 collision_enable{collision_enable}
1237{
1238}
1239
1241{
1242 yarp::os::idl::WireWriter writer(connection);
1243 if (!writer.writeListHeader(s_cmd_len)) {
1244 return false;
1245 }
1246 return write(writer);
1247}
1248
1250{
1251 yarp::os::idl::WireReader reader(connection);
1252 if (!reader.readListHeader()) {
1253 reader.fail();
1254 return false;
1255 }
1256 return read(reader);
1257}
1258
1260{
1261 if (!writeTag(writer)) {
1262 return false;
1263 }
1264 if (!writeArgs(writer)) {
1265 return false;
1266 }
1267 return true;
1268}
1269
1271{
1272 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1273 return false;
1274 }
1275 return true;
1276}
1277
1279{
1280 if (!writer.writeString(id_name)) {
1281 return false;
1282 }
1283 if (!writer.writeFloat64(radius)) {
1284 return false;
1285 }
1286 if (!writer.writeNested(pose)) {
1287 return false;
1288 }
1289 if (!writer.writeNested(color)) {
1290 return false;
1291 }
1292 if (!writer.writeString(frame_name)) {
1293 return false;
1294 }
1295 if (!writer.writeBool(gravity_enable)) {
1296 return false;
1297 }
1298 if (!writer.writeBool(collision_enable)) {
1299 return false;
1300 }
1301 return true;
1302}
1303
1305{
1306 if (!readTag(reader)) {
1307 return false;
1308 }
1309 if (!readArgs(reader)) {
1310 return false;
1311 }
1312 return true;
1313}
1314
1316{
1317 std::string tag = reader.readTag(s_tag_len);
1318 if (reader.isError()) {
1319 return false;
1320 }
1321 if (tag != s_tag) {
1322 reader.fail();
1323 return false;
1324 }
1325 return true;
1326}
1327
1329{
1330 if (reader.noMore()) {
1331 reader.fail();
1332 return false;
1333 }
1334 if (!reader.readString(id_name)) {
1335 reader.fail();
1336 return false;
1337 }
1338 if (reader.noMore()) {
1339 reader.fail();
1340 return false;
1341 }
1342 if (!reader.readFloat64(radius)) {
1343 reader.fail();
1344 return false;
1345 }
1346 if (reader.noMore()) {
1347 reader.fail();
1348 return false;
1349 }
1350 if (!reader.readNested(pose)) {
1351 reader.fail();
1352 return false;
1353 }
1354 if (reader.noMore()) {
1355 reader.fail();
1356 return false;
1357 }
1358 if (!reader.readNested(color)) {
1359 reader.fail();
1360 return false;
1361 }
1362 if (reader.noMore()) {
1363 reader.fail();
1364 return false;
1365 }
1366 if (!reader.readString(frame_name)) {
1367 reader.fail();
1368 return false;
1369 }
1370 if (reader.noMore()) {
1371 reader.fail();
1372 return false;
1373 }
1374 if (!reader.readBool(gravity_enable)) {
1375 reader.fail();
1376 return false;
1377 }
1378 if (reader.noMore()) {
1379 reader.fail();
1380 return false;
1381 }
1382 if (!reader.readBool(collision_enable)) {
1383 reader.fail();
1384 return false;
1385 }
1386 if (!reader.noMore()) {
1387 reader.fail();
1388 return false;
1389 }
1390 return true;
1391}
1392
1394{
1395 yarp::os::idl::WireWriter writer(connection);
1396 return write(writer);
1397}
1398
1400{
1401 yarp::os::idl::WireReader reader(connection);
1402 return read(reader);
1403}
1404
1406{
1407 if (!writer.isNull()) {
1408 if (!writer.write(return_helper)) {
1409 return false;
1410 }
1411 }
1412 return true;
1413}
1414
1416{
1417 if (reader.noMore()) {
1418 reader.fail();
1419 return false;
1420 }
1421 if (!reader.read(return_helper)) {
1422 reader.fail();
1423 return false;
1424 }
1425 return true;
1426}
1427
1432
1433// makeBox helper class implementation
1434ISimulatedWorldMsgs_makeBox_helper::ISimulatedWorldMsgs_makeBox_helper(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1435 cmd{id_name, width, height, thickness, pose, color, frame_name, gravity_enable, collision_enable}
1436{
1437}
1438
1440{
1441 return cmd.write(connection);
1442}
1443
1445{
1446 return reply.read(connection);
1447}
1448
1449ISimulatedWorldMsgs_makeBox_helper::Command::Command(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1450 id_name{id_name},
1451 width{width},
1452 height{height},
1453 thickness{thickness},
1454 pose{pose},
1455 color{color},
1456 frame_name{frame_name},
1457 gravity_enable{gravity_enable},
1458 collision_enable{collision_enable}
1459{
1460}
1461
1463{
1464 yarp::os::idl::WireWriter writer(connection);
1465 if (!writer.writeListHeader(s_cmd_len)) {
1466 return false;
1467 }
1468 return write(writer);
1469}
1470
1472{
1473 yarp::os::idl::WireReader reader(connection);
1474 if (!reader.readListHeader()) {
1475 reader.fail();
1476 return false;
1477 }
1478 return read(reader);
1479}
1480
1482{
1483 if (!writeTag(writer)) {
1484 return false;
1485 }
1486 if (!writeArgs(writer)) {
1487 return false;
1488 }
1489 return true;
1490}
1491
1493{
1494 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1495 return false;
1496 }
1497 return true;
1498}
1499
1501{
1502 if (!writer.writeString(id_name)) {
1503 return false;
1504 }
1505 if (!writer.writeFloat64(width)) {
1506 return false;
1507 }
1508 if (!writer.writeFloat64(height)) {
1509 return false;
1510 }
1511 if (!writer.writeFloat64(thickness)) {
1512 return false;
1513 }
1514 if (!writer.writeNested(pose)) {
1515 return false;
1516 }
1517 if (!writer.writeNested(color)) {
1518 return false;
1519 }
1520 if (!writer.writeString(frame_name)) {
1521 return false;
1522 }
1523 if (!writer.writeBool(gravity_enable)) {
1524 return false;
1525 }
1526 if (!writer.writeBool(collision_enable)) {
1527 return false;
1528 }
1529 return true;
1530}
1531
1533{
1534 if (!readTag(reader)) {
1535 return false;
1536 }
1537 if (!readArgs(reader)) {
1538 return false;
1539 }
1540 return true;
1541}
1542
1544{
1545 std::string tag = reader.readTag(s_tag_len);
1546 if (reader.isError()) {
1547 return false;
1548 }
1549 if (tag != s_tag) {
1550 reader.fail();
1551 return false;
1552 }
1553 return true;
1554}
1555
1557{
1558 if (reader.noMore()) {
1559 reader.fail();
1560 return false;
1561 }
1562 if (!reader.readString(id_name)) {
1563 reader.fail();
1564 return false;
1565 }
1566 if (reader.noMore()) {
1567 reader.fail();
1568 return false;
1569 }
1570 if (!reader.readFloat64(width)) {
1571 reader.fail();
1572 return false;
1573 }
1574 if (reader.noMore()) {
1575 reader.fail();
1576 return false;
1577 }
1578 if (!reader.readFloat64(height)) {
1579 reader.fail();
1580 return false;
1581 }
1582 if (reader.noMore()) {
1583 reader.fail();
1584 return false;
1585 }
1586 if (!reader.readFloat64(thickness)) {
1587 reader.fail();
1588 return false;
1589 }
1590 if (reader.noMore()) {
1591 reader.fail();
1592 return false;
1593 }
1594 if (!reader.readNested(pose)) {
1595 reader.fail();
1596 return false;
1597 }
1598 if (reader.noMore()) {
1599 reader.fail();
1600 return false;
1601 }
1602 if (!reader.readNested(color)) {
1603 reader.fail();
1604 return false;
1605 }
1606 if (reader.noMore()) {
1607 reader.fail();
1608 return false;
1609 }
1610 if (!reader.readString(frame_name)) {
1611 reader.fail();
1612 return false;
1613 }
1614 if (reader.noMore()) {
1615 reader.fail();
1616 return false;
1617 }
1618 if (!reader.readBool(gravity_enable)) {
1619 reader.fail();
1620 return false;
1621 }
1622 if (reader.noMore()) {
1623 reader.fail();
1624 return false;
1625 }
1626 if (!reader.readBool(collision_enable)) {
1627 reader.fail();
1628 return false;
1629 }
1630 if (!reader.noMore()) {
1631 reader.fail();
1632 return false;
1633 }
1634 return true;
1635}
1636
1638{
1639 yarp::os::idl::WireWriter writer(connection);
1640 return write(writer);
1641}
1642
1644{
1645 yarp::os::idl::WireReader reader(connection);
1646 return read(reader);
1647}
1648
1650{
1651 if (!writer.isNull()) {
1652 if (!writer.write(return_helper)) {
1653 return false;
1654 }
1655 }
1656 return true;
1657}
1658
1660{
1661 if (reader.noMore()) {
1662 reader.fail();
1663 return false;
1664 }
1665 if (!reader.read(return_helper)) {
1666 reader.fail();
1667 return false;
1668 }
1669 return true;
1670}
1671
1676
1677// makeCylinder helper class implementation
1678ISimulatedWorldMsgs_makeCylinder_helper::ISimulatedWorldMsgs_makeCylinder_helper(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1679 cmd{id_name, radius, length, pose, color, frame_name, gravity_enable, collision_enable}
1680{
1681}
1682
1684{
1685 return cmd.write(connection);
1686}
1687
1689{
1690 return reply.read(connection);
1691}
1692
1693ISimulatedWorldMsgs_makeCylinder_helper::Command::Command(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1694 id_name{id_name},
1695 radius{radius},
1696 length{length},
1697 pose{pose},
1698 color{color},
1699 frame_name{frame_name},
1700 gravity_enable{gravity_enable},
1701 collision_enable{collision_enable}
1702{
1703}
1704
1706{
1707 yarp::os::idl::WireWriter writer(connection);
1708 if (!writer.writeListHeader(s_cmd_len)) {
1709 return false;
1710 }
1711 return write(writer);
1712}
1713
1715{
1716 yarp::os::idl::WireReader reader(connection);
1717 if (!reader.readListHeader()) {
1718 reader.fail();
1719 return false;
1720 }
1721 return read(reader);
1722}
1723
1725{
1726 if (!writeTag(writer)) {
1727 return false;
1728 }
1729 if (!writeArgs(writer)) {
1730 return false;
1731 }
1732 return true;
1733}
1734
1736{
1737 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1738 return false;
1739 }
1740 return true;
1741}
1742
1744{
1745 if (!writer.writeString(id_name)) {
1746 return false;
1747 }
1748 if (!writer.writeFloat64(radius)) {
1749 return false;
1750 }
1751 if (!writer.writeFloat64(length)) {
1752 return false;
1753 }
1754 if (!writer.writeNested(pose)) {
1755 return false;
1756 }
1757 if (!writer.writeNested(color)) {
1758 return false;
1759 }
1760 if (!writer.writeString(frame_name)) {
1761 return false;
1762 }
1763 if (!writer.writeBool(gravity_enable)) {
1764 return false;
1765 }
1766 if (!writer.writeBool(collision_enable)) {
1767 return false;
1768 }
1769 return true;
1770}
1771
1773{
1774 if (!readTag(reader)) {
1775 return false;
1776 }
1777 if (!readArgs(reader)) {
1778 return false;
1779 }
1780 return true;
1781}
1782
1784{
1785 std::string tag = reader.readTag(s_tag_len);
1786 if (reader.isError()) {
1787 return false;
1788 }
1789 if (tag != s_tag) {
1790 reader.fail();
1791 return false;
1792 }
1793 return true;
1794}
1795
1797{
1798 if (reader.noMore()) {
1799 reader.fail();
1800 return false;
1801 }
1802 if (!reader.readString(id_name)) {
1803 reader.fail();
1804 return false;
1805 }
1806 if (reader.noMore()) {
1807 reader.fail();
1808 return false;
1809 }
1810 if (!reader.readFloat64(radius)) {
1811 reader.fail();
1812 return false;
1813 }
1814 if (reader.noMore()) {
1815 reader.fail();
1816 return false;
1817 }
1818 if (!reader.readFloat64(length)) {
1819 reader.fail();
1820 return false;
1821 }
1822 if (reader.noMore()) {
1823 reader.fail();
1824 return false;
1825 }
1826 if (!reader.readNested(pose)) {
1827 reader.fail();
1828 return false;
1829 }
1830 if (reader.noMore()) {
1831 reader.fail();
1832 return false;
1833 }
1834 if (!reader.readNested(color)) {
1835 reader.fail();
1836 return false;
1837 }
1838 if (reader.noMore()) {
1839 reader.fail();
1840 return false;
1841 }
1842 if (!reader.readString(frame_name)) {
1843 reader.fail();
1844 return false;
1845 }
1846 if (reader.noMore()) {
1847 reader.fail();
1848 return false;
1849 }
1850 if (!reader.readBool(gravity_enable)) {
1851 reader.fail();
1852 return false;
1853 }
1854 if (reader.noMore()) {
1855 reader.fail();
1856 return false;
1857 }
1858 if (!reader.readBool(collision_enable)) {
1859 reader.fail();
1860 return false;
1861 }
1862 if (!reader.noMore()) {
1863 reader.fail();
1864 return false;
1865 }
1866 return true;
1867}
1868
1870{
1871 yarp::os::idl::WireWriter writer(connection);
1872 return write(writer);
1873}
1874
1876{
1877 yarp::os::idl::WireReader reader(connection);
1878 return read(reader);
1879}
1880
1882{
1883 if (!writer.isNull()) {
1884 if (!writer.write(return_helper)) {
1885 return false;
1886 }
1887 }
1888 return true;
1889}
1890
1892{
1893 if (reader.noMore()) {
1894 reader.fail();
1895 return false;
1896 }
1897 if (!reader.read(return_helper)) {
1898 reader.fail();
1899 return false;
1900 }
1901 return true;
1902}
1903
1908
1909// makeFrame helper class implementation
1910ISimulatedWorldMsgs_makeFrame_helper::ISimulatedWorldMsgs_makeFrame_helper(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1911 cmd{id_name, size, pose, color, frame_name, gravity_enable, collision_enable}
1912{
1913}
1914
1916{
1917 return cmd.write(connection);
1918}
1919
1921{
1922 return reply.read(connection);
1923}
1924
1925ISimulatedWorldMsgs_makeFrame_helper::Command::Command(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
1926 id_name{id_name},
1927 size{size},
1928 pose{pose},
1929 color{color},
1930 frame_name{frame_name},
1931 gravity_enable{gravity_enable},
1932 collision_enable{collision_enable}
1933{
1934}
1935
1937{
1938 yarp::os::idl::WireWriter writer(connection);
1939 if (!writer.writeListHeader(s_cmd_len)) {
1940 return false;
1941 }
1942 return write(writer);
1943}
1944
1946{
1947 yarp::os::idl::WireReader reader(connection);
1948 if (!reader.readListHeader()) {
1949 reader.fail();
1950 return false;
1951 }
1952 return read(reader);
1953}
1954
1956{
1957 if (!writeTag(writer)) {
1958 return false;
1959 }
1960 if (!writeArgs(writer)) {
1961 return false;
1962 }
1963 return true;
1964}
1965
1967{
1968 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1969 return false;
1970 }
1971 return true;
1972}
1973
1975{
1976 if (!writer.writeString(id_name)) {
1977 return false;
1978 }
1979 if (!writer.writeFloat64(size)) {
1980 return false;
1981 }
1982 if (!writer.writeNested(pose)) {
1983 return false;
1984 }
1985 if (!writer.writeNested(color)) {
1986 return false;
1987 }
1988 if (!writer.writeString(frame_name)) {
1989 return false;
1990 }
1991 if (!writer.writeBool(gravity_enable)) {
1992 return false;
1993 }
1994 if (!writer.writeBool(collision_enable)) {
1995 return false;
1996 }
1997 return true;
1998}
1999
2001{
2002 if (!readTag(reader)) {
2003 return false;
2004 }
2005 if (!readArgs(reader)) {
2006 return false;
2007 }
2008 return true;
2009}
2010
2012{
2013 std::string tag = reader.readTag(s_tag_len);
2014 if (reader.isError()) {
2015 return false;
2016 }
2017 if (tag != s_tag) {
2018 reader.fail();
2019 return false;
2020 }
2021 return true;
2022}
2023
2025{
2026 if (reader.noMore()) {
2027 reader.fail();
2028 return false;
2029 }
2030 if (!reader.readString(id_name)) {
2031 reader.fail();
2032 return false;
2033 }
2034 if (reader.noMore()) {
2035 reader.fail();
2036 return false;
2037 }
2038 if (!reader.readFloat64(size)) {
2039 reader.fail();
2040 return false;
2041 }
2042 if (reader.noMore()) {
2043 reader.fail();
2044 return false;
2045 }
2046 if (!reader.readNested(pose)) {
2047 reader.fail();
2048 return false;
2049 }
2050 if (reader.noMore()) {
2051 reader.fail();
2052 return false;
2053 }
2054 if (!reader.readNested(color)) {
2055 reader.fail();
2056 return false;
2057 }
2058 if (reader.noMore()) {
2059 reader.fail();
2060 return false;
2061 }
2062 if (!reader.readString(frame_name)) {
2063 reader.fail();
2064 return false;
2065 }
2066 if (reader.noMore()) {
2067 reader.fail();
2068 return false;
2069 }
2070 if (!reader.readBool(gravity_enable)) {
2071 reader.fail();
2072 return false;
2073 }
2074 if (reader.noMore()) {
2075 reader.fail();
2076 return false;
2077 }
2078 if (!reader.readBool(collision_enable)) {
2079 reader.fail();
2080 return false;
2081 }
2082 if (!reader.noMore()) {
2083 reader.fail();
2084 return false;
2085 }
2086 return true;
2087}
2088
2090{
2091 yarp::os::idl::WireWriter writer(connection);
2092 return write(writer);
2093}
2094
2096{
2097 yarp::os::idl::WireReader reader(connection);
2098 return read(reader);
2099}
2100
2102{
2103 if (!writer.isNull()) {
2104 if (!writer.write(return_helper)) {
2105 return false;
2106 }
2107 }
2108 return true;
2109}
2110
2112{
2113 if (reader.noMore()) {
2114 reader.fail();
2115 return false;
2116 }
2117 if (!reader.read(return_helper)) {
2118 reader.fail();
2119 return false;
2120 }
2121 return true;
2122}
2123
2128
2129// makeModel helper class implementation
2130ISimulatedWorldMsgs_makeModel_helper::ISimulatedWorldMsgs_makeModel_helper(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
2131 cmd{id_name, filename, pose, frame_name, gravity_enable, collision_enable}
2132{
2133}
2134
2136{
2137 return cmd.write(connection);
2138}
2139
2141{
2142 return reply.read(connection);
2143}
2144
2145ISimulatedWorldMsgs_makeModel_helper::Command::Command(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable) :
2146 id_name{id_name},
2147 filename{filename},
2148 pose{pose},
2149 frame_name{frame_name},
2150 gravity_enable{gravity_enable},
2151 collision_enable{collision_enable}
2152{
2153}
2154
2156{
2157 yarp::os::idl::WireWriter writer(connection);
2158 if (!writer.writeListHeader(s_cmd_len)) {
2159 return false;
2160 }
2161 return write(writer);
2162}
2163
2165{
2166 yarp::os::idl::WireReader reader(connection);
2167 if (!reader.readListHeader()) {
2168 reader.fail();
2169 return false;
2170 }
2171 return read(reader);
2172}
2173
2175{
2176 if (!writeTag(writer)) {
2177 return false;
2178 }
2179 if (!writeArgs(writer)) {
2180 return false;
2181 }
2182 return true;
2183}
2184
2186{
2187 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2188 return false;
2189 }
2190 return true;
2191}
2192
2194{
2195 if (!writer.writeString(id_name)) {
2196 return false;
2197 }
2198 if (!writer.writeString(filename)) {
2199 return false;
2200 }
2201 if (!writer.writeNested(pose)) {
2202 return false;
2203 }
2204 if (!writer.writeString(frame_name)) {
2205 return false;
2206 }
2207 if (!writer.writeBool(gravity_enable)) {
2208 return false;
2209 }
2210 if (!writer.writeBool(collision_enable)) {
2211 return false;
2212 }
2213 return true;
2214}
2215
2217{
2218 if (!readTag(reader)) {
2219 return false;
2220 }
2221 if (!readArgs(reader)) {
2222 return false;
2223 }
2224 return true;
2225}
2226
2228{
2229 std::string tag = reader.readTag(s_tag_len);
2230 if (reader.isError()) {
2231 return false;
2232 }
2233 if (tag != s_tag) {
2234 reader.fail();
2235 return false;
2236 }
2237 return true;
2238}
2239
2241{
2242 if (reader.noMore()) {
2243 reader.fail();
2244 return false;
2245 }
2246 if (!reader.readString(id_name)) {
2247 reader.fail();
2248 return false;
2249 }
2250 if (reader.noMore()) {
2251 reader.fail();
2252 return false;
2253 }
2254 if (!reader.readString(filename)) {
2255 reader.fail();
2256 return false;
2257 }
2258 if (reader.noMore()) {
2259 reader.fail();
2260 return false;
2261 }
2262 if (!reader.readNested(pose)) {
2263 reader.fail();
2264 return false;
2265 }
2266 if (reader.noMore()) {
2267 reader.fail();
2268 return false;
2269 }
2270 if (!reader.readString(frame_name)) {
2271 reader.fail();
2272 return false;
2273 }
2274 if (reader.noMore()) {
2275 reader.fail();
2276 return false;
2277 }
2278 if (!reader.readBool(gravity_enable)) {
2279 reader.fail();
2280 return false;
2281 }
2282 if (reader.noMore()) {
2283 reader.fail();
2284 return false;
2285 }
2286 if (!reader.readBool(collision_enable)) {
2287 reader.fail();
2288 return false;
2289 }
2290 if (!reader.noMore()) {
2291 reader.fail();
2292 return false;
2293 }
2294 return true;
2295}
2296
2298{
2299 yarp::os::idl::WireWriter writer(connection);
2300 return write(writer);
2301}
2302
2304{
2305 yarp::os::idl::WireReader reader(connection);
2306 return read(reader);
2307}
2308
2310{
2311 if (!writer.isNull()) {
2312 if (!writer.write(return_helper)) {
2313 return false;
2314 }
2315 }
2316 return true;
2317}
2318
2320{
2321 if (reader.noMore()) {
2322 reader.fail();
2323 return false;
2324 }
2325 if (!reader.read(return_helper)) {
2326 reader.fail();
2327 return false;
2328 }
2329 return true;
2330}
2331
2336
2337// makeActor helper class implementation
2338ISimulatedWorldMsgs_makeActor_helper::ISimulatedWorldMsgs_makeActor_helper(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose) :
2339 cmd{id_name, skinfile, animfile, pose}
2340{
2341}
2342
2344{
2345 return cmd.write(connection);
2346}
2347
2349{
2350 return reply.read(connection);
2351}
2352
2353ISimulatedWorldMsgs_makeActor_helper::Command::Command(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose) :
2354 id_name{id_name},
2355 skinfile{skinfile},
2356 animfile{animfile},
2357 pose{pose}
2358{
2359}
2360
2362{
2363 yarp::os::idl::WireWriter writer(connection);
2364 if (!writer.writeListHeader(s_cmd_len)) {
2365 return false;
2366 }
2367 return write(writer);
2368}
2369
2371{
2372 yarp::os::idl::WireReader reader(connection);
2373 if (!reader.readListHeader()) {
2374 reader.fail();
2375 return false;
2376 }
2377 return read(reader);
2378}
2379
2381{
2382 if (!writeTag(writer)) {
2383 return false;
2384 }
2385 if (!writeArgs(writer)) {
2386 return false;
2387 }
2388 return true;
2389}
2390
2392{
2393 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2394 return false;
2395 }
2396 return true;
2397}
2398
2400{
2401 if (!writer.writeString(id_name)) {
2402 return false;
2403 }
2404 if (!writer.writeString(skinfile)) {
2405 return false;
2406 }
2407 if (!writer.writeString(animfile)) {
2408 return false;
2409 }
2410 if (!writer.writeNested(pose)) {
2411 return false;
2412 }
2413 return true;
2414}
2415
2417{
2418 if (!readTag(reader)) {
2419 return false;
2420 }
2421 if (!readArgs(reader)) {
2422 return false;
2423 }
2424 return true;
2425}
2426
2428{
2429 std::string tag = reader.readTag(s_tag_len);
2430 if (reader.isError()) {
2431 return false;
2432 }
2433 if (tag != s_tag) {
2434 reader.fail();
2435 return false;
2436 }
2437 return true;
2438}
2439
2441{
2442 if (reader.noMore()) {
2443 reader.fail();
2444 return false;
2445 }
2446 if (!reader.readString(id_name)) {
2447 reader.fail();
2448 return false;
2449 }
2450 if (reader.noMore()) {
2451 reader.fail();
2452 return false;
2453 }
2454 if (!reader.readString(skinfile)) {
2455 reader.fail();
2456 return false;
2457 }
2458 if (reader.noMore()) {
2459 reader.fail();
2460 return false;
2461 }
2462 if (!reader.readString(animfile)) {
2463 reader.fail();
2464 return false;
2465 }
2466 if (reader.noMore()) {
2467 reader.fail();
2468 return false;
2469 }
2470 if (!reader.readNested(pose)) {
2471 reader.fail();
2472 return false;
2473 }
2474 if (!reader.noMore()) {
2475 reader.fail();
2476 return false;
2477 }
2478 return true;
2479}
2480
2482{
2483 yarp::os::idl::WireWriter writer(connection);
2484 return write(writer);
2485}
2486
2488{
2489 yarp::os::idl::WireReader reader(connection);
2490 return read(reader);
2491}
2492
2494{
2495 if (!writer.isNull()) {
2496 if (!writer.write(return_helper)) {
2497 return false;
2498 }
2499 }
2500 return true;
2501}
2502
2504{
2505 if (reader.noMore()) {
2506 reader.fail();
2507 return false;
2508 }
2509 if (!reader.read(return_helper)) {
2510 reader.fail();
2511 return false;
2512 }
2513 return true;
2514}
2515
2520
2521// changeColor helper class implementation
2523 cmd{id, color}
2524{
2525}
2526
2528{
2529 return cmd.write(connection);
2530}
2531
2533{
2534 return reply.read(connection);
2535}
2536
2538 id{id},
2539 color{color}
2540{
2541}
2542
2544{
2545 yarp::os::idl::WireWriter writer(connection);
2546 if (!writer.writeListHeader(s_cmd_len)) {
2547 return false;
2548 }
2549 return write(writer);
2550}
2551
2553{
2554 yarp::os::idl::WireReader reader(connection);
2555 if (!reader.readListHeader()) {
2556 reader.fail();
2557 return false;
2558 }
2559 return read(reader);
2560}
2561
2563{
2564 if (!writeTag(writer)) {
2565 return false;
2566 }
2567 if (!writeArgs(writer)) {
2568 return false;
2569 }
2570 return true;
2571}
2572
2574{
2575 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2576 return false;
2577 }
2578 return true;
2579}
2580
2582{
2583 if (!writer.writeString(id)) {
2584 return false;
2585 }
2586 if (!writer.writeNested(color)) {
2587 return false;
2588 }
2589 return true;
2590}
2591
2593{
2594 if (!readTag(reader)) {
2595 return false;
2596 }
2597 if (!readArgs(reader)) {
2598 return false;
2599 }
2600 return true;
2601}
2602
2604{
2605 std::string tag = reader.readTag(s_tag_len);
2606 if (reader.isError()) {
2607 return false;
2608 }
2609 if (tag != s_tag) {
2610 reader.fail();
2611 return false;
2612 }
2613 return true;
2614}
2615
2617{
2618 if (reader.noMore()) {
2619 reader.fail();
2620 return false;
2621 }
2622 if (!reader.readString(id)) {
2623 reader.fail();
2624 return false;
2625 }
2626 if (reader.noMore()) {
2627 reader.fail();
2628 return false;
2629 }
2630 if (!reader.readNested(color)) {
2631 reader.fail();
2632 return false;
2633 }
2634 if (!reader.noMore()) {
2635 reader.fail();
2636 return false;
2637 }
2638 return true;
2639}
2640
2642{
2643 yarp::os::idl::WireWriter writer(connection);
2644 return write(writer);
2645}
2646
2648{
2649 yarp::os::idl::WireReader reader(connection);
2650 return read(reader);
2651}
2652
2654{
2655 if (!writer.isNull()) {
2656 if (!writer.write(return_helper)) {
2657 return false;
2658 }
2659 }
2660 return true;
2661}
2662
2664{
2665 if (reader.noMore()) {
2666 reader.fail();
2667 return false;
2668 }
2669 if (!reader.read(return_helper)) {
2670 reader.fail();
2671 return false;
2672 }
2673 return true;
2674}
2675
2680
2681// setPose helper class implementation
2682ISimulatedWorldMsgs_setPose_helper::ISimulatedWorldMsgs_setPose_helper(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name) :
2683 cmd{id, pose, frame_name}
2684{
2685}
2686
2688{
2689 return cmd.write(connection);
2690}
2691
2693{
2694 return reply.read(connection);
2695}
2696
2697ISimulatedWorldMsgs_setPose_helper::Command::Command(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name) :
2698 id{id},
2699 pose{pose},
2700 frame_name{frame_name}
2701{
2702}
2703
2705{
2706 yarp::os::idl::WireWriter writer(connection);
2707 if (!writer.writeListHeader(s_cmd_len)) {
2708 return false;
2709 }
2710 return write(writer);
2711}
2712
2714{
2715 yarp::os::idl::WireReader reader(connection);
2716 if (!reader.readListHeader()) {
2717 reader.fail();
2718 return false;
2719 }
2720 return read(reader);
2721}
2722
2724{
2725 if (!writeTag(writer)) {
2726 return false;
2727 }
2728 if (!writeArgs(writer)) {
2729 return false;
2730 }
2731 return true;
2732}
2733
2735{
2736 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2737 return false;
2738 }
2739 return true;
2740}
2741
2743{
2744 if (!writer.writeString(id)) {
2745 return false;
2746 }
2747 if (!writer.writeNested(pose)) {
2748 return false;
2749 }
2750 if (!writer.writeString(frame_name)) {
2751 return false;
2752 }
2753 return true;
2754}
2755
2757{
2758 if (!readTag(reader)) {
2759 return false;
2760 }
2761 if (!readArgs(reader)) {
2762 return false;
2763 }
2764 return true;
2765}
2766
2768{
2769 std::string tag = reader.readTag(s_tag_len);
2770 if (reader.isError()) {
2771 return false;
2772 }
2773 if (tag != s_tag) {
2774 reader.fail();
2775 return false;
2776 }
2777 return true;
2778}
2779
2781{
2782 if (reader.noMore()) {
2783 reader.fail();
2784 return false;
2785 }
2786 if (!reader.readString(id)) {
2787 reader.fail();
2788 return false;
2789 }
2790 if (reader.noMore()) {
2791 reader.fail();
2792 return false;
2793 }
2794 if (!reader.readNested(pose)) {
2795 reader.fail();
2796 return false;
2797 }
2798 if (reader.noMore()) {
2799 reader.fail();
2800 return false;
2801 }
2802 if (!reader.readString(frame_name)) {
2803 reader.fail();
2804 return false;
2805 }
2806 if (!reader.noMore()) {
2807 reader.fail();
2808 return false;
2809 }
2810 return true;
2811}
2812
2814{
2815 yarp::os::idl::WireWriter writer(connection);
2816 return write(writer);
2817}
2818
2820{
2821 yarp::os::idl::WireReader reader(connection);
2822 return read(reader);
2823}
2824
2826{
2827 if (!writer.isNull()) {
2828 if (!writer.write(return_helper)) {
2829 return false;
2830 }
2831 }
2832 return true;
2833}
2834
2836{
2837 if (reader.noMore()) {
2838 reader.fail();
2839 return false;
2840 }
2841 if (!reader.read(return_helper)) {
2842 reader.fail();
2843 return false;
2844 }
2845 return true;
2846}
2847
2852
2853// enableGravity helper class implementation
2855 cmd{id, enable}
2856{
2857}
2858
2860{
2861 return cmd.write(connection);
2862}
2863
2865{
2866 return reply.read(connection);
2867}
2868
2869ISimulatedWorldMsgs_enableGravity_helper::Command::Command(const std::string& id, const bool enable) :
2870 id{id},
2871 enable{enable}
2872{
2873}
2874
2876{
2877 yarp::os::idl::WireWriter writer(connection);
2878 if (!writer.writeListHeader(s_cmd_len)) {
2879 return false;
2880 }
2881 return write(writer);
2882}
2883
2885{
2886 yarp::os::idl::WireReader reader(connection);
2887 if (!reader.readListHeader()) {
2888 reader.fail();
2889 return false;
2890 }
2891 return read(reader);
2892}
2893
2895{
2896 if (!writeTag(writer)) {
2897 return false;
2898 }
2899 if (!writeArgs(writer)) {
2900 return false;
2901 }
2902 return true;
2903}
2904
2906{
2907 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2908 return false;
2909 }
2910 return true;
2911}
2912
2914{
2915 if (!writer.writeString(id)) {
2916 return false;
2917 }
2918 if (!writer.writeBool(enable)) {
2919 return false;
2920 }
2921 return true;
2922}
2923
2925{
2926 if (!readTag(reader)) {
2927 return false;
2928 }
2929 if (!readArgs(reader)) {
2930 return false;
2931 }
2932 return true;
2933}
2934
2936{
2937 std::string tag = reader.readTag(s_tag_len);
2938 if (reader.isError()) {
2939 return false;
2940 }
2941 if (tag != s_tag) {
2942 reader.fail();
2943 return false;
2944 }
2945 return true;
2946}
2947
2949{
2950 if (reader.noMore()) {
2951 reader.fail();
2952 return false;
2953 }
2954 if (!reader.readString(id)) {
2955 reader.fail();
2956 return false;
2957 }
2958 if (reader.noMore()) {
2959 reader.fail();
2960 return false;
2961 }
2962 if (!reader.readBool(enable)) {
2963 reader.fail();
2964 return false;
2965 }
2966 if (!reader.noMore()) {
2967 reader.fail();
2968 return false;
2969 }
2970 return true;
2971}
2972
2974{
2975 yarp::os::idl::WireWriter writer(connection);
2976 return write(writer);
2977}
2978
2980{
2981 yarp::os::idl::WireReader reader(connection);
2982 return read(reader);
2983}
2984
2986{
2987 if (!writer.isNull()) {
2988 if (!writer.write(return_helper)) {
2989 return false;
2990 }
2991 }
2992 return true;
2993}
2994
2996{
2997 if (reader.noMore()) {
2998 reader.fail();
2999 return false;
3000 }
3001 if (!reader.read(return_helper)) {
3002 reader.fail();
3003 return false;
3004 }
3005 return true;
3006}
3007
3012
3013// enableCollision helper class implementation
3015 cmd{id, enable}
3016{
3017}
3018
3020{
3021 return cmd.write(connection);
3022}
3023
3025{
3026 return reply.read(connection);
3027}
3028
3029ISimulatedWorldMsgs_enableCollision_helper::Command::Command(const std::string& id, const bool enable) :
3030 id{id},
3031 enable{enable}
3032{
3033}
3034
3036{
3037 yarp::os::idl::WireWriter writer(connection);
3038 if (!writer.writeListHeader(s_cmd_len)) {
3039 return false;
3040 }
3041 return write(writer);
3042}
3043
3045{
3046 yarp::os::idl::WireReader reader(connection);
3047 if (!reader.readListHeader()) {
3048 reader.fail();
3049 return false;
3050 }
3051 return read(reader);
3052}
3053
3055{
3056 if (!writeTag(writer)) {
3057 return false;
3058 }
3059 if (!writeArgs(writer)) {
3060 return false;
3061 }
3062 return true;
3063}
3064
3066{
3067 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3068 return false;
3069 }
3070 return true;
3071}
3072
3074{
3075 if (!writer.writeString(id)) {
3076 return false;
3077 }
3078 if (!writer.writeBool(enable)) {
3079 return false;
3080 }
3081 return true;
3082}
3083
3085{
3086 if (!readTag(reader)) {
3087 return false;
3088 }
3089 if (!readArgs(reader)) {
3090 return false;
3091 }
3092 return true;
3093}
3094
3096{
3097 std::string tag = reader.readTag(s_tag_len);
3098 if (reader.isError()) {
3099 return false;
3100 }
3101 if (tag != s_tag) {
3102 reader.fail();
3103 return false;
3104 }
3105 return true;
3106}
3107
3109{
3110 if (reader.noMore()) {
3111 reader.fail();
3112 return false;
3113 }
3114 if (!reader.readString(id)) {
3115 reader.fail();
3116 return false;
3117 }
3118 if (reader.noMore()) {
3119 reader.fail();
3120 return false;
3121 }
3122 if (!reader.readBool(enable)) {
3123 reader.fail();
3124 return false;
3125 }
3126 if (!reader.noMore()) {
3127 reader.fail();
3128 return false;
3129 }
3130 return true;
3131}
3132
3134{
3135 yarp::os::idl::WireWriter writer(connection);
3136 return write(writer);
3137}
3138
3140{
3141 yarp::os::idl::WireReader reader(connection);
3142 return read(reader);
3143}
3144
3146{
3147 if (!writer.isNull()) {
3148 if (!writer.write(return_helper)) {
3149 return false;
3150 }
3151 }
3152 return true;
3153}
3154
3156{
3157 if (reader.noMore()) {
3158 reader.fail();
3159 return false;
3160 }
3161 if (!reader.read(return_helper)) {
3162 reader.fail();
3163 return false;
3164 }
3165 return true;
3166}
3167
3172
3173// getPose helper class implementation
3174ISimulatedWorldMsgs_getPose_helper::ISimulatedWorldMsgs_getPose_helper(const std::string& id, const std::string& frame_name) :
3175 cmd{id, frame_name}
3176{
3177}
3178
3180{
3181 return cmd.write(connection);
3182}
3183
3185{
3186 return reply.read(connection);
3187}
3188
3189ISimulatedWorldMsgs_getPose_helper::Command::Command(const std::string& id, const std::string& frame_name) :
3190 id{id},
3191 frame_name{frame_name}
3192{
3193}
3194
3196{
3197 yarp::os::idl::WireWriter writer(connection);
3198 if (!writer.writeListHeader(s_cmd_len)) {
3199 return false;
3200 }
3201 return write(writer);
3202}
3203
3205{
3206 yarp::os::idl::WireReader reader(connection);
3207 if (!reader.readListHeader()) {
3208 reader.fail();
3209 return false;
3210 }
3211 return read(reader);
3212}
3213
3215{
3216 if (!writeTag(writer)) {
3217 return false;
3218 }
3219 if (!writeArgs(writer)) {
3220 return false;
3221 }
3222 return true;
3223}
3224
3226{
3227 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3228 return false;
3229 }
3230 return true;
3231}
3232
3234{
3235 if (!writer.writeString(id)) {
3236 return false;
3237 }
3238 if (!writer.writeString(frame_name)) {
3239 return false;
3240 }
3241 return true;
3242}
3243
3245{
3246 if (!readTag(reader)) {
3247 return false;
3248 }
3249 if (!readArgs(reader)) {
3250 return false;
3251 }
3252 return true;
3253}
3254
3256{
3257 std::string tag = reader.readTag(s_tag_len);
3258 if (reader.isError()) {
3259 return false;
3260 }
3261 if (tag != s_tag) {
3262 reader.fail();
3263 return false;
3264 }
3265 return true;
3266}
3267
3269{
3270 if (reader.noMore()) {
3271 reader.fail();
3272 return false;
3273 }
3274 if (!reader.readString(id)) {
3275 reader.fail();
3276 return false;
3277 }
3278 if (reader.noMore()) {
3279 reader.fail();
3280 return false;
3281 }
3282 if (!reader.readString(frame_name)) {
3283 reader.fail();
3284 return false;
3285 }
3286 if (!reader.noMore()) {
3287 reader.fail();
3288 return false;
3289 }
3290 return true;
3291}
3292
3294{
3295 yarp::os::idl::WireWriter writer(connection);
3296 return write(writer);
3297}
3298
3300{
3301 yarp::os::idl::WireReader reader(connection);
3302 return read(reader);
3303}
3304
3306{
3307 if (!writer.isNull()) {
3308 if (!writer.writeListHeader(s_reply_len)) {
3309 return false;
3310 }
3311 if (!writer.write(return_helper)) {
3312 return false;
3313 }
3314 }
3315 return true;
3316}
3317
3319{
3320 if (!reader.readListReturn()) {
3321 return false;
3322 }
3323 if (reader.noMore()) {
3324 reader.fail();
3325 return false;
3326 }
3327 if (!reader.read(return_helper)) {
3328 reader.fail();
3329 return false;
3330 }
3331 return true;
3332}
3333
3338
3339// deleteObject helper class implementation
3344
3346{
3347 return cmd.write(connection);
3348}
3349
3351{
3352 return reply.read(connection);
3353}
3354
3356 id{id}
3357{
3358}
3359
3361{
3362 yarp::os::idl::WireWriter writer(connection);
3363 if (!writer.writeListHeader(s_cmd_len)) {
3364 return false;
3365 }
3366 return write(writer);
3367}
3368
3370{
3371 yarp::os::idl::WireReader reader(connection);
3372 if (!reader.readListHeader()) {
3373 reader.fail();
3374 return false;
3375 }
3376 return read(reader);
3377}
3378
3380{
3381 if (!writeTag(writer)) {
3382 return false;
3383 }
3384 if (!writeArgs(writer)) {
3385 return false;
3386 }
3387 return true;
3388}
3389
3391{
3392 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3393 return false;
3394 }
3395 return true;
3396}
3397
3399{
3400 if (!writer.writeString(id)) {
3401 return false;
3402 }
3403 return true;
3404}
3405
3407{
3408 if (!readTag(reader)) {
3409 return false;
3410 }
3411 if (!readArgs(reader)) {
3412 return false;
3413 }
3414 return true;
3415}
3416
3418{
3419 std::string tag = reader.readTag(s_tag_len);
3420 if (reader.isError()) {
3421 return false;
3422 }
3423 if (tag != s_tag) {
3424 reader.fail();
3425 return false;
3426 }
3427 return true;
3428}
3429
3431{
3432 if (reader.noMore()) {
3433 reader.fail();
3434 return false;
3435 }
3436 if (!reader.readString(id)) {
3437 reader.fail();
3438 return false;
3439 }
3440 if (!reader.noMore()) {
3441 reader.fail();
3442 return false;
3443 }
3444 return true;
3445}
3446
3448{
3449 yarp::os::idl::WireWriter writer(connection);
3450 return write(writer);
3451}
3452
3454{
3455 yarp::os::idl::WireReader reader(connection);
3456 return read(reader);
3457}
3458
3460{
3461 if (!writer.isNull()) {
3462 if (!writer.write(return_helper)) {
3463 return false;
3464 }
3465 }
3466 return true;
3467}
3468
3470{
3471 if (reader.noMore()) {
3472 reader.fail();
3473 return false;
3474 }
3475 if (!reader.read(return_helper)) {
3476 reader.fail();
3477 return false;
3478 }
3479 return true;
3480}
3481
3486
3487// deleteAll helper class implementation
3489{
3490 return cmd.write(connection);
3491}
3492
3494{
3495 return reply.read(connection);
3496}
3497
3499{
3500 yarp::os::idl::WireWriter writer(connection);
3501 if (!writer.writeListHeader(s_cmd_len)) {
3502 return false;
3503 }
3504 return write(writer);
3505}
3506
3508{
3509 yarp::os::idl::WireReader reader(connection);
3510 if (!reader.readListHeader()) {
3511 reader.fail();
3512 return false;
3513 }
3514 return read(reader);
3515}
3516
3518{
3519 if (!writeTag(writer)) {
3520 return false;
3521 }
3522 if (!writeArgs(writer)) {
3523 return false;
3524 }
3525 return true;
3526}
3527
3529{
3530 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3531 return false;
3532 }
3533 return true;
3534}
3535
3537{
3538 return true;
3539}
3540
3542{
3543 if (!readTag(reader)) {
3544 return false;
3545 }
3546 if (!readArgs(reader)) {
3547 return false;
3548 }
3549 return true;
3550}
3551
3553{
3554 std::string tag = reader.readTag(s_tag_len);
3555 if (reader.isError()) {
3556 return false;
3557 }
3558 if (tag != s_tag) {
3559 reader.fail();
3560 return false;
3561 }
3562 return true;
3563}
3564
3566{
3567 if (!reader.noMore()) {
3568 reader.fail();
3569 return false;
3570 }
3571 return true;
3572}
3573
3575{
3576 yarp::os::idl::WireWriter writer(connection);
3577 return write(writer);
3578}
3579
3581{
3582 yarp::os::idl::WireReader reader(connection);
3583 return read(reader);
3584}
3585
3587{
3588 if (!writer.isNull()) {
3589 if (!writer.write(return_helper)) {
3590 return false;
3591 }
3592 }
3593 return true;
3594}
3595
3597{
3598 if (reader.noMore()) {
3599 reader.fail();
3600 return false;
3601 }
3602 if (!reader.read(return_helper)) {
3603 reader.fail();
3604 return false;
3605 }
3606 return true;
3607}
3608
3613
3614// getList helper class implementation
3616{
3617 return cmd.write(connection);
3618}
3619
3621{
3622 return reply.read(connection);
3623}
3624
3626{
3627 yarp::os::idl::WireWriter writer(connection);
3628 if (!writer.writeListHeader(s_cmd_len)) {
3629 return false;
3630 }
3631 return write(writer);
3632}
3633
3635{
3636 yarp::os::idl::WireReader reader(connection);
3637 if (!reader.readListHeader()) {
3638 reader.fail();
3639 return false;
3640 }
3641 return read(reader);
3642}
3643
3645{
3646 if (!writeTag(writer)) {
3647 return false;
3648 }
3649 if (!writeArgs(writer)) {
3650 return false;
3651 }
3652 return true;
3653}
3654
3656{
3657 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3658 return false;
3659 }
3660 return true;
3661}
3662
3664{
3665 return true;
3666}
3667
3669{
3670 if (!readTag(reader)) {
3671 return false;
3672 }
3673 if (!readArgs(reader)) {
3674 return false;
3675 }
3676 return true;
3677}
3678
3680{
3681 std::string tag = reader.readTag(s_tag_len);
3682 if (reader.isError()) {
3683 return false;
3684 }
3685 if (tag != s_tag) {
3686 reader.fail();
3687 return false;
3688 }
3689 return true;
3690}
3691
3693{
3694 if (!reader.noMore()) {
3695 reader.fail();
3696 return false;
3697 }
3698 return true;
3699}
3700
3702{
3703 yarp::os::idl::WireWriter writer(connection);
3704 return write(writer);
3705}
3706
3708{
3709 yarp::os::idl::WireReader reader(connection);
3710 return read(reader);
3711}
3712
3714{
3715 if (!writer.isNull()) {
3716 if (!writer.writeListHeader(s_reply_len)) {
3717 return false;
3718 }
3719 if (!writer.write(return_helper)) {
3720 return false;
3721 }
3722 }
3723 return true;
3724}
3725
3727{
3728 if (!reader.readListReturn()) {
3729 return false;
3730 }
3731 if (reader.noMore()) {
3732 reader.fail();
3733 return false;
3734 }
3735 if (!reader.read(return_helper)) {
3736 reader.fail();
3737 return false;
3738 }
3739 return true;
3740}
3741
3746
3747// attach helper class implementation
3748ISimulatedWorldMsgs_attach_helper::ISimulatedWorldMsgs_attach_helper(const std::string& id, const std::string& link_name) :
3749 cmd{id, link_name}
3750{
3751}
3752
3754{
3755 return cmd.write(connection);
3756}
3757
3759{
3760 return reply.read(connection);
3761}
3762
3763ISimulatedWorldMsgs_attach_helper::Command::Command(const std::string& id, const std::string& link_name) :
3764 id{id},
3765 link_name{link_name}
3766{
3767}
3768
3770{
3771 yarp::os::idl::WireWriter writer(connection);
3772 if (!writer.writeListHeader(s_cmd_len)) {
3773 return false;
3774 }
3775 return write(writer);
3776}
3777
3779{
3780 yarp::os::idl::WireReader reader(connection);
3781 if (!reader.readListHeader()) {
3782 reader.fail();
3783 return false;
3784 }
3785 return read(reader);
3786}
3787
3789{
3790 if (!writeTag(writer)) {
3791 return false;
3792 }
3793 if (!writeArgs(writer)) {
3794 return false;
3795 }
3796 return true;
3797}
3798
3800{
3801 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3802 return false;
3803 }
3804 return true;
3805}
3806
3808{
3809 if (!writer.writeString(id)) {
3810 return false;
3811 }
3812 if (!writer.writeString(link_name)) {
3813 return false;
3814 }
3815 return true;
3816}
3817
3819{
3820 if (!readTag(reader)) {
3821 return false;
3822 }
3823 if (!readArgs(reader)) {
3824 return false;
3825 }
3826 return true;
3827}
3828
3830{
3831 std::string tag = reader.readTag(s_tag_len);
3832 if (reader.isError()) {
3833 return false;
3834 }
3835 if (tag != s_tag) {
3836 reader.fail();
3837 return false;
3838 }
3839 return true;
3840}
3841
3843{
3844 if (reader.noMore()) {
3845 reader.fail();
3846 return false;
3847 }
3848 if (!reader.readString(id)) {
3849 reader.fail();
3850 return false;
3851 }
3852 if (reader.noMore()) {
3853 reader.fail();
3854 return false;
3855 }
3856 if (!reader.readString(link_name)) {
3857 reader.fail();
3858 return false;
3859 }
3860 if (!reader.noMore()) {
3861 reader.fail();
3862 return false;
3863 }
3864 return true;
3865}
3866
3868{
3869 yarp::os::idl::WireWriter writer(connection);
3870 return write(writer);
3871}
3872
3874{
3875 yarp::os::idl::WireReader reader(connection);
3876 return read(reader);
3877}
3878
3880{
3881 if (!writer.isNull()) {
3882 if (!writer.write(return_helper)) {
3883 return false;
3884 }
3885 }
3886 return true;
3887}
3888
3890{
3891 if (reader.noMore()) {
3892 reader.fail();
3893 return false;
3894 }
3895 if (!reader.read(return_helper)) {
3896 reader.fail();
3897 return false;
3898 }
3899 return true;
3900}
3901
3906
3907// detach helper class implementation
3912
3914{
3915 return cmd.write(connection);
3916}
3917
3919{
3920 return reply.read(connection);
3921}
3922
3924 id{id}
3925{
3926}
3927
3929{
3930 yarp::os::idl::WireWriter writer(connection);
3931 if (!writer.writeListHeader(s_cmd_len)) {
3932 return false;
3933 }
3934 return write(writer);
3935}
3936
3938{
3939 yarp::os::idl::WireReader reader(connection);
3940 if (!reader.readListHeader()) {
3941 reader.fail();
3942 return false;
3943 }
3944 return read(reader);
3945}
3946
3948{
3949 if (!writeTag(writer)) {
3950 return false;
3951 }
3952 if (!writeArgs(writer)) {
3953 return false;
3954 }
3955 return true;
3956}
3957
3959{
3960 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3961 return false;
3962 }
3963 return true;
3964}
3965
3967{
3968 if (!writer.writeString(id)) {
3969 return false;
3970 }
3971 return true;
3972}
3973
3975{
3976 if (!readTag(reader)) {
3977 return false;
3978 }
3979 if (!readArgs(reader)) {
3980 return false;
3981 }
3982 return true;
3983}
3984
3986{
3987 std::string tag = reader.readTag(s_tag_len);
3988 if (reader.isError()) {
3989 return false;
3990 }
3991 if (tag != s_tag) {
3992 reader.fail();
3993 return false;
3994 }
3995 return true;
3996}
3997
3999{
4000 if (reader.noMore()) {
4001 reader.fail();
4002 return false;
4003 }
4004 if (!reader.readString(id)) {
4005 reader.fail();
4006 return false;
4007 }
4008 if (!reader.noMore()) {
4009 reader.fail();
4010 return false;
4011 }
4012 return true;
4013}
4014
4016{
4017 yarp::os::idl::WireWriter writer(connection);
4018 return write(writer);
4019}
4020
4022{
4023 yarp::os::idl::WireReader reader(connection);
4024 return read(reader);
4025}
4026
4028{
4029 if (!writer.isNull()) {
4030 if (!writer.write(return_helper)) {
4031 return false;
4032 }
4033 }
4034 return true;
4035}
4036
4038{
4039 if (reader.noMore()) {
4040 reader.fail();
4041 return false;
4042 }
4043 if (!reader.read(return_helper)) {
4044 reader.fail();
4045 return false;
4046 }
4047 return true;
4048}
4049
4054
4055// rename helper class implementation
4056ISimulatedWorldMsgs_rename_helper::ISimulatedWorldMsgs_rename_helper(const std::string& old_name, const std::string& new_name) :
4057 cmd{old_name, new_name}
4058{
4059}
4060
4062{
4063 return cmd.write(connection);
4064}
4065
4067{
4068 return reply.read(connection);
4069}
4070
4071ISimulatedWorldMsgs_rename_helper::Command::Command(const std::string& old_name, const std::string& new_name) :
4072 old_name{old_name},
4073 new_name{new_name}
4074{
4075}
4076
4078{
4079 yarp::os::idl::WireWriter writer(connection);
4080 if (!writer.writeListHeader(s_cmd_len)) {
4081 return false;
4082 }
4083 return write(writer);
4084}
4085
4087{
4088 yarp::os::idl::WireReader reader(connection);
4089 if (!reader.readListHeader()) {
4090 reader.fail();
4091 return false;
4092 }
4093 return read(reader);
4094}
4095
4097{
4098 if (!writeTag(writer)) {
4099 return false;
4100 }
4101 if (!writeArgs(writer)) {
4102 return false;
4103 }
4104 return true;
4105}
4106
4108{
4109 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
4110 return false;
4111 }
4112 return true;
4113}
4114
4116{
4117 if (!writer.writeString(old_name)) {
4118 return false;
4119 }
4120 if (!writer.writeString(new_name)) {
4121 return false;
4122 }
4123 return true;
4124}
4125
4127{
4128 if (!readTag(reader)) {
4129 return false;
4130 }
4131 if (!readArgs(reader)) {
4132 return false;
4133 }
4134 return true;
4135}
4136
4138{
4139 std::string tag = reader.readTag(s_tag_len);
4140 if (reader.isError()) {
4141 return false;
4142 }
4143 if (tag != s_tag) {
4144 reader.fail();
4145 return false;
4146 }
4147 return true;
4148}
4149
4151{
4152 if (reader.noMore()) {
4153 reader.fail();
4154 return false;
4155 }
4156 if (!reader.readString(old_name)) {
4157 reader.fail();
4158 return false;
4159 }
4160 if (reader.noMore()) {
4161 reader.fail();
4162 return false;
4163 }
4164 if (!reader.readString(new_name)) {
4165 reader.fail();
4166 return false;
4167 }
4168 if (!reader.noMore()) {
4169 reader.fail();
4170 return false;
4171 }
4172 return true;
4173}
4174
4176{
4177 yarp::os::idl::WireWriter writer(connection);
4178 return write(writer);
4179}
4180
4182{
4183 yarp::os::idl::WireReader reader(connection);
4184 return read(reader);
4185}
4186
4188{
4189 if (!writer.isNull()) {
4190 if (!writer.write(return_helper)) {
4191 return false;
4192 }
4193 }
4194 return true;
4195}
4196
4198{
4199 if (reader.noMore()) {
4200 reader.fail();
4201 return false;
4202 }
4203 if (!reader.read(return_helper)) {
4204 reader.fail();
4205 return false;
4206 }
4207 return true;
4208}
4209
4214
4215// Constructor
4217{
4218 yarp().setOwner(*this);
4219}
4220
4221yarp::dev::ReturnValue ISimulatedWorldMsgs::makeSphere(const std::string& id_name, const double radius, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)
4222{
4223 if (!yarp().canWrite()) {
4224 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeSphere_helper::s_prototype);
4225 }
4226 ISimulatedWorldMsgs_makeSphere_helper helper{id_name, radius, pose, color, frame_name, gravity_enable, collision_enable};
4227 bool ok = yarp().write(helper, helper);
4229}
4230
4231yarp::dev::ReturnValue ISimulatedWorldMsgs::makeBox(const std::string& id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)
4232{
4233 if (!yarp().canWrite()) {
4234 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeBox_helper::s_prototype);
4235 }
4236 ISimulatedWorldMsgs_makeBox_helper helper{id_name, width, height, thickness, pose, color, frame_name, gravity_enable, collision_enable};
4237 bool ok = yarp().write(helper, helper);
4239}
4240
4241yarp::dev::ReturnValue ISimulatedWorldMsgs::makeCylinder(const std::string& id_name, const double radius, const double length, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)
4242{
4243 if (!yarp().canWrite()) {
4244 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeCylinder_helper::s_prototype);
4245 }
4246 ISimulatedWorldMsgs_makeCylinder_helper helper{id_name, radius, length, pose, color, frame_name, gravity_enable, collision_enable};
4247 bool ok = yarp().write(helper, helper);
4249}
4250
4251yarp::dev::ReturnValue ISimulatedWorldMsgs::makeFrame(const std::string& id_name, const double size, const yarp::sig::Pose6D& pose, const yarp::sig::ColorRGB& color, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)
4252{
4253 if (!yarp().canWrite()) {
4254 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeFrame_helper::s_prototype);
4255 }
4256 ISimulatedWorldMsgs_makeFrame_helper helper{id_name, size, pose, color, frame_name, gravity_enable, collision_enable};
4257 bool ok = yarp().write(helper, helper);
4259}
4260
4261yarp::dev::ReturnValue ISimulatedWorldMsgs::makeModel(const std::string& id_name, const std::string& filename, const yarp::sig::Pose6D& pose, const std::string& frame_name, const bool gravity_enable, const bool collision_enable)
4262{
4263 if (!yarp().canWrite()) {
4264 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeModel_helper::s_prototype);
4265 }
4266 ISimulatedWorldMsgs_makeModel_helper helper{id_name, filename, pose, frame_name, gravity_enable, collision_enable};
4267 bool ok = yarp().write(helper, helper);
4269}
4270
4271yarp::dev::ReturnValue ISimulatedWorldMsgs::makeActor(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose)
4272{
4273 if (!yarp().canWrite()) {
4274 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeActor_helper::s_prototype);
4275 }
4276 ISimulatedWorldMsgs_makeActor_helper helper{id_name, skinfile, animfile, pose};
4277 bool ok = yarp().write(helper, helper);
4279}
4280
4282{
4283 if (!yarp().canWrite()) {
4284 yError("Missing server method '%s'?", ISimulatedWorldMsgs_changeColor_helper::s_prototype);
4285 }
4287 bool ok = yarp().write(helper, helper);
4289}
4290
4291yarp::dev::ReturnValue ISimulatedWorldMsgs::setPose(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name)
4292{
4293 if (!yarp().canWrite()) {
4294 yError("Missing server method '%s'?", ISimulatedWorldMsgs_setPose_helper::s_prototype);
4295 }
4296 ISimulatedWorldMsgs_setPose_helper helper{id, pose, frame_name};
4297 bool ok = yarp().write(helper, helper);
4299}
4300
4301yarp::dev::ReturnValue ISimulatedWorldMsgs::enableGravity(const std::string& id, const bool enable)
4302{
4303 if (!yarp().canWrite()) {
4304 yError("Missing server method '%s'?", ISimulatedWorldMsgs_enableGravity_helper::s_prototype);
4305 }
4307 bool ok = yarp().write(helper, helper);
4309}
4310
4311yarp::dev::ReturnValue ISimulatedWorldMsgs::enableCollision(const std::string& id, const bool enable)
4312{
4313 if (!yarp().canWrite()) {
4315 }
4317 bool ok = yarp().write(helper, helper);
4319}
4320
4321getPoseReturnValue ISimulatedWorldMsgs::getPose(const std::string& id, const std::string& frame_name)
4322{
4323 if (!yarp().canWrite()) {
4324 yError("Missing server method '%s'?", ISimulatedWorldMsgs_getPose_helper::s_prototype);
4325 }
4326 ISimulatedWorldMsgs_getPose_helper helper{id, frame_name};
4327 bool ok = yarp().write(helper, helper);
4328 if (!ok) {
4329 getPoseReturnValue failed_reply{};
4331 return failed_reply;
4332 }
4333 return helper.reply.return_helper;
4334}
4335
4337{
4338 if (!yarp().canWrite()) {
4339 yError("Missing server method '%s'?", ISimulatedWorldMsgs_deleteObject_helper::s_prototype);
4340 }
4342 bool ok = yarp().write(helper, helper);
4344}
4345
4347{
4348 if (!yarp().canWrite()) {
4349 yError("Missing server method '%s'?", ISimulatedWorldMsgs_deleteAll_helper::s_prototype);
4350 }
4352 bool ok = yarp().write(helper, helper);
4354}
4355
4357{
4358 if (!yarp().canWrite()) {
4359 yError("Missing server method '%s'?", ISimulatedWorldMsgs_getList_helper::s_prototype);
4360 }
4362 bool ok = yarp().write(helper, helper);
4363 if (!ok) {
4364 getListReturnValue failed_reply{};
4366 return failed_reply;
4367 }
4368 return helper.reply.return_helper;
4369}
4370
4371yarp::dev::ReturnValue ISimulatedWorldMsgs::attach(const std::string& id, const std::string& link_name)
4372{
4373 if (!yarp().canWrite()) {
4374 yError("Missing server method '%s'?", ISimulatedWorldMsgs_attach_helper::s_prototype);
4375 }
4376 ISimulatedWorldMsgs_attach_helper helper{id, link_name};
4377 bool ok = yarp().write(helper, helper);
4379}
4380
4382{
4383 if (!yarp().canWrite()) {
4384 yError("Missing server method '%s'?", ISimulatedWorldMsgs_detach_helper::s_prototype);
4385 }
4387 bool ok = yarp().write(helper, helper);
4389}
4390
4391yarp::dev::ReturnValue ISimulatedWorldMsgs::rename(const std::string& old_name, const std::string& new_name)
4392{
4393 if (!yarp().canWrite()) {
4394 yError("Missing server method '%s'?", ISimulatedWorldMsgs_rename_helper::s_prototype);
4395 }
4396 ISimulatedWorldMsgs_rename_helper helper{old_name, new_name};
4397 bool ok = yarp().write(helper, helper);
4399}
4400
4401// help method
4402std::vector<std::string> ISimulatedWorldMsgs::help(const std::string& functionName)
4403{
4404 bool showAll = (functionName == "--all");
4405 std::vector<std::string> helpString;
4406 if (showAll) {
4407 helpString.emplace_back("*** Available commands:");
4408 helpString.emplace_back(ISimulatedWorldMsgs_makeSphere_helper::s_tag);
4409 helpString.emplace_back(ISimulatedWorldMsgs_makeBox_helper::s_tag);
4410 helpString.emplace_back(ISimulatedWorldMsgs_makeCylinder_helper::s_tag);
4411 helpString.emplace_back(ISimulatedWorldMsgs_makeFrame_helper::s_tag);
4412 helpString.emplace_back(ISimulatedWorldMsgs_makeModel_helper::s_tag);
4413 helpString.emplace_back(ISimulatedWorldMsgs_makeActor_helper::s_tag);
4414 helpString.emplace_back(ISimulatedWorldMsgs_changeColor_helper::s_tag);
4415 helpString.emplace_back(ISimulatedWorldMsgs_setPose_helper::s_tag);
4416 helpString.emplace_back(ISimulatedWorldMsgs_enableGravity_helper::s_tag);
4418 helpString.emplace_back(ISimulatedWorldMsgs_getPose_helper::s_tag);
4419 helpString.emplace_back(ISimulatedWorldMsgs_deleteObject_helper::s_tag);
4420 helpString.emplace_back(ISimulatedWorldMsgs_deleteAll_helper::s_tag);
4421 helpString.emplace_back(ISimulatedWorldMsgs_getList_helper::s_tag);
4422 helpString.emplace_back(ISimulatedWorldMsgs_attach_helper::s_tag);
4423 helpString.emplace_back(ISimulatedWorldMsgs_detach_helper::s_tag);
4424 helpString.emplace_back(ISimulatedWorldMsgs_rename_helper::s_tag);
4425 helpString.emplace_back("help");
4426 } else {
4429 }
4430 if (functionName == ISimulatedWorldMsgs_makeBox_helper::s_tag) {
4431 helpString.emplace_back(ISimulatedWorldMsgs_makeBox_helper::s_prototype);
4432 }
4435 }
4436 if (functionName == ISimulatedWorldMsgs_makeFrame_helper::s_tag) {
4438 }
4439 if (functionName == ISimulatedWorldMsgs_makeModel_helper::s_tag) {
4441 }
4442 if (functionName == ISimulatedWorldMsgs_makeActor_helper::s_tag) {
4444 }
4447 }
4448 if (functionName == ISimulatedWorldMsgs_setPose_helper::s_tag) {
4449 helpString.emplace_back(ISimulatedWorldMsgs_setPose_helper::s_prototype);
4450 }
4453 }
4456 }
4457 if (functionName == ISimulatedWorldMsgs_getPose_helper::s_tag) {
4458 helpString.emplace_back(ISimulatedWorldMsgs_getPose_helper::s_prototype);
4459 }
4462 }
4463 if (functionName == ISimulatedWorldMsgs_deleteAll_helper::s_tag) {
4465 }
4466 if (functionName == ISimulatedWorldMsgs_getList_helper::s_tag) {
4467 helpString.emplace_back(ISimulatedWorldMsgs_getList_helper::s_prototype);
4468 }
4469 if (functionName == ISimulatedWorldMsgs_attach_helper::s_tag) {
4470 helpString.emplace_back(ISimulatedWorldMsgs_attach_helper::s_prototype);
4471 }
4472 if (functionName == ISimulatedWorldMsgs_detach_helper::s_tag) {
4473 helpString.emplace_back(ISimulatedWorldMsgs_detach_helper::s_prototype);
4474 }
4475 if (functionName == ISimulatedWorldMsgs_rename_helper::s_tag) {
4476 helpString.emplace_back(ISimulatedWorldMsgs_rename_helper::s_prototype);
4477 }
4478 if (functionName == "help") {
4479 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
4480 helpString.emplace_back("Return list of available commands, or help message for a specific function");
4481 helpString.emplace_back("@param functionName name of command for which to get a detailed description. If none or '--all' is provided, print list of available commands");
4482 helpString.emplace_back("@return list of strings (one string per line)");
4483 }
4484 }
4485 if (helpString.empty()) {
4486 helpString.emplace_back("Command not found");
4487 }
4488 return helpString;
4489}
4490
4491// read from ConnectionReader
4493{
4494 constexpr size_t max_tag_len = 1;
4495 size_t tag_len = 1;
4496
4497 yarp::os::idl::WireReader reader(connection);
4498 reader.expectAccept();
4499 if (!reader.readListHeader()) {
4500 reader.fail();
4501 return false;
4502 }
4503
4504 std::string tag = reader.readTag(1);
4505 bool direct = (tag == "__direct__");
4506 if (direct) {
4507 tag = reader.readTag(1);
4508 }
4509 while (tag_len <= max_tag_len && !reader.isError()) {
4510 if(tag == "getRemoteProtocolVersion") {
4511 if (!reader.noMore()) {
4512 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4513 reader.fail();
4514 return false;
4515 }
4516
4517 auto proto = getLocalProtocolVersion();
4518
4519 yarp::os::idl::WireWriter writer(reader);
4520 if (!writer.writeListHeader(1)) {
4521 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4522 return false;}
4523 if (!writer.write(proto)) {
4524 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4525 return false;
4526 }
4527 reader.accept();
4528 return true;
4529 }
4532 if (!helper.cmd.readArgs(reader)) {
4533 return false;
4534 }
4535
4536 helper.call(this);
4537
4538 yarp::os::idl::WireWriter writer(reader);
4539 if (!helper.reply.write(writer)) {
4540 return false;
4541 }
4542 reader.accept();
4543 return true;
4544 }
4547 if (!helper.cmd.readArgs(reader)) {
4548 return false;
4549 }
4550
4551 helper.call(this);
4552
4553 yarp::os::idl::WireWriter writer(reader);
4554 if (!helper.reply.write(writer)) {
4555 return false;
4556 }
4557 reader.accept();
4558 return true;
4559 }
4562 if (!helper.cmd.readArgs(reader)) {
4563 return false;
4564 }
4565
4566 helper.call(this);
4567
4568 yarp::os::idl::WireWriter writer(reader);
4569 if (!helper.reply.write(writer)) {
4570 return false;
4571 }
4572 reader.accept();
4573 return true;
4574 }
4577 if (!helper.cmd.readArgs(reader)) {
4578 return false;
4579 }
4580
4581 helper.call(this);
4582
4583 yarp::os::idl::WireWriter writer(reader);
4584 if (!helper.reply.write(writer)) {
4585 return false;
4586 }
4587 reader.accept();
4588 return true;
4589 }
4592 if (!helper.cmd.readArgs(reader)) {
4593 return false;
4594 }
4595
4596 helper.call(this);
4597
4598 yarp::os::idl::WireWriter writer(reader);
4599 if (!helper.reply.write(writer)) {
4600 return false;
4601 }
4602 reader.accept();
4603 return true;
4604 }
4607 if (!helper.cmd.readArgs(reader)) {
4608 return false;
4609 }
4610
4611 helper.call(this);
4612
4613 yarp::os::idl::WireWriter writer(reader);
4614 if (!helper.reply.write(writer)) {
4615 return false;
4616 }
4617 reader.accept();
4618 return true;
4619 }
4622 if (!helper.cmd.readArgs(reader)) {
4623 return false;
4624 }
4625
4626 helper.call(this);
4627
4628 yarp::os::idl::WireWriter writer(reader);
4629 if (!helper.reply.write(writer)) {
4630 return false;
4631 }
4632 reader.accept();
4633 return true;
4634 }
4637 if (!helper.cmd.readArgs(reader)) {
4638 return false;
4639 }
4640
4641 helper.call(this);
4642
4643 yarp::os::idl::WireWriter writer(reader);
4644 if (!helper.reply.write(writer)) {
4645 return false;
4646 }
4647 reader.accept();
4648 return true;
4649 }
4652 if (!helper.cmd.readArgs(reader)) {
4653 return false;
4654 }
4655
4656 helper.call(this);
4657
4658 yarp::os::idl::WireWriter writer(reader);
4659 if (!helper.reply.write(writer)) {
4660 return false;
4661 }
4662 reader.accept();
4663 return true;
4664 }
4667 if (!helper.cmd.readArgs(reader)) {
4668 return false;
4669 }
4670
4671 helper.call(this);
4672
4673 yarp::os::idl::WireWriter writer(reader);
4674 if (!helper.reply.write(writer)) {
4675 return false;
4676 }
4677 reader.accept();
4678 return true;
4679 }
4682 if (!helper.cmd.readArgs(reader)) {
4683 return false;
4684 }
4685
4686 helper.call(this);
4687
4688 yarp::os::idl::WireWriter writer(reader);
4689 if (!helper.reply.write(writer)) {
4690 return false;
4691 }
4692 reader.accept();
4693 return true;
4694 }
4697 if (!helper.cmd.readArgs(reader)) {
4698 return false;
4699 }
4700
4701 helper.call(this);
4702
4703 yarp::os::idl::WireWriter writer(reader);
4704 if (!helper.reply.write(writer)) {
4705 return false;
4706 }
4707 reader.accept();
4708 return true;
4709 }
4712 if (!helper.cmd.readArgs(reader)) {
4713 return false;
4714 }
4715
4716 helper.call(this);
4717
4718 yarp::os::idl::WireWriter writer(reader);
4719 if (!helper.reply.write(writer)) {
4720 return false;
4721 }
4722 reader.accept();
4723 return true;
4724 }
4727 if (!helper.cmd.readArgs(reader)) {
4728 return false;
4729 }
4730
4731 helper.call(this);
4732
4733 yarp::os::idl::WireWriter writer(reader);
4734 if (!helper.reply.write(writer)) {
4735 return false;
4736 }
4737 reader.accept();
4738 return true;
4739 }
4742 if (!helper.cmd.readArgs(reader)) {
4743 return false;
4744 }
4745
4746 helper.call(this);
4747
4748 yarp::os::idl::WireWriter writer(reader);
4749 if (!helper.reply.write(writer)) {
4750 return false;
4751 }
4752 reader.accept();
4753 return true;
4754 }
4757 if (!helper.cmd.readArgs(reader)) {
4758 return false;
4759 }
4760
4761 helper.call(this);
4762
4763 yarp::os::idl::WireWriter writer(reader);
4764 if (!helper.reply.write(writer)) {
4765 return false;
4766 }
4767 reader.accept();
4768 return true;
4769 }
4772 if (!helper.cmd.readArgs(reader)) {
4773 return false;
4774 }
4775
4776 helper.call(this);
4777
4778 yarp::os::idl::WireWriter writer(reader);
4779 if (!helper.reply.write(writer)) {
4780 return false;
4781 }
4782 reader.accept();
4783 return true;
4784 }
4785 if (tag == "help") {
4786 std::string functionName;
4787 if (!reader.readString(functionName)) {
4788 functionName = "--all";
4789 }
4790 auto help_strings = help(functionName);
4791 yarp::os::idl::WireWriter writer(reader);
4792 if (!writer.isNull()) {
4793 if (!writer.writeListHeader(2)) {
4794 return false;
4795 }
4796 if (!writer.writeTag("many", 1, 0)) {
4797 return false;
4798 }
4799 if (!writer.writeListBegin(0, help_strings.size())) {
4800 return false;
4801 }
4802 for (const auto& help_string : help_strings) {
4803 if (!writer.writeString(help_string)) {
4804 return false;
4805 }
4806 }
4807 if (!writer.writeListEnd()) {
4808 return false;
4809 }
4810 }
4811 reader.accept();
4812 return true;
4813 }
4814 if (reader.noMore()) {
4815 reader.fail();
4816 return false;
4817 }
4818 std::string next_tag = reader.readTag(1);
4819 if (next_tag.empty()) {
4820 break;
4821 }
4822 tag.append("_").append(next_tag);
4823 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
4824 }
4825 return false;
4826}
#define yError(...)
Definition Log.h:361
#define __YFUNCTION__
Definition Log.h:24
#define yWarning(...)
Definition Log.h:340
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
yarp::dev::ReturnValue(*)(const std::string &, const std::string &) funcptr_t
static constexpr const char * s_tag
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
void call(ISimulatedWorldMsgs *ptr)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
yarp::dev::ReturnValue(*)(const std::string &, const yarp::sig::ColorRGB &) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)(const std::string &) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::string &) funcptr_t
static constexpr const char * s_tag
void call(ISimulatedWorldMsgs *ptr)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const bool) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const bool) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_tag
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
void call(ISimulatedWorldMsgs *ptr)
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
static constexpr const char * s_tag
void call(ISimulatedWorldMsgs *ptr)
static constexpr const char * s_help
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
getPoseReturnValue(*)(const std::string &, const std::string &) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::os::ApplicationNetworkProtocolVersion helper_proto
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const std::string &, const std::string &, const yarp::sig::Pose6D &) funcptr_t
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(ISimulatedWorldMsgs *ptr)
static constexpr const char * s_help
static constexpr const char * s_tag
static constexpr const char * s_prototype
yarp::dev::ReturnValue(*)(const std::string &, const double, const double, const double, const yarp::sig::Pose6D &, const yarp::sig::ColorRGB &, const std::string &, const bool, const bool) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const double, const double, const yarp::sig::Pose6D &, const yarp::sig::ColorRGB &, const std::string &, const bool, const bool) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const double, const yarp::sig::Pose6D &, const yarp::sig::ColorRGB &, const std::string &, const bool, const bool) funcptr_t
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const std::string &, const yarp::sig::Pose6D &, const std::string &, const bool, const bool) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const double, const yarp::sig::Pose6D &, const yarp::sig::ColorRGB &, const std::string &, const bool, const bool) funcptr_t
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::string &, const std::string &) funcptr_t
static constexpr const char * s_help
static constexpr const char * s_prototype
void call(ISimulatedWorldMsgs *ptr)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
void call(ISimulatedWorldMsgs *ptr)
static constexpr const char * s_tag
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
yarp::dev::ReturnValue(*)(const std::string &, const yarp::sig::Pose6D &, const std::string &) funcptr_t
virtual yarp::dev::ReturnValue rename(const std::string &old_name, const std::string &new_name)
virtual yarp::dev::ReturnValue makeModel(const std::string &id_name, const std::string &filename, const yarp::sig::Pose6D &pose, const std::string &frame_name, const bool gravity_enable, const bool collision_enable)
virtual yarp::dev::ReturnValue deleteAll()
virtual yarp::dev::ReturnValue deleteObject(const std::string &id)
virtual yarp::dev::ReturnValue detach(const std::string &id)
virtual yarp::dev::ReturnValue makeBox(const std::string &id_name, const double width, const double height, const double thickness, const yarp::sig::Pose6D &pose, const yarp::sig::ColorRGB &color, const std::string &frame_name, const bool gravity_enable, const bool collision_enable)
virtual yarp::dev::ReturnValue makeActor(const std::string &id_name, const std::string &skinfile, const std::string &animfile, const yarp::sig::Pose6D &pose)
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual yarp::dev::ReturnValue enableGravity(const std::string &id, const bool enable)
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
virtual yarp::dev::ReturnValue changeColor(const std::string &id, const yarp::sig::ColorRGB &color)
virtual yarp::dev::ReturnValue enableCollision(const std::string &id, const bool enable)
virtual bool checkProtocolVersion()
virtual getListReturnValue getList()
virtual yarp::dev::ReturnValue makeCylinder(const std::string &id_name, const double radius, const double length, const yarp::sig::Pose6D &pose, const yarp::sig::ColorRGB &color, const std::string &frame_name, const bool gravity_enable, const bool collision_enable)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual yarp::dev::ReturnValue setPose(const std::string &id, const yarp::sig::Pose6D &pose, const std::string &frame_name)
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
virtual yarp::dev::ReturnValue makeFrame(const std::string &id_name, const double size, const yarp::sig::Pose6D &pose, const yarp::sig::ColorRGB &color, const std::string &frame_name, const bool gravity_enable, const bool collision_enable)
virtual getPoseReturnValue getPose(const std::string &id, const std::string &frame_name)
virtual yarp::dev::ReturnValue makeSphere(const std::string &id_name, const double radius, const yarp::sig::Pose6D &pose, const yarp::sig::ColorRGB &color, const std::string &frame_name, const bool gravity_enable, const bool collision_enable)
virtual yarp::dev::ReturnValue attach(const std::string &id, const std::string &link_name)
yarp::dev::ReturnValue retVal
yarp::dev::ReturnValue retVal
@ return_value_error_nws_nwc_communication_error
Method is not (yet) implemented.
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
Definition Wire.h:28
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
Definition WireReader.h:27
bool readNested(WirePortable &obj)
bool readString(std::string &str, bool *is_vocab=nullptr)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
bool readFloat64(yarp::conf::float64_t &x)
IDL-friendly connection writer.
Definition WireWriter.h:28
bool writeBool(bool x, bool skip_tag=false) const
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeFloat64(yarp::conf::float64_t x, bool skip_tag=false) const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeNested(const WirePortable &obj) const
bool writeListBegin(int tag, size_t len) const
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_VERSION_PATCH
Definition version.h:12
#define YARP_VERSION_MAJOR
Definition version.h:10
#define YARP_VERSION_MINOR
Definition version.h:11