YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ControlBoardMsgs.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 <ControlBoardMsgs.h>
14#include <yarp/os/LogStream.h>
15
17
18#include <algorithm>
19
20namespace
21{
22 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "ControlBoardMsgs")
23}
24
25//ControlBoardMsgs_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 ControlBoardMsgs_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 ControlBoardMsgs::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// isJointBrakedRPC helper class declaration
110 public yarp::os::Portable
111{
112public:
114 explicit ControlBoardMsgs_isJointBrakedRPC_helper(const std::int32_t j);
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 explicit Command(const std::int32_t j);
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::int32_t j{0};
139 };
140
141 class Reply :
143 {
144 public:
145 Reply() = default;
146 ~Reply() override = default;
147
148 bool write(yarp::os::ConnectionWriter& connection) const override;
149 bool read(yarp::os::ConnectionReader& connection) override;
150
151 bool write(const yarp::os::idl::WireWriter& writer) const override;
152 bool read(yarp::os::idl::WireReader& reader) override;
153
155 };
156
157 using funcptr_t = return_isJointBraked (*)(const std::int32_t);
158 void call(ControlBoardMsgs* ptr);
159
162
163 static constexpr const char* s_tag{"isJointBrakedRPC"};
164 static constexpr size_t s_tag_len{1};
165 static constexpr size_t s_cmd_len{2};
166 static constexpr size_t s_reply_len{2};
167 static constexpr const char* s_prototype{"return_isJointBraked ControlBoardMsgs::isJointBrakedRPC(const std::int32_t j) const"};
168 static constexpr const char* s_help{""};
169};
170
171// setManualBrakeActiveRPC helper class declaration
173 public yarp::os::Portable
174{
175public:
177 ControlBoardMsgs_setManualBrakeActiveRPC_helper(const std::int32_t j, const bool active);
178 bool write(yarp::os::ConnectionWriter& connection) const override;
179 bool read(yarp::os::ConnectionReader& connection) override;
180
181 class Command :
183 {
184 public:
185 Command() = default;
186 Command(const std::int32_t j, const bool active);
187
188 ~Command() override = default;
189
190 bool write(yarp::os::ConnectionWriter& connection) const override;
191 bool read(yarp::os::ConnectionReader& connection) override;
192
193 bool write(const yarp::os::idl::WireWriter& writer) const override;
194 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
195 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
196
197 bool read(yarp::os::idl::WireReader& reader) override;
200
201 std::int32_t j{0};
202 bool active{false};
203 };
204
205 class Reply :
207 {
208 public:
209 Reply() = default;
210 ~Reply() override = default;
211
212 bool write(yarp::os::ConnectionWriter& connection) const override;
213 bool read(yarp::os::ConnectionReader& connection) override;
214
215 bool write(const yarp::os::idl::WireWriter& writer) const override;
216 bool read(yarp::os::idl::WireReader& reader) override;
217
219 };
220
221 using funcptr_t = yarp::dev::ReturnValue (*)(const std::int32_t, const bool);
222 void call(ControlBoardMsgs* ptr);
223
226
227 static constexpr const char* s_tag{"setManualBrakeActiveRPC"};
228 static constexpr size_t s_tag_len{1};
229 static constexpr size_t s_cmd_len{3};
230 static constexpr size_t s_reply_len{1};
231 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ControlBoardMsgs::setManualBrakeActiveRPC(const std::int32_t j, const bool active)"};
232 static constexpr const char* s_help{""};
233};
234
235// setAutoBrakeEnabledRPC helper class declaration
237 public yarp::os::Portable
238{
239public:
241 ControlBoardMsgs_setAutoBrakeEnabledRPC_helper(const std::int32_t j, const bool enabled);
242 bool write(yarp::os::ConnectionWriter& connection) const override;
243 bool read(yarp::os::ConnectionReader& connection) override;
244
245 class Command :
247 {
248 public:
249 Command() = default;
250 Command(const std::int32_t j, const bool enabled);
251
252 ~Command() override = default;
253
254 bool write(yarp::os::ConnectionWriter& connection) const override;
255 bool read(yarp::os::ConnectionReader& connection) override;
256
257 bool write(const yarp::os::idl::WireWriter& writer) const override;
258 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
259 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
260
261 bool read(yarp::os::idl::WireReader& reader) override;
264
265 std::int32_t j{0};
266 bool enabled{false};
267 };
268
269 class Reply :
271 {
272 public:
273 Reply() = default;
274 ~Reply() override = default;
275
276 bool write(yarp::os::ConnectionWriter& connection) const override;
277 bool read(yarp::os::ConnectionReader& connection) override;
278
279 bool write(const yarp::os::idl::WireWriter& writer) const override;
280 bool read(yarp::os::idl::WireReader& reader) override;
281
283 };
284
285 using funcptr_t = yarp::dev::ReturnValue (*)(const std::int32_t, const bool);
286 void call(ControlBoardMsgs* ptr);
287
290
291 static constexpr const char* s_tag{"setAutoBrakeEnabledRPC"};
292 static constexpr size_t s_tag_len{1};
293 static constexpr size_t s_cmd_len{3};
294 static constexpr size_t s_reply_len{1};
295 static constexpr const char* s_prototype{"yarp::dev::ReturnValue ControlBoardMsgs::setAutoBrakeEnabledRPC(const std::int32_t j, const bool enabled)"};
296 static constexpr const char* s_help{""};
297};
298
299// getAutoBrakeEnabledRPC helper class declaration
301 public yarp::os::Portable
302{
303public:
305 explicit ControlBoardMsgs_getAutoBrakeEnabledRPC_helper(const std::int32_t j);
306 bool write(yarp::os::ConnectionWriter& connection) const override;
307 bool read(yarp::os::ConnectionReader& connection) override;
308
309 class Command :
311 {
312 public:
313 Command() = default;
314 explicit Command(const std::int32_t j);
315
316 ~Command() override = default;
317
318 bool write(yarp::os::ConnectionWriter& connection) const override;
319 bool read(yarp::os::ConnectionReader& connection) override;
320
321 bool write(const yarp::os::idl::WireWriter& writer) const override;
322 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
323 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
324
325 bool read(yarp::os::idl::WireReader& reader) override;
328
329 std::int32_t j{0};
330 };
331
332 class Reply :
334 {
335 public:
336 Reply() = default;
337 ~Reply() override = default;
338
339 bool write(yarp::os::ConnectionWriter& connection) const override;
340 bool read(yarp::os::ConnectionReader& connection) override;
341
342 bool write(const yarp::os::idl::WireWriter& writer) const override;
343 bool read(yarp::os::idl::WireReader& reader) override;
344
346 };
347
348 using funcptr_t = return_getAutoBrakeEnabled (*)(const std::int32_t);
349 void call(ControlBoardMsgs* ptr);
350
353
354 static constexpr const char* s_tag{"getAutoBrakeEnabledRPC"};
355 static constexpr size_t s_tag_len{1};
356 static constexpr size_t s_cmd_len{2};
357 static constexpr size_t s_reply_len{2};
358 static constexpr const char* s_prototype{"return_getAutoBrakeEnabled ControlBoardMsgs::getAutoBrakeEnabledRPC(const std::int32_t j) const"};
359 static constexpr const char* s_help{""};
360};
361
362// getAxesRPC helper class declaration
364 public yarp::os::Portable
365{
366public:
368 bool write(yarp::os::ConnectionWriter& connection) const override;
369 bool read(yarp::os::ConnectionReader& connection) override;
370
371 class Command :
373 {
374 public:
375 Command() = default;
376 ~Command() override = default;
377
378 bool write(yarp::os::ConnectionWriter& connection) const override;
379 bool read(yarp::os::ConnectionReader& connection) override;
380
381 bool write(const yarp::os::idl::WireWriter& writer) const override;
382 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
383 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
384
385 bool read(yarp::os::idl::WireReader& reader) override;
388 };
389
390 class Reply :
392 {
393 public:
394 Reply() = default;
395 ~Reply() override = default;
396
397 bool write(yarp::os::ConnectionWriter& connection) const override;
398 bool read(yarp::os::ConnectionReader& connection) override;
399
400 bool write(const yarp::os::idl::WireWriter& writer) const override;
401 bool read(yarp::os::idl::WireReader& reader) override;
402
404 };
405
407 void call(ControlBoardMsgs* ptr);
408
411
412 static constexpr const char* s_tag{"getAxesRPC"};
413 static constexpr size_t s_tag_len{1};
414 static constexpr size_t s_cmd_len{1};
415 static constexpr size_t s_reply_len{2};
416 static constexpr const char* s_prototype{"return_getAxes ControlBoardMsgs::getAxesRPC() const"};
417 static constexpr const char* s_help{""};
418};
419
420// getDesiredVelocityOneRPC helper class declaration
422 public yarp::os::Portable
423{
424public:
426 explicit ControlBoardMsgs_getDesiredVelocityOneRPC_helper(const std::int32_t j);
427 bool write(yarp::os::ConnectionWriter& connection) const override;
428 bool read(yarp::os::ConnectionReader& connection) override;
429
430 class Command :
432 {
433 public:
434 Command() = default;
435 explicit Command(const std::int32_t j);
436
437 ~Command() override = default;
438
439 bool write(yarp::os::ConnectionWriter& connection) const override;
440 bool read(yarp::os::ConnectionReader& connection) override;
441
442 bool write(const yarp::os::idl::WireWriter& writer) const override;
443 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
444 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
445
446 bool read(yarp::os::idl::WireReader& reader) override;
449
450 std::int32_t j{0};
451 };
452
453 class Reply :
455 {
456 public:
457 Reply() = default;
458 ~Reply() override = default;
459
460 bool write(yarp::os::ConnectionWriter& connection) const override;
461 bool read(yarp::os::ConnectionReader& connection) override;
462
463 bool write(const yarp::os::idl::WireWriter& writer) const override;
464 bool read(yarp::os::idl::WireReader& reader) override;
465
467 };
468
469 using funcptr_t = return_getDesiredVelocityOne (*)(const std::int32_t);
470 void call(ControlBoardMsgs* ptr);
471
474
475 static constexpr const char* s_tag{"getDesiredVelocityOneRPC"};
476 static constexpr size_t s_tag_len{1};
477 static constexpr size_t s_cmd_len{2};
478 static constexpr size_t s_reply_len{2};
479 static constexpr const char* s_prototype{"return_getDesiredVelocityOne ControlBoardMsgs::getDesiredVelocityOneRPC(const std::int32_t j) const"};
480 static constexpr const char* s_help{""};
481};
482
483// getDesiredVelocityAllRPC helper class declaration
485 public yarp::os::Portable
486{
487public:
489 bool write(yarp::os::ConnectionWriter& connection) const override;
490 bool read(yarp::os::ConnectionReader& connection) override;
491
492 class Command :
494 {
495 public:
496 Command() = default;
497 ~Command() override = default;
498
499 bool write(yarp::os::ConnectionWriter& connection) const override;
500 bool read(yarp::os::ConnectionReader& connection) override;
501
502 bool write(const yarp::os::idl::WireWriter& writer) const override;
503 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
504 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
505
506 bool read(yarp::os::idl::WireReader& reader) override;
509 };
510
511 class Reply :
513 {
514 public:
515 Reply() = default;
516 ~Reply() override = default;
517
518 bool write(yarp::os::ConnectionWriter& connection) const override;
519 bool read(yarp::os::ConnectionReader& connection) override;
520
521 bool write(const yarp::os::idl::WireWriter& writer) const override;
522 bool read(yarp::os::idl::WireReader& reader) override;
523
525 };
526
528 void call(ControlBoardMsgs* ptr);
529
532
533 static constexpr const char* s_tag{"getDesiredVelocityAllRPC"};
534 static constexpr size_t s_tag_len{1};
535 static constexpr size_t s_cmd_len{1};
536 static constexpr size_t s_reply_len{2};
537 static constexpr const char* s_prototype{"return_getDesiredVelocityAll ControlBoardMsgs::getDesiredVelocityAllRPC() const"};
538 static constexpr const char* s_help{""};
539};
540
541// getDesiredVelocityGroupRPC helper class declaration
543 public yarp::os::Portable
544{
545public:
547 explicit ControlBoardMsgs_getDesiredVelocityGroupRPC_helper(const std::vector<std::int32_t>& j);
548 bool write(yarp::os::ConnectionWriter& connection) const override;
549 bool read(yarp::os::ConnectionReader& connection) override;
550
551 class Command :
553 {
554 public:
555 Command() = default;
556 explicit Command(const std::vector<std::int32_t>& j);
557
558 ~Command() override = default;
559
560 bool write(yarp::os::ConnectionWriter& connection) const override;
561 bool read(yarp::os::ConnectionReader& connection) override;
562
563 bool write(const yarp::os::idl::WireWriter& writer) const override;
564 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
565 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
566
567 bool read(yarp::os::idl::WireReader& reader) override;
570
571 std::vector<std::int32_t> j{};
572 };
573
574 class Reply :
576 {
577 public:
578 Reply() = default;
579 ~Reply() override = default;
580
581 bool write(yarp::os::ConnectionWriter& connection) const override;
582 bool read(yarp::os::ConnectionReader& connection) override;
583
584 bool write(const yarp::os::idl::WireWriter& writer) const override;
585 bool read(yarp::os::idl::WireReader& reader) override;
586
588 };
589
590 using funcptr_t = return_getDesiredVelocityGroup (*)(const std::vector<std::int32_t>&);
591 void call(ControlBoardMsgs* ptr);
592
595
596 static constexpr const char* s_tag{"getDesiredVelocityGroupRPC"};
597 static constexpr size_t s_tag_len{1};
598 static constexpr size_t s_cmd_len{2};
599 static constexpr size_t s_reply_len{2};
600 static constexpr const char* s_prototype{"return_getDesiredVelocityGroup ControlBoardMsgs::getDesiredVelocityGroupRPC(const std::vector<std::int32_t>& j) const"};
601 static constexpr const char* s_help{""};
602};
603
604// isJointBrakedRPC helper class implementation
609
611{
612 return cmd.write(connection);
613}
614
619
621 j{j}
622{
623}
624
626{
627 yarp::os::idl::WireWriter writer(connection);
628 if (!writer.writeListHeader(s_cmd_len)) {
629 return false;
630 }
631 return write(writer);
632}
633
635{
636 yarp::os::idl::WireReader reader(connection);
637 if (!reader.readListHeader()) {
638 reader.fail();
639 return false;
640 }
641 return read(reader);
642}
643
645{
646 if (!writeTag(writer)) {
647 return false;
648 }
649 if (!writeArgs(writer)) {
650 return false;
651 }
652 return true;
653}
654
656{
657 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
658 return false;
659 }
660 return true;
661}
662
664{
665 if (!writer.writeI32(j)) {
666 return false;
667 }
668 return true;
669}
670
672{
673 if (!readTag(reader)) {
674 return false;
675 }
676 if (!readArgs(reader)) {
677 return false;
678 }
679 return true;
680}
681
683{
684 std::string tag = reader.readTag(s_tag_len);
685 if (reader.isError()) {
686 return false;
687 }
688 if (tag != s_tag) {
689 reader.fail();
690 return false;
691 }
692 return true;
693}
694
696{
697 if (reader.noMore()) {
698 reader.fail();
699 return false;
700 }
701 if (!reader.readI32(j)) {
702 reader.fail();
703 return false;
704 }
705 if (!reader.noMore()) {
706 reader.fail();
707 return false;
708 }
709 return true;
710}
711
713{
714 yarp::os::idl::WireWriter writer(connection);
715 return write(writer);
716}
717
719{
720 yarp::os::idl::WireReader reader(connection);
721 return read(reader);
722}
723
725{
726 if (!writer.isNull()) {
727 if (!writer.writeListHeader(s_reply_len)) {
728 return false;
729 }
730 if (!writer.write(return_helper)) {
731 return false;
732 }
733 }
734 return true;
735}
736
738{
739 if (!reader.readListReturn()) {
740 return false;
741 }
742 if (reader.noMore()) {
743 reader.fail();
744 return false;
745 }
746 if (!reader.read(return_helper)) {
747 reader.fail();
748 return false;
749 }
750 return true;
751}
752
757
758// setManualBrakeActiveRPC helper class implementation
760 cmd{j, active}
761{
762}
763
765{
766 return cmd.write(connection);
767}
768
773
775 j{j},
776 active{active}
777{
778}
779
781{
782 yarp::os::idl::WireWriter writer(connection);
783 if (!writer.writeListHeader(s_cmd_len)) {
784 return false;
785 }
786 return write(writer);
787}
788
790{
791 yarp::os::idl::WireReader reader(connection);
792 if (!reader.readListHeader()) {
793 reader.fail();
794 return false;
795 }
796 return read(reader);
797}
798
800{
801 if (!writeTag(writer)) {
802 return false;
803 }
804 if (!writeArgs(writer)) {
805 return false;
806 }
807 return true;
808}
809
811{
812 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
813 return false;
814 }
815 return true;
816}
817
819{
820 if (!writer.writeI32(j)) {
821 return false;
822 }
823 if (!writer.writeBool(active)) {
824 return false;
825 }
826 return true;
827}
828
830{
831 if (!readTag(reader)) {
832 return false;
833 }
834 if (!readArgs(reader)) {
835 return false;
836 }
837 return true;
838}
839
841{
842 std::string tag = reader.readTag(s_tag_len);
843 if (reader.isError()) {
844 return false;
845 }
846 if (tag != s_tag) {
847 reader.fail();
848 return false;
849 }
850 return true;
851}
852
854{
855 if (reader.noMore()) {
856 reader.fail();
857 return false;
858 }
859 if (!reader.readI32(j)) {
860 reader.fail();
861 return false;
862 }
863 if (reader.noMore()) {
864 reader.fail();
865 return false;
866 }
867 if (!reader.readBool(active)) {
868 reader.fail();
869 return false;
870 }
871 if (!reader.noMore()) {
872 reader.fail();
873 return false;
874 }
875 return true;
876}
877
879{
880 yarp::os::idl::WireWriter writer(connection);
881 return write(writer);
882}
883
889
891{
892 if (!writer.isNull()) {
893 if (!writer.write(return_helper)) {
894 return false;
895 }
896 }
897 return true;
898}
899
901{
902 if (reader.noMore()) {
903 reader.fail();
904 return false;
905 }
906 if (!reader.read(return_helper)) {
907 reader.fail();
908 return false;
909 }
910 return true;
911}
912
917
918// setAutoBrakeEnabledRPC helper class implementation
920 cmd{j, enabled}
921{
922}
923
925{
926 return cmd.write(connection);
927}
928
933
935 j{j},
936 enabled{enabled}
937{
938}
939
941{
942 yarp::os::idl::WireWriter writer(connection);
943 if (!writer.writeListHeader(s_cmd_len)) {
944 return false;
945 }
946 return write(writer);
947}
948
950{
951 yarp::os::idl::WireReader reader(connection);
952 if (!reader.readListHeader()) {
953 reader.fail();
954 return false;
955 }
956 return read(reader);
957}
958
960{
961 if (!writeTag(writer)) {
962 return false;
963 }
964 if (!writeArgs(writer)) {
965 return false;
966 }
967 return true;
968}
969
971{
972 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
973 return false;
974 }
975 return true;
976}
977
979{
980 if (!writer.writeI32(j)) {
981 return false;
982 }
983 if (!writer.writeBool(enabled)) {
984 return false;
985 }
986 return true;
987}
988
990{
991 if (!readTag(reader)) {
992 return false;
993 }
994 if (!readArgs(reader)) {
995 return false;
996 }
997 return true;
998}
999
1001{
1002 std::string tag = reader.readTag(s_tag_len);
1003 if (reader.isError()) {
1004 return false;
1005 }
1006 if (tag != s_tag) {
1007 reader.fail();
1008 return false;
1009 }
1010 return true;
1011}
1012
1014{
1015 if (reader.noMore()) {
1016 reader.fail();
1017 return false;
1018 }
1019 if (!reader.readI32(j)) {
1020 reader.fail();
1021 return false;
1022 }
1023 if (reader.noMore()) {
1024 reader.fail();
1025 return false;
1026 }
1027 if (!reader.readBool(enabled)) {
1028 reader.fail();
1029 return false;
1030 }
1031 if (!reader.noMore()) {
1032 reader.fail();
1033 return false;
1034 }
1035 return true;
1036}
1037
1039{
1040 yarp::os::idl::WireWriter writer(connection);
1041 return write(writer);
1042}
1043
1045{
1046 yarp::os::idl::WireReader reader(connection);
1047 return read(reader);
1048}
1049
1051{
1052 if (!writer.isNull()) {
1053 if (!writer.write(return_helper)) {
1054 return false;
1055 }
1056 }
1057 return true;
1058}
1059
1061{
1062 if (reader.noMore()) {
1063 reader.fail();
1064 return false;
1065 }
1066 if (!reader.read(return_helper)) {
1067 reader.fail();
1068 return false;
1069 }
1070 return true;
1071}
1072
1077
1078// getAutoBrakeEnabledRPC helper class implementation
1083
1085{
1086 return cmd.write(connection);
1087}
1088
1093
1095 j{j}
1096{
1097}
1098
1100{
1101 yarp::os::idl::WireWriter writer(connection);
1102 if (!writer.writeListHeader(s_cmd_len)) {
1103 return false;
1104 }
1105 return write(writer);
1106}
1107
1109{
1110 yarp::os::idl::WireReader reader(connection);
1111 if (!reader.readListHeader()) {
1112 reader.fail();
1113 return false;
1114 }
1115 return read(reader);
1116}
1117
1119{
1120 if (!writeTag(writer)) {
1121 return false;
1122 }
1123 if (!writeArgs(writer)) {
1124 return false;
1125 }
1126 return true;
1127}
1128
1130{
1131 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1132 return false;
1133 }
1134 return true;
1135}
1136
1138{
1139 if (!writer.writeI32(j)) {
1140 return false;
1141 }
1142 return true;
1143}
1144
1146{
1147 if (!readTag(reader)) {
1148 return false;
1149 }
1150 if (!readArgs(reader)) {
1151 return false;
1152 }
1153 return true;
1154}
1155
1157{
1158 std::string tag = reader.readTag(s_tag_len);
1159 if (reader.isError()) {
1160 return false;
1161 }
1162 if (tag != s_tag) {
1163 reader.fail();
1164 return false;
1165 }
1166 return true;
1167}
1168
1170{
1171 if (reader.noMore()) {
1172 reader.fail();
1173 return false;
1174 }
1175 if (!reader.readI32(j)) {
1176 reader.fail();
1177 return false;
1178 }
1179 if (!reader.noMore()) {
1180 reader.fail();
1181 return false;
1182 }
1183 return true;
1184}
1185
1187{
1188 yarp::os::idl::WireWriter writer(connection);
1189 return write(writer);
1190}
1191
1193{
1194 yarp::os::idl::WireReader reader(connection);
1195 return read(reader);
1196}
1197
1199{
1200 if (!writer.isNull()) {
1201 if (!writer.writeListHeader(s_reply_len)) {
1202 return false;
1203 }
1204 if (!writer.write(return_helper)) {
1205 return false;
1206 }
1207 }
1208 return true;
1209}
1210
1212{
1213 if (!reader.readListReturn()) {
1214 return false;
1215 }
1216 if (reader.noMore()) {
1217 reader.fail();
1218 return false;
1219 }
1220 if (!reader.read(return_helper)) {
1221 reader.fail();
1222 return false;
1223 }
1224 return true;
1225}
1226
1231
1232// getAxesRPC helper class implementation
1234{
1235 return cmd.write(connection);
1236}
1237
1239{
1240 return reply.read(connection);
1241}
1242
1244{
1245 yarp::os::idl::WireWriter writer(connection);
1246 if (!writer.writeListHeader(s_cmd_len)) {
1247 return false;
1248 }
1249 return write(writer);
1250}
1251
1253{
1254 yarp::os::idl::WireReader reader(connection);
1255 if (!reader.readListHeader()) {
1256 reader.fail();
1257 return false;
1258 }
1259 return read(reader);
1260}
1261
1263{
1264 if (!writeTag(writer)) {
1265 return false;
1266 }
1267 if (!writeArgs(writer)) {
1268 return false;
1269 }
1270 return true;
1271}
1272
1274{
1275 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1276 return false;
1277 }
1278 return true;
1279}
1280
1282{
1283 return true;
1284}
1285
1287{
1288 if (!readTag(reader)) {
1289 return false;
1290 }
1291 if (!readArgs(reader)) {
1292 return false;
1293 }
1294 return true;
1295}
1296
1298{
1299 std::string tag = reader.readTag(s_tag_len);
1300 if (reader.isError()) {
1301 return false;
1302 }
1303 if (tag != s_tag) {
1304 reader.fail();
1305 return false;
1306 }
1307 return true;
1308}
1309
1311{
1312 if (!reader.noMore()) {
1313 reader.fail();
1314 return false;
1315 }
1316 return true;
1317}
1318
1320{
1321 yarp::os::idl::WireWriter writer(connection);
1322 return write(writer);
1323}
1324
1326{
1327 yarp::os::idl::WireReader reader(connection);
1328 return read(reader);
1329}
1330
1332{
1333 if (!writer.isNull()) {
1334 if (!writer.writeListHeader(s_reply_len)) {
1335 return false;
1336 }
1337 if (!writer.write(return_helper)) {
1338 return false;
1339 }
1340 }
1341 return true;
1342}
1343
1345{
1346 if (!reader.readListReturn()) {
1347 return false;
1348 }
1349 if (reader.noMore()) {
1350 reader.fail();
1351 return false;
1352 }
1353 if (!reader.read(return_helper)) {
1354 reader.fail();
1355 return false;
1356 }
1357 return true;
1358}
1359
1364
1365// getDesiredVelocityOneRPC helper class implementation
1370
1372{
1373 return cmd.write(connection);
1374}
1375
1380
1385
1387{
1388 yarp::os::idl::WireWriter writer(connection);
1389 if (!writer.writeListHeader(s_cmd_len)) {
1390 return false;
1391 }
1392 return write(writer);
1393}
1394
1396{
1397 yarp::os::idl::WireReader reader(connection);
1398 if (!reader.readListHeader()) {
1399 reader.fail();
1400 return false;
1401 }
1402 return read(reader);
1403}
1404
1406{
1407 if (!writeTag(writer)) {
1408 return false;
1409 }
1410 if (!writeArgs(writer)) {
1411 return false;
1412 }
1413 return true;
1414}
1415
1417{
1418 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1419 return false;
1420 }
1421 return true;
1422}
1423
1425{
1426 if (!writer.writeI32(j)) {
1427 return false;
1428 }
1429 return true;
1430}
1431
1433{
1434 if (!readTag(reader)) {
1435 return false;
1436 }
1437 if (!readArgs(reader)) {
1438 return false;
1439 }
1440 return true;
1441}
1442
1444{
1445 std::string tag = reader.readTag(s_tag_len);
1446 if (reader.isError()) {
1447 return false;
1448 }
1449 if (tag != s_tag) {
1450 reader.fail();
1451 return false;
1452 }
1453 return true;
1454}
1455
1457{
1458 if (reader.noMore()) {
1459 reader.fail();
1460 return false;
1461 }
1462 if (!reader.readI32(j)) {
1463 reader.fail();
1464 return false;
1465 }
1466 if (!reader.noMore()) {
1467 reader.fail();
1468 return false;
1469 }
1470 return true;
1471}
1472
1474{
1475 yarp::os::idl::WireWriter writer(connection);
1476 return write(writer);
1477}
1478
1484
1486{
1487 if (!writer.isNull()) {
1488 if (!writer.writeListHeader(s_reply_len)) {
1489 return false;
1490 }
1491 if (!writer.write(return_helper)) {
1492 return false;
1493 }
1494 }
1495 return true;
1496}
1497
1499{
1500 if (!reader.readListReturn()) {
1501 return false;
1502 }
1503 if (reader.noMore()) {
1504 reader.fail();
1505 return false;
1506 }
1507 if (!reader.read(return_helper)) {
1508 reader.fail();
1509 return false;
1510 }
1511 return true;
1512}
1513
1518
1519// getDesiredVelocityAllRPC helper class implementation
1521{
1522 return cmd.write(connection);
1523}
1524
1529
1531{
1532 yarp::os::idl::WireWriter writer(connection);
1533 if (!writer.writeListHeader(s_cmd_len)) {
1534 return false;
1535 }
1536 return write(writer);
1537}
1538
1540{
1541 yarp::os::idl::WireReader reader(connection);
1542 if (!reader.readListHeader()) {
1543 reader.fail();
1544 return false;
1545 }
1546 return read(reader);
1547}
1548
1550{
1551 if (!writeTag(writer)) {
1552 return false;
1553 }
1554 if (!writeArgs(writer)) {
1555 return false;
1556 }
1557 return true;
1558}
1559
1561{
1562 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1563 return false;
1564 }
1565 return true;
1566}
1567
1569{
1570 return true;
1571}
1572
1574{
1575 if (!readTag(reader)) {
1576 return false;
1577 }
1578 if (!readArgs(reader)) {
1579 return false;
1580 }
1581 return true;
1582}
1583
1585{
1586 std::string tag = reader.readTag(s_tag_len);
1587 if (reader.isError()) {
1588 return false;
1589 }
1590 if (tag != s_tag) {
1591 reader.fail();
1592 return false;
1593 }
1594 return true;
1595}
1596
1598{
1599 if (!reader.noMore()) {
1600 reader.fail();
1601 return false;
1602 }
1603 return true;
1604}
1605
1607{
1608 yarp::os::idl::WireWriter writer(connection);
1609 return write(writer);
1610}
1611
1617
1619{
1620 if (!writer.isNull()) {
1621 if (!writer.writeListHeader(s_reply_len)) {
1622 return false;
1623 }
1624 if (!writer.write(return_helper)) {
1625 return false;
1626 }
1627 }
1628 return true;
1629}
1630
1632{
1633 if (!reader.readListReturn()) {
1634 return false;
1635 }
1636 if (reader.noMore()) {
1637 reader.fail();
1638 return false;
1639 }
1640 if (!reader.read(return_helper)) {
1641 reader.fail();
1642 return false;
1643 }
1644 return true;
1645}
1646
1651
1652// getDesiredVelocityGroupRPC helper class implementation
1657
1659{
1660 return cmd.write(connection);
1661}
1662
1667
1669 j{j}
1670{
1671}
1672
1674{
1675 yarp::os::idl::WireWriter writer(connection);
1676 if (!writer.writeListHeader(s_cmd_len)) {
1677 return false;
1678 }
1679 return write(writer);
1680}
1681
1683{
1684 yarp::os::idl::WireReader reader(connection);
1685 if (!reader.readListHeader()) {
1686 reader.fail();
1687 return false;
1688 }
1689 return read(reader);
1690}
1691
1693{
1694 if (!writeTag(writer)) {
1695 return false;
1696 }
1697 if (!writeArgs(writer)) {
1698 return false;
1699 }
1700 return true;
1701}
1702
1704{
1705 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1706 return false;
1707 }
1708 return true;
1709}
1710
1712{
1713 if (!writer.writeListBegin(BOTTLE_TAG_INT32, j.size())) {
1714 return false;
1715 }
1716 if (!writer.writeBlock(reinterpret_cast<const char*>(j.data()), j.size() * sizeof(std::int32_t))) {
1717 return false;
1718 }
1719 if (!writer.writeListEnd()) {
1720 return false;
1721 }
1722 return true;
1723}
1724
1726{
1727 if (!readTag(reader)) {
1728 return false;
1729 }
1730 if (!readArgs(reader)) {
1731 return false;
1732 }
1733 return true;
1734}
1735
1737{
1738 std::string tag = reader.readTag(s_tag_len);
1739 if (reader.isError()) {
1740 return false;
1741 }
1742 if (tag != s_tag) {
1743 reader.fail();
1744 return false;
1745 }
1746 return true;
1747}
1748
1750{
1751 if (reader.noMore()) {
1752 reader.fail();
1753 return false;
1754 }
1755 size_t _csize;
1757 reader.readListBegin(_etype, _csize);
1758 // WireReader removes BOTTLE_TAG_LIST from the tag
1759 constexpr int expected_tag = ((BOTTLE_TAG_INT32) & (~BOTTLE_TAG_LIST));
1760 if constexpr (expected_tag != 0) {
1761 if (_csize != 0 && _etype.code != expected_tag) {
1762 return false;
1763 }
1764 }
1765 j.resize(_csize);
1766 if (_csize != 0 && !reader.readBlock(reinterpret_cast<char*>(j.data()), j.size() * sizeof(std::int32_t))) {
1767 return false;
1768 }
1769 reader.readListEnd();
1770 if (!reader.noMore()) {
1771 reader.fail();
1772 return false;
1773 }
1774 return true;
1775}
1776
1778{
1779 yarp::os::idl::WireWriter writer(connection);
1780 return write(writer);
1781}
1782
1788
1790{
1791 if (!writer.isNull()) {
1792 if (!writer.writeListHeader(s_reply_len)) {
1793 return false;
1794 }
1795 if (!writer.write(return_helper)) {
1796 return false;
1797 }
1798 }
1799 return true;
1800}
1801
1803{
1804 if (!reader.readListReturn()) {
1805 return false;
1806 }
1807 if (reader.noMore()) {
1808 reader.fail();
1809 return false;
1810 }
1811 if (!reader.read(return_helper)) {
1812 reader.fail();
1813 return false;
1814 }
1815 return true;
1816}
1817
1822
1823// Constructor
1825{
1826 yarp().setOwner(*this);
1827}
1828
1830{
1831 if (!yarp().canWrite()) {
1832 yError("Missing server method '%s'?", ControlBoardMsgs_isJointBrakedRPC_helper::s_prototype);
1833 }
1835 bool ok = yarp().write(helper, helper);
1836 return ok ? helper.reply.return_helper : return_isJointBraked{};
1837}
1838
1840{
1841 if (!yarp().canWrite()) {
1843 }
1845 bool ok = yarp().write(helper, helper);
1846 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1847}
1848
1850{
1851 if (!yarp().canWrite()) {
1853 }
1855 bool ok = yarp().write(helper, helper);
1856 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1857}
1858
1860{
1861 if (!yarp().canWrite()) {
1863 }
1865 bool ok = yarp().write(helper, helper);
1866 return ok ? helper.reply.return_helper : return_getAutoBrakeEnabled{};
1867}
1868
1870{
1871 if (!yarp().canWrite()) {
1872 yError("Missing server method '%s'?", ControlBoardMsgs_getAxesRPC_helper::s_prototype);
1873 }
1875 bool ok = yarp().write(helper, helper);
1876 return ok ? helper.reply.return_helper : return_getAxes{};
1877}
1878
1880{
1881 if (!yarp().canWrite()) {
1883 }
1885 bool ok = yarp().write(helper, helper);
1886 return ok ? helper.reply.return_helper : return_getDesiredVelocityOne{};
1887}
1888
1890{
1891 if (!yarp().canWrite()) {
1893 }
1895 bool ok = yarp().write(helper, helper);
1896 return ok ? helper.reply.return_helper : return_getDesiredVelocityAll{};
1897}
1898
1900{
1901 if (!yarp().canWrite()) {
1903 }
1905 bool ok = yarp().write(helper, helper);
1906 return ok ? helper.reply.return_helper : return_getDesiredVelocityGroup{};
1907}
1908
1909// help method
1910std::vector<std::string> ControlBoardMsgs::help(const std::string& functionName)
1911{
1912 bool showAll = (functionName == "--all");
1913 std::vector<std::string> helpString;
1914 if (showAll) {
1915 helpString.emplace_back("*** Available commands:");
1916 helpString.emplace_back(ControlBoardMsgs_isJointBrakedRPC_helper::s_tag);
1920 helpString.emplace_back(ControlBoardMsgs_getAxesRPC_helper::s_tag);
1924 helpString.emplace_back("help");
1925 } else {
1928 }
1931 }
1934 }
1937 }
1938 if (functionName == ControlBoardMsgs_getAxesRPC_helper::s_tag) {
1939 helpString.emplace_back(ControlBoardMsgs_getAxesRPC_helper::s_prototype);
1940 }
1943 }
1946 }
1949 }
1950 if (functionName == "help") {
1951 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
1952 helpString.emplace_back("Return list of available commands, or help message for a specific function");
1953 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");
1954 helpString.emplace_back("@return list of strings (one string per line)");
1955 }
1956 }
1957 if (helpString.empty()) {
1958 helpString.emplace_back("Command not found");
1959 }
1960 return helpString;
1961}
1962
1963// read from ConnectionReader
1965{
1966 constexpr size_t max_tag_len = 1;
1967 size_t tag_len = 1;
1968
1969 yarp::os::idl::WireReader reader(connection);
1970 reader.expectAccept();
1971 if (!reader.readListHeader()) {
1972 reader.fail();
1973 return false;
1974 }
1975
1976 std::string tag = reader.readTag(1);
1977 bool direct = (tag == "__direct__");
1978 if (direct) {
1979 tag = reader.readTag(1);
1980 }
1981 while (tag_len <= max_tag_len && !reader.isError()) {
1982 if(tag == "getRemoteProtocolVersion") {
1983 if (!reader.noMore()) {
1984 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1985 reader.fail();
1986 return false;
1987 }
1988
1989 auto proto = getLocalProtocolVersion();
1990
1991 yarp::os::idl::WireWriter writer(reader);
1992 if (!writer.writeListHeader(1)) {
1993 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1994 return false;}
1995 if (!writer.write(proto)) {
1996 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1997 return false;
1998 }
1999 reader.accept();
2000 return true;
2001 }
2004 if (!helper.cmd.readArgs(reader)) {
2005 return false;
2006 }
2007
2008 helper.call(this);
2009
2010 yarp::os::idl::WireWriter writer(reader);
2011 if (!helper.reply.write(writer)) {
2012 return false;
2013 }
2014 reader.accept();
2015 return true;
2016 }
2019 if (!helper.cmd.readArgs(reader)) {
2020 return false;
2021 }
2022
2023 helper.call(this);
2024
2025 yarp::os::idl::WireWriter writer(reader);
2026 if (!helper.reply.write(writer)) {
2027 return false;
2028 }
2029 reader.accept();
2030 return true;
2031 }
2034 if (!helper.cmd.readArgs(reader)) {
2035 return false;
2036 }
2037
2038 helper.call(this);
2039
2040 yarp::os::idl::WireWriter writer(reader);
2041 if (!helper.reply.write(writer)) {
2042 return false;
2043 }
2044 reader.accept();
2045 return true;
2046 }
2049 if (!helper.cmd.readArgs(reader)) {
2050 return false;
2051 }
2052
2053 helper.call(this);
2054
2055 yarp::os::idl::WireWriter writer(reader);
2056 if (!helper.reply.write(writer)) {
2057 return false;
2058 }
2059 reader.accept();
2060 return true;
2061 }
2064 if (!helper.cmd.readArgs(reader)) {
2065 return false;
2066 }
2067
2068 helper.call(this);
2069
2070 yarp::os::idl::WireWriter writer(reader);
2071 if (!helper.reply.write(writer)) {
2072 return false;
2073 }
2074 reader.accept();
2075 return true;
2076 }
2079 if (!helper.cmd.readArgs(reader)) {
2080 return false;
2081 }
2082
2083 helper.call(this);
2084
2085 yarp::os::idl::WireWriter writer(reader);
2086 if (!helper.reply.write(writer)) {
2087 return false;
2088 }
2089 reader.accept();
2090 return true;
2091 }
2094 if (!helper.cmd.readArgs(reader)) {
2095 return false;
2096 }
2097
2098 helper.call(this);
2099
2100 yarp::os::idl::WireWriter writer(reader);
2101 if (!helper.reply.write(writer)) {
2102 return false;
2103 }
2104 reader.accept();
2105 return true;
2106 }
2109 if (!helper.cmd.readArgs(reader)) {
2110 return false;
2111 }
2112
2113 helper.call(this);
2114
2115 yarp::os::idl::WireWriter writer(reader);
2116 if (!helper.reply.write(writer)) {
2117 return false;
2118 }
2119 reader.accept();
2120 return true;
2121 }
2122 if (tag == "help") {
2123 std::string functionName;
2124 if (!reader.readString(functionName)) {
2125 functionName = "--all";
2126 }
2127 auto help_strings = help(functionName);
2128 yarp::os::idl::WireWriter writer(reader);
2129 if (!writer.isNull()) {
2130 if (!writer.writeListHeader(2)) {
2131 return false;
2132 }
2133 if (!writer.writeTag("many", 1, 0)) {
2134 return false;
2135 }
2136 if (!writer.writeListBegin(0, help_strings.size())) {
2137 return false;
2138 }
2139 for (const auto& help_string : help_strings) {
2140 if (!writer.writeString(help_string)) {
2141 return false;
2142 }
2143 }
2144 if (!writer.writeListEnd()) {
2145 return false;
2146 }
2147 }
2148 reader.accept();
2149 return true;
2150 }
2151 if (reader.noMore()) {
2152 reader.fail();
2153 return false;
2154 }
2155 std::string next_tag = reader.readTag(1);
2156 if (next_tag.empty()) {
2157 break;
2158 }
2159 tag.append("_").append(next_tag);
2160 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
2161 }
2162 return false;
2163}
#define BOTTLE_TAG_INT32
Definition Bottle.h:21
#define BOTTLE_TAG_LIST
Definition Bottle.h:29
#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 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.
return_getAutoBrakeEnabled(*)(const std::int32_t) 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 writeTag(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 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_tag
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_help
static constexpr const char * s_prototype
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 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 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.
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 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.
return_getDesiredVelocityGroup(*)(const std::vector< std::int32_t > &) 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 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 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.
return_getDesiredVelocityOne(*)(const std::int32_t) funcptr_t
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 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 writeArgs(const yarp::os::idl::WireWriter &writer) const
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.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_isJointBraked(*)(const std::int32_t) 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 write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
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.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::int32_t, 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 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 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 read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const std::int32_t, const bool) funcptr_t
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_getDesiredVelocityGroup getDesiredVelocityGroupRPC(const std::vector< std::int32_t > &j) const
virtual yarp::dev::ReturnValue setManualBrakeActiveRPC(const std::int32_t j, const bool active)
virtual bool checkProtocolVersion()
virtual return_getDesiredVelocityAll getDesiredVelocityAllRPC() const
virtual yarp::dev::ReturnValue setAutoBrakeEnabledRPC(const std::int32_t j, const bool enabled)
virtual return_getAxes getAxesRPC() const
virtual return_getAutoBrakeEnabled getAutoBrakeEnabledRPC(const std::int32_t j) const
virtual return_isJointBraked isJointBrakedRPC(const std::int32_t j) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_getDesiredVelocityOne getDesiredVelocityOneRPC(const std::int32_t j) const
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 readString(std::string &str, bool *is_vocab=nullptr)
void readListBegin(yarp::os::idl::WireState &nstate, size_t &len)
bool readI32(std::int32_t &x)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool readBlock(char *const data, size_t len)
bool read(WirePortable &obj)
IDL-friendly state.
Definition WireState.h:17
IDL-friendly connection writer.
Definition WireWriter.h:28
bool writeBool(bool x, bool skip_tag=false) const
bool write(const WirePortable &obj) const
bool writeI32(std::int32_t x, bool skip_tag=false) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeBlock(const char *data, size_t len) const
bool writeString(const std::string &str, bool skip_tag=false) 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