YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ISpeechSynthesizerMsgs.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>
14#include <yarp/os/LogStream.h>
15
17
18#include <algorithm>
19
20namespace
21{
22 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "ISpeechSynthesizerMsgs")
23}
24
25//ISpeechSynthesizerMsgs_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 ISpeechSynthesizerMsgs_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 ISpeechSynthesizerMsgs::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// set_language helper class declaration
110 public yarp::os::Portable
111{
112public:
114 explicit ISpeechSynthesizerMsgs_set_language_helper(const std::string& language);
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::string& language);
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 language{};
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_set_language (*)(const std::string&);
158 void call(ISpeechSynthesizerMsgs* ptr);
159
162
163 static constexpr const char* s_tag{"set_language"};
164 static constexpr size_t s_tag_len{2};
165 static constexpr size_t s_cmd_len{3};
166 static constexpr size_t s_reply_len{1};
167 static constexpr const char* s_prototype{"return_set_language ISpeechSynthesizerMsgs::set_language(const std::string& language)"};
168 static constexpr const char* s_help{""};
169};
170
171// get_language helper class declaration
173 public yarp::os::Portable
174{
175public:
177 bool write(yarp::os::ConnectionWriter& connection) const override;
178 bool read(yarp::os::ConnectionReader& connection) override;
179
180 class Command :
182 {
183 public:
184 Command() = default;
185 ~Command() override = default;
186
187 bool write(yarp::os::ConnectionWriter& connection) const override;
188 bool read(yarp::os::ConnectionReader& connection) override;
189
190 bool write(const yarp::os::idl::WireWriter& writer) const override;
191 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
192 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
193
194 bool read(yarp::os::idl::WireReader& reader) override;
197 };
198
199 class Reply :
201 {
202 public:
203 Reply() = default;
204 ~Reply() override = default;
205
206 bool write(yarp::os::ConnectionWriter& connection) const override;
207 bool read(yarp::os::ConnectionReader& connection) override;
208
209 bool write(const yarp::os::idl::WireWriter& writer) const override;
210 bool read(yarp::os::idl::WireReader& reader) override;
211
213 };
214
216 void call(ISpeechSynthesizerMsgs* ptr);
217
220
221 static constexpr const char* s_tag{"get_language"};
222 static constexpr size_t s_tag_len{2};
223 static constexpr size_t s_cmd_len{2};
224 static constexpr size_t s_reply_len{2};
225 static constexpr const char* s_prototype{"return_get_language ISpeechSynthesizerMsgs::get_language()"};
226 static constexpr const char* s_help{""};
227};
228
229// set_voice helper class declaration
231 public yarp::os::Portable
232{
233public:
235 explicit ISpeechSynthesizerMsgs_set_voice_helper(const std::string& language);
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 explicit Command(const std::string& language);
245
246 ~Command() override = default;
247
248 bool write(yarp::os::ConnectionWriter& connection) const override;
249 bool read(yarp::os::ConnectionReader& connection) override;
250
251 bool write(const yarp::os::idl::WireWriter& writer) const override;
252 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
253 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
254
255 bool read(yarp::os::idl::WireReader& reader) override;
258
259 std::string language{};
260 };
261
262 class Reply :
264 {
265 public:
266 Reply() = default;
267 ~Reply() override = default;
268
269 bool write(yarp::os::ConnectionWriter& connection) const override;
270 bool read(yarp::os::ConnectionReader& connection) override;
271
272 bool write(const yarp::os::idl::WireWriter& writer) const override;
273 bool read(yarp::os::idl::WireReader& reader) override;
274
276 };
277
278 using funcptr_t = return_set_voice (*)(const std::string&);
279 void call(ISpeechSynthesizerMsgs* ptr);
280
283
284 static constexpr const char* s_tag{"set_voice"};
285 static constexpr size_t s_tag_len{2};
286 static constexpr size_t s_cmd_len{3};
287 static constexpr size_t s_reply_len{1};
288 static constexpr const char* s_prototype{"return_set_voice ISpeechSynthesizerMsgs::set_voice(const std::string& language)"};
289 static constexpr const char* s_help{""};
290};
291
292// get_voice helper class declaration
294 public yarp::os::Portable
295{
296public:
298 bool write(yarp::os::ConnectionWriter& connection) const override;
299 bool read(yarp::os::ConnectionReader& connection) override;
300
301 class Command :
303 {
304 public:
305 Command() = default;
306 ~Command() override = default;
307
308 bool write(yarp::os::ConnectionWriter& connection) const override;
309 bool read(yarp::os::ConnectionReader& connection) override;
310
311 bool write(const yarp::os::idl::WireWriter& writer) const override;
312 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
313 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
314
315 bool read(yarp::os::idl::WireReader& reader) override;
318 };
319
320 class Reply :
322 {
323 public:
324 Reply() = default;
325 ~Reply() override = default;
326
327 bool write(yarp::os::ConnectionWriter& connection) const override;
328 bool read(yarp::os::ConnectionReader& connection) override;
329
330 bool write(const yarp::os::idl::WireWriter& writer) const override;
331 bool read(yarp::os::idl::WireReader& reader) override;
332
334 };
335
337 void call(ISpeechSynthesizerMsgs* ptr);
338
341
342 static constexpr const char* s_tag{"get_voice"};
343 static constexpr size_t s_tag_len{2};
344 static constexpr size_t s_cmd_len{2};
345 static constexpr size_t s_reply_len{2};
346 static constexpr const char* s_prototype{"return_get_voice ISpeechSynthesizerMsgs::get_voice()"};
347 static constexpr const char* s_help{""};
348};
349
350// set_speed helper class declaration
352 public yarp::os::Portable
353{
354public:
356 explicit ISpeechSynthesizerMsgs_set_speed_helper(const double speed);
357 bool write(yarp::os::ConnectionWriter& connection) const override;
358 bool read(yarp::os::ConnectionReader& connection) override;
359
360 class Command :
362 {
363 public:
364 Command() = default;
365 explicit Command(const double speed);
366
367 ~Command() override = default;
368
369 bool write(yarp::os::ConnectionWriter& connection) const override;
370 bool read(yarp::os::ConnectionReader& connection) override;
371
372 bool write(const yarp::os::idl::WireWriter& writer) const override;
373 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
374 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
375
376 bool read(yarp::os::idl::WireReader& reader) override;
379
380 double speed{0.0};
381 };
382
383 class Reply :
385 {
386 public:
387 Reply() = default;
388 ~Reply() override = default;
389
390 bool write(yarp::os::ConnectionWriter& connection) const override;
391 bool read(yarp::os::ConnectionReader& connection) override;
392
393 bool write(const yarp::os::idl::WireWriter& writer) const override;
394 bool read(yarp::os::idl::WireReader& reader) override;
395
397 };
398
399 using funcptr_t = return_set_speed (*)(const double);
400 void call(ISpeechSynthesizerMsgs* ptr);
401
404
405 static constexpr const char* s_tag{"set_speed"};
406 static constexpr size_t s_tag_len{2};
407 static constexpr size_t s_cmd_len{3};
408 static constexpr size_t s_reply_len{1};
409 static constexpr const char* s_prototype{"return_set_speed ISpeechSynthesizerMsgs::set_speed(const double speed)"};
410 static constexpr const char* s_help{""};
411};
412
413// get_speed helper class declaration
415 public yarp::os::Portable
416{
417public:
419 bool write(yarp::os::ConnectionWriter& connection) const override;
420 bool read(yarp::os::ConnectionReader& connection) override;
421
422 class Command :
424 {
425 public:
426 Command() = default;
427 ~Command() override = default;
428
429 bool write(yarp::os::ConnectionWriter& connection) const override;
430 bool read(yarp::os::ConnectionReader& connection) override;
431
432 bool write(const yarp::os::idl::WireWriter& writer) const override;
433 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
434 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
435
436 bool read(yarp::os::idl::WireReader& reader) override;
439 };
440
441 class Reply :
443 {
444 public:
445 Reply() = default;
446 ~Reply() override = default;
447
448 bool write(yarp::os::ConnectionWriter& connection) const override;
449 bool read(yarp::os::ConnectionReader& connection) override;
450
451 bool write(const yarp::os::idl::WireWriter& writer) const override;
452 bool read(yarp::os::idl::WireReader& reader) override;
453
455 };
456
458 void call(ISpeechSynthesizerMsgs* ptr);
459
462
463 static constexpr const char* s_tag{"get_speed"};
464 static constexpr size_t s_tag_len{2};
465 static constexpr size_t s_cmd_len{2};
466 static constexpr size_t s_reply_len{2};
467 static constexpr const char* s_prototype{"return_get_speed ISpeechSynthesizerMsgs::get_speed()"};
468 static constexpr const char* s_help{""};
469};
470
471// set_pitch helper class declaration
473 public yarp::os::Portable
474{
475public:
477 explicit ISpeechSynthesizerMsgs_set_pitch_helper(const double pitch);
478 bool write(yarp::os::ConnectionWriter& connection) const override;
479 bool read(yarp::os::ConnectionReader& connection) override;
480
481 class Command :
483 {
484 public:
485 Command() = default;
486 explicit Command(const double pitch);
487
488 ~Command() override = default;
489
490 bool write(yarp::os::ConnectionWriter& connection) const override;
491 bool read(yarp::os::ConnectionReader& connection) override;
492
493 bool write(const yarp::os::idl::WireWriter& writer) const override;
494 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
495 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
496
497 bool read(yarp::os::idl::WireReader& reader) override;
500
501 double pitch{0.0};
502 };
503
504 class Reply :
506 {
507 public:
508 Reply() = default;
509 ~Reply() override = default;
510
511 bool write(yarp::os::ConnectionWriter& connection) const override;
512 bool read(yarp::os::ConnectionReader& connection) override;
513
514 bool write(const yarp::os::idl::WireWriter& writer) const override;
515 bool read(yarp::os::idl::WireReader& reader) override;
516
518 };
519
520 using funcptr_t = return_set_pitch (*)(const double);
521 void call(ISpeechSynthesizerMsgs* ptr);
522
525
526 static constexpr const char* s_tag{"set_pitch"};
527 static constexpr size_t s_tag_len{2};
528 static constexpr size_t s_cmd_len{3};
529 static constexpr size_t s_reply_len{1};
530 static constexpr const char* s_prototype{"return_set_pitch ISpeechSynthesizerMsgs::set_pitch(const double pitch)"};
531 static constexpr const char* s_help{""};
532};
533
534// get_pitch helper class declaration
536 public yarp::os::Portable
537{
538public:
540 bool write(yarp::os::ConnectionWriter& connection) const override;
541 bool read(yarp::os::ConnectionReader& connection) override;
542
543 class Command :
545 {
546 public:
547 Command() = default;
548 ~Command() override = default;
549
550 bool write(yarp::os::ConnectionWriter& connection) const override;
551 bool read(yarp::os::ConnectionReader& connection) override;
552
553 bool write(const yarp::os::idl::WireWriter& writer) const override;
554 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
555 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
556
557 bool read(yarp::os::idl::WireReader& reader) override;
560 };
561
562 class Reply :
564 {
565 public:
566 Reply() = default;
567 ~Reply() override = default;
568
569 bool write(yarp::os::ConnectionWriter& connection) const override;
570 bool read(yarp::os::ConnectionReader& connection) override;
571
572 bool write(const yarp::os::idl::WireWriter& writer) const override;
573 bool read(yarp::os::idl::WireReader& reader) override;
574
576 };
577
579 void call(ISpeechSynthesizerMsgs* ptr);
580
583
584 static constexpr const char* s_tag{"get_pitch"};
585 static constexpr size_t s_tag_len{2};
586 static constexpr size_t s_cmd_len{2};
587 static constexpr size_t s_reply_len{2};
588 static constexpr const char* s_prototype{"return_get_pitch ISpeechSynthesizerMsgs::get_pitch()"};
589 static constexpr const char* s_help{""};
590};
591
592// synthesize helper class declaration
594 public yarp::os::Portable
595{
596public:
598 explicit ISpeechSynthesizerMsgs_synthesize_helper(const std::string& text);
599 bool write(yarp::os::ConnectionWriter& connection) const override;
600 bool read(yarp::os::ConnectionReader& connection) override;
601
602 class Command :
604 {
605 public:
606 Command() = default;
607 explicit Command(const std::string& text);
608
609 ~Command() override = default;
610
611 bool write(yarp::os::ConnectionWriter& connection) const override;
612 bool read(yarp::os::ConnectionReader& connection) override;
613
614 bool write(const yarp::os::idl::WireWriter& writer) const override;
615 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
616 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
617
618 bool read(yarp::os::idl::WireReader& reader) override;
621
622 std::string text{};
623 };
624
625 class Reply :
627 {
628 public:
629 Reply() = default;
630 ~Reply() override = default;
631
632 bool write(yarp::os::ConnectionWriter& connection) const override;
633 bool read(yarp::os::ConnectionReader& connection) override;
634
635 bool write(const yarp::os::idl::WireWriter& writer) const override;
636 bool read(yarp::os::idl::WireReader& reader) override;
637
639 };
640
641 using funcptr_t = return_synthesize (*)(const std::string&);
642 void call(ISpeechSynthesizerMsgs* ptr);
643
646
647 static constexpr const char* s_tag{"synthesize"};
648 static constexpr size_t s_tag_len{1};
649 static constexpr size_t s_cmd_len{2};
650 static constexpr size_t s_reply_len{2};
651 static constexpr const char* s_prototype{"return_synthesize ISpeechSynthesizerMsgs::synthesize(const std::string& text)"};
652 static constexpr const char* s_help{""};
653};
654
655// set_language helper class implementation
657 cmd{language}
658{
659}
660
662{
663 return cmd.write(connection);
664}
665
670
672 language{language}
673{
674}
675
677{
678 yarp::os::idl::WireWriter writer(connection);
679 if (!writer.writeListHeader(s_cmd_len)) {
680 return false;
681 }
682 return write(writer);
683}
684
686{
687 yarp::os::idl::WireReader reader(connection);
688 if (!reader.readListHeader()) {
689 reader.fail();
690 return false;
691 }
692 return read(reader);
693}
694
696{
697 if (!writeTag(writer)) {
698 return false;
699 }
700 if (!writeArgs(writer)) {
701 return false;
702 }
703 return true;
704}
705
707{
708 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
709 return false;
710 }
711 return true;
712}
713
715{
716 if (!writer.writeString(language)) {
717 return false;
718 }
719 return true;
720}
721
723{
724 if (!readTag(reader)) {
725 return false;
726 }
727 if (!readArgs(reader)) {
728 return false;
729 }
730 return true;
731}
732
734{
735 std::string tag = reader.readTag(s_tag_len);
736 if (reader.isError()) {
737 return false;
738 }
739 if (tag != s_tag) {
740 reader.fail();
741 return false;
742 }
743 return true;
744}
745
747{
748 if (reader.noMore()) {
749 reader.fail();
750 return false;
751 }
752 if (!reader.readString(language)) {
753 reader.fail();
754 return false;
755 }
756 if (!reader.noMore()) {
757 reader.fail();
758 return false;
759 }
760 return true;
761}
762
764{
765 yarp::os::idl::WireWriter writer(connection);
766 return write(writer);
767}
768
770{
771 yarp::os::idl::WireReader reader(connection);
772 return read(reader);
773}
774
776{
777 if (!writer.isNull()) {
778 if (!writer.writeListHeader(s_reply_len)) {
779 return false;
780 }
781 if (!writer.write(return_helper)) {
782 return false;
783 }
784 }
785 return true;
786}
787
789{
790 if (!reader.readListReturn()) {
791 return false;
792 }
793 if (reader.noMore()) {
794 reader.fail();
795 return false;
796 }
797 if (!reader.read(return_helper)) {
798 reader.fail();
799 return false;
800 }
801 return true;
802}
803
808
809// get_language helper class implementation
811{
812 return cmd.write(connection);
813}
814
819
821{
822 yarp::os::idl::WireWriter writer(connection);
823 if (!writer.writeListHeader(s_cmd_len)) {
824 return false;
825 }
826 return write(writer);
827}
828
830{
831 yarp::os::idl::WireReader reader(connection);
832 if (!reader.readListHeader()) {
833 reader.fail();
834 return false;
835 }
836 return read(reader);
837}
838
840{
841 if (!writeTag(writer)) {
842 return false;
843 }
844 if (!writeArgs(writer)) {
845 return false;
846 }
847 return true;
848}
849
851{
852 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
853 return false;
854 }
855 return true;
856}
857
859{
860 return true;
861}
862
864{
865 if (!readTag(reader)) {
866 return false;
867 }
868 if (!readArgs(reader)) {
869 return false;
870 }
871 return true;
872}
873
875{
876 std::string tag = reader.readTag(s_tag_len);
877 if (reader.isError()) {
878 return false;
879 }
880 if (tag != s_tag) {
881 reader.fail();
882 return false;
883 }
884 return true;
885}
886
888{
889 if (!reader.noMore()) {
890 reader.fail();
891 return false;
892 }
893 return true;
894}
895
897{
898 yarp::os::idl::WireWriter writer(connection);
899 return write(writer);
900}
901
903{
904 yarp::os::idl::WireReader reader(connection);
905 return read(reader);
906}
907
909{
910 if (!writer.isNull()) {
911 if (!writer.writeListHeader(s_reply_len)) {
912 return false;
913 }
914 if (!writer.write(return_helper)) {
915 return false;
916 }
917 }
918 return true;
919}
920
922{
923 if (!reader.readListReturn()) {
924 return false;
925 }
926 if (reader.noMore()) {
927 reader.fail();
928 return false;
929 }
930 if (!reader.read(return_helper)) {
931 reader.fail();
932 return false;
933 }
934 return true;
935}
936
941
942// set_voice helper class implementation
947
949{
950 return cmd.write(connection);
951}
952
954{
955 return reply.read(connection);
956}
957
959 language{language}
960{
961}
962
964{
965 yarp::os::idl::WireWriter writer(connection);
966 if (!writer.writeListHeader(s_cmd_len)) {
967 return false;
968 }
969 return write(writer);
970}
971
973{
974 yarp::os::idl::WireReader reader(connection);
975 if (!reader.readListHeader()) {
976 reader.fail();
977 return false;
978 }
979 return read(reader);
980}
981
983{
984 if (!writeTag(writer)) {
985 return false;
986 }
987 if (!writeArgs(writer)) {
988 return false;
989 }
990 return true;
991}
992
994{
995 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
996 return false;
997 }
998 return true;
999}
1000
1002{
1003 if (!writer.writeString(language)) {
1004 return false;
1005 }
1006 return true;
1007}
1008
1010{
1011 if (!readTag(reader)) {
1012 return false;
1013 }
1014 if (!readArgs(reader)) {
1015 return false;
1016 }
1017 return true;
1018}
1019
1021{
1022 std::string tag = reader.readTag(s_tag_len);
1023 if (reader.isError()) {
1024 return false;
1025 }
1026 if (tag != s_tag) {
1027 reader.fail();
1028 return false;
1029 }
1030 return true;
1031}
1032
1034{
1035 if (reader.noMore()) {
1036 reader.fail();
1037 return false;
1038 }
1039 if (!reader.readString(language)) {
1040 reader.fail();
1041 return false;
1042 }
1043 if (!reader.noMore()) {
1044 reader.fail();
1045 return false;
1046 }
1047 return true;
1048}
1049
1051{
1052 yarp::os::idl::WireWriter writer(connection);
1053 return write(writer);
1054}
1055
1057{
1058 yarp::os::idl::WireReader reader(connection);
1059 return read(reader);
1060}
1061
1063{
1064 if (!writer.isNull()) {
1065 if (!writer.writeListHeader(s_reply_len)) {
1066 return false;
1067 }
1068 if (!writer.write(return_helper)) {
1069 return false;
1070 }
1071 }
1072 return true;
1073}
1074
1076{
1077 if (!reader.readListReturn()) {
1078 return false;
1079 }
1080 if (reader.noMore()) {
1081 reader.fail();
1082 return false;
1083 }
1084 if (!reader.read(return_helper)) {
1085 reader.fail();
1086 return false;
1087 }
1088 return true;
1089}
1090
1095
1096// get_voice helper class implementation
1098{
1099 return cmd.write(connection);
1100}
1101
1103{
1104 return reply.read(connection);
1105}
1106
1108{
1109 yarp::os::idl::WireWriter writer(connection);
1110 if (!writer.writeListHeader(s_cmd_len)) {
1111 return false;
1112 }
1113 return write(writer);
1114}
1115
1117{
1118 yarp::os::idl::WireReader reader(connection);
1119 if (!reader.readListHeader()) {
1120 reader.fail();
1121 return false;
1122 }
1123 return read(reader);
1124}
1125
1127{
1128 if (!writeTag(writer)) {
1129 return false;
1130 }
1131 if (!writeArgs(writer)) {
1132 return false;
1133 }
1134 return true;
1135}
1136
1138{
1139 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1140 return false;
1141 }
1142 return true;
1143}
1144
1146{
1147 return true;
1148}
1149
1151{
1152 if (!readTag(reader)) {
1153 return false;
1154 }
1155 if (!readArgs(reader)) {
1156 return false;
1157 }
1158 return true;
1159}
1160
1162{
1163 std::string tag = reader.readTag(s_tag_len);
1164 if (reader.isError()) {
1165 return false;
1166 }
1167 if (tag != s_tag) {
1168 reader.fail();
1169 return false;
1170 }
1171 return true;
1172}
1173
1175{
1176 if (!reader.noMore()) {
1177 reader.fail();
1178 return false;
1179 }
1180 return true;
1181}
1182
1184{
1185 yarp::os::idl::WireWriter writer(connection);
1186 return write(writer);
1187}
1188
1190{
1191 yarp::os::idl::WireReader reader(connection);
1192 return read(reader);
1193}
1194
1196{
1197 if (!writer.isNull()) {
1198 if (!writer.writeListHeader(s_reply_len)) {
1199 return false;
1200 }
1201 if (!writer.write(return_helper)) {
1202 return false;
1203 }
1204 }
1205 return true;
1206}
1207
1209{
1210 if (!reader.readListReturn()) {
1211 return false;
1212 }
1213 if (reader.noMore()) {
1214 reader.fail();
1215 return false;
1216 }
1217 if (!reader.read(return_helper)) {
1218 reader.fail();
1219 return false;
1220 }
1221 return true;
1222}
1223
1228
1229// set_speed helper class implementation
1234
1236{
1237 return cmd.write(connection);
1238}
1239
1241{
1242 return reply.read(connection);
1243}
1244
1246 speed{speed}
1247{
1248}
1249
1251{
1252 yarp::os::idl::WireWriter writer(connection);
1253 if (!writer.writeListHeader(s_cmd_len)) {
1254 return false;
1255 }
1256 return write(writer);
1257}
1258
1260{
1261 yarp::os::idl::WireReader reader(connection);
1262 if (!reader.readListHeader()) {
1263 reader.fail();
1264 return false;
1265 }
1266 return read(reader);
1267}
1268
1270{
1271 if (!writeTag(writer)) {
1272 return false;
1273 }
1274 if (!writeArgs(writer)) {
1275 return false;
1276 }
1277 return true;
1278}
1279
1281{
1282 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1283 return false;
1284 }
1285 return true;
1286}
1287
1289{
1290 if (!writer.writeFloat64(speed)) {
1291 return false;
1292 }
1293 return true;
1294}
1295
1297{
1298 if (!readTag(reader)) {
1299 return false;
1300 }
1301 if (!readArgs(reader)) {
1302 return false;
1303 }
1304 return true;
1305}
1306
1308{
1309 std::string tag = reader.readTag(s_tag_len);
1310 if (reader.isError()) {
1311 return false;
1312 }
1313 if (tag != s_tag) {
1314 reader.fail();
1315 return false;
1316 }
1317 return true;
1318}
1319
1321{
1322 if (reader.noMore()) {
1323 reader.fail();
1324 return false;
1325 }
1326 if (!reader.readFloat64(speed)) {
1327 reader.fail();
1328 return false;
1329 }
1330 if (!reader.noMore()) {
1331 reader.fail();
1332 return false;
1333 }
1334 return true;
1335}
1336
1338{
1339 yarp::os::idl::WireWriter writer(connection);
1340 return write(writer);
1341}
1342
1344{
1345 yarp::os::idl::WireReader reader(connection);
1346 return read(reader);
1347}
1348
1350{
1351 if (!writer.isNull()) {
1352 if (!writer.writeListHeader(s_reply_len)) {
1353 return false;
1354 }
1355 if (!writer.write(return_helper)) {
1356 return false;
1357 }
1358 }
1359 return true;
1360}
1361
1363{
1364 if (!reader.readListReturn()) {
1365 return false;
1366 }
1367 if (reader.noMore()) {
1368 reader.fail();
1369 return false;
1370 }
1371 if (!reader.read(return_helper)) {
1372 reader.fail();
1373 return false;
1374 }
1375 return true;
1376}
1377
1382
1383// get_speed helper class implementation
1385{
1386 return cmd.write(connection);
1387}
1388
1390{
1391 return reply.read(connection);
1392}
1393
1395{
1396 yarp::os::idl::WireWriter writer(connection);
1397 if (!writer.writeListHeader(s_cmd_len)) {
1398 return false;
1399 }
1400 return write(writer);
1401}
1402
1404{
1405 yarp::os::idl::WireReader reader(connection);
1406 if (!reader.readListHeader()) {
1407 reader.fail();
1408 return false;
1409 }
1410 return read(reader);
1411}
1412
1414{
1415 if (!writeTag(writer)) {
1416 return false;
1417 }
1418 if (!writeArgs(writer)) {
1419 return false;
1420 }
1421 return true;
1422}
1423
1425{
1426 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1427 return false;
1428 }
1429 return true;
1430}
1431
1433{
1434 return true;
1435}
1436
1438{
1439 if (!readTag(reader)) {
1440 return false;
1441 }
1442 if (!readArgs(reader)) {
1443 return false;
1444 }
1445 return true;
1446}
1447
1449{
1450 std::string tag = reader.readTag(s_tag_len);
1451 if (reader.isError()) {
1452 return false;
1453 }
1454 if (tag != s_tag) {
1455 reader.fail();
1456 return false;
1457 }
1458 return true;
1459}
1460
1462{
1463 if (!reader.noMore()) {
1464 reader.fail();
1465 return false;
1466 }
1467 return true;
1468}
1469
1471{
1472 yarp::os::idl::WireWriter writer(connection);
1473 return write(writer);
1474}
1475
1477{
1478 yarp::os::idl::WireReader reader(connection);
1479 return read(reader);
1480}
1481
1483{
1484 if (!writer.isNull()) {
1485 if (!writer.writeListHeader(s_reply_len)) {
1486 return false;
1487 }
1488 if (!writer.write(return_helper)) {
1489 return false;
1490 }
1491 }
1492 return true;
1493}
1494
1496{
1497 if (!reader.readListReturn()) {
1498 return false;
1499 }
1500 if (reader.noMore()) {
1501 reader.fail();
1502 return false;
1503 }
1504 if (!reader.read(return_helper)) {
1505 reader.fail();
1506 return false;
1507 }
1508 return true;
1509}
1510
1515
1516// set_pitch helper class implementation
1521
1523{
1524 return cmd.write(connection);
1525}
1526
1528{
1529 return reply.read(connection);
1530}
1531
1533 pitch{pitch}
1534{
1535}
1536
1538{
1539 yarp::os::idl::WireWriter writer(connection);
1540 if (!writer.writeListHeader(s_cmd_len)) {
1541 return false;
1542 }
1543 return write(writer);
1544}
1545
1547{
1548 yarp::os::idl::WireReader reader(connection);
1549 if (!reader.readListHeader()) {
1550 reader.fail();
1551 return false;
1552 }
1553 return read(reader);
1554}
1555
1557{
1558 if (!writeTag(writer)) {
1559 return false;
1560 }
1561 if (!writeArgs(writer)) {
1562 return false;
1563 }
1564 return true;
1565}
1566
1568{
1569 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1570 return false;
1571 }
1572 return true;
1573}
1574
1576{
1577 if (!writer.writeFloat64(pitch)) {
1578 return false;
1579 }
1580 return true;
1581}
1582
1584{
1585 if (!readTag(reader)) {
1586 return false;
1587 }
1588 if (!readArgs(reader)) {
1589 return false;
1590 }
1591 return true;
1592}
1593
1595{
1596 std::string tag = reader.readTag(s_tag_len);
1597 if (reader.isError()) {
1598 return false;
1599 }
1600 if (tag != s_tag) {
1601 reader.fail();
1602 return false;
1603 }
1604 return true;
1605}
1606
1608{
1609 if (reader.noMore()) {
1610 reader.fail();
1611 return false;
1612 }
1613 if (!reader.readFloat64(pitch)) {
1614 reader.fail();
1615 return false;
1616 }
1617 if (!reader.noMore()) {
1618 reader.fail();
1619 return false;
1620 }
1621 return true;
1622}
1623
1625{
1626 yarp::os::idl::WireWriter writer(connection);
1627 return write(writer);
1628}
1629
1631{
1632 yarp::os::idl::WireReader reader(connection);
1633 return read(reader);
1634}
1635
1637{
1638 if (!writer.isNull()) {
1639 if (!writer.writeListHeader(s_reply_len)) {
1640 return false;
1641 }
1642 if (!writer.write(return_helper)) {
1643 return false;
1644 }
1645 }
1646 return true;
1647}
1648
1650{
1651 if (!reader.readListReturn()) {
1652 return false;
1653 }
1654 if (reader.noMore()) {
1655 reader.fail();
1656 return false;
1657 }
1658 if (!reader.read(return_helper)) {
1659 reader.fail();
1660 return false;
1661 }
1662 return true;
1663}
1664
1669
1670// get_pitch helper class implementation
1672{
1673 return cmd.write(connection);
1674}
1675
1677{
1678 return reply.read(connection);
1679}
1680
1682{
1683 yarp::os::idl::WireWriter writer(connection);
1684 if (!writer.writeListHeader(s_cmd_len)) {
1685 return false;
1686 }
1687 return write(writer);
1688}
1689
1691{
1692 yarp::os::idl::WireReader reader(connection);
1693 if (!reader.readListHeader()) {
1694 reader.fail();
1695 return false;
1696 }
1697 return read(reader);
1698}
1699
1701{
1702 if (!writeTag(writer)) {
1703 return false;
1704 }
1705 if (!writeArgs(writer)) {
1706 return false;
1707 }
1708 return true;
1709}
1710
1712{
1713 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1714 return false;
1715 }
1716 return true;
1717}
1718
1720{
1721 return true;
1722}
1723
1725{
1726 if (!readTag(reader)) {
1727 return false;
1728 }
1729 if (!readArgs(reader)) {
1730 return false;
1731 }
1732 return true;
1733}
1734
1736{
1737 std::string tag = reader.readTag(s_tag_len);
1738 if (reader.isError()) {
1739 return false;
1740 }
1741 if (tag != s_tag) {
1742 reader.fail();
1743 return false;
1744 }
1745 return true;
1746}
1747
1749{
1750 if (!reader.noMore()) {
1751 reader.fail();
1752 return false;
1753 }
1754 return true;
1755}
1756
1758{
1759 yarp::os::idl::WireWriter writer(connection);
1760 return write(writer);
1761}
1762
1764{
1765 yarp::os::idl::WireReader reader(connection);
1766 return read(reader);
1767}
1768
1770{
1771 if (!writer.isNull()) {
1772 if (!writer.writeListHeader(s_reply_len)) {
1773 return false;
1774 }
1775 if (!writer.write(return_helper)) {
1776 return false;
1777 }
1778 }
1779 return true;
1780}
1781
1783{
1784 if (!reader.readListReturn()) {
1785 return false;
1786 }
1787 if (reader.noMore()) {
1788 reader.fail();
1789 return false;
1790 }
1791 if (!reader.read(return_helper)) {
1792 reader.fail();
1793 return false;
1794 }
1795 return true;
1796}
1797
1802
1803// synthesize helper class implementation
1808
1810{
1811 return cmd.write(connection);
1812}
1813
1815{
1816 return reply.read(connection);
1817}
1818
1820 text{text}
1821{
1822}
1823
1825{
1826 yarp::os::idl::WireWriter writer(connection);
1827 if (!writer.writeListHeader(s_cmd_len)) {
1828 return false;
1829 }
1830 return write(writer);
1831}
1832
1834{
1835 yarp::os::idl::WireReader reader(connection);
1836 if (!reader.readListHeader()) {
1837 reader.fail();
1838 return false;
1839 }
1840 return read(reader);
1841}
1842
1844{
1845 if (!writeTag(writer)) {
1846 return false;
1847 }
1848 if (!writeArgs(writer)) {
1849 return false;
1850 }
1851 return true;
1852}
1853
1855{
1856 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1857 return false;
1858 }
1859 return true;
1860}
1861
1863{
1864 if (!writer.writeString(text)) {
1865 return false;
1866 }
1867 return true;
1868}
1869
1871{
1872 if (!readTag(reader)) {
1873 return false;
1874 }
1875 if (!readArgs(reader)) {
1876 return false;
1877 }
1878 return true;
1879}
1880
1882{
1883 std::string tag = reader.readTag(s_tag_len);
1884 if (reader.isError()) {
1885 return false;
1886 }
1887 if (tag != s_tag) {
1888 reader.fail();
1889 return false;
1890 }
1891 return true;
1892}
1893
1895{
1896 if (reader.noMore()) {
1897 reader.fail();
1898 return false;
1899 }
1900 if (!reader.readString(text)) {
1901 reader.fail();
1902 return false;
1903 }
1904 if (!reader.noMore()) {
1905 reader.fail();
1906 return false;
1907 }
1908 return true;
1909}
1910
1912{
1913 yarp::os::idl::WireWriter writer(connection);
1914 return write(writer);
1915}
1916
1918{
1919 yarp::os::idl::WireReader reader(connection);
1920 return read(reader);
1921}
1922
1924{
1925 if (!writer.isNull()) {
1926 if (!writer.writeListHeader(s_reply_len)) {
1927 return false;
1928 }
1929 if (!writer.write(return_helper)) {
1930 return false;
1931 }
1932 }
1933 return true;
1934}
1935
1937{
1938 if (!reader.readListReturn()) {
1939 return false;
1940 }
1941 if (reader.noMore()) {
1942 reader.fail();
1943 return false;
1944 }
1945 if (!reader.read(return_helper)) {
1946 reader.fail();
1947 return false;
1948 }
1949 return true;
1950}
1951
1956
1957// Constructor
1959{
1960 yarp().setOwner(*this);
1961}
1962
1964{
1965 if (!yarp().canWrite()) {
1967 }
1969 bool ok = yarp().write(helper, helper);
1970 return ok ? helper.reply.return_helper : return_set_language{};
1971}
1972
1974{
1975 if (!yarp().canWrite()) {
1977 }
1979 bool ok = yarp().write(helper, helper);
1980 return ok ? helper.reply.return_helper : return_get_language{};
1981}
1982
1984{
1985 if (!yarp().canWrite()) {
1986 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_set_voice_helper::s_prototype);
1987 }
1989 bool ok = yarp().write(helper, helper);
1990 return ok ? helper.reply.return_helper : return_set_voice{};
1991}
1992
1994{
1995 if (!yarp().canWrite()) {
1996 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_get_voice_helper::s_prototype);
1997 }
1999 bool ok = yarp().write(helper, helper);
2000 return ok ? helper.reply.return_helper : return_get_voice{};
2001}
2002
2004{
2005 if (!yarp().canWrite()) {
2006 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_set_speed_helper::s_prototype);
2007 }
2009 bool ok = yarp().write(helper, helper);
2010 return ok ? helper.reply.return_helper : return_set_speed{};
2011}
2012
2014{
2015 if (!yarp().canWrite()) {
2016 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_get_speed_helper::s_prototype);
2017 }
2019 bool ok = yarp().write(helper, helper);
2020 return ok ? helper.reply.return_helper : return_get_speed{};
2021}
2022
2024{
2025 if (!yarp().canWrite()) {
2026 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_set_pitch_helper::s_prototype);
2027 }
2029 bool ok = yarp().write(helper, helper);
2030 return ok ? helper.reply.return_helper : return_set_pitch{};
2031}
2032
2034{
2035 if (!yarp().canWrite()) {
2036 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_get_pitch_helper::s_prototype);
2037 }
2039 bool ok = yarp().write(helper, helper);
2040 return ok ? helper.reply.return_helper : return_get_pitch{};
2041}
2042
2044{
2045 if (!yarp().canWrite()) {
2046 yError("Missing server method '%s'?", ISpeechSynthesizerMsgs_synthesize_helper::s_prototype);
2047 }
2049 bool ok = yarp().write(helper, helper);
2050 return ok ? helper.reply.return_helper : return_synthesize{};
2051}
2052
2053// help method
2054std::vector<std::string> ISpeechSynthesizerMsgs::help(const std::string& functionName)
2055{
2056 bool showAll = (functionName == "--all");
2057 std::vector<std::string> helpString;
2058 if (showAll) {
2059 helpString.emplace_back("*** Available commands:");
2062 helpString.emplace_back(ISpeechSynthesizerMsgs_set_voice_helper::s_tag);
2063 helpString.emplace_back(ISpeechSynthesizerMsgs_get_voice_helper::s_tag);
2064 helpString.emplace_back(ISpeechSynthesizerMsgs_set_speed_helper::s_tag);
2065 helpString.emplace_back(ISpeechSynthesizerMsgs_get_speed_helper::s_tag);
2066 helpString.emplace_back(ISpeechSynthesizerMsgs_set_pitch_helper::s_tag);
2067 helpString.emplace_back(ISpeechSynthesizerMsgs_get_pitch_helper::s_tag);
2068 helpString.emplace_back(ISpeechSynthesizerMsgs_synthesize_helper::s_tag);
2069 helpString.emplace_back("help");
2070 } else {
2073 }
2076 }
2079 }
2082 }
2085 }
2088 }
2091 }
2094 }
2097 }
2098 if (functionName == "help") {
2099 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
2100 helpString.emplace_back("Return list of available commands, or help message for a specific function");
2101 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");
2102 helpString.emplace_back("@return list of strings (one string per line)");
2103 }
2104 }
2105 if (helpString.empty()) {
2106 helpString.emplace_back("Command not found");
2107 }
2108 return helpString;
2109}
2110
2111// read from ConnectionReader
2113{
2114 constexpr size_t max_tag_len = 2;
2115 size_t tag_len = 1;
2116
2117 yarp::os::idl::WireReader reader(connection);
2118 reader.expectAccept();
2119 if (!reader.readListHeader()) {
2120 reader.fail();
2121 return false;
2122 }
2123
2124 std::string tag = reader.readTag(1);
2125 bool direct = (tag == "__direct__");
2126 if (direct) {
2127 tag = reader.readTag(1);
2128 }
2129 while (tag_len <= max_tag_len && !reader.isError()) {
2130 if(tag == "getRemoteProtocolVersion") {
2131 if (!reader.noMore()) {
2132 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
2133 reader.fail();
2134 return false;
2135 }
2136
2137 auto proto = getLocalProtocolVersion();
2138
2139 yarp::os::idl::WireWriter writer(reader);
2140 if (!writer.writeListHeader(1)) {
2141 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
2142 return false;}
2143 if (!writer.write(proto)) {
2144 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
2145 return false;
2146 }
2147 reader.accept();
2148 return true;
2149 }
2152 if (!helper.cmd.readArgs(reader)) {
2153 return false;
2154 }
2155
2156 helper.call(this);
2157
2158 yarp::os::idl::WireWriter writer(reader);
2159 if (!helper.reply.write(writer)) {
2160 return false;
2161 }
2162 reader.accept();
2163 return true;
2164 }
2167 if (!helper.cmd.readArgs(reader)) {
2168 return false;
2169 }
2170
2171 helper.call(this);
2172
2173 yarp::os::idl::WireWriter writer(reader);
2174 if (!helper.reply.write(writer)) {
2175 return false;
2176 }
2177 reader.accept();
2178 return true;
2179 }
2182 if (!helper.cmd.readArgs(reader)) {
2183 return false;
2184 }
2185
2186 helper.call(this);
2187
2188 yarp::os::idl::WireWriter writer(reader);
2189 if (!helper.reply.write(writer)) {
2190 return false;
2191 }
2192 reader.accept();
2193 return true;
2194 }
2197 if (!helper.cmd.readArgs(reader)) {
2198 return false;
2199 }
2200
2201 helper.call(this);
2202
2203 yarp::os::idl::WireWriter writer(reader);
2204 if (!helper.reply.write(writer)) {
2205 return false;
2206 }
2207 reader.accept();
2208 return true;
2209 }
2212 if (!helper.cmd.readArgs(reader)) {
2213 return false;
2214 }
2215
2216 helper.call(this);
2217
2218 yarp::os::idl::WireWriter writer(reader);
2219 if (!helper.reply.write(writer)) {
2220 return false;
2221 }
2222 reader.accept();
2223 return true;
2224 }
2227 if (!helper.cmd.readArgs(reader)) {
2228 return false;
2229 }
2230
2231 helper.call(this);
2232
2233 yarp::os::idl::WireWriter writer(reader);
2234 if (!helper.reply.write(writer)) {
2235 return false;
2236 }
2237 reader.accept();
2238 return true;
2239 }
2242 if (!helper.cmd.readArgs(reader)) {
2243 return false;
2244 }
2245
2246 helper.call(this);
2247
2248 yarp::os::idl::WireWriter writer(reader);
2249 if (!helper.reply.write(writer)) {
2250 return false;
2251 }
2252 reader.accept();
2253 return true;
2254 }
2257 if (!helper.cmd.readArgs(reader)) {
2258 return false;
2259 }
2260
2261 helper.call(this);
2262
2263 yarp::os::idl::WireWriter writer(reader);
2264 if (!helper.reply.write(writer)) {
2265 return false;
2266 }
2267 reader.accept();
2268 return true;
2269 }
2272 if (!helper.cmd.readArgs(reader)) {
2273 return false;
2274 }
2275
2276 helper.call(this);
2277
2278 yarp::os::idl::WireWriter writer(reader);
2279 if (!helper.reply.write(writer)) {
2280 return false;
2281 }
2282 reader.accept();
2283 return true;
2284 }
2285 if (tag == "help") {
2286 std::string functionName;
2287 if (!reader.readString(functionName)) {
2288 functionName = "--all";
2289 }
2290 auto help_strings = help(functionName);
2291 yarp::os::idl::WireWriter writer(reader);
2292 if (!writer.isNull()) {
2293 if (!writer.writeListHeader(2)) {
2294 return false;
2295 }
2296 if (!writer.writeTag("many", 1, 0)) {
2297 return false;
2298 }
2299 if (!writer.writeListBegin(0, help_strings.size())) {
2300 return false;
2301 }
2302 for (const auto& help_string : help_strings) {
2303 if (!writer.writeString(help_string)) {
2304 return false;
2305 }
2306 }
2307 if (!writer.writeListEnd()) {
2308 return false;
2309 }
2310 }
2311 reader.accept();
2312 return true;
2313 }
2314 if (reader.noMore()) {
2315 reader.fail();
2316 return false;
2317 }
2318 std::string next_tag = reader.readTag(1);
2319 if (next_tag.empty()) {
2320 break;
2321 }
2322 tag.append("_").append(next_tag);
2323 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
2324 }
2325 return false;
2326}
#define yError(...)
Definition Log.h:361
#define __YFUNCTION__
Definition Log.h:24
#define yWarning(...)
Definition Log.h:340
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 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 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 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 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.
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 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.
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 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 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.
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 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.
return_set_language(*)(const std::string &) funcptr_t
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.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_set_pitch(*)(const double) funcptr_t
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 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_set_speed(*)(const double) funcptr_t
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 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.
return_set_voice(*)(const std::string &) 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 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 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_synthesize(*)(const std::string &) funcptr_t
virtual return_set_speed set_speed(const double speed)
virtual return_get_speed get_speed()
virtual return_set_pitch set_pitch(const double pitch)
virtual return_set_voice set_voice(const std::string &language)
virtual return_synthesize synthesize(const std::string &text)
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_get_pitch get_pitch()
virtual return_get_language get_language()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_get_voice get_voice()
virtual return_set_language set_language(const std::string &language)
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
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)
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 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 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