YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
TestReturnValue.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6// Autogenerated by Thrift (based on compiler 0.14.1-yarped)
7// yarpidl_thrift version 2.0 - 11/11/2026
8// Protocol version: protocol_version=0, yarp_major=4, yarp_minor=0, yarp_patch=2
9// This is an automatically generated file.
10// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
11
12#include <yarp/conf/version.h>
13#include <TestReturnValue.h>
15#include <yarp/os/LogStream.h>
16
18
19#include <algorithm>
20
21namespace
22{
23 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "TestReturnValue")
24}
25
26//TestReturnValue_getRemoteProtocolVersion_helper declaration
37
39{
40 yarp::os::idl::WireWriter writer(connection);
41 if (!writer.writeListHeader(1)) {
42 return false;
43 }
44 if (!writer.writeString("getRemoteProtocolVersion")) {
45 return false;
46 }
47 return true;
48}
49
50bool TestReturnValue_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
51 {
52 yarp::os::idl::WireReader reader(connection);
53 if (!reader.readListHeader()) {
54 reader.fail();
55 return false;
56 }
57
58 if (!helper_proto.read(connection)) {
59 reader.fail();
60 return false;
61 }
62 return true;
63}
64
65//ProtocolVersion, client side
67 {
68 if(!yarp().canWrite()) {
69 yError(" Missing server method TestReturnValue::getRemoteProtocolVersion");
70 }
72 bool ok = yarp().write(helper, helper);
73 if (ok) {
74 return helper.helper_proto;}
75 else {
77 return failureproto;}
78}
79
80//ProtocolVersion, client side
82 {
83 auto locproto = this->getLocalProtocolVersion();
84 auto remproto = this->getRemoteProtocolVersion();
85 if (remproto.protocol_version != locproto.protocol_version)
86 {
87 yCError(SERVICE_LOG_COMPONENT) << "Invalid communication protocol.";
88 yCError(SERVICE_LOG_COMPONENT) << "Local Protocol Version: " << locproto.toString();
89 yCError(SERVICE_LOG_COMPONENT) << "Remote Protocol Version: " << remproto.toString();
90 return false;
91 }
92 return true;
93}
94
95//ProtocolVersion, server side
97{
99 //myproto.protocol_version using default value = 0
100 //to change this value add the following line to the .thrift file:
101 //const i16 protocol_version = <your_number_here>
102 myproto.protocol_version = 0;
106 return myproto;
107}
108
109// setValueRPC helper class declaration
111 public yarp::os::Portable
112{
113public:
115 explicit TestReturnValue_setValueRPC_helper(const std::int32_t value);
116 bool write(yarp::os::ConnectionWriter& connection) const override;
117 bool read(yarp::os::ConnectionReader& connection) override;
118
119 class Command :
121 {
122 public:
123 Command() = default;
124 explicit Command(const std::int32_t value);
125
126 ~Command() override = default;
127
128 bool write(yarp::os::ConnectionWriter& connection) const override;
129 bool read(yarp::os::ConnectionReader& connection) override;
130
131 bool write(const yarp::os::idl::WireWriter& writer) const override;
132 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
133 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
134
135 bool read(yarp::os::idl::WireReader& reader) override;
138
139 std::int32_t value{0};
140 };
141
142 class Reply :
144 {
145 public:
146 Reply() = default;
147 ~Reply() override = default;
148
149 bool write(yarp::os::ConnectionWriter& connection) const override;
150 bool read(yarp::os::ConnectionReader& connection) override;
151
152 bool write(const yarp::os::idl::WireWriter& writer) const override;
153 bool read(yarp::os::idl::WireReader& reader) override;
154
156 };
157
158 using funcptr_t = yarp::dev::ReturnValue (*)(const std::int32_t);
159 void call(TestReturnValue* ptr);
160
163
164 static constexpr const char* s_tag{"setValueRPC"};
165 static constexpr size_t s_tag_len{1};
166 static constexpr size_t s_cmd_len{2};
167 static constexpr size_t s_reply_len{1};
168 static constexpr const char* s_prototype{"yarp::dev::ReturnValue TestReturnValue::setValueRPC(const std::int32_t value)"};
169 static constexpr const char* s_help{""};
170};
171
172// getValueRPC helper class declaration
174 public yarp::os::Portable
175{
176public:
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() override = default;
187
188 bool write(yarp::os::ConnectionWriter& connection) const override;
189 bool read(yarp::os::ConnectionReader& connection) override;
190
191 bool write(const yarp::os::idl::WireWriter& writer) const override;
192 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
193 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
194
195 bool read(yarp::os::idl::WireReader& reader) override;
198 };
199
200 class Reply :
202 {
203 public:
204 Reply() = default;
205 ~Reply() override = default;
206
207 bool write(yarp::os::ConnectionWriter& connection) const override;
208 bool read(yarp::os::ConnectionReader& connection) override;
209
210 bool write(const yarp::os::idl::WireWriter& writer) const override;
211 bool read(yarp::os::idl::WireReader& reader) override;
212
214 };
215
217 void call(TestReturnValue* ptr);
218
221
222 static constexpr const char* s_tag{"getValueRPC"};
223 static constexpr size_t s_tag_len{1};
224 static constexpr size_t s_cmd_len{1};
225 static constexpr size_t s_reply_len{2};
226 static constexpr const char* s_prototype{"return_getValue TestReturnValue::getValueRPC()"};
227 static constexpr const char* s_help{""};
228};
229
230// getTwoValuesRPC helper class declaration
232 public yarp::os::Portable
233{
234public:
236 bool write(yarp::os::ConnectionWriter& connection) const override;
237 bool read(yarp::os::ConnectionReader& connection) override;
238
239 class Command :
241 {
242 public:
243 Command() = default;
244 ~Command() override = default;
245
246 bool write(yarp::os::ConnectionWriter& connection) const override;
247 bool read(yarp::os::ConnectionReader& connection) override;
248
249 bool write(const yarp::os::idl::WireWriter& writer) const override;
250 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
251 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
252
253 bool read(yarp::os::idl::WireReader& reader) override;
256 };
257
258 class Reply :
260 {
261 public:
262 Reply() = default;
263 ~Reply() override = default;
264
265 bool write(yarp::os::ConnectionWriter& connection) const override;
266 bool read(yarp::os::ConnectionReader& connection) override;
267
268 bool write(const yarp::os::idl::WireWriter& writer) const override;
269 bool read(yarp::os::idl::WireReader& reader) override;
270
272 };
273
275 void call(TestReturnValue* ptr);
276
279
280 static constexpr const char* s_tag{"getTwoValuesRPC"};
281 static constexpr size_t s_tag_len{1};
282 static constexpr size_t s_cmd_len{1};
283 static constexpr size_t s_reply_len{3};
284 static constexpr const char* s_prototype{"return_getTwoValues TestReturnValue::getTwoValuesRPC()"};
285 static constexpr const char* s_help{""};
286};
287
288// getBoolRPC helper class declaration
290 public yarp::os::Portable
291{
292public:
294 bool write(yarp::os::ConnectionWriter& connection) const override;
295 bool read(yarp::os::ConnectionReader& connection) override;
296
297 class Command :
299 {
300 public:
301 Command() = default;
302 ~Command() override = default;
303
304 bool write(yarp::os::ConnectionWriter& connection) const override;
305 bool read(yarp::os::ConnectionReader& connection) override;
306
307 bool write(const yarp::os::idl::WireWriter& writer) const override;
308 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
309 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
310
311 bool read(yarp::os::idl::WireReader& reader) override;
314 };
315
316 class Reply :
318 {
319 public:
320 Reply() = default;
321 ~Reply() override = default;
322
323 bool write(yarp::os::ConnectionWriter& connection) const override;
324 bool read(yarp::os::ConnectionReader& connection) override;
325
326 bool write(const yarp::os::idl::WireWriter& writer) const override;
327 bool read(yarp::os::idl::WireReader& reader) override;
328
329 bool return_helper{false};
330 };
331
332 using funcptr_t = bool (*)();
333 void call(TestReturnValue* ptr);
334
337
338 static constexpr const char* s_tag{"getBoolRPC"};
339 static constexpr size_t s_tag_len{1};
340 static constexpr size_t s_cmd_len{1};
341 static constexpr size_t s_reply_len{1};
342 static constexpr const char* s_prototype{"bool TestReturnValue::getBoolRPC()"};
343 static constexpr const char* s_help{""};
344};
345
346// setValueRPC helper class implementation
348 cmd{value}
349{
350}
351
353{
354 return cmd.write(connection);
355}
356
358{
359 return reply.read(connection);
360}
361
363 value{value}
364{
365}
366
368{
369 yarp::os::idl::WireWriter writer(connection);
370 if (!writer.writeListHeader(s_cmd_len)) {
371 return false;
372 }
373 return write(writer);
374}
375
377{
378 yarp::os::idl::WireReader reader(connection);
379 if (!reader.readListHeader()) {
380 reader.fail();
381 return false;
382 }
383 return read(reader);
384}
385
387{
388 if (!writeTag(writer)) {
389 return false;
390 }
391 if (!writeArgs(writer)) {
392 return false;
393 }
394 return true;
395}
396
398{
399 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
400 return false;
401 }
402 return true;
403}
404
406{
407 if (!writer.writeI32(value)) {
408 return false;
409 }
410 return true;
411}
412
414{
415 if (!readTag(reader)) {
416 return false;
417 }
418 if (!readArgs(reader)) {
419 return false;
420 }
421 return true;
422}
423
425{
426 std::string tag = reader.readTag(s_tag_len);
427 if (reader.isError()) {
428 return false;
429 }
430 if (tag != s_tag) {
431 reader.fail();
432 return false;
433 }
434 return true;
435}
436
438{
439 if (reader.noMore()) {
440 reader.fail();
441 return false;
442 }
443 if (!reader.readI32(value)) {
444 reader.fail();
445 return false;
446 }
447 if (!reader.noMore()) {
448 reader.fail();
449 return false;
450 }
451 return true;
452}
453
455{
456 yarp::os::idl::WireWriter writer(connection);
457 return write(writer);
458}
459
461{
462 yarp::os::idl::WireReader reader(connection);
463 return read(reader);
464}
465
467{
468 if (!writer.isNull()) {
469 if (!writer.write(return_helper)) {
470 return false;
471 }
472 }
473 return true;
474}
475
477{
478 if (reader.noMore()) {
479 reader.fail();
480 return false;
481 }
482 if (!reader.read(return_helper)) {
483 reader.fail();
484 return false;
485 }
486 return true;
487}
488
493
494// getValueRPC helper class implementation
496{
497 return cmd.write(connection);
498}
499
501{
502 return reply.read(connection);
503}
504
506{
507 yarp::os::idl::WireWriter writer(connection);
508 if (!writer.writeListHeader(s_cmd_len)) {
509 return false;
510 }
511 return write(writer);
512}
513
515{
516 yarp::os::idl::WireReader reader(connection);
517 if (!reader.readListHeader()) {
518 reader.fail();
519 return false;
520 }
521 return read(reader);
522}
523
525{
526 if (!writeTag(writer)) {
527 return false;
528 }
529 if (!writeArgs(writer)) {
530 return false;
531 }
532 return true;
533}
534
536{
537 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
538 return false;
539 }
540 return true;
541}
542
544{
545 return true;
546}
547
549{
550 if (!readTag(reader)) {
551 return false;
552 }
553 if (!readArgs(reader)) {
554 return false;
555 }
556 return true;
557}
558
560{
561 std::string tag = reader.readTag(s_tag_len);
562 if (reader.isError()) {
563 return false;
564 }
565 if (tag != s_tag) {
566 reader.fail();
567 return false;
568 }
569 return true;
570}
571
573{
574 if (!reader.noMore()) {
575 reader.fail();
576 return false;
577 }
578 return true;
579}
580
582{
583 yarp::os::idl::WireWriter writer(connection);
584 return write(writer);
585}
586
588{
589 yarp::os::idl::WireReader reader(connection);
590 return read(reader);
591}
592
594{
595 if (!writer.isNull()) {
596 if (!writer.writeListHeader(s_reply_len)) {
597 return false;
598 }
599 if (!writer.write(return_helper)) {
600 return false;
601 }
602 }
603 return true;
604}
605
607{
608 if (!reader.readListReturn()) {
609 return false;
610 }
611 if (reader.noMore()) {
612 reader.fail();
613 return false;
614 }
615 if (!reader.read(return_helper)) {
616 reader.fail();
617 return false;
618 }
619 return true;
620}
621
626
627// getTwoValuesRPC helper class implementation
629{
630 return cmd.write(connection);
631}
632
634{
635 return reply.read(connection);
636}
637
639{
640 yarp::os::idl::WireWriter writer(connection);
641 if (!writer.writeListHeader(s_cmd_len)) {
642 return false;
643 }
644 return write(writer);
645}
646
648{
649 yarp::os::idl::WireReader reader(connection);
650 if (!reader.readListHeader()) {
651 reader.fail();
652 return false;
653 }
654 return read(reader);
655}
656
658{
659 if (!writeTag(writer)) {
660 return false;
661 }
662 if (!writeArgs(writer)) {
663 return false;
664 }
665 return true;
666}
667
669{
670 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
671 return false;
672 }
673 return true;
674}
675
677{
678 return true;
679}
680
682{
683 if (!readTag(reader)) {
684 return false;
685 }
686 if (!readArgs(reader)) {
687 return false;
688 }
689 return true;
690}
691
693{
694 std::string tag = reader.readTag(s_tag_len);
695 if (reader.isError()) {
696 return false;
697 }
698 if (tag != s_tag) {
699 reader.fail();
700 return false;
701 }
702 return true;
703}
704
706{
707 if (!reader.noMore()) {
708 reader.fail();
709 return false;
710 }
711 return true;
712}
713
715{
716 yarp::os::idl::WireWriter writer(connection);
717 return write(writer);
718}
719
721{
722 yarp::os::idl::WireReader reader(connection);
723 return read(reader);
724}
725
727{
728 if (!writer.isNull()) {
729 if (!writer.writeListHeader(s_reply_len)) {
730 return false;
731 }
732 if (!writer.write(return_helper)) {
733 return false;
734 }
735 }
736 return true;
737}
738
740{
741 if (!reader.readListReturn()) {
742 return false;
743 }
744 if (reader.noMore()) {
745 reader.fail();
746 return false;
747 }
748 if (!reader.read(return_helper)) {
749 reader.fail();
750 return false;
751 }
752 return true;
753}
754
759
760// getBoolRPC helper class implementation
762{
763 return cmd.write(connection);
764}
765
767{
768 return reply.read(connection);
769}
770
772{
773 yarp::os::idl::WireWriter writer(connection);
774 if (!writer.writeListHeader(s_cmd_len)) {
775 return false;
776 }
777 return write(writer);
778}
779
781{
782 yarp::os::idl::WireReader reader(connection);
783 if (!reader.readListHeader()) {
784 reader.fail();
785 return false;
786 }
787 return read(reader);
788}
789
791{
792 if (!writeTag(writer)) {
793 return false;
794 }
795 if (!writeArgs(writer)) {
796 return false;
797 }
798 return true;
799}
800
802{
803 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
804 return false;
805 }
806 return true;
807}
808
810{
811 return true;
812}
813
815{
816 if (!readTag(reader)) {
817 return false;
818 }
819 if (!readArgs(reader)) {
820 return false;
821 }
822 return true;
823}
824
826{
827 std::string tag = reader.readTag(s_tag_len);
828 if (reader.isError()) {
829 return false;
830 }
831 if (tag != s_tag) {
832 reader.fail();
833 return false;
834 }
835 return true;
836}
837
839{
840 if (!reader.noMore()) {
841 reader.fail();
842 return false;
843 }
844 return true;
845}
846
848{
849 yarp::os::idl::WireWriter writer(connection);
850 return write(writer);
851}
852
854{
855 yarp::os::idl::WireReader reader(connection);
856 return read(reader);
857}
858
860{
861 if (!writer.isNull()) {
862 if (!writer.writeListHeader(s_reply_len)) {
863 return false;
864 }
865 if (!writer.writeBool(return_helper)) {
866 return false;
867 }
868 }
869 return true;
870}
871
873{
874 if (!reader.readListReturn()) {
875 return false;
876 }
877 if (reader.noMore()) {
878 reader.fail();
879 return false;
880 }
881 if (!reader.readBool(return_helper)) {
882 reader.fail();
883 return false;
884 }
885 return true;
886}
887
892
893// Constructor
895{
896 yarp().setOwner(*this);
897}
898
900{
901 if (!yarp().canWrite()) {
902 yError("Missing server method '%s'?", TestReturnValue_setValueRPC_helper::s_prototype);
903 }
905 bool ok = yarp().write(helper, helper);
907}
908
910{
911 if (!yarp().canWrite()) {
912 yError("Missing server method '%s'?", TestReturnValue_getValueRPC_helper::s_prototype);
913 }
915 bool ok = yarp().write(helper, helper);
916 if (!ok) {
917 return_getValue failed_reply{};
919 return failed_reply;
920 }
921 return helper.reply.return_helper;
922}
923
925{
926 if (!yarp().canWrite()) {
927 yError("Missing server method '%s'?", TestReturnValue_getTwoValuesRPC_helper::s_prototype);
928 }
930 bool ok = yarp().write(helper, helper);
931 if (!ok) {
932 return_getTwoValues failed_reply{};
935 return failed_reply;
936 }
937 return helper.reply.return_helper;
938}
939
941{
942 if (!yarp().canWrite()) {
943 yError("Missing server method '%s'?", TestReturnValue_getBoolRPC_helper::s_prototype);
944 }
946 bool ok = yarp().write(helper, helper);
947 return ok ? helper.reply.return_helper : bool{};
948}
949
950// help method
951std::vector<std::string> TestReturnValue::help(const std::string& functionName)
952{
953 bool showAll = (functionName == "--all");
954 std::vector<std::string> helpString;
955 if (showAll) {
956 helpString.emplace_back("*** Available commands:");
957 helpString.emplace_back(TestReturnValue_setValueRPC_helper::s_tag);
958 helpString.emplace_back(TestReturnValue_getValueRPC_helper::s_tag);
959 helpString.emplace_back(TestReturnValue_getTwoValuesRPC_helper::s_tag);
960 helpString.emplace_back(TestReturnValue_getBoolRPC_helper::s_tag);
961 helpString.emplace_back("help");
962 } else {
963 if (functionName == TestReturnValue_setValueRPC_helper::s_tag) {
965 }
966 if (functionName == TestReturnValue_getValueRPC_helper::s_tag) {
968 }
971 }
972 if (functionName == TestReturnValue_getBoolRPC_helper::s_tag) {
973 helpString.emplace_back(TestReturnValue_getBoolRPC_helper::s_prototype);
974 }
975 if (functionName == "help") {
976 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
977 helpString.emplace_back("Return list of available commands, or help message for a specific function");
978 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");
979 helpString.emplace_back("@return list of strings (one string per line)");
980 }
981 }
982 if (helpString.empty()) {
983 helpString.emplace_back("Command not found");
984 }
985 return helpString;
986}
987
988// read from ConnectionReader
990{
991 constexpr size_t max_tag_len = 1;
992 size_t tag_len = 1;
993
994 yarp::os::idl::WireReader reader(connection);
995 reader.expectAccept();
996 if (!reader.readListHeader()) {
997 reader.fail();
998 return false;
999 }
1000
1001 std::string tag = reader.readTag(1);
1002 bool direct = (tag == "__direct__");
1003 if (direct) {
1004 tag = reader.readTag(1);
1005 }
1006 while (tag_len <= max_tag_len && !reader.isError()) {
1007 if(tag == "getRemoteProtocolVersion") {
1008 if (!reader.noMore()) {
1009 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1010 reader.fail();
1011 return false;
1012 }
1013
1014 auto proto = getLocalProtocolVersion();
1015
1016 yarp::os::idl::WireWriter writer(reader);
1017 if (!writer.writeListHeader(1)) {
1018 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1019 return false;}
1020 if (!writer.write(proto)) {
1021 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
1022 return false;
1023 }
1024 reader.accept();
1025 return true;
1026 }
1029 if (!helper.cmd.readArgs(reader)) {
1030 return false;
1031 }
1032
1033 helper.call(this);
1034
1035 yarp::os::idl::WireWriter writer(reader);
1036 if (!helper.reply.write(writer)) {
1037 return false;
1038 }
1039 reader.accept();
1040 return true;
1041 }
1044 if (!helper.cmd.readArgs(reader)) {
1045 return false;
1046 }
1047
1048 helper.call(this);
1049
1050 yarp::os::idl::WireWriter writer(reader);
1051 if (!helper.reply.write(writer)) {
1052 return false;
1053 }
1054 reader.accept();
1055 return true;
1056 }
1059 if (!helper.cmd.readArgs(reader)) {
1060 return false;
1061 }
1062
1063 helper.call(this);
1064
1065 yarp::os::idl::WireWriter writer(reader);
1066 if (!helper.reply.write(writer)) {
1067 return false;
1068 }
1069 reader.accept();
1070 return true;
1071 }
1074 if (!helper.cmd.readArgs(reader)) {
1075 return false;
1076 }
1077
1078 helper.call(this);
1079
1080 yarp::os::idl::WireWriter writer(reader);
1081 if (!helper.reply.write(writer)) {
1082 return false;
1083 }
1084 reader.accept();
1085 return true;
1086 }
1087 if (tag == "help") {
1088 std::string functionName;
1089 if (!reader.readString(functionName)) {
1090 functionName = "--all";
1091 }
1092 auto help_strings = help(functionName);
1093 yarp::os::idl::WireWriter writer(reader);
1094 if (!writer.isNull()) {
1095 if (!writer.writeListHeader(2)) {
1096 return false;
1097 }
1098 if (!writer.writeTag("many", 1, 0)) {
1099 return false;
1100 }
1101 if (!writer.writeListBegin(0, help_strings.size())) {
1102 return false;
1103 }
1104 for (const auto& help_string : help_strings) {
1105 if (!writer.writeString(help_string)) {
1106 return false;
1107 }
1108 }
1109 if (!writer.writeListEnd()) {
1110 return false;
1111 }
1112 }
1113 reader.accept();
1114 return true;
1115 }
1116 if (reader.noMore()) {
1117 reader.fail();
1118 return false;
1119 }
1120 std::string next_tag = reader.readTag(1);
1121 if (next_tag.empty()) {
1122 break;
1123 }
1124 tag.append("_").append(next_tag);
1125 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
1126 }
1127 return false;
1128}
#define yError(...)
Definition Log.h:361
#define __YFUNCTION__
Definition Log.h:24
#define yWarning(...)
Definition Log.h:340
bool readArgs(yarp::os::idl::WireReader &reader)
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 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
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
static constexpr size_t s_reply_len
static constexpr const char * s_prototype
void call(TestReturnValue *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.
yarp::os::ApplicationNetworkProtocolVersion helper_proto
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 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 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.
static constexpr const char * s_help
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
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 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 read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(TestReturnValue *ptr)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_help
bool readArgs(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 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.
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::int32_t) funcptr_t
void call(TestReturnValue *ptr)
static constexpr const char * s_help
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
virtual return_getTwoValues getTwoValuesRPC()
virtual bool checkProtocolVersion()
virtual return_getValue getValueRPC()
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
virtual yarp::dev::ReturnValue setValueRPC(const std::int32_t value)
virtual bool getBoolRPC()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
@ return_value_error_nws_nwc_communication_error
Method is not (yet) implemented.
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
Definition Wire.h:28
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
Definition WireReader.h:27
bool readString(std::string &str, bool *is_vocab=nullptr)
bool readI32(std::int32_t &x)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
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 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