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 Compiler (0.14.1-yarped)
7//
8// This is an automatically generated file.
9// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
10
11#include <yarp/conf/version.h>
12#include <ISimulatedWorldMsgs.h>
14#include <yarp/os/LogStream.h>
15
17
18#include <algorithm>
19
20namespace
21{
22 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "ISimulatedWorldMsgs")
23}
24
25//ISimulatedWorldMsgs_getRemoteProtocolVersion_helper declaration
36
38{
39 yarp::os::idl::WireWriter writer(connection);
40 if (!writer.writeListHeader(1)) {
41 return false;
42 }
43 if (!writer.writeString("getRemoteProtocolVersion")) {
44 return false;
45 }
46 return true;
47}
48
49bool ISimulatedWorldMsgs_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
50 {
51 yarp::os::idl::WireReader reader(connection);
52 if (!reader.readListHeader()) {
53 reader.fail();
54 return false;
55 }
56
57 if (!helper_proto.read(connection)) {
58 reader.fail();
59 return false;
60 }
61 return true;
62}
63
64//ProtocolVersion, client side
66 {
67 if(!yarp().canWrite()) {
68 yError(" Missing server method ISimulatedWorldMsgs::getRemoteProtocolVersion");
69 }
71 bool ok = yarp().write(helper, helper);
72 if (ok) {
73 return helper.helper_proto;}
74 else {
76 return failureproto;}
77}
78
79//ProtocolVersion, client side
81 {
82 auto locproto = this->getLocalProtocolVersion();
83 auto remproto = this->getRemoteProtocolVersion();
84 if (remproto.protocol_version != locproto.protocol_version)
85 {
86 yCError(SERVICE_LOG_COMPONENT) << "Invalid communication protocol.";
87 yCError(SERVICE_LOG_COMPONENT) << "Local Protocol Version: " << locproto.toString();
88 yCError(SERVICE_LOG_COMPONENT) << "Remote Protocol Version: " << remproto.toString();
89 return false;
90 }
91 return true;
92}
93
94//ProtocolVersion, server side
96{
98 //myproto.protocol_version using default value = 0
99 //to change this value add the following line to the .thrift file:
100 //const i16 protocol_version = <your_number_here>
101 myproto.protocol_version = 0;
105 return myproto;
106}
107
108// makeSphere helper class declaration
110 public yarp::os::Portable
111{
112public:
114 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);
115 bool write(yarp::os::ConnectionWriter& connection) const override;
116 bool read(yarp::os::ConnectionReader& connection) override;
117
118 class Command :
120 {
121 public:
122 Command() = default;
123 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);
124
125 ~Command() override = default;
126
127 bool write(yarp::os::ConnectionWriter& connection) const override;
128 bool read(yarp::os::ConnectionReader& connection) override;
129
130 bool write(const yarp::os::idl::WireWriter& writer) const override;
131 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
132 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
133
134 bool read(yarp::os::idl::WireReader& reader) override;
137
138 std::string id_name{};
139 double radius{0.0};
142 std::string frame_name{};
143 bool gravity_enable{false};
144 bool collision_enable{false};
145 };
146
147 class Reply :
149 {
150 public:
151 Reply() = default;
152 ~Reply() override = default;
153
154 bool write(yarp::os::ConnectionWriter& connection) const override;
155 bool read(yarp::os::ConnectionReader& connection) override;
156
157 bool write(const yarp::os::idl::WireWriter& writer) const override;
158 bool read(yarp::os::idl::WireReader& reader) override;
159
161 };
162
163 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);
164 void call(ISimulatedWorldMsgs* ptr);
165
168
169 static constexpr const char* s_tag{"makeSphere"};
170 static constexpr size_t s_tag_len{1};
171 static constexpr size_t s_cmd_len{8};
172 static constexpr size_t s_reply_len{1};
173 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)"};
174 static constexpr const char* s_help{""};
175};
176
177// makeBox helper class declaration
179 public yarp::os::Portable
180{
181public:
183 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);
184 bool write(yarp::os::ConnectionWriter& connection) const override;
185 bool read(yarp::os::ConnectionReader& connection) override;
186
187 class Command :
189 {
190 public:
191 Command() = default;
192 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);
193
194 ~Command() override = default;
195
196 bool write(yarp::os::ConnectionWriter& connection) const override;
197 bool read(yarp::os::ConnectionReader& connection) override;
198
199 bool write(const yarp::os::idl::WireWriter& writer) const override;
200 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
201 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
202
203 bool read(yarp::os::idl::WireReader& reader) override;
206
207 std::string id_name{};
208 double width{0.0};
209 double height{0.0};
210 double thickness{0.0};
213 std::string frame_name{};
214 bool gravity_enable{false};
215 bool collision_enable{false};
216 };
217
218 class Reply :
220 {
221 public:
222 Reply() = default;
223 ~Reply() override = default;
224
225 bool write(yarp::os::ConnectionWriter& connection) const override;
226 bool read(yarp::os::ConnectionReader& connection) override;
227
228 bool write(const yarp::os::idl::WireWriter& writer) const override;
229 bool read(yarp::os::idl::WireReader& reader) override;
230
232 };
233
234 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);
235 void call(ISimulatedWorldMsgs* ptr);
236
239
240 static constexpr const char* s_tag{"makeBox"};
241 static constexpr size_t s_tag_len{1};
242 static constexpr size_t s_cmd_len{10};
243 static constexpr size_t s_reply_len{1};
244 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)"};
245 static constexpr const char* s_help{""};
246};
247
248// makeCylinder helper class declaration
250 public yarp::os::Portable
251{
252public:
254 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);
255 bool write(yarp::os::ConnectionWriter& connection) const override;
256 bool read(yarp::os::ConnectionReader& connection) override;
257
258 class Command :
260 {
261 public:
262 Command() = default;
263 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);
264
265 ~Command() override = default;
266
267 bool write(yarp::os::ConnectionWriter& connection) const override;
268 bool read(yarp::os::ConnectionReader& connection) override;
269
270 bool write(const yarp::os::idl::WireWriter& writer) const override;
271 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
272 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
273
274 bool read(yarp::os::idl::WireReader& reader) override;
277
278 std::string id_name{};
279 double radius{0.0};
280 double length{0.0};
283 std::string frame_name{};
284 bool gravity_enable{false};
285 bool collision_enable{false};
286 };
287
288 class Reply :
290 {
291 public:
292 Reply() = default;
293 ~Reply() override = default;
294
295 bool write(yarp::os::ConnectionWriter& connection) const override;
296 bool read(yarp::os::ConnectionReader& connection) override;
297
298 bool write(const yarp::os::idl::WireWriter& writer) const override;
299 bool read(yarp::os::idl::WireReader& reader) override;
300
302 };
303
304 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);
305 void call(ISimulatedWorldMsgs* ptr);
306
309
310 static constexpr const char* s_tag{"makeCylinder"};
311 static constexpr size_t s_tag_len{1};
312 static constexpr size_t s_cmd_len{9};
313 static constexpr size_t s_reply_len{1};
314 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)"};
315 static constexpr const char* s_help{""};
316};
317
318// makeFrame helper class declaration
320 public yarp::os::Portable
321{
322public:
324 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);
325 bool write(yarp::os::ConnectionWriter& connection) const override;
326 bool read(yarp::os::ConnectionReader& connection) override;
327
328 class Command :
330 {
331 public:
332 Command() = default;
333 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);
334
335 ~Command() override = default;
336
337 bool write(yarp::os::ConnectionWriter& connection) const override;
338 bool read(yarp::os::ConnectionReader& connection) override;
339
340 bool write(const yarp::os::idl::WireWriter& writer) const override;
341 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
342 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
343
344 bool read(yarp::os::idl::WireReader& reader) override;
347
348 std::string id_name{};
349 double size{0.0};
352 std::string frame_name{};
353 bool gravity_enable{false};
354 bool collision_enable{false};
355 };
356
357 class Reply :
359 {
360 public:
361 Reply() = default;
362 ~Reply() override = default;
363
364 bool write(yarp::os::ConnectionWriter& connection) const override;
365 bool read(yarp::os::ConnectionReader& connection) override;
366
367 bool write(const yarp::os::idl::WireWriter& writer) const override;
368 bool read(yarp::os::idl::WireReader& reader) override;
369
371 };
372
373 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);
374 void call(ISimulatedWorldMsgs* ptr);
375
378
379 static constexpr const char* s_tag{"makeFrame"};
380 static constexpr size_t s_tag_len{1};
381 static constexpr size_t s_cmd_len{8};
382 static constexpr size_t s_reply_len{1};
383 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)"};
384 static constexpr const char* s_help{""};
385};
386
387// makeModel helper class declaration
389 public yarp::os::Portable
390{
391public:
393 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);
394 bool write(yarp::os::ConnectionWriter& connection) const override;
395 bool read(yarp::os::ConnectionReader& connection) override;
396
397 class Command :
399 {
400 public:
401 Command() = default;
402 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);
403
404 ~Command() override = default;
405
406 bool write(yarp::os::ConnectionWriter& connection) const override;
407 bool read(yarp::os::ConnectionReader& connection) override;
408
409 bool write(const yarp::os::idl::WireWriter& writer) const override;
410 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
411 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
412
413 bool read(yarp::os::idl::WireReader& reader) override;
416
417 std::string id_name{};
418 std::string filename{};
420 std::string frame_name{};
421 bool gravity_enable{false};
422 bool collision_enable{false};
423 };
424
425 class Reply :
427 {
428 public:
429 Reply() = default;
430 ~Reply() override = default;
431
432 bool write(yarp::os::ConnectionWriter& connection) const override;
433 bool read(yarp::os::ConnectionReader& connection) override;
434
435 bool write(const yarp::os::idl::WireWriter& writer) const override;
436 bool read(yarp::os::idl::WireReader& reader) override;
437
439 };
440
441 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&, const yarp::sig::Pose6D&, const std::string&, const bool, const bool);
442 void call(ISimulatedWorldMsgs* ptr);
443
446
447 static constexpr const char* s_tag{"makeModel"};
448 static constexpr size_t s_tag_len{1};
449 static constexpr size_t s_cmd_len{7};
450 static constexpr size_t s_reply_len{1};
451 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)"};
452 static constexpr const char* s_help{""};
453};
454
455// makeActor helper class declaration
457 public yarp::os::Portable
458{
459public:
461 ISimulatedWorldMsgs_makeActor_helper(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose);
462 bool write(yarp::os::ConnectionWriter& connection) const override;
463 bool read(yarp::os::ConnectionReader& connection) override;
464
465 class Command :
467 {
468 public:
469 Command() = default;
470 Command(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose);
471
472 ~Command() override = default;
473
474 bool write(yarp::os::ConnectionWriter& connection) const override;
475 bool read(yarp::os::ConnectionReader& connection) override;
476
477 bool write(const yarp::os::idl::WireWriter& writer) const override;
478 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
479 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
480
481 bool read(yarp::os::idl::WireReader& reader) override;
484
485 std::string id_name{};
486 std::string skinfile{};
487 std::string animfile{};
489 };
490
491 class Reply :
493 {
494 public:
495 Reply() = default;
496 ~Reply() override = default;
497
498 bool write(yarp::os::ConnectionWriter& connection) const override;
499 bool read(yarp::os::ConnectionReader& connection) override;
500
501 bool write(const yarp::os::idl::WireWriter& writer) const override;
502 bool read(yarp::os::idl::WireReader& reader) override;
503
505 };
506
507 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&, const std::string&, const yarp::sig::Pose6D&);
508 void call(ISimulatedWorldMsgs* ptr);
509
512
513 static constexpr const char* s_tag{"makeActor"};
514 static constexpr size_t s_tag_len{1};
515 static constexpr size_t s_cmd_len{5};
516 static constexpr size_t s_reply_len{1};
517 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)"};
518 static constexpr const char* s_help{""};
519};
520
521// changeColor helper class declaration
523 public yarp::os::Portable
524{
525public:
527 ISimulatedWorldMsgs_changeColor_helper(const std::string& id, const yarp::sig::ColorRGB& color);
528 bool write(yarp::os::ConnectionWriter& connection) const override;
529 bool read(yarp::os::ConnectionReader& connection) override;
530
531 class Command :
533 {
534 public:
535 Command() = default;
536 Command(const std::string& id, const yarp::sig::ColorRGB& color);
537
538 ~Command() override = default;
539
540 bool write(yarp::os::ConnectionWriter& connection) const override;
541 bool read(yarp::os::ConnectionReader& connection) override;
542
543 bool write(const yarp::os::idl::WireWriter& writer) const override;
544 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
545 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
546
547 bool read(yarp::os::idl::WireReader& reader) override;
550
551 std::string id{};
553 };
554
555 class Reply :
557 {
558 public:
559 Reply() = default;
560 ~Reply() override = default;
561
562 bool write(yarp::os::ConnectionWriter& connection) const override;
563 bool read(yarp::os::ConnectionReader& connection) override;
564
565 bool write(const yarp::os::idl::WireWriter& writer) const override;
566 bool read(yarp::os::idl::WireReader& reader) override;
567
569 };
570
571 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const yarp::sig::ColorRGB&);
572 void call(ISimulatedWorldMsgs* ptr);
573
576
577 static constexpr const char* s_tag{"changeColor"};
578 static constexpr size_t s_tag_len{1};
579 static constexpr size_t s_cmd_len{3};
580 static constexpr size_t s_reply_len{1};
581 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::changeColor(const std::string& id, const yarp::sig::ColorRGB& color)"};
582 static constexpr const char* s_help{""};
583};
584
585// setPose helper class declaration
587 public yarp::os::Portable
588{
589public:
591 ISimulatedWorldMsgs_setPose_helper(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name);
592 bool write(yarp::os::ConnectionWriter& connection) const override;
593 bool read(yarp::os::ConnectionReader& connection) override;
594
595 class Command :
597 {
598 public:
599 Command() = default;
600 Command(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name);
601
602 ~Command() override = default;
603
604 bool write(yarp::os::ConnectionWriter& connection) const override;
605 bool read(yarp::os::ConnectionReader& connection) override;
606
607 bool write(const yarp::os::idl::WireWriter& writer) const override;
608 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
609 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
610
611 bool read(yarp::os::idl::WireReader& reader) override;
614
615 std::string id{};
617 std::string frame_name{};
618 };
619
620 class Reply :
622 {
623 public:
624 Reply() = default;
625 ~Reply() override = default;
626
627 bool write(yarp::os::ConnectionWriter& connection) const override;
628 bool read(yarp::os::ConnectionReader& connection) override;
629
630 bool write(const yarp::os::idl::WireWriter& writer) const override;
631 bool read(yarp::os::idl::WireReader& reader) override;
632
634 };
635
636 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const yarp::sig::Pose6D&, const std::string&);
637 void call(ISimulatedWorldMsgs* ptr);
638
641
642 static constexpr const char* s_tag{"setPose"};
643 static constexpr size_t s_tag_len{1};
644 static constexpr size_t s_cmd_len{4};
645 static constexpr size_t s_reply_len{1};
646 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)"};
647 static constexpr const char* s_help{""};
648};
649
650// enableGravity helper class declaration
652 public yarp::os::Portable
653{
654public:
656 ISimulatedWorldMsgs_enableGravity_helper(const std::string& id, const bool enable);
657 bool write(yarp::os::ConnectionWriter& connection) const override;
658 bool read(yarp::os::ConnectionReader& connection) override;
659
660 class Command :
662 {
663 public:
664 Command() = default;
665 Command(const std::string& id, const bool enable);
666
667 ~Command() override = default;
668
669 bool write(yarp::os::ConnectionWriter& connection) const override;
670 bool read(yarp::os::ConnectionReader& connection) override;
671
672 bool write(const yarp::os::idl::WireWriter& writer) const override;
673 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
674 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
675
676 bool read(yarp::os::idl::WireReader& reader) override;
679
680 std::string id{};
681 bool enable{false};
682 };
683
684 class Reply :
686 {
687 public:
688 Reply() = default;
689 ~Reply() override = default;
690
691 bool write(yarp::os::ConnectionWriter& connection) const override;
692 bool read(yarp::os::ConnectionReader& connection) override;
693
694 bool write(const yarp::os::idl::WireWriter& writer) const override;
695 bool read(yarp::os::idl::WireReader& reader) override;
696
698 };
699
700 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const bool);
701 void call(ISimulatedWorldMsgs* ptr);
702
705
706 static constexpr const char* s_tag{"enableGravity"};
707 static constexpr size_t s_tag_len{1};
708 static constexpr size_t s_cmd_len{3};
709 static constexpr size_t s_reply_len{1};
710 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::enableGravity(const std::string& id, const bool enable)"};
711 static constexpr const char* s_help{""};
712};
713
714// enableCollision helper class declaration
716 public yarp::os::Portable
717{
718public:
720 ISimulatedWorldMsgs_enableCollision_helper(const std::string& id, const bool enable);
721 bool write(yarp::os::ConnectionWriter& connection) const override;
722 bool read(yarp::os::ConnectionReader& connection) override;
723
724 class Command :
726 {
727 public:
728 Command() = default;
729 Command(const std::string& id, const bool enable);
730
731 ~Command() override = default;
732
733 bool write(yarp::os::ConnectionWriter& connection) const override;
734 bool read(yarp::os::ConnectionReader& connection) override;
735
736 bool write(const yarp::os::idl::WireWriter& writer) const override;
737 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
738 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
739
740 bool read(yarp::os::idl::WireReader& reader) override;
743
744 std::string id{};
745 bool enable{false};
746 };
747
748 class Reply :
750 {
751 public:
752 Reply() = default;
753 ~Reply() override = default;
754
755 bool write(yarp::os::ConnectionWriter& connection) const override;
756 bool read(yarp::os::ConnectionReader& connection) override;
757
758 bool write(const yarp::os::idl::WireWriter& writer) const override;
759 bool read(yarp::os::idl::WireReader& reader) override;
760
762 };
763
764 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const bool);
765 void call(ISimulatedWorldMsgs* ptr);
766
769
770 static constexpr const char* s_tag{"enableCollision"};
771 static constexpr size_t s_tag_len{1};
772 static constexpr size_t s_cmd_len{3};
773 static constexpr size_t s_reply_len{1};
774 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::enableCollision(const std::string& id, const bool enable)"};
775 static constexpr const char* s_help{""};
776};
777
778// getPose helper class declaration
780 public yarp::os::Portable
781{
782public:
784 ISimulatedWorldMsgs_getPose_helper(const std::string& id, const std::string& frame_name);
785 bool write(yarp::os::ConnectionWriter& connection) const override;
786 bool read(yarp::os::ConnectionReader& connection) override;
787
788 class Command :
790 {
791 public:
792 Command() = default;
793 Command(const std::string& id, const std::string& frame_name);
794
795 ~Command() override = default;
796
797 bool write(yarp::os::ConnectionWriter& connection) const override;
798 bool read(yarp::os::ConnectionReader& connection) override;
799
800 bool write(const yarp::os::idl::WireWriter& writer) const override;
801 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
802 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
803
804 bool read(yarp::os::idl::WireReader& reader) override;
807
808 std::string id{};
809 std::string frame_name{};
810 };
811
812 class Reply :
814 {
815 public:
816 Reply() = default;
817 ~Reply() override = default;
818
819 bool write(yarp::os::ConnectionWriter& connection) const override;
820 bool read(yarp::os::ConnectionReader& connection) override;
821
822 bool write(const yarp::os::idl::WireWriter& writer) const override;
823 bool read(yarp::os::idl::WireReader& reader) override;
824
826 };
827
828 using funcptr_t = getPoseReturnValue (*)(const std::string&, const std::string&);
829 void call(ISimulatedWorldMsgs* ptr);
830
833
834 static constexpr const char* s_tag{"getPose"};
835 static constexpr size_t s_tag_len{1};
836 static constexpr size_t s_cmd_len{3};
837 static constexpr size_t s_reply_len{2};
838 static constexpr const char* s_prototype{"getPoseReturnValue ISimulatedWorldMsgs::getPose(const std::string& id, const std::string& frame_name)"};
839 static constexpr const char* s_help{""};
840};
841
842// deleteObject helper class declaration
844 public yarp::os::Portable
845{
846public:
848 explicit ISimulatedWorldMsgs_deleteObject_helper(const std::string& id);
849 bool write(yarp::os::ConnectionWriter& connection) const override;
850 bool read(yarp::os::ConnectionReader& connection) override;
851
852 class Command :
854 {
855 public:
856 Command() = default;
857 explicit Command(const std::string& id);
858
859 ~Command() override = default;
860
861 bool write(yarp::os::ConnectionWriter& connection) const override;
862 bool read(yarp::os::ConnectionReader& connection) override;
863
864 bool write(const yarp::os::idl::WireWriter& writer) const override;
865 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
866 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
867
868 bool read(yarp::os::idl::WireReader& reader) override;
871
872 std::string id{};
873 };
874
875 class Reply :
877 {
878 public:
879 Reply() = default;
880 ~Reply() override = default;
881
882 bool write(yarp::os::ConnectionWriter& connection) const override;
883 bool read(yarp::os::ConnectionReader& connection) override;
884
885 bool write(const yarp::os::idl::WireWriter& writer) const override;
886 bool read(yarp::os::idl::WireReader& reader) override;
887
889 };
890
891 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&);
892 void call(ISimulatedWorldMsgs* ptr);
893
896
897 static constexpr const char* s_tag{"deleteObject"};
898 static constexpr size_t s_tag_len{1};
899 static constexpr size_t s_cmd_len{2};
900 static constexpr size_t s_reply_len{1};
901 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::deleteObject(const std::string& id)"};
902 static constexpr const char* s_help{""};
903};
904
905// deleteAll helper class declaration
907 public yarp::os::Portable
908{
909public:
911 bool write(yarp::os::ConnectionWriter& connection) const override;
912 bool read(yarp::os::ConnectionReader& connection) override;
913
914 class Command :
916 {
917 public:
918 Command() = default;
919 ~Command() override = default;
920
921 bool write(yarp::os::ConnectionWriter& connection) const override;
922 bool read(yarp::os::ConnectionReader& connection) override;
923
924 bool write(const yarp::os::idl::WireWriter& writer) const override;
925 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
926 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
927
928 bool read(yarp::os::idl::WireReader& reader) override;
931 };
932
933 class Reply :
935 {
936 public:
937 Reply() = default;
938 ~Reply() override = default;
939
940 bool write(yarp::os::ConnectionWriter& connection) const override;
941 bool read(yarp::os::ConnectionReader& connection) override;
942
943 bool write(const yarp::os::idl::WireWriter& writer) const override;
944 bool read(yarp::os::idl::WireReader& reader) override;
945
947 };
948
950 void call(ISimulatedWorldMsgs* ptr);
951
954
955 static constexpr const char* s_tag{"deleteAll"};
956 static constexpr size_t s_tag_len{1};
957 static constexpr size_t s_cmd_len{1};
958 static constexpr size_t s_reply_len{1};
959 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::deleteAll()"};
960 static constexpr const char* s_help{""};
961};
962
963// getList helper class declaration
965 public yarp::os::Portable
966{
967public:
969 bool write(yarp::os::ConnectionWriter& connection) const override;
970 bool read(yarp::os::ConnectionReader& connection) override;
971
972 class Command :
974 {
975 public:
976 Command() = default;
977 ~Command() override = default;
978
979 bool write(yarp::os::ConnectionWriter& connection) const override;
980 bool read(yarp::os::ConnectionReader& connection) override;
981
982 bool write(const yarp::os::idl::WireWriter& writer) const override;
983 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
984 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
985
986 bool read(yarp::os::idl::WireReader& reader) override;
989 };
990
991 class Reply :
993 {
994 public:
995 Reply() = default;
996 ~Reply() override = default;
997
998 bool write(yarp::os::ConnectionWriter& connection) const override;
999 bool read(yarp::os::ConnectionReader& connection) override;
1000
1001 bool write(const yarp::os::idl::WireWriter& writer) const override;
1002 bool read(yarp::os::idl::WireReader& reader) override;
1003
1005 };
1006
1008 void call(ISimulatedWorldMsgs* ptr);
1009
1012
1013 static constexpr const char* s_tag{"getList"};
1014 static constexpr size_t s_tag_len{1};
1015 static constexpr size_t s_cmd_len{1};
1016 static constexpr size_t s_reply_len{2};
1017 static constexpr const char* s_prototype{"getListReturnValue ISimulatedWorldMsgs::getList()"};
1018 static constexpr const char* s_help{""};
1019};
1020
1021// attach helper class declaration
1023 public yarp::os::Portable
1024{
1025public:
1027 ISimulatedWorldMsgs_attach_helper(const std::string& id, const std::string& link_name);
1028 bool write(yarp::os::ConnectionWriter& connection) const override;
1029 bool read(yarp::os::ConnectionReader& connection) override;
1030
1031 class Command :
1033 {
1034 public:
1035 Command() = default;
1036 Command(const std::string& id, const std::string& link_name);
1037
1038 ~Command() override = default;
1039
1040 bool write(yarp::os::ConnectionWriter& connection) const override;
1041 bool read(yarp::os::ConnectionReader& connection) override;
1042
1043 bool write(const yarp::os::idl::WireWriter& writer) const override;
1044 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1045 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1046
1047 bool read(yarp::os::idl::WireReader& reader) override;
1048 bool readTag(yarp::os::idl::WireReader& reader);
1049 bool readArgs(yarp::os::idl::WireReader& reader);
1050
1051 std::string id{};
1052 std::string link_name{};
1053 };
1054
1055 class Reply :
1057 {
1058 public:
1059 Reply() = default;
1060 ~Reply() override = default;
1061
1062 bool write(yarp::os::ConnectionWriter& connection) const override;
1063 bool read(yarp::os::ConnectionReader& connection) override;
1064
1065 bool write(const yarp::os::idl::WireWriter& writer) const override;
1066 bool read(yarp::os::idl::WireReader& reader) override;
1067
1069 };
1070
1071 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&);
1072 void call(ISimulatedWorldMsgs* ptr);
1073
1076
1077 static constexpr const char* s_tag{"attach"};
1078 static constexpr size_t s_tag_len{1};
1079 static constexpr size_t s_cmd_len{3};
1080 static constexpr size_t s_reply_len{1};
1081 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::attach(const std::string& id, const std::string& link_name)"};
1082 static constexpr const char* s_help{""};
1083};
1084
1085// detach helper class declaration
1087 public yarp::os::Portable
1088{
1089public:
1091 explicit ISimulatedWorldMsgs_detach_helper(const std::string& id);
1092 bool write(yarp::os::ConnectionWriter& connection) const override;
1093 bool read(yarp::os::ConnectionReader& connection) override;
1094
1095 class Command :
1097 {
1098 public:
1099 Command() = default;
1100 explicit Command(const std::string& id);
1101
1102 ~Command() override = default;
1103
1104 bool write(yarp::os::ConnectionWriter& connection) const override;
1105 bool read(yarp::os::ConnectionReader& connection) override;
1106
1107 bool write(const yarp::os::idl::WireWriter& writer) const override;
1108 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1109 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1110
1111 bool read(yarp::os::idl::WireReader& reader) override;
1112 bool readTag(yarp::os::idl::WireReader& reader);
1113 bool readArgs(yarp::os::idl::WireReader& reader);
1114
1115 std::string id{};
1116 };
1117
1118 class Reply :
1120 {
1121 public:
1122 Reply() = default;
1123 ~Reply() override = default;
1124
1125 bool write(yarp::os::ConnectionWriter& connection) const override;
1126 bool read(yarp::os::ConnectionReader& connection) override;
1127
1128 bool write(const yarp::os::idl::WireWriter& writer) const override;
1129 bool read(yarp::os::idl::WireReader& reader) override;
1130
1132 };
1133
1134 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&);
1135 void call(ISimulatedWorldMsgs* ptr);
1136
1139
1140 static constexpr const char* s_tag{"detach"};
1141 static constexpr size_t s_tag_len{1};
1142 static constexpr size_t s_cmd_len{2};
1143 static constexpr size_t s_reply_len{1};
1144 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::detach(const std::string& id)"};
1145 static constexpr const char* s_help{""};
1146};
1147
1148// rename helper class declaration
1150 public yarp::os::Portable
1151{
1152public:
1154 ISimulatedWorldMsgs_rename_helper(const std::string& old_name, const std::string& new_name);
1155 bool write(yarp::os::ConnectionWriter& connection) const override;
1156 bool read(yarp::os::ConnectionReader& connection) override;
1157
1158 class Command :
1160 {
1161 public:
1162 Command() = default;
1163 Command(const std::string& old_name, const std::string& new_name);
1164
1165 ~Command() override = default;
1166
1167 bool write(yarp::os::ConnectionWriter& connection) const override;
1168 bool read(yarp::os::ConnectionReader& connection) override;
1169
1170 bool write(const yarp::os::idl::WireWriter& writer) const override;
1171 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
1172 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
1173
1174 bool read(yarp::os::idl::WireReader& reader) override;
1175 bool readTag(yarp::os::idl::WireReader& reader);
1176 bool readArgs(yarp::os::idl::WireReader& reader);
1177
1178 std::string old_name{};
1179 std::string new_name{};
1180 };
1181
1182 class Reply :
1184 {
1185 public:
1186 Reply() = default;
1187 ~Reply() override = default;
1188
1189 bool write(yarp::os::ConnectionWriter& connection) const override;
1190 bool read(yarp::os::ConnectionReader& connection) override;
1191
1192 bool write(const yarp::os::idl::WireWriter& writer) const override;
1193 bool read(yarp::os::idl::WireReader& reader) override;
1194
1196 };
1197
1198 using funcptr_t = yarp::dev::ReturnValue (*)(const std::string&, const std::string&);
1199 void call(ISimulatedWorldMsgs* ptr);
1200
1203
1204 static constexpr const char* s_tag{"rename"};
1205 static constexpr size_t s_tag_len{1};
1206 static constexpr size_t s_cmd_len{3};
1207 static constexpr size_t s_reply_len{1};
1208 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ISimulatedWorldMsgs::rename(const std::string& old_name, const std::string& new_name)"};
1209 static constexpr const char* s_help{""};
1210};
1211
1212// makeSphere helper class implementation
1213ISimulatedWorldMsgs_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) :
1214 cmd{id_name, radius, pose, color, frame_name, gravity_enable, collision_enable}
1215{
1216}
1217
1219{
1220 return cmd.write(connection);
1221}
1222
1224{
1225 return reply.read(connection);
1226}
1227
1228ISimulatedWorldMsgs_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) :
1229 id_name{id_name},
1230 radius{radius},
1231 pose{pose},
1232 color{color},
1233 frame_name{frame_name},
1234 gravity_enable{gravity_enable},
1235 collision_enable{collision_enable}
1236{
1237}
1238
1240{
1241 yarp::os::idl::WireWriter writer(connection);
1242 if (!writer.writeListHeader(s_cmd_len)) {
1243 return false;
1244 }
1245 return write(writer);
1246}
1247
1249{
1250 yarp::os::idl::WireReader reader(connection);
1251 if (!reader.readListHeader()) {
1252 reader.fail();
1253 return false;
1254 }
1255 return read(reader);
1256}
1257
1259{
1260 if (!writeTag(writer)) {
1261 return false;
1262 }
1263 if (!writeArgs(writer)) {
1264 return false;
1265 }
1266 return true;
1267}
1268
1270{
1271 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1272 return false;
1273 }
1274 return true;
1275}
1276
1278{
1279 if (!writer.writeString(id_name)) {
1280 return false;
1281 }
1282 if (!writer.writeFloat64(radius)) {
1283 return false;
1284 }
1285 if (!writer.writeNested(pose)) {
1286 return false;
1287 }
1288 if (!writer.writeNested(color)) {
1289 return false;
1290 }
1291 if (!writer.writeString(frame_name)) {
1292 return false;
1293 }
1294 if (!writer.writeBool(gravity_enable)) {
1295 return false;
1296 }
1297 if (!writer.writeBool(collision_enable)) {
1298 return false;
1299 }
1300 return true;
1301}
1302
1304{
1305 if (!readTag(reader)) {
1306 return false;
1307 }
1308 if (!readArgs(reader)) {
1309 return false;
1310 }
1311 return true;
1312}
1313
1315{
1316 std::string tag = reader.readTag(s_tag_len);
1317 if (reader.isError()) {
1318 return false;
1319 }
1320 if (tag != s_tag) {
1321 reader.fail();
1322 return false;
1323 }
1324 return true;
1325}
1326
1328{
1329 if (reader.noMore()) {
1330 reader.fail();
1331 return false;
1332 }
1333 if (!reader.readString(id_name)) {
1334 reader.fail();
1335 return false;
1336 }
1337 if (reader.noMore()) {
1338 reader.fail();
1339 return false;
1340 }
1341 if (!reader.readFloat64(radius)) {
1342 reader.fail();
1343 return false;
1344 }
1345 if (reader.noMore()) {
1346 reader.fail();
1347 return false;
1348 }
1349 if (!reader.readNested(pose)) {
1350 reader.fail();
1351 return false;
1352 }
1353 if (reader.noMore()) {
1354 reader.fail();
1355 return false;
1356 }
1357 if (!reader.readNested(color)) {
1358 reader.fail();
1359 return false;
1360 }
1361 if (reader.noMore()) {
1362 reader.fail();
1363 return false;
1364 }
1365 if (!reader.readString(frame_name)) {
1366 reader.fail();
1367 return false;
1368 }
1369 if (reader.noMore()) {
1370 reader.fail();
1371 return false;
1372 }
1373 if (!reader.readBool(gravity_enable)) {
1374 reader.fail();
1375 return false;
1376 }
1377 if (reader.noMore()) {
1378 reader.fail();
1379 return false;
1380 }
1381 if (!reader.readBool(collision_enable)) {
1382 reader.fail();
1383 return false;
1384 }
1385 if (!reader.noMore()) {
1386 reader.fail();
1387 return false;
1388 }
1389 return true;
1390}
1391
1393{
1394 yarp::os::idl::WireWriter writer(connection);
1395 return write(writer);
1396}
1397
1399{
1400 yarp::os::idl::WireReader reader(connection);
1401 return read(reader);
1402}
1403
1405{
1406 if (!writer.isNull()) {
1407 if (!writer.write(return_helper)) {
1408 return false;
1409 }
1410 }
1411 return true;
1412}
1413
1415{
1416 if (reader.noMore()) {
1417 reader.fail();
1418 return false;
1419 }
1420 if (!reader.read(return_helper)) {
1421 reader.fail();
1422 return false;
1423 }
1424 return true;
1425}
1426
1431
1432// makeBox helper class implementation
1433ISimulatedWorldMsgs_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) :
1434 cmd{id_name, width, height, thickness, pose, color, frame_name, gravity_enable, collision_enable}
1435{
1436}
1437
1439{
1440 return cmd.write(connection);
1441}
1442
1444{
1445 return reply.read(connection);
1446}
1447
1448ISimulatedWorldMsgs_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) :
1449 id_name{id_name},
1450 width{width},
1451 height{height},
1452 thickness{thickness},
1453 pose{pose},
1454 color{color},
1455 frame_name{frame_name},
1456 gravity_enable{gravity_enable},
1457 collision_enable{collision_enable}
1458{
1459}
1460
1462{
1463 yarp::os::idl::WireWriter writer(connection);
1464 if (!writer.writeListHeader(s_cmd_len)) {
1465 return false;
1466 }
1467 return write(writer);
1468}
1469
1471{
1472 yarp::os::idl::WireReader reader(connection);
1473 if (!reader.readListHeader()) {
1474 reader.fail();
1475 return false;
1476 }
1477 return read(reader);
1478}
1479
1481{
1482 if (!writeTag(writer)) {
1483 return false;
1484 }
1485 if (!writeArgs(writer)) {
1486 return false;
1487 }
1488 return true;
1489}
1490
1492{
1493 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1494 return false;
1495 }
1496 return true;
1497}
1498
1500{
1501 if (!writer.writeString(id_name)) {
1502 return false;
1503 }
1504 if (!writer.writeFloat64(width)) {
1505 return false;
1506 }
1507 if (!writer.writeFloat64(height)) {
1508 return false;
1509 }
1510 if (!writer.writeFloat64(thickness)) {
1511 return false;
1512 }
1513 if (!writer.writeNested(pose)) {
1514 return false;
1515 }
1516 if (!writer.writeNested(color)) {
1517 return false;
1518 }
1519 if (!writer.writeString(frame_name)) {
1520 return false;
1521 }
1522 if (!writer.writeBool(gravity_enable)) {
1523 return false;
1524 }
1525 if (!writer.writeBool(collision_enable)) {
1526 return false;
1527 }
1528 return true;
1529}
1530
1532{
1533 if (!readTag(reader)) {
1534 return false;
1535 }
1536 if (!readArgs(reader)) {
1537 return false;
1538 }
1539 return true;
1540}
1541
1543{
1544 std::string tag = reader.readTag(s_tag_len);
1545 if (reader.isError()) {
1546 return false;
1547 }
1548 if (tag != s_tag) {
1549 reader.fail();
1550 return false;
1551 }
1552 return true;
1553}
1554
1556{
1557 if (reader.noMore()) {
1558 reader.fail();
1559 return false;
1560 }
1561 if (!reader.readString(id_name)) {
1562 reader.fail();
1563 return false;
1564 }
1565 if (reader.noMore()) {
1566 reader.fail();
1567 return false;
1568 }
1569 if (!reader.readFloat64(width)) {
1570 reader.fail();
1571 return false;
1572 }
1573 if (reader.noMore()) {
1574 reader.fail();
1575 return false;
1576 }
1577 if (!reader.readFloat64(height)) {
1578 reader.fail();
1579 return false;
1580 }
1581 if (reader.noMore()) {
1582 reader.fail();
1583 return false;
1584 }
1585 if (!reader.readFloat64(thickness)) {
1586 reader.fail();
1587 return false;
1588 }
1589 if (reader.noMore()) {
1590 reader.fail();
1591 return false;
1592 }
1593 if (!reader.readNested(pose)) {
1594 reader.fail();
1595 return false;
1596 }
1597 if (reader.noMore()) {
1598 reader.fail();
1599 return false;
1600 }
1601 if (!reader.readNested(color)) {
1602 reader.fail();
1603 return false;
1604 }
1605 if (reader.noMore()) {
1606 reader.fail();
1607 return false;
1608 }
1609 if (!reader.readString(frame_name)) {
1610 reader.fail();
1611 return false;
1612 }
1613 if (reader.noMore()) {
1614 reader.fail();
1615 return false;
1616 }
1617 if (!reader.readBool(gravity_enable)) {
1618 reader.fail();
1619 return false;
1620 }
1621 if (reader.noMore()) {
1622 reader.fail();
1623 return false;
1624 }
1625 if (!reader.readBool(collision_enable)) {
1626 reader.fail();
1627 return false;
1628 }
1629 if (!reader.noMore()) {
1630 reader.fail();
1631 return false;
1632 }
1633 return true;
1634}
1635
1637{
1638 yarp::os::idl::WireWriter writer(connection);
1639 return write(writer);
1640}
1641
1643{
1644 yarp::os::idl::WireReader reader(connection);
1645 return read(reader);
1646}
1647
1649{
1650 if (!writer.isNull()) {
1651 if (!writer.write(return_helper)) {
1652 return false;
1653 }
1654 }
1655 return true;
1656}
1657
1659{
1660 if (reader.noMore()) {
1661 reader.fail();
1662 return false;
1663 }
1664 if (!reader.read(return_helper)) {
1665 reader.fail();
1666 return false;
1667 }
1668 return true;
1669}
1670
1675
1676// makeCylinder helper class implementation
1677ISimulatedWorldMsgs_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) :
1678 cmd{id_name, radius, length, pose, color, frame_name, gravity_enable, collision_enable}
1679{
1680}
1681
1683{
1684 return cmd.write(connection);
1685}
1686
1688{
1689 return reply.read(connection);
1690}
1691
1692ISimulatedWorldMsgs_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) :
1693 id_name{id_name},
1694 radius{radius},
1695 length{length},
1696 pose{pose},
1697 color{color},
1698 frame_name{frame_name},
1699 gravity_enable{gravity_enable},
1700 collision_enable{collision_enable}
1701{
1702}
1703
1705{
1706 yarp::os::idl::WireWriter writer(connection);
1707 if (!writer.writeListHeader(s_cmd_len)) {
1708 return false;
1709 }
1710 return write(writer);
1711}
1712
1714{
1715 yarp::os::idl::WireReader reader(connection);
1716 if (!reader.readListHeader()) {
1717 reader.fail();
1718 return false;
1719 }
1720 return read(reader);
1721}
1722
1724{
1725 if (!writeTag(writer)) {
1726 return false;
1727 }
1728 if (!writeArgs(writer)) {
1729 return false;
1730 }
1731 return true;
1732}
1733
1735{
1736 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1737 return false;
1738 }
1739 return true;
1740}
1741
1743{
1744 if (!writer.writeString(id_name)) {
1745 return false;
1746 }
1747 if (!writer.writeFloat64(radius)) {
1748 return false;
1749 }
1750 if (!writer.writeFloat64(length)) {
1751 return false;
1752 }
1753 if (!writer.writeNested(pose)) {
1754 return false;
1755 }
1756 if (!writer.writeNested(color)) {
1757 return false;
1758 }
1759 if (!writer.writeString(frame_name)) {
1760 return false;
1761 }
1762 if (!writer.writeBool(gravity_enable)) {
1763 return false;
1764 }
1765 if (!writer.writeBool(collision_enable)) {
1766 return false;
1767 }
1768 return true;
1769}
1770
1772{
1773 if (!readTag(reader)) {
1774 return false;
1775 }
1776 if (!readArgs(reader)) {
1777 return false;
1778 }
1779 return true;
1780}
1781
1783{
1784 std::string tag = reader.readTag(s_tag_len);
1785 if (reader.isError()) {
1786 return false;
1787 }
1788 if (tag != s_tag) {
1789 reader.fail();
1790 return false;
1791 }
1792 return true;
1793}
1794
1796{
1797 if (reader.noMore()) {
1798 reader.fail();
1799 return false;
1800 }
1801 if (!reader.readString(id_name)) {
1802 reader.fail();
1803 return false;
1804 }
1805 if (reader.noMore()) {
1806 reader.fail();
1807 return false;
1808 }
1809 if (!reader.readFloat64(radius)) {
1810 reader.fail();
1811 return false;
1812 }
1813 if (reader.noMore()) {
1814 reader.fail();
1815 return false;
1816 }
1817 if (!reader.readFloat64(length)) {
1818 reader.fail();
1819 return false;
1820 }
1821 if (reader.noMore()) {
1822 reader.fail();
1823 return false;
1824 }
1825 if (!reader.readNested(pose)) {
1826 reader.fail();
1827 return false;
1828 }
1829 if (reader.noMore()) {
1830 reader.fail();
1831 return false;
1832 }
1833 if (!reader.readNested(color)) {
1834 reader.fail();
1835 return false;
1836 }
1837 if (reader.noMore()) {
1838 reader.fail();
1839 return false;
1840 }
1841 if (!reader.readString(frame_name)) {
1842 reader.fail();
1843 return false;
1844 }
1845 if (reader.noMore()) {
1846 reader.fail();
1847 return false;
1848 }
1849 if (!reader.readBool(gravity_enable)) {
1850 reader.fail();
1851 return false;
1852 }
1853 if (reader.noMore()) {
1854 reader.fail();
1855 return false;
1856 }
1857 if (!reader.readBool(collision_enable)) {
1858 reader.fail();
1859 return false;
1860 }
1861 if (!reader.noMore()) {
1862 reader.fail();
1863 return false;
1864 }
1865 return true;
1866}
1867
1869{
1870 yarp::os::idl::WireWriter writer(connection);
1871 return write(writer);
1872}
1873
1875{
1876 yarp::os::idl::WireReader reader(connection);
1877 return read(reader);
1878}
1879
1881{
1882 if (!writer.isNull()) {
1883 if (!writer.write(return_helper)) {
1884 return false;
1885 }
1886 }
1887 return true;
1888}
1889
1891{
1892 if (reader.noMore()) {
1893 reader.fail();
1894 return false;
1895 }
1896 if (!reader.read(return_helper)) {
1897 reader.fail();
1898 return false;
1899 }
1900 return true;
1901}
1902
1907
1908// makeFrame helper class implementation
1909ISimulatedWorldMsgs_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) :
1910 cmd{id_name, size, pose, color, frame_name, gravity_enable, collision_enable}
1911{
1912}
1913
1915{
1916 return cmd.write(connection);
1917}
1918
1920{
1921 return reply.read(connection);
1922}
1923
1924ISimulatedWorldMsgs_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) :
1925 id_name{id_name},
1926 size{size},
1927 pose{pose},
1928 color{color},
1929 frame_name{frame_name},
1930 gravity_enable{gravity_enable},
1931 collision_enable{collision_enable}
1932{
1933}
1934
1936{
1937 yarp::os::idl::WireWriter writer(connection);
1938 if (!writer.writeListHeader(s_cmd_len)) {
1939 return false;
1940 }
1941 return write(writer);
1942}
1943
1945{
1946 yarp::os::idl::WireReader reader(connection);
1947 if (!reader.readListHeader()) {
1948 reader.fail();
1949 return false;
1950 }
1951 return read(reader);
1952}
1953
1955{
1956 if (!writeTag(writer)) {
1957 return false;
1958 }
1959 if (!writeArgs(writer)) {
1960 return false;
1961 }
1962 return true;
1963}
1964
1966{
1967 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1968 return false;
1969 }
1970 return true;
1971}
1972
1974{
1975 if (!writer.writeString(id_name)) {
1976 return false;
1977 }
1978 if (!writer.writeFloat64(size)) {
1979 return false;
1980 }
1981 if (!writer.writeNested(pose)) {
1982 return false;
1983 }
1984 if (!writer.writeNested(color)) {
1985 return false;
1986 }
1987 if (!writer.writeString(frame_name)) {
1988 return false;
1989 }
1990 if (!writer.writeBool(gravity_enable)) {
1991 return false;
1992 }
1993 if (!writer.writeBool(collision_enable)) {
1994 return false;
1995 }
1996 return true;
1997}
1998
2000{
2001 if (!readTag(reader)) {
2002 return false;
2003 }
2004 if (!readArgs(reader)) {
2005 return false;
2006 }
2007 return true;
2008}
2009
2011{
2012 std::string tag = reader.readTag(s_tag_len);
2013 if (reader.isError()) {
2014 return false;
2015 }
2016 if (tag != s_tag) {
2017 reader.fail();
2018 return false;
2019 }
2020 return true;
2021}
2022
2024{
2025 if (reader.noMore()) {
2026 reader.fail();
2027 return false;
2028 }
2029 if (!reader.readString(id_name)) {
2030 reader.fail();
2031 return false;
2032 }
2033 if (reader.noMore()) {
2034 reader.fail();
2035 return false;
2036 }
2037 if (!reader.readFloat64(size)) {
2038 reader.fail();
2039 return false;
2040 }
2041 if (reader.noMore()) {
2042 reader.fail();
2043 return false;
2044 }
2045 if (!reader.readNested(pose)) {
2046 reader.fail();
2047 return false;
2048 }
2049 if (reader.noMore()) {
2050 reader.fail();
2051 return false;
2052 }
2053 if (!reader.readNested(color)) {
2054 reader.fail();
2055 return false;
2056 }
2057 if (reader.noMore()) {
2058 reader.fail();
2059 return false;
2060 }
2061 if (!reader.readString(frame_name)) {
2062 reader.fail();
2063 return false;
2064 }
2065 if (reader.noMore()) {
2066 reader.fail();
2067 return false;
2068 }
2069 if (!reader.readBool(gravity_enable)) {
2070 reader.fail();
2071 return false;
2072 }
2073 if (reader.noMore()) {
2074 reader.fail();
2075 return false;
2076 }
2077 if (!reader.readBool(collision_enable)) {
2078 reader.fail();
2079 return false;
2080 }
2081 if (!reader.noMore()) {
2082 reader.fail();
2083 return false;
2084 }
2085 return true;
2086}
2087
2089{
2090 yarp::os::idl::WireWriter writer(connection);
2091 return write(writer);
2092}
2093
2095{
2096 yarp::os::idl::WireReader reader(connection);
2097 return read(reader);
2098}
2099
2101{
2102 if (!writer.isNull()) {
2103 if (!writer.write(return_helper)) {
2104 return false;
2105 }
2106 }
2107 return true;
2108}
2109
2111{
2112 if (reader.noMore()) {
2113 reader.fail();
2114 return false;
2115 }
2116 if (!reader.read(return_helper)) {
2117 reader.fail();
2118 return false;
2119 }
2120 return true;
2121}
2122
2127
2128// makeModel helper class implementation
2129ISimulatedWorldMsgs_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) :
2130 cmd{id_name, filename, pose, frame_name, gravity_enable, collision_enable}
2131{
2132}
2133
2135{
2136 return cmd.write(connection);
2137}
2138
2140{
2141 return reply.read(connection);
2142}
2143
2144ISimulatedWorldMsgs_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) :
2145 id_name{id_name},
2146 filename{filename},
2147 pose{pose},
2148 frame_name{frame_name},
2149 gravity_enable{gravity_enable},
2150 collision_enable{collision_enable}
2151{
2152}
2153
2155{
2156 yarp::os::idl::WireWriter writer(connection);
2157 if (!writer.writeListHeader(s_cmd_len)) {
2158 return false;
2159 }
2160 return write(writer);
2161}
2162
2164{
2165 yarp::os::idl::WireReader reader(connection);
2166 if (!reader.readListHeader()) {
2167 reader.fail();
2168 return false;
2169 }
2170 return read(reader);
2171}
2172
2174{
2175 if (!writeTag(writer)) {
2176 return false;
2177 }
2178 if (!writeArgs(writer)) {
2179 return false;
2180 }
2181 return true;
2182}
2183
2185{
2186 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2187 return false;
2188 }
2189 return true;
2190}
2191
2193{
2194 if (!writer.writeString(id_name)) {
2195 return false;
2196 }
2197 if (!writer.writeString(filename)) {
2198 return false;
2199 }
2200 if (!writer.writeNested(pose)) {
2201 return false;
2202 }
2203 if (!writer.writeString(frame_name)) {
2204 return false;
2205 }
2206 if (!writer.writeBool(gravity_enable)) {
2207 return false;
2208 }
2209 if (!writer.writeBool(collision_enable)) {
2210 return false;
2211 }
2212 return true;
2213}
2214
2216{
2217 if (!readTag(reader)) {
2218 return false;
2219 }
2220 if (!readArgs(reader)) {
2221 return false;
2222 }
2223 return true;
2224}
2225
2227{
2228 std::string tag = reader.readTag(s_tag_len);
2229 if (reader.isError()) {
2230 return false;
2231 }
2232 if (tag != s_tag) {
2233 reader.fail();
2234 return false;
2235 }
2236 return true;
2237}
2238
2240{
2241 if (reader.noMore()) {
2242 reader.fail();
2243 return false;
2244 }
2245 if (!reader.readString(id_name)) {
2246 reader.fail();
2247 return false;
2248 }
2249 if (reader.noMore()) {
2250 reader.fail();
2251 return false;
2252 }
2253 if (!reader.readString(filename)) {
2254 reader.fail();
2255 return false;
2256 }
2257 if (reader.noMore()) {
2258 reader.fail();
2259 return false;
2260 }
2261 if (!reader.readNested(pose)) {
2262 reader.fail();
2263 return false;
2264 }
2265 if (reader.noMore()) {
2266 reader.fail();
2267 return false;
2268 }
2269 if (!reader.readString(frame_name)) {
2270 reader.fail();
2271 return false;
2272 }
2273 if (reader.noMore()) {
2274 reader.fail();
2275 return false;
2276 }
2277 if (!reader.readBool(gravity_enable)) {
2278 reader.fail();
2279 return false;
2280 }
2281 if (reader.noMore()) {
2282 reader.fail();
2283 return false;
2284 }
2285 if (!reader.readBool(collision_enable)) {
2286 reader.fail();
2287 return false;
2288 }
2289 if (!reader.noMore()) {
2290 reader.fail();
2291 return false;
2292 }
2293 return true;
2294}
2295
2297{
2298 yarp::os::idl::WireWriter writer(connection);
2299 return write(writer);
2300}
2301
2303{
2304 yarp::os::idl::WireReader reader(connection);
2305 return read(reader);
2306}
2307
2309{
2310 if (!writer.isNull()) {
2311 if (!writer.write(return_helper)) {
2312 return false;
2313 }
2314 }
2315 return true;
2316}
2317
2319{
2320 if (reader.noMore()) {
2321 reader.fail();
2322 return false;
2323 }
2324 if (!reader.read(return_helper)) {
2325 reader.fail();
2326 return false;
2327 }
2328 return true;
2329}
2330
2335
2336// makeActor helper class implementation
2337ISimulatedWorldMsgs_makeActor_helper::ISimulatedWorldMsgs_makeActor_helper(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose) :
2338 cmd{id_name, skinfile, animfile, pose}
2339{
2340}
2341
2343{
2344 return cmd.write(connection);
2345}
2346
2348{
2349 return reply.read(connection);
2350}
2351
2352ISimulatedWorldMsgs_makeActor_helper::Command::Command(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose) :
2353 id_name{id_name},
2354 skinfile{skinfile},
2355 animfile{animfile},
2356 pose{pose}
2357{
2358}
2359
2361{
2362 yarp::os::idl::WireWriter writer(connection);
2363 if (!writer.writeListHeader(s_cmd_len)) {
2364 return false;
2365 }
2366 return write(writer);
2367}
2368
2370{
2371 yarp::os::idl::WireReader reader(connection);
2372 if (!reader.readListHeader()) {
2373 reader.fail();
2374 return false;
2375 }
2376 return read(reader);
2377}
2378
2380{
2381 if (!writeTag(writer)) {
2382 return false;
2383 }
2384 if (!writeArgs(writer)) {
2385 return false;
2386 }
2387 return true;
2388}
2389
2391{
2392 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2393 return false;
2394 }
2395 return true;
2396}
2397
2399{
2400 if (!writer.writeString(id_name)) {
2401 return false;
2402 }
2403 if (!writer.writeString(skinfile)) {
2404 return false;
2405 }
2406 if (!writer.writeString(animfile)) {
2407 return false;
2408 }
2409 if (!writer.writeNested(pose)) {
2410 return false;
2411 }
2412 return true;
2413}
2414
2416{
2417 if (!readTag(reader)) {
2418 return false;
2419 }
2420 if (!readArgs(reader)) {
2421 return false;
2422 }
2423 return true;
2424}
2425
2427{
2428 std::string tag = reader.readTag(s_tag_len);
2429 if (reader.isError()) {
2430 return false;
2431 }
2432 if (tag != s_tag) {
2433 reader.fail();
2434 return false;
2435 }
2436 return true;
2437}
2438
2440{
2441 if (reader.noMore()) {
2442 reader.fail();
2443 return false;
2444 }
2445 if (!reader.readString(id_name)) {
2446 reader.fail();
2447 return false;
2448 }
2449 if (reader.noMore()) {
2450 reader.fail();
2451 return false;
2452 }
2453 if (!reader.readString(skinfile)) {
2454 reader.fail();
2455 return false;
2456 }
2457 if (reader.noMore()) {
2458 reader.fail();
2459 return false;
2460 }
2461 if (!reader.readString(animfile)) {
2462 reader.fail();
2463 return false;
2464 }
2465 if (reader.noMore()) {
2466 reader.fail();
2467 return false;
2468 }
2469 if (!reader.readNested(pose)) {
2470 reader.fail();
2471 return false;
2472 }
2473 if (!reader.noMore()) {
2474 reader.fail();
2475 return false;
2476 }
2477 return true;
2478}
2479
2481{
2482 yarp::os::idl::WireWriter writer(connection);
2483 return write(writer);
2484}
2485
2487{
2488 yarp::os::idl::WireReader reader(connection);
2489 return read(reader);
2490}
2491
2493{
2494 if (!writer.isNull()) {
2495 if (!writer.write(return_helper)) {
2496 return false;
2497 }
2498 }
2499 return true;
2500}
2501
2503{
2504 if (reader.noMore()) {
2505 reader.fail();
2506 return false;
2507 }
2508 if (!reader.read(return_helper)) {
2509 reader.fail();
2510 return false;
2511 }
2512 return true;
2513}
2514
2519
2520// changeColor helper class implementation
2522 cmd{id, color}
2523{
2524}
2525
2527{
2528 return cmd.write(connection);
2529}
2530
2532{
2533 return reply.read(connection);
2534}
2535
2537 id{id},
2538 color{color}
2539{
2540}
2541
2543{
2544 yarp::os::idl::WireWriter writer(connection);
2545 if (!writer.writeListHeader(s_cmd_len)) {
2546 return false;
2547 }
2548 return write(writer);
2549}
2550
2552{
2553 yarp::os::idl::WireReader reader(connection);
2554 if (!reader.readListHeader()) {
2555 reader.fail();
2556 return false;
2557 }
2558 return read(reader);
2559}
2560
2562{
2563 if (!writeTag(writer)) {
2564 return false;
2565 }
2566 if (!writeArgs(writer)) {
2567 return false;
2568 }
2569 return true;
2570}
2571
2573{
2574 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2575 return false;
2576 }
2577 return true;
2578}
2579
2581{
2582 if (!writer.writeString(id)) {
2583 return false;
2584 }
2585 if (!writer.writeNested(color)) {
2586 return false;
2587 }
2588 return true;
2589}
2590
2592{
2593 if (!readTag(reader)) {
2594 return false;
2595 }
2596 if (!readArgs(reader)) {
2597 return false;
2598 }
2599 return true;
2600}
2601
2603{
2604 std::string tag = reader.readTag(s_tag_len);
2605 if (reader.isError()) {
2606 return false;
2607 }
2608 if (tag != s_tag) {
2609 reader.fail();
2610 return false;
2611 }
2612 return true;
2613}
2614
2616{
2617 if (reader.noMore()) {
2618 reader.fail();
2619 return false;
2620 }
2621 if (!reader.readString(id)) {
2622 reader.fail();
2623 return false;
2624 }
2625 if (reader.noMore()) {
2626 reader.fail();
2627 return false;
2628 }
2629 if (!reader.readNested(color)) {
2630 reader.fail();
2631 return false;
2632 }
2633 if (!reader.noMore()) {
2634 reader.fail();
2635 return false;
2636 }
2637 return true;
2638}
2639
2641{
2642 yarp::os::idl::WireWriter writer(connection);
2643 return write(writer);
2644}
2645
2647{
2648 yarp::os::idl::WireReader reader(connection);
2649 return read(reader);
2650}
2651
2653{
2654 if (!writer.isNull()) {
2655 if (!writer.write(return_helper)) {
2656 return false;
2657 }
2658 }
2659 return true;
2660}
2661
2663{
2664 if (reader.noMore()) {
2665 reader.fail();
2666 return false;
2667 }
2668 if (!reader.read(return_helper)) {
2669 reader.fail();
2670 return false;
2671 }
2672 return true;
2673}
2674
2679
2680// setPose helper class implementation
2681ISimulatedWorldMsgs_setPose_helper::ISimulatedWorldMsgs_setPose_helper(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name) :
2682 cmd{id, pose, frame_name}
2683{
2684}
2685
2687{
2688 return cmd.write(connection);
2689}
2690
2692{
2693 return reply.read(connection);
2694}
2695
2696ISimulatedWorldMsgs_setPose_helper::Command::Command(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name) :
2697 id{id},
2698 pose{pose},
2699 frame_name{frame_name}
2700{
2701}
2702
2704{
2705 yarp::os::idl::WireWriter writer(connection);
2706 if (!writer.writeListHeader(s_cmd_len)) {
2707 return false;
2708 }
2709 return write(writer);
2710}
2711
2713{
2714 yarp::os::idl::WireReader reader(connection);
2715 if (!reader.readListHeader()) {
2716 reader.fail();
2717 return false;
2718 }
2719 return read(reader);
2720}
2721
2723{
2724 if (!writeTag(writer)) {
2725 return false;
2726 }
2727 if (!writeArgs(writer)) {
2728 return false;
2729 }
2730 return true;
2731}
2732
2734{
2735 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2736 return false;
2737 }
2738 return true;
2739}
2740
2742{
2743 if (!writer.writeString(id)) {
2744 return false;
2745 }
2746 if (!writer.writeNested(pose)) {
2747 return false;
2748 }
2749 if (!writer.writeString(frame_name)) {
2750 return false;
2751 }
2752 return true;
2753}
2754
2756{
2757 if (!readTag(reader)) {
2758 return false;
2759 }
2760 if (!readArgs(reader)) {
2761 return false;
2762 }
2763 return true;
2764}
2765
2767{
2768 std::string tag = reader.readTag(s_tag_len);
2769 if (reader.isError()) {
2770 return false;
2771 }
2772 if (tag != s_tag) {
2773 reader.fail();
2774 return false;
2775 }
2776 return true;
2777}
2778
2780{
2781 if (reader.noMore()) {
2782 reader.fail();
2783 return false;
2784 }
2785 if (!reader.readString(id)) {
2786 reader.fail();
2787 return false;
2788 }
2789 if (reader.noMore()) {
2790 reader.fail();
2791 return false;
2792 }
2793 if (!reader.readNested(pose)) {
2794 reader.fail();
2795 return false;
2796 }
2797 if (reader.noMore()) {
2798 reader.fail();
2799 return false;
2800 }
2801 if (!reader.readString(frame_name)) {
2802 reader.fail();
2803 return false;
2804 }
2805 if (!reader.noMore()) {
2806 reader.fail();
2807 return false;
2808 }
2809 return true;
2810}
2811
2813{
2814 yarp::os::idl::WireWriter writer(connection);
2815 return write(writer);
2816}
2817
2819{
2820 yarp::os::idl::WireReader reader(connection);
2821 return read(reader);
2822}
2823
2825{
2826 if (!writer.isNull()) {
2827 if (!writer.write(return_helper)) {
2828 return false;
2829 }
2830 }
2831 return true;
2832}
2833
2835{
2836 if (reader.noMore()) {
2837 reader.fail();
2838 return false;
2839 }
2840 if (!reader.read(return_helper)) {
2841 reader.fail();
2842 return false;
2843 }
2844 return true;
2845}
2846
2851
2852// enableGravity helper class implementation
2854 cmd{id, enable}
2855{
2856}
2857
2859{
2860 return cmd.write(connection);
2861}
2862
2864{
2865 return reply.read(connection);
2866}
2867
2868ISimulatedWorldMsgs_enableGravity_helper::Command::Command(const std::string& id, const bool enable) :
2869 id{id},
2870 enable{enable}
2871{
2872}
2873
2875{
2876 yarp::os::idl::WireWriter writer(connection);
2877 if (!writer.writeListHeader(s_cmd_len)) {
2878 return false;
2879 }
2880 return write(writer);
2881}
2882
2884{
2885 yarp::os::idl::WireReader reader(connection);
2886 if (!reader.readListHeader()) {
2887 reader.fail();
2888 return false;
2889 }
2890 return read(reader);
2891}
2892
2894{
2895 if (!writeTag(writer)) {
2896 return false;
2897 }
2898 if (!writeArgs(writer)) {
2899 return false;
2900 }
2901 return true;
2902}
2903
2905{
2906 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2907 return false;
2908 }
2909 return true;
2910}
2911
2913{
2914 if (!writer.writeString(id)) {
2915 return false;
2916 }
2917 if (!writer.writeBool(enable)) {
2918 return false;
2919 }
2920 return true;
2921}
2922
2924{
2925 if (!readTag(reader)) {
2926 return false;
2927 }
2928 if (!readArgs(reader)) {
2929 return false;
2930 }
2931 return true;
2932}
2933
2935{
2936 std::string tag = reader.readTag(s_tag_len);
2937 if (reader.isError()) {
2938 return false;
2939 }
2940 if (tag != s_tag) {
2941 reader.fail();
2942 return false;
2943 }
2944 return true;
2945}
2946
2948{
2949 if (reader.noMore()) {
2950 reader.fail();
2951 return false;
2952 }
2953 if (!reader.readString(id)) {
2954 reader.fail();
2955 return false;
2956 }
2957 if (reader.noMore()) {
2958 reader.fail();
2959 return false;
2960 }
2961 if (!reader.readBool(enable)) {
2962 reader.fail();
2963 return false;
2964 }
2965 if (!reader.noMore()) {
2966 reader.fail();
2967 return false;
2968 }
2969 return true;
2970}
2971
2973{
2974 yarp::os::idl::WireWriter writer(connection);
2975 return write(writer);
2976}
2977
2979{
2980 yarp::os::idl::WireReader reader(connection);
2981 return read(reader);
2982}
2983
2985{
2986 if (!writer.isNull()) {
2987 if (!writer.write(return_helper)) {
2988 return false;
2989 }
2990 }
2991 return true;
2992}
2993
2995{
2996 if (reader.noMore()) {
2997 reader.fail();
2998 return false;
2999 }
3000 if (!reader.read(return_helper)) {
3001 reader.fail();
3002 return false;
3003 }
3004 return true;
3005}
3006
3011
3012// enableCollision helper class implementation
3014 cmd{id, enable}
3015{
3016}
3017
3019{
3020 return cmd.write(connection);
3021}
3022
3024{
3025 return reply.read(connection);
3026}
3027
3028ISimulatedWorldMsgs_enableCollision_helper::Command::Command(const std::string& id, const bool enable) :
3029 id{id},
3030 enable{enable}
3031{
3032}
3033
3035{
3036 yarp::os::idl::WireWriter writer(connection);
3037 if (!writer.writeListHeader(s_cmd_len)) {
3038 return false;
3039 }
3040 return write(writer);
3041}
3042
3044{
3045 yarp::os::idl::WireReader reader(connection);
3046 if (!reader.readListHeader()) {
3047 reader.fail();
3048 return false;
3049 }
3050 return read(reader);
3051}
3052
3054{
3055 if (!writeTag(writer)) {
3056 return false;
3057 }
3058 if (!writeArgs(writer)) {
3059 return false;
3060 }
3061 return true;
3062}
3063
3065{
3066 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3067 return false;
3068 }
3069 return true;
3070}
3071
3073{
3074 if (!writer.writeString(id)) {
3075 return false;
3076 }
3077 if (!writer.writeBool(enable)) {
3078 return false;
3079 }
3080 return true;
3081}
3082
3084{
3085 if (!readTag(reader)) {
3086 return false;
3087 }
3088 if (!readArgs(reader)) {
3089 return false;
3090 }
3091 return true;
3092}
3093
3095{
3096 std::string tag = reader.readTag(s_tag_len);
3097 if (reader.isError()) {
3098 return false;
3099 }
3100 if (tag != s_tag) {
3101 reader.fail();
3102 return false;
3103 }
3104 return true;
3105}
3106
3108{
3109 if (reader.noMore()) {
3110 reader.fail();
3111 return false;
3112 }
3113 if (!reader.readString(id)) {
3114 reader.fail();
3115 return false;
3116 }
3117 if (reader.noMore()) {
3118 reader.fail();
3119 return false;
3120 }
3121 if (!reader.readBool(enable)) {
3122 reader.fail();
3123 return false;
3124 }
3125 if (!reader.noMore()) {
3126 reader.fail();
3127 return false;
3128 }
3129 return true;
3130}
3131
3133{
3134 yarp::os::idl::WireWriter writer(connection);
3135 return write(writer);
3136}
3137
3139{
3140 yarp::os::idl::WireReader reader(connection);
3141 return read(reader);
3142}
3143
3145{
3146 if (!writer.isNull()) {
3147 if (!writer.write(return_helper)) {
3148 return false;
3149 }
3150 }
3151 return true;
3152}
3153
3155{
3156 if (reader.noMore()) {
3157 reader.fail();
3158 return false;
3159 }
3160 if (!reader.read(return_helper)) {
3161 reader.fail();
3162 return false;
3163 }
3164 return true;
3165}
3166
3171
3172// getPose helper class implementation
3173ISimulatedWorldMsgs_getPose_helper::ISimulatedWorldMsgs_getPose_helper(const std::string& id, const std::string& frame_name) :
3174 cmd{id, frame_name}
3175{
3176}
3177
3179{
3180 return cmd.write(connection);
3181}
3182
3184{
3185 return reply.read(connection);
3186}
3187
3188ISimulatedWorldMsgs_getPose_helper::Command::Command(const std::string& id, const std::string& frame_name) :
3189 id{id},
3190 frame_name{frame_name}
3191{
3192}
3193
3195{
3196 yarp::os::idl::WireWriter writer(connection);
3197 if (!writer.writeListHeader(s_cmd_len)) {
3198 return false;
3199 }
3200 return write(writer);
3201}
3202
3204{
3205 yarp::os::idl::WireReader reader(connection);
3206 if (!reader.readListHeader()) {
3207 reader.fail();
3208 return false;
3209 }
3210 return read(reader);
3211}
3212
3214{
3215 if (!writeTag(writer)) {
3216 return false;
3217 }
3218 if (!writeArgs(writer)) {
3219 return false;
3220 }
3221 return true;
3222}
3223
3225{
3226 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3227 return false;
3228 }
3229 return true;
3230}
3231
3233{
3234 if (!writer.writeString(id)) {
3235 return false;
3236 }
3237 if (!writer.writeString(frame_name)) {
3238 return false;
3239 }
3240 return true;
3241}
3242
3244{
3245 if (!readTag(reader)) {
3246 return false;
3247 }
3248 if (!readArgs(reader)) {
3249 return false;
3250 }
3251 return true;
3252}
3253
3255{
3256 std::string tag = reader.readTag(s_tag_len);
3257 if (reader.isError()) {
3258 return false;
3259 }
3260 if (tag != s_tag) {
3261 reader.fail();
3262 return false;
3263 }
3264 return true;
3265}
3266
3268{
3269 if (reader.noMore()) {
3270 reader.fail();
3271 return false;
3272 }
3273 if (!reader.readString(id)) {
3274 reader.fail();
3275 return false;
3276 }
3277 if (reader.noMore()) {
3278 reader.fail();
3279 return false;
3280 }
3281 if (!reader.readString(frame_name)) {
3282 reader.fail();
3283 return false;
3284 }
3285 if (!reader.noMore()) {
3286 reader.fail();
3287 return false;
3288 }
3289 return true;
3290}
3291
3293{
3294 yarp::os::idl::WireWriter writer(connection);
3295 return write(writer);
3296}
3297
3299{
3300 yarp::os::idl::WireReader reader(connection);
3301 return read(reader);
3302}
3303
3305{
3306 if (!writer.isNull()) {
3307 if (!writer.writeListHeader(s_reply_len)) {
3308 return false;
3309 }
3310 if (!writer.write(return_helper)) {
3311 return false;
3312 }
3313 }
3314 return true;
3315}
3316
3318{
3319 if (!reader.readListReturn()) {
3320 return false;
3321 }
3322 if (reader.noMore()) {
3323 reader.fail();
3324 return false;
3325 }
3326 if (!reader.read(return_helper)) {
3327 reader.fail();
3328 return false;
3329 }
3330 return true;
3331}
3332
3337
3338// deleteObject helper class implementation
3343
3345{
3346 return cmd.write(connection);
3347}
3348
3350{
3351 return reply.read(connection);
3352}
3353
3355 id{id}
3356{
3357}
3358
3360{
3361 yarp::os::idl::WireWriter writer(connection);
3362 if (!writer.writeListHeader(s_cmd_len)) {
3363 return false;
3364 }
3365 return write(writer);
3366}
3367
3369{
3370 yarp::os::idl::WireReader reader(connection);
3371 if (!reader.readListHeader()) {
3372 reader.fail();
3373 return false;
3374 }
3375 return read(reader);
3376}
3377
3379{
3380 if (!writeTag(writer)) {
3381 return false;
3382 }
3383 if (!writeArgs(writer)) {
3384 return false;
3385 }
3386 return true;
3387}
3388
3390{
3391 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3392 return false;
3393 }
3394 return true;
3395}
3396
3398{
3399 if (!writer.writeString(id)) {
3400 return false;
3401 }
3402 return true;
3403}
3404
3406{
3407 if (!readTag(reader)) {
3408 return false;
3409 }
3410 if (!readArgs(reader)) {
3411 return false;
3412 }
3413 return true;
3414}
3415
3417{
3418 std::string tag = reader.readTag(s_tag_len);
3419 if (reader.isError()) {
3420 return false;
3421 }
3422 if (tag != s_tag) {
3423 reader.fail();
3424 return false;
3425 }
3426 return true;
3427}
3428
3430{
3431 if (reader.noMore()) {
3432 reader.fail();
3433 return false;
3434 }
3435 if (!reader.readString(id)) {
3436 reader.fail();
3437 return false;
3438 }
3439 if (!reader.noMore()) {
3440 reader.fail();
3441 return false;
3442 }
3443 return true;
3444}
3445
3447{
3448 yarp::os::idl::WireWriter writer(connection);
3449 return write(writer);
3450}
3451
3453{
3454 yarp::os::idl::WireReader reader(connection);
3455 return read(reader);
3456}
3457
3459{
3460 if (!writer.isNull()) {
3461 if (!writer.write(return_helper)) {
3462 return false;
3463 }
3464 }
3465 return true;
3466}
3467
3469{
3470 if (reader.noMore()) {
3471 reader.fail();
3472 return false;
3473 }
3474 if (!reader.read(return_helper)) {
3475 reader.fail();
3476 return false;
3477 }
3478 return true;
3479}
3480
3485
3486// deleteAll helper class implementation
3488{
3489 return cmd.write(connection);
3490}
3491
3493{
3494 return reply.read(connection);
3495}
3496
3498{
3499 yarp::os::idl::WireWriter writer(connection);
3500 if (!writer.writeListHeader(s_cmd_len)) {
3501 return false;
3502 }
3503 return write(writer);
3504}
3505
3507{
3508 yarp::os::idl::WireReader reader(connection);
3509 if (!reader.readListHeader()) {
3510 reader.fail();
3511 return false;
3512 }
3513 return read(reader);
3514}
3515
3517{
3518 if (!writeTag(writer)) {
3519 return false;
3520 }
3521 if (!writeArgs(writer)) {
3522 return false;
3523 }
3524 return true;
3525}
3526
3528{
3529 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3530 return false;
3531 }
3532 return true;
3533}
3534
3536{
3537 return true;
3538}
3539
3541{
3542 if (!readTag(reader)) {
3543 return false;
3544 }
3545 if (!readArgs(reader)) {
3546 return false;
3547 }
3548 return true;
3549}
3550
3552{
3553 std::string tag = reader.readTag(s_tag_len);
3554 if (reader.isError()) {
3555 return false;
3556 }
3557 if (tag != s_tag) {
3558 reader.fail();
3559 return false;
3560 }
3561 return true;
3562}
3563
3565{
3566 if (!reader.noMore()) {
3567 reader.fail();
3568 return false;
3569 }
3570 return true;
3571}
3572
3574{
3575 yarp::os::idl::WireWriter writer(connection);
3576 return write(writer);
3577}
3578
3580{
3581 yarp::os::idl::WireReader reader(connection);
3582 return read(reader);
3583}
3584
3586{
3587 if (!writer.isNull()) {
3588 if (!writer.write(return_helper)) {
3589 return false;
3590 }
3591 }
3592 return true;
3593}
3594
3596{
3597 if (reader.noMore()) {
3598 reader.fail();
3599 return false;
3600 }
3601 if (!reader.read(return_helper)) {
3602 reader.fail();
3603 return false;
3604 }
3605 return true;
3606}
3607
3612
3613// getList helper class implementation
3615{
3616 return cmd.write(connection);
3617}
3618
3620{
3621 return reply.read(connection);
3622}
3623
3625{
3626 yarp::os::idl::WireWriter writer(connection);
3627 if (!writer.writeListHeader(s_cmd_len)) {
3628 return false;
3629 }
3630 return write(writer);
3631}
3632
3634{
3635 yarp::os::idl::WireReader reader(connection);
3636 if (!reader.readListHeader()) {
3637 reader.fail();
3638 return false;
3639 }
3640 return read(reader);
3641}
3642
3644{
3645 if (!writeTag(writer)) {
3646 return false;
3647 }
3648 if (!writeArgs(writer)) {
3649 return false;
3650 }
3651 return true;
3652}
3653
3655{
3656 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3657 return false;
3658 }
3659 return true;
3660}
3661
3663{
3664 return true;
3665}
3666
3668{
3669 if (!readTag(reader)) {
3670 return false;
3671 }
3672 if (!readArgs(reader)) {
3673 return false;
3674 }
3675 return true;
3676}
3677
3679{
3680 std::string tag = reader.readTag(s_tag_len);
3681 if (reader.isError()) {
3682 return false;
3683 }
3684 if (tag != s_tag) {
3685 reader.fail();
3686 return false;
3687 }
3688 return true;
3689}
3690
3692{
3693 if (!reader.noMore()) {
3694 reader.fail();
3695 return false;
3696 }
3697 return true;
3698}
3699
3701{
3702 yarp::os::idl::WireWriter writer(connection);
3703 return write(writer);
3704}
3705
3707{
3708 yarp::os::idl::WireReader reader(connection);
3709 return read(reader);
3710}
3711
3713{
3714 if (!writer.isNull()) {
3715 if (!writer.writeListHeader(s_reply_len)) {
3716 return false;
3717 }
3718 if (!writer.write(return_helper)) {
3719 return false;
3720 }
3721 }
3722 return true;
3723}
3724
3726{
3727 if (!reader.readListReturn()) {
3728 return false;
3729 }
3730 if (reader.noMore()) {
3731 reader.fail();
3732 return false;
3733 }
3734 if (!reader.read(return_helper)) {
3735 reader.fail();
3736 return false;
3737 }
3738 return true;
3739}
3740
3745
3746// attach helper class implementation
3747ISimulatedWorldMsgs_attach_helper::ISimulatedWorldMsgs_attach_helper(const std::string& id, const std::string& link_name) :
3748 cmd{id, link_name}
3749{
3750}
3751
3753{
3754 return cmd.write(connection);
3755}
3756
3758{
3759 return reply.read(connection);
3760}
3761
3762ISimulatedWorldMsgs_attach_helper::Command::Command(const std::string& id, const std::string& link_name) :
3763 id{id},
3764 link_name{link_name}
3765{
3766}
3767
3769{
3770 yarp::os::idl::WireWriter writer(connection);
3771 if (!writer.writeListHeader(s_cmd_len)) {
3772 return false;
3773 }
3774 return write(writer);
3775}
3776
3778{
3779 yarp::os::idl::WireReader reader(connection);
3780 if (!reader.readListHeader()) {
3781 reader.fail();
3782 return false;
3783 }
3784 return read(reader);
3785}
3786
3788{
3789 if (!writeTag(writer)) {
3790 return false;
3791 }
3792 if (!writeArgs(writer)) {
3793 return false;
3794 }
3795 return true;
3796}
3797
3799{
3800 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3801 return false;
3802 }
3803 return true;
3804}
3805
3807{
3808 if (!writer.writeString(id)) {
3809 return false;
3810 }
3811 if (!writer.writeString(link_name)) {
3812 return false;
3813 }
3814 return true;
3815}
3816
3818{
3819 if (!readTag(reader)) {
3820 return false;
3821 }
3822 if (!readArgs(reader)) {
3823 return false;
3824 }
3825 return true;
3826}
3827
3829{
3830 std::string tag = reader.readTag(s_tag_len);
3831 if (reader.isError()) {
3832 return false;
3833 }
3834 if (tag != s_tag) {
3835 reader.fail();
3836 return false;
3837 }
3838 return true;
3839}
3840
3842{
3843 if (reader.noMore()) {
3844 reader.fail();
3845 return false;
3846 }
3847 if (!reader.readString(id)) {
3848 reader.fail();
3849 return false;
3850 }
3851 if (reader.noMore()) {
3852 reader.fail();
3853 return false;
3854 }
3855 if (!reader.readString(link_name)) {
3856 reader.fail();
3857 return false;
3858 }
3859 if (!reader.noMore()) {
3860 reader.fail();
3861 return false;
3862 }
3863 return true;
3864}
3865
3867{
3868 yarp::os::idl::WireWriter writer(connection);
3869 return write(writer);
3870}
3871
3873{
3874 yarp::os::idl::WireReader reader(connection);
3875 return read(reader);
3876}
3877
3879{
3880 if (!writer.isNull()) {
3881 if (!writer.write(return_helper)) {
3882 return false;
3883 }
3884 }
3885 return true;
3886}
3887
3889{
3890 if (reader.noMore()) {
3891 reader.fail();
3892 return false;
3893 }
3894 if (!reader.read(return_helper)) {
3895 reader.fail();
3896 return false;
3897 }
3898 return true;
3899}
3900
3905
3906// detach helper class implementation
3911
3913{
3914 return cmd.write(connection);
3915}
3916
3918{
3919 return reply.read(connection);
3920}
3921
3923 id{id}
3924{
3925}
3926
3928{
3929 yarp::os::idl::WireWriter writer(connection);
3930 if (!writer.writeListHeader(s_cmd_len)) {
3931 return false;
3932 }
3933 return write(writer);
3934}
3935
3937{
3938 yarp::os::idl::WireReader reader(connection);
3939 if (!reader.readListHeader()) {
3940 reader.fail();
3941 return false;
3942 }
3943 return read(reader);
3944}
3945
3947{
3948 if (!writeTag(writer)) {
3949 return false;
3950 }
3951 if (!writeArgs(writer)) {
3952 return false;
3953 }
3954 return true;
3955}
3956
3958{
3959 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
3960 return false;
3961 }
3962 return true;
3963}
3964
3966{
3967 if (!writer.writeString(id)) {
3968 return false;
3969 }
3970 return true;
3971}
3972
3974{
3975 if (!readTag(reader)) {
3976 return false;
3977 }
3978 if (!readArgs(reader)) {
3979 return false;
3980 }
3981 return true;
3982}
3983
3985{
3986 std::string tag = reader.readTag(s_tag_len);
3987 if (reader.isError()) {
3988 return false;
3989 }
3990 if (tag != s_tag) {
3991 reader.fail();
3992 return false;
3993 }
3994 return true;
3995}
3996
3998{
3999 if (reader.noMore()) {
4000 reader.fail();
4001 return false;
4002 }
4003 if (!reader.readString(id)) {
4004 reader.fail();
4005 return false;
4006 }
4007 if (!reader.noMore()) {
4008 reader.fail();
4009 return false;
4010 }
4011 return true;
4012}
4013
4015{
4016 yarp::os::idl::WireWriter writer(connection);
4017 return write(writer);
4018}
4019
4021{
4022 yarp::os::idl::WireReader reader(connection);
4023 return read(reader);
4024}
4025
4027{
4028 if (!writer.isNull()) {
4029 if (!writer.write(return_helper)) {
4030 return false;
4031 }
4032 }
4033 return true;
4034}
4035
4037{
4038 if (reader.noMore()) {
4039 reader.fail();
4040 return false;
4041 }
4042 if (!reader.read(return_helper)) {
4043 reader.fail();
4044 return false;
4045 }
4046 return true;
4047}
4048
4053
4054// rename helper class implementation
4055ISimulatedWorldMsgs_rename_helper::ISimulatedWorldMsgs_rename_helper(const std::string& old_name, const std::string& new_name) :
4056 cmd{old_name, new_name}
4057{
4058}
4059
4061{
4062 return cmd.write(connection);
4063}
4064
4066{
4067 return reply.read(connection);
4068}
4069
4070ISimulatedWorldMsgs_rename_helper::Command::Command(const std::string& old_name, const std::string& new_name) :
4071 old_name{old_name},
4072 new_name{new_name}
4073{
4074}
4075
4077{
4078 yarp::os::idl::WireWriter writer(connection);
4079 if (!writer.writeListHeader(s_cmd_len)) {
4080 return false;
4081 }
4082 return write(writer);
4083}
4084
4086{
4087 yarp::os::idl::WireReader reader(connection);
4088 if (!reader.readListHeader()) {
4089 reader.fail();
4090 return false;
4091 }
4092 return read(reader);
4093}
4094
4096{
4097 if (!writeTag(writer)) {
4098 return false;
4099 }
4100 if (!writeArgs(writer)) {
4101 return false;
4102 }
4103 return true;
4104}
4105
4107{
4108 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
4109 return false;
4110 }
4111 return true;
4112}
4113
4115{
4116 if (!writer.writeString(old_name)) {
4117 return false;
4118 }
4119 if (!writer.writeString(new_name)) {
4120 return false;
4121 }
4122 return true;
4123}
4124
4126{
4127 if (!readTag(reader)) {
4128 return false;
4129 }
4130 if (!readArgs(reader)) {
4131 return false;
4132 }
4133 return true;
4134}
4135
4137{
4138 std::string tag = reader.readTag(s_tag_len);
4139 if (reader.isError()) {
4140 return false;
4141 }
4142 if (tag != s_tag) {
4143 reader.fail();
4144 return false;
4145 }
4146 return true;
4147}
4148
4150{
4151 if (reader.noMore()) {
4152 reader.fail();
4153 return false;
4154 }
4155 if (!reader.readString(old_name)) {
4156 reader.fail();
4157 return false;
4158 }
4159 if (reader.noMore()) {
4160 reader.fail();
4161 return false;
4162 }
4163 if (!reader.readString(new_name)) {
4164 reader.fail();
4165 return false;
4166 }
4167 if (!reader.noMore()) {
4168 reader.fail();
4169 return false;
4170 }
4171 return true;
4172}
4173
4175{
4176 yarp::os::idl::WireWriter writer(connection);
4177 return write(writer);
4178}
4179
4181{
4182 yarp::os::idl::WireReader reader(connection);
4183 return read(reader);
4184}
4185
4187{
4188 if (!writer.isNull()) {
4189 if (!writer.write(return_helper)) {
4190 return false;
4191 }
4192 }
4193 return true;
4194}
4195
4197{
4198 if (reader.noMore()) {
4199 reader.fail();
4200 return false;
4201 }
4202 if (!reader.read(return_helper)) {
4203 reader.fail();
4204 return false;
4205 }
4206 return true;
4207}
4208
4213
4214// Constructor
4216{
4217 yarp().setOwner(*this);
4218}
4219
4220yarp::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)
4221{
4222 if (!yarp().canWrite()) {
4223 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeSphere_helper::s_prototype);
4224 }
4225 ISimulatedWorldMsgs_makeSphere_helper helper{id_name, radius, pose, color, frame_name, gravity_enable, collision_enable};
4226 bool ok = yarp().write(helper, helper);
4227 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4228}
4229
4230yarp::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)
4231{
4232 if (!yarp().canWrite()) {
4233 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeBox_helper::s_prototype);
4234 }
4235 ISimulatedWorldMsgs_makeBox_helper helper{id_name, width, height, thickness, pose, color, frame_name, gravity_enable, collision_enable};
4236 bool ok = yarp().write(helper, helper);
4237 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4238}
4239
4240yarp::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)
4241{
4242 if (!yarp().canWrite()) {
4243 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeCylinder_helper::s_prototype);
4244 }
4245 ISimulatedWorldMsgs_makeCylinder_helper helper{id_name, radius, length, pose, color, frame_name, gravity_enable, collision_enable};
4246 bool ok = yarp().write(helper, helper);
4247 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4248}
4249
4250yarp::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)
4251{
4252 if (!yarp().canWrite()) {
4253 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeFrame_helper::s_prototype);
4254 }
4255 ISimulatedWorldMsgs_makeFrame_helper helper{id_name, size, pose, color, frame_name, gravity_enable, collision_enable};
4256 bool ok = yarp().write(helper, helper);
4257 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4258}
4259
4260yarp::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)
4261{
4262 if (!yarp().canWrite()) {
4263 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeModel_helper::s_prototype);
4264 }
4265 ISimulatedWorldMsgs_makeModel_helper helper{id_name, filename, pose, frame_name, gravity_enable, collision_enable};
4266 bool ok = yarp().write(helper, helper);
4267 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4268}
4269
4270yarp::dev::ReturnValue ISimulatedWorldMsgs::makeActor(const std::string& id_name, const std::string& skinfile, const std::string& animfile, const yarp::sig::Pose6D& pose)
4271{
4272 if (!yarp().canWrite()) {
4273 yError("Missing server method '%s'?", ISimulatedWorldMsgs_makeActor_helper::s_prototype);
4274 }
4275 ISimulatedWorldMsgs_makeActor_helper helper{id_name, skinfile, animfile, pose};
4276 bool ok = yarp().write(helper, helper);
4277 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4278}
4279
4281{
4282 if (!yarp().canWrite()) {
4283 yError("Missing server method '%s'?", ISimulatedWorldMsgs_changeColor_helper::s_prototype);
4284 }
4286 bool ok = yarp().write(helper, helper);
4287 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4288}
4289
4290yarp::dev::ReturnValue ISimulatedWorldMsgs::setPose(const std::string& id, const yarp::sig::Pose6D& pose, const std::string& frame_name)
4291{
4292 if (!yarp().canWrite()) {
4293 yError("Missing server method '%s'?", ISimulatedWorldMsgs_setPose_helper::s_prototype);
4294 }
4295 ISimulatedWorldMsgs_setPose_helper helper{id, pose, frame_name};
4296 bool ok = yarp().write(helper, helper);
4297 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4298}
4299
4300yarp::dev::ReturnValue ISimulatedWorldMsgs::enableGravity(const std::string& id, const bool enable)
4301{
4302 if (!yarp().canWrite()) {
4303 yError("Missing server method '%s'?", ISimulatedWorldMsgs_enableGravity_helper::s_prototype);
4304 }
4306 bool ok = yarp().write(helper, helper);
4307 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4308}
4309
4310yarp::dev::ReturnValue ISimulatedWorldMsgs::enableCollision(const std::string& id, const bool enable)
4311{
4312 if (!yarp().canWrite()) {
4314 }
4316 bool ok = yarp().write(helper, helper);
4317 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4318}
4319
4320getPoseReturnValue ISimulatedWorldMsgs::getPose(const std::string& id, const std::string& frame_name)
4321{
4322 if (!yarp().canWrite()) {
4323 yError("Missing server method '%s'?", ISimulatedWorldMsgs_getPose_helper::s_prototype);
4324 }
4325 ISimulatedWorldMsgs_getPose_helper helper{id, frame_name};
4326 bool ok = yarp().write(helper, helper);
4327 return ok ? helper.reply.return_helper : getPoseReturnValue{};
4328}
4329
4331{
4332 if (!yarp().canWrite()) {
4333 yError("Missing server method '%s'?", ISimulatedWorldMsgs_deleteObject_helper::s_prototype);
4334 }
4336 bool ok = yarp().write(helper, helper);
4337 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4338}
4339
4341{
4342 if (!yarp().canWrite()) {
4343 yError("Missing server method '%s'?", ISimulatedWorldMsgs_deleteAll_helper::s_prototype);
4344 }
4346 bool ok = yarp().write(helper, helper);
4347 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4348}
4349
4351{
4352 if (!yarp().canWrite()) {
4353 yError("Missing server method '%s'?", ISimulatedWorldMsgs_getList_helper::s_prototype);
4354 }
4356 bool ok = yarp().write(helper, helper);
4357 return ok ? helper.reply.return_helper : getListReturnValue{};
4358}
4359
4360yarp::dev::ReturnValue ISimulatedWorldMsgs::attach(const std::string& id, const std::string& link_name)
4361{
4362 if (!yarp().canWrite()) {
4363 yError("Missing server method '%s'?", ISimulatedWorldMsgs_attach_helper::s_prototype);
4364 }
4365 ISimulatedWorldMsgs_attach_helper helper{id, link_name};
4366 bool ok = yarp().write(helper, helper);
4367 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4368}
4369
4371{
4372 if (!yarp().canWrite()) {
4373 yError("Missing server method '%s'?", ISimulatedWorldMsgs_detach_helper::s_prototype);
4374 }
4376 bool ok = yarp().write(helper, helper);
4377 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4378}
4379
4380yarp::dev::ReturnValue ISimulatedWorldMsgs::rename(const std::string& old_name, const std::string& new_name)
4381{
4382 if (!yarp().canWrite()) {
4383 yError("Missing server method '%s'?", ISimulatedWorldMsgs_rename_helper::s_prototype);
4384 }
4385 ISimulatedWorldMsgs_rename_helper helper{old_name, new_name};
4386 bool ok = yarp().write(helper, helper);
4387 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
4388}
4389
4390// help method
4391std::vector<std::string> ISimulatedWorldMsgs::help(const std::string& functionName)
4392{
4393 bool showAll = (functionName == "--all");
4394 std::vector<std::string> helpString;
4395 if (showAll) {
4396 helpString.emplace_back("*** Available commands:");
4397 helpString.emplace_back(ISimulatedWorldMsgs_makeSphere_helper::s_tag);
4398 helpString.emplace_back(ISimulatedWorldMsgs_makeBox_helper::s_tag);
4399 helpString.emplace_back(ISimulatedWorldMsgs_makeCylinder_helper::s_tag);
4400 helpString.emplace_back(ISimulatedWorldMsgs_makeFrame_helper::s_tag);
4401 helpString.emplace_back(ISimulatedWorldMsgs_makeModel_helper::s_tag);
4402 helpString.emplace_back(ISimulatedWorldMsgs_makeActor_helper::s_tag);
4403 helpString.emplace_back(ISimulatedWorldMsgs_changeColor_helper::s_tag);
4404 helpString.emplace_back(ISimulatedWorldMsgs_setPose_helper::s_tag);
4405 helpString.emplace_back(ISimulatedWorldMsgs_enableGravity_helper::s_tag);
4407 helpString.emplace_back(ISimulatedWorldMsgs_getPose_helper::s_tag);
4408 helpString.emplace_back(ISimulatedWorldMsgs_deleteObject_helper::s_tag);
4409 helpString.emplace_back(ISimulatedWorldMsgs_deleteAll_helper::s_tag);
4410 helpString.emplace_back(ISimulatedWorldMsgs_getList_helper::s_tag);
4411 helpString.emplace_back(ISimulatedWorldMsgs_attach_helper::s_tag);
4412 helpString.emplace_back(ISimulatedWorldMsgs_detach_helper::s_tag);
4413 helpString.emplace_back(ISimulatedWorldMsgs_rename_helper::s_tag);
4414 helpString.emplace_back("help");
4415 } else {
4418 }
4419 if (functionName == ISimulatedWorldMsgs_makeBox_helper::s_tag) {
4420 helpString.emplace_back(ISimulatedWorldMsgs_makeBox_helper::s_prototype);
4421 }
4424 }
4425 if (functionName == ISimulatedWorldMsgs_makeFrame_helper::s_tag) {
4427 }
4428 if (functionName == ISimulatedWorldMsgs_makeModel_helper::s_tag) {
4430 }
4431 if (functionName == ISimulatedWorldMsgs_makeActor_helper::s_tag) {
4433 }
4436 }
4437 if (functionName == ISimulatedWorldMsgs_setPose_helper::s_tag) {
4438 helpString.emplace_back(ISimulatedWorldMsgs_setPose_helper::s_prototype);
4439 }
4442 }
4445 }
4446 if (functionName == ISimulatedWorldMsgs_getPose_helper::s_tag) {
4447 helpString.emplace_back(ISimulatedWorldMsgs_getPose_helper::s_prototype);
4448 }
4451 }
4452 if (functionName == ISimulatedWorldMsgs_deleteAll_helper::s_tag) {
4454 }
4455 if (functionName == ISimulatedWorldMsgs_getList_helper::s_tag) {
4456 helpString.emplace_back(ISimulatedWorldMsgs_getList_helper::s_prototype);
4457 }
4458 if (functionName == ISimulatedWorldMsgs_attach_helper::s_tag) {
4459 helpString.emplace_back(ISimulatedWorldMsgs_attach_helper::s_prototype);
4460 }
4461 if (functionName == ISimulatedWorldMsgs_detach_helper::s_tag) {
4462 helpString.emplace_back(ISimulatedWorldMsgs_detach_helper::s_prototype);
4463 }
4464 if (functionName == ISimulatedWorldMsgs_rename_helper::s_tag) {
4465 helpString.emplace_back(ISimulatedWorldMsgs_rename_helper::s_prototype);
4466 }
4467 if (functionName == "help") {
4468 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
4469 helpString.emplace_back("Return list of available commands, or help message for a specific function");
4470 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");
4471 helpString.emplace_back("@return list of strings (one string per line)");
4472 }
4473 }
4474 if (helpString.empty()) {
4475 helpString.emplace_back("Command not found");
4476 }
4477 return helpString;
4478}
4479
4480// read from ConnectionReader
4482{
4483 constexpr size_t max_tag_len = 1;
4484 size_t tag_len = 1;
4485
4486 yarp::os::idl::WireReader reader(connection);
4487 reader.expectAccept();
4488 if (!reader.readListHeader()) {
4489 reader.fail();
4490 return false;
4491 }
4492
4493 std::string tag = reader.readTag(1);
4494 bool direct = (tag == "__direct__");
4495 if (direct) {
4496 tag = reader.readTag(1);
4497 }
4498 while (tag_len <= max_tag_len && !reader.isError()) {
4499 if(tag == "getRemoteProtocolVersion") {
4500 if (!reader.noMore()) {
4501 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4502 reader.fail();
4503 return false;
4504 }
4505
4506 auto proto = getLocalProtocolVersion();
4507
4508 yarp::os::idl::WireWriter writer(reader);
4509 if (!writer.writeListHeader(1)) {
4510 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4511 return false;}
4512 if (!writer.write(proto)) {
4513 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
4514 return false;
4515 }
4516 reader.accept();
4517 return true;
4518 }
4521 if (!helper.cmd.readArgs(reader)) {
4522 return false;
4523 }
4524
4525 helper.call(this);
4526
4527 yarp::os::idl::WireWriter writer(reader);
4528 if (!helper.reply.write(writer)) {
4529 return false;
4530 }
4531 reader.accept();
4532 return true;
4533 }
4536 if (!helper.cmd.readArgs(reader)) {
4537 return false;
4538 }
4539
4540 helper.call(this);
4541
4542 yarp::os::idl::WireWriter writer(reader);
4543 if (!helper.reply.write(writer)) {
4544 return false;
4545 }
4546 reader.accept();
4547 return true;
4548 }
4551 if (!helper.cmd.readArgs(reader)) {
4552 return false;
4553 }
4554
4555 helper.call(this);
4556
4557 yarp::os::idl::WireWriter writer(reader);
4558 if (!helper.reply.write(writer)) {
4559 return false;
4560 }
4561 reader.accept();
4562 return true;
4563 }
4566 if (!helper.cmd.readArgs(reader)) {
4567 return false;
4568 }
4569
4570 helper.call(this);
4571
4572 yarp::os::idl::WireWriter writer(reader);
4573 if (!helper.reply.write(writer)) {
4574 return false;
4575 }
4576 reader.accept();
4577 return true;
4578 }
4581 if (!helper.cmd.readArgs(reader)) {
4582 return false;
4583 }
4584
4585 helper.call(this);
4586
4587 yarp::os::idl::WireWriter writer(reader);
4588 if (!helper.reply.write(writer)) {
4589 return false;
4590 }
4591 reader.accept();
4592 return true;
4593 }
4596 if (!helper.cmd.readArgs(reader)) {
4597 return false;
4598 }
4599
4600 helper.call(this);
4601
4602 yarp::os::idl::WireWriter writer(reader);
4603 if (!helper.reply.write(writer)) {
4604 return false;
4605 }
4606 reader.accept();
4607 return true;
4608 }
4611 if (!helper.cmd.readArgs(reader)) {
4612 return false;
4613 }
4614
4615 helper.call(this);
4616
4617 yarp::os::idl::WireWriter writer(reader);
4618 if (!helper.reply.write(writer)) {
4619 return false;
4620 }
4621 reader.accept();
4622 return true;
4623 }
4626 if (!helper.cmd.readArgs(reader)) {
4627 return false;
4628 }
4629
4630 helper.call(this);
4631
4632 yarp::os::idl::WireWriter writer(reader);
4633 if (!helper.reply.write(writer)) {
4634 return false;
4635 }
4636 reader.accept();
4637 return true;
4638 }
4641 if (!helper.cmd.readArgs(reader)) {
4642 return false;
4643 }
4644
4645 helper.call(this);
4646
4647 yarp::os::idl::WireWriter writer(reader);
4648 if (!helper.reply.write(writer)) {
4649 return false;
4650 }
4651 reader.accept();
4652 return true;
4653 }
4656 if (!helper.cmd.readArgs(reader)) {
4657 return false;
4658 }
4659
4660 helper.call(this);
4661
4662 yarp::os::idl::WireWriter writer(reader);
4663 if (!helper.reply.write(writer)) {
4664 return false;
4665 }
4666 reader.accept();
4667 return true;
4668 }
4671 if (!helper.cmd.readArgs(reader)) {
4672 return false;
4673 }
4674
4675 helper.call(this);
4676
4677 yarp::os::idl::WireWriter writer(reader);
4678 if (!helper.reply.write(writer)) {
4679 return false;
4680 }
4681 reader.accept();
4682 return true;
4683 }
4686 if (!helper.cmd.readArgs(reader)) {
4687 return false;
4688 }
4689
4690 helper.call(this);
4691
4692 yarp::os::idl::WireWriter writer(reader);
4693 if (!helper.reply.write(writer)) {
4694 return false;
4695 }
4696 reader.accept();
4697 return true;
4698 }
4701 if (!helper.cmd.readArgs(reader)) {
4702 return false;
4703 }
4704
4705 helper.call(this);
4706
4707 yarp::os::idl::WireWriter writer(reader);
4708 if (!helper.reply.write(writer)) {
4709 return false;
4710 }
4711 reader.accept();
4712 return true;
4713 }
4716 if (!helper.cmd.readArgs(reader)) {
4717 return false;
4718 }
4719
4720 helper.call(this);
4721
4722 yarp::os::idl::WireWriter writer(reader);
4723 if (!helper.reply.write(writer)) {
4724 return false;
4725 }
4726 reader.accept();
4727 return true;
4728 }
4731 if (!helper.cmd.readArgs(reader)) {
4732 return false;
4733 }
4734
4735 helper.call(this);
4736
4737 yarp::os::idl::WireWriter writer(reader);
4738 if (!helper.reply.write(writer)) {
4739 return false;
4740 }
4741 reader.accept();
4742 return true;
4743 }
4746 if (!helper.cmd.readArgs(reader)) {
4747 return false;
4748 }
4749
4750 helper.call(this);
4751
4752 yarp::os::idl::WireWriter writer(reader);
4753 if (!helper.reply.write(writer)) {
4754 return false;
4755 }
4756 reader.accept();
4757 return true;
4758 }
4761 if (!helper.cmd.readArgs(reader)) {
4762 return false;
4763 }
4764
4765 helper.call(this);
4766
4767 yarp::os::idl::WireWriter writer(reader);
4768 if (!helper.reply.write(writer)) {
4769 return false;
4770 }
4771 reader.accept();
4772 return true;
4773 }
4774 if (tag == "help") {
4775 std::string functionName;
4776 if (!reader.readString(functionName)) {
4777 functionName = "--all";
4778 }
4779 auto help_strings = help(functionName);
4780 yarp::os::idl::WireWriter writer(reader);
4781 if (!writer.isNull()) {
4782 if (!writer.writeListHeader(2)) {
4783 return false;
4784 }
4785 if (!writer.writeTag("many", 1, 0)) {
4786 return false;
4787 }
4788 if (!writer.writeListBegin(0, help_strings.size())) {
4789 return false;
4790 }
4791 for (const auto& help_string : help_strings) {
4792 if (!writer.writeString(help_string)) {
4793 return false;
4794 }
4795 }
4796 if (!writer.writeListEnd()) {
4797 return false;
4798 }
4799 }
4800 reader.accept();
4801 return true;
4802 }
4803 if (reader.noMore()) {
4804 reader.fail();
4805 return false;
4806 }
4807 std::string next_tag = reader.readTag(1);
4808 if (next_tag.empty()) {
4809 break;
4810 }
4811 tag.append("_").append(next_tag);
4812 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
4813 }
4814 return false;
4815}
#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)
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