YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IAudioGrabberMsgs.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 <IAudioGrabberMsgs.h>
12
14
15#include <algorithm>
16
17// setHWGain_RPC helper class declaration
20{
21public:
23 explicit IAudioGrabberMsgs_setHWGain_RPC_helper(const double gain);
24 bool write(yarp::os::ConnectionWriter& connection) const override;
25 bool read(yarp::os::ConnectionReader& connection) override;
26
27 class Command :
29 {
30 public:
31 Command() = default;
32 explicit Command(const double gain);
33
34 ~Command() override = default;
35
36 bool write(yarp::os::ConnectionWriter& connection) const override;
37 bool read(yarp::os::ConnectionReader& connection) override;
38
39 bool write(const yarp::os::idl::WireWriter& writer) const override;
40 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
41 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
42
43 bool read(yarp::os::idl::WireReader& reader) override;
46
47 double gain{0.0};
48 };
49
50 class Reply :
52 {
53 public:
54 Reply() = default;
55 ~Reply() override = default;
56
57 bool write(yarp::os::ConnectionWriter& connection) const override;
58 bool read(yarp::os::ConnectionReader& connection) override;
59
60 bool write(const yarp::os::idl::WireWriter& writer) const override;
61 bool read(yarp::os::idl::WireReader& reader) override;
62
64 };
65
66 using funcptr_t = yarp::dev::ReturnValue (*)(const double);
67 void call(IAudioGrabberMsgs* ptr);
68
71
72 static constexpr const char* s_tag{"setHWGain_RPC"};
73 static constexpr size_t s_tag_len{2};
74 static constexpr size_t s_cmd_len{3};
75 static constexpr size_t s_reply_len{1};
76 static constexpr const char* s_prototype{"yarp::dev::ReturnValue IAudioGrabberMsgs::setHWGain_RPC(const double gain)"};
77 static constexpr const char* s_help{""};
78};
79
80// setSWGain_RPC helper class declaration
83{
84public:
86 explicit IAudioGrabberMsgs_setSWGain_RPC_helper(const double gain);
87 bool write(yarp::os::ConnectionWriter& connection) const override;
88 bool read(yarp::os::ConnectionReader& connection) override;
89
90 class Command :
92 {
93 public:
94 Command() = default;
95 explicit Command(const double gain);
96
97 ~Command() override = default;
98
99 bool write(yarp::os::ConnectionWriter& connection) const override;
100 bool read(yarp::os::ConnectionReader& connection) override;
101
102 bool write(const yarp::os::idl::WireWriter& writer) const override;
103 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
104 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
105
106 bool read(yarp::os::idl::WireReader& reader) override;
109
110 double gain{0.0};
111 };
112
113 class Reply :
115 {
116 public:
117 Reply() = default;
118 ~Reply() override = default;
119
120 bool write(yarp::os::ConnectionWriter& connection) const override;
121 bool read(yarp::os::ConnectionReader& connection) override;
122
123 bool write(const yarp::os::idl::WireWriter& writer) const override;
124 bool read(yarp::os::idl::WireReader& reader) override;
125
127 };
128
129 using funcptr_t = yarp::dev::ReturnValue (*)(const double);
130 void call(IAudioGrabberMsgs* ptr);
131
134
135 static constexpr const char* s_tag{"setSWGain_RPC"};
136 static constexpr size_t s_tag_len{2};
137 static constexpr size_t s_cmd_len{3};
138 static constexpr size_t s_reply_len{1};
139 static constexpr const char* s_prototype{"yarp::dev::ReturnValue IAudioGrabberMsgs::setSWGain_RPC(const double gain)"};
140 static constexpr const char* s_help{""};
141};
142
143// resetRecordingAudioBuffer_RPC helper class declaration
145 public yarp::os::Portable
146{
147public:
149 bool write(yarp::os::ConnectionWriter& connection) const override;
150 bool read(yarp::os::ConnectionReader& connection) override;
151
152 class Command :
154 {
155 public:
156 Command() = default;
157 ~Command() override = default;
158
159 bool write(yarp::os::ConnectionWriter& connection) const override;
160 bool read(yarp::os::ConnectionReader& connection) override;
161
162 bool write(const yarp::os::idl::WireWriter& writer) const override;
163 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
164 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
165
166 bool read(yarp::os::idl::WireReader& reader) override;
169 };
170
171 class Reply :
173 {
174 public:
175 Reply() = default;
176 ~Reply() override = default;
177
178 bool write(yarp::os::ConnectionWriter& connection) const override;
179 bool read(yarp::os::ConnectionReader& connection) override;
180
181 bool write(const yarp::os::idl::WireWriter& writer) const override;
182 bool read(yarp::os::idl::WireReader& reader) override;
183
185 };
186
188 void call(IAudioGrabberMsgs* ptr);
189
192
193 static constexpr const char* s_tag{"resetRecordingAudioBuffer_RPC"};
194 static constexpr size_t s_tag_len{2};
195 static constexpr size_t s_cmd_len{2};
196 static constexpr size_t s_reply_len{1};
197 static constexpr const char* s_prototype{"yarp::dev::ReturnValue IAudioGrabberMsgs::resetRecordingAudioBuffer_RPC()"};
198 static constexpr const char* s_help{""};
199};
200
201// startRecording_RPC helper class declaration
203 public yarp::os::Portable
204{
205public:
207 bool write(yarp::os::ConnectionWriter& connection) const override;
208 bool read(yarp::os::ConnectionReader& connection) override;
209
210 class Command :
212 {
213 public:
214 Command() = default;
215 ~Command() override = default;
216
217 bool write(yarp::os::ConnectionWriter& connection) const override;
218 bool read(yarp::os::ConnectionReader& connection) override;
219
220 bool write(const yarp::os::idl::WireWriter& writer) const override;
221 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
222 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
223
224 bool read(yarp::os::idl::WireReader& reader) override;
227 };
228
229 class Reply :
231 {
232 public:
233 Reply() = default;
234 ~Reply() override = default;
235
236 bool write(yarp::os::ConnectionWriter& connection) const override;
237 bool read(yarp::os::ConnectionReader& connection) override;
238
239 bool write(const yarp::os::idl::WireWriter& writer) const override;
240 bool read(yarp::os::idl::WireReader& reader) override;
241
243 };
244
246 void call(IAudioGrabberMsgs* ptr);
247
250
251 static constexpr const char* s_tag{"startRecording_RPC"};
252 static constexpr size_t s_tag_len{2};
253 static constexpr size_t s_cmd_len{2};
254 static constexpr size_t s_reply_len{1};
255 static constexpr const char* s_prototype{"yarp::dev::ReturnValue IAudioGrabberMsgs::startRecording_RPC()"};
256 static constexpr const char* s_help{""};
257};
258
259// stopRecording_RPC helper class declaration
261 public yarp::os::Portable
262{
263public:
265 bool write(yarp::os::ConnectionWriter& connection) const override;
266 bool read(yarp::os::ConnectionReader& connection) override;
267
268 class Command :
270 {
271 public:
272 Command() = default;
273 ~Command() override = default;
274
275 bool write(yarp::os::ConnectionWriter& connection) const override;
276 bool read(yarp::os::ConnectionReader& connection) override;
277
278 bool write(const yarp::os::idl::WireWriter& writer) const override;
279 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
280 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
281
282 bool read(yarp::os::idl::WireReader& reader) override;
285 };
286
287 class Reply :
289 {
290 public:
291 Reply() = default;
292 ~Reply() override = default;
293
294 bool write(yarp::os::ConnectionWriter& connection) const override;
295 bool read(yarp::os::ConnectionReader& connection) override;
296
297 bool write(const yarp::os::idl::WireWriter& writer) const override;
298 bool read(yarp::os::idl::WireReader& reader) override;
299
301 };
302
304 void call(IAudioGrabberMsgs* ptr);
305
308
309 static constexpr const char* s_tag{"stopRecording_RPC"};
310 static constexpr size_t s_tag_len{2};
311 static constexpr size_t s_cmd_len{2};
312 static constexpr size_t s_reply_len{1};
313 static constexpr const char* s_prototype{"yarp::dev::ReturnValue IAudioGrabberMsgs::stopRecording_RPC()"};
314 static constexpr const char* s_help{""};
315};
316
317// isRecording_RPC helper class declaration
319 public yarp::os::Portable
320{
321public:
323 bool write(yarp::os::ConnectionWriter& connection) const override;
324 bool read(yarp::os::ConnectionReader& connection) override;
325
326 class Command :
328 {
329 public:
330 Command() = default;
331 ~Command() override = default;
332
333 bool write(yarp::os::ConnectionWriter& connection) const override;
334 bool read(yarp::os::ConnectionReader& connection) override;
335
336 bool write(const yarp::os::idl::WireWriter& writer) const override;
337 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
338 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
339
340 bool read(yarp::os::idl::WireReader& reader) override;
343 };
344
345 class Reply :
347 {
348 public:
349 Reply() = default;
350 ~Reply() override = default;
351
352 bool write(yarp::os::ConnectionWriter& connection) const override;
353 bool read(yarp::os::ConnectionReader& connection) override;
354
355 bool write(const yarp::os::idl::WireWriter& writer) const override;
356 bool read(yarp::os::idl::WireReader& reader) override;
357
359 };
360
362 void call(IAudioGrabberMsgs* ptr);
363
366
367 static constexpr const char* s_tag{"isRecording_RPC"};
368 static constexpr size_t s_tag_len{2};
369 static constexpr size_t s_cmd_len{2};
370 static constexpr size_t s_reply_len{2};
371 static constexpr const char* s_prototype{"return_isRecording IAudioGrabberMsgs::isRecording_RPC()"};
372 static constexpr const char* s_help{""};
373};
374
375// getSound_RPC helper class declaration
377 public yarp::os::Portable
378{
379public:
381 IAudioGrabberMsgs_getSound_RPC_helper(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s);
382 bool write(yarp::os::ConnectionWriter& connection) const override;
383 bool read(yarp::os::ConnectionReader& connection) override;
384
385 class Command :
387 {
388 public:
389 Command() = default;
390 Command(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s);
391
392 ~Command() override = default;
393
394 bool write(yarp::os::ConnectionWriter& connection) const override;
395 bool read(yarp::os::ConnectionReader& connection) override;
396
397 bool write(const yarp::os::idl::WireWriter& writer) const override;
398 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
399 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
400
401 bool read(yarp::os::idl::WireReader& reader) override;
404
408 };
409
410 class Reply :
412 {
413 public:
414 Reply() = default;
415 ~Reply() override = default;
416
417 bool write(yarp::os::ConnectionWriter& connection) const override;
418 bool read(yarp::os::ConnectionReader& connection) override;
419
420 bool write(const yarp::os::idl::WireWriter& writer) const override;
421 bool read(yarp::os::idl::WireReader& reader) override;
422
424 };
425
426 using funcptr_t = return_getSound (*)(const size_t, const size_t, const double);
427 void call(IAudioGrabberMsgs* ptr);
428
431
432 static constexpr const char* s_tag{"getSound_RPC"};
433 static constexpr size_t s_tag_len{2};
434 static constexpr size_t s_cmd_len{5};
435 static constexpr size_t s_reply_len{2};
436 static constexpr const char* s_prototype{"return_getSound IAudioGrabberMsgs::getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s)"};
437 static constexpr const char* s_help{""};
438};
439
440// getRecordingAudioBufferMaxSize_RPC helper class declaration
442 public yarp::os::Portable
443{
444public:
446 bool write(yarp::os::ConnectionWriter& connection) const override;
447 bool read(yarp::os::ConnectionReader& connection) override;
448
449 class Command :
451 {
452 public:
453 Command() = default;
454 ~Command() override = default;
455
456 bool write(yarp::os::ConnectionWriter& connection) const override;
457 bool read(yarp::os::ConnectionReader& connection) override;
458
459 bool write(const yarp::os::idl::WireWriter& writer) const override;
460 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
461 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
462
463 bool read(yarp::os::idl::WireReader& reader) override;
466 };
467
468 class Reply :
470 {
471 public:
472 Reply() = default;
473 ~Reply() override = default;
474
475 bool write(yarp::os::ConnectionWriter& connection) const override;
476 bool read(yarp::os::ConnectionReader& connection) override;
477
478 bool write(const yarp::os::idl::WireWriter& writer) const override;
479 bool read(yarp::os::idl::WireReader& reader) override;
480
482 };
483
485 void call(IAudioGrabberMsgs* ptr);
486
489
490 static constexpr const char* s_tag{"getRecordingAudioBufferMaxSize_RPC"};
491 static constexpr size_t s_tag_len{2};
492 static constexpr size_t s_cmd_len{2};
493 static constexpr size_t s_reply_len{2};
494 static constexpr const char* s_prototype{"return_getRecordingAudioBufferMaxSize IAudioGrabberMsgs::getRecordingAudioBufferMaxSize_RPC()"};
495 static constexpr const char* s_help{""};
496};
497
498// getRecordingAudioBufferCurrentSize_RPC helper class declaration
500 public yarp::os::Portable
501{
502public:
504 bool write(yarp::os::ConnectionWriter& connection) const override;
505 bool read(yarp::os::ConnectionReader& connection) override;
506
507 class Command :
509 {
510 public:
511 Command() = default;
512 ~Command() override = default;
513
514 bool write(yarp::os::ConnectionWriter& connection) const override;
515 bool read(yarp::os::ConnectionReader& connection) override;
516
517 bool write(const yarp::os::idl::WireWriter& writer) const override;
518 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
519 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
520
521 bool read(yarp::os::idl::WireReader& reader) override;
524 };
525
526 class Reply :
528 {
529 public:
530 Reply() = default;
531 ~Reply() override = default;
532
533 bool write(yarp::os::ConnectionWriter& connection) const override;
534 bool read(yarp::os::ConnectionReader& connection) override;
535
536 bool write(const yarp::os::idl::WireWriter& writer) const override;
537 bool read(yarp::os::idl::WireReader& reader) override;
538
540 };
541
543 void call(IAudioGrabberMsgs* ptr);
544
547
548 static constexpr const char* s_tag{"getRecordingAudioBufferCurrentSize_RPC"};
549 static constexpr size_t s_tag_len{2};
550 static constexpr size_t s_cmd_len{2};
551 static constexpr size_t s_reply_len{2};
552 static constexpr const char* s_prototype{"return_getRecordingAudioBufferCurrentSize IAudioGrabberMsgs::getRecordingAudioBufferCurrentSize_RPC()"};
553 static constexpr const char* s_help{""};
554};
555
556// setHWGain_RPC helper class implementation
561
563{
564 return cmd.write(connection);
565}
566
568{
569 return reply.read(connection);
570}
571
573 gain{gain}
574{
575}
576
578{
579 yarp::os::idl::WireWriter writer(connection);
580 if (!writer.writeListHeader(s_cmd_len)) {
581 return false;
582 }
583 return write(writer);
584}
585
587{
588 yarp::os::idl::WireReader reader(connection);
589 if (!reader.readListHeader()) {
590 reader.fail();
591 return false;
592 }
593 return read(reader);
594}
595
597{
598 if (!writeTag(writer)) {
599 return false;
600 }
601 if (!writeArgs(writer)) {
602 return false;
603 }
604 return true;
605}
606
608{
609 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
610 return false;
611 }
612 return true;
613}
614
616{
617 if (!writer.writeFloat64(gain)) {
618 return false;
619 }
620 return true;
621}
622
624{
625 if (!readTag(reader)) {
626 return false;
627 }
628 if (!readArgs(reader)) {
629 return false;
630 }
631 return true;
632}
633
635{
636 std::string tag = reader.readTag(s_tag_len);
637 if (reader.isError()) {
638 return false;
639 }
640 if (tag != s_tag) {
641 reader.fail();
642 return false;
643 }
644 return true;
645}
646
648{
649 if (reader.noMore()) {
650 reader.fail();
651 return false;
652 }
653 if (!reader.readFloat64(gain)) {
654 reader.fail();
655 return false;
656 }
657 if (!reader.noMore()) {
658 reader.fail();
659 return false;
660 }
661 return true;
662}
663
665{
666 yarp::os::idl::WireWriter writer(connection);
667 return write(writer);
668}
669
671{
672 yarp::os::idl::WireReader reader(connection);
673 return read(reader);
674}
675
677{
678 if (!writer.isNull()) {
679 if (!writer.write(return_helper)) {
680 return false;
681 }
682 }
683 return true;
684}
685
687{
688 if (reader.noMore()) {
689 reader.fail();
690 return false;
691 }
692 if (!reader.read(return_helper)) {
693 reader.fail();
694 return false;
695 }
696 return true;
697}
698
703
704// setSWGain_RPC helper class implementation
709
711{
712 return cmd.write(connection);
713}
714
716{
717 return reply.read(connection);
718}
719
721 gain{gain}
722{
723}
724
726{
727 yarp::os::idl::WireWriter writer(connection);
728 if (!writer.writeListHeader(s_cmd_len)) {
729 return false;
730 }
731 return write(writer);
732}
733
735{
736 yarp::os::idl::WireReader reader(connection);
737 if (!reader.readListHeader()) {
738 reader.fail();
739 return false;
740 }
741 return read(reader);
742}
743
745{
746 if (!writeTag(writer)) {
747 return false;
748 }
749 if (!writeArgs(writer)) {
750 return false;
751 }
752 return true;
753}
754
756{
757 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
758 return false;
759 }
760 return true;
761}
762
764{
765 if (!writer.writeFloat64(gain)) {
766 return false;
767 }
768 return true;
769}
770
772{
773 if (!readTag(reader)) {
774 return false;
775 }
776 if (!readArgs(reader)) {
777 return false;
778 }
779 return true;
780}
781
783{
784 std::string tag = reader.readTag(s_tag_len);
785 if (reader.isError()) {
786 return false;
787 }
788 if (tag != s_tag) {
789 reader.fail();
790 return false;
791 }
792 return true;
793}
794
796{
797 if (reader.noMore()) {
798 reader.fail();
799 return false;
800 }
801 if (!reader.readFloat64(gain)) {
802 reader.fail();
803 return false;
804 }
805 if (!reader.noMore()) {
806 reader.fail();
807 return false;
808 }
809 return true;
810}
811
813{
814 yarp::os::idl::WireWriter writer(connection);
815 return write(writer);
816}
817
819{
820 yarp::os::idl::WireReader reader(connection);
821 return read(reader);
822}
823
825{
826 if (!writer.isNull()) {
827 if (!writer.write(return_helper)) {
828 return false;
829 }
830 }
831 return true;
832}
833
835{
836 if (reader.noMore()) {
837 reader.fail();
838 return false;
839 }
840 if (!reader.read(return_helper)) {
841 reader.fail();
842 return false;
843 }
844 return true;
845}
846
851
852// resetRecordingAudioBuffer_RPC helper class implementation
857
862
864{
865 yarp::os::idl::WireWriter writer(connection);
866 if (!writer.writeListHeader(s_cmd_len)) {
867 return false;
868 }
869 return write(writer);
870}
871
873{
874 yarp::os::idl::WireReader reader(connection);
875 if (!reader.readListHeader()) {
876 reader.fail();
877 return false;
878 }
879 return read(reader);
880}
881
883{
884 if (!writeTag(writer)) {
885 return false;
886 }
887 if (!writeArgs(writer)) {
888 return false;
889 }
890 return true;
891}
892
894{
895 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
896 return false;
897 }
898 return true;
899}
900
902{
903 return true;
904}
905
907{
908 if (!readTag(reader)) {
909 return false;
910 }
911 if (!readArgs(reader)) {
912 return false;
913 }
914 return true;
915}
916
918{
919 std::string tag = reader.readTag(s_tag_len);
920 if (reader.isError()) {
921 return false;
922 }
923 if (tag != s_tag) {
924 reader.fail();
925 return false;
926 }
927 return true;
928}
929
931{
932 if (!reader.noMore()) {
933 reader.fail();
934 return false;
935 }
936 return true;
937}
938
944
950
952{
953 if (!writer.isNull()) {
954 if (!writer.write(return_helper)) {
955 return false;
956 }
957 }
958 return true;
959}
960
962{
963 if (reader.noMore()) {
964 reader.fail();
965 return false;
966 }
967 if (!reader.read(return_helper)) {
968 reader.fail();
969 return false;
970 }
971 return true;
972}
973
978
979// startRecording_RPC helper class implementation
981{
982 return cmd.write(connection);
983}
984
989
991{
992 yarp::os::idl::WireWriter writer(connection);
993 if (!writer.writeListHeader(s_cmd_len)) {
994 return false;
995 }
996 return write(writer);
997}
998
1000{
1001 yarp::os::idl::WireReader reader(connection);
1002 if (!reader.readListHeader()) {
1003 reader.fail();
1004 return false;
1005 }
1006 return read(reader);
1007}
1008
1010{
1011 if (!writeTag(writer)) {
1012 return false;
1013 }
1014 if (!writeArgs(writer)) {
1015 return false;
1016 }
1017 return true;
1018}
1019
1021{
1022 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1023 return false;
1024 }
1025 return true;
1026}
1027
1029{
1030 return true;
1031}
1032
1034{
1035 if (!readTag(reader)) {
1036 return false;
1037 }
1038 if (!readArgs(reader)) {
1039 return false;
1040 }
1041 return true;
1042}
1043
1045{
1046 std::string tag = reader.readTag(s_tag_len);
1047 if (reader.isError()) {
1048 return false;
1049 }
1050 if (tag != s_tag) {
1051 reader.fail();
1052 return false;
1053 }
1054 return true;
1055}
1056
1058{
1059 if (!reader.noMore()) {
1060 reader.fail();
1061 return false;
1062 }
1063 return true;
1064}
1065
1067{
1068 yarp::os::idl::WireWriter writer(connection);
1069 return write(writer);
1070}
1071
1073{
1074 yarp::os::idl::WireReader reader(connection);
1075 return read(reader);
1076}
1077
1079{
1080 if (!writer.isNull()) {
1081 if (!writer.write(return_helper)) {
1082 return false;
1083 }
1084 }
1085 return true;
1086}
1087
1089{
1090 if (reader.noMore()) {
1091 reader.fail();
1092 return false;
1093 }
1094 if (!reader.read(return_helper)) {
1095 reader.fail();
1096 return false;
1097 }
1098 return true;
1099}
1100
1105
1106// stopRecording_RPC helper class implementation
1108{
1109 return cmd.write(connection);
1110}
1111
1113{
1114 return reply.read(connection);
1115}
1116
1118{
1119 yarp::os::idl::WireWriter writer(connection);
1120 if (!writer.writeListHeader(s_cmd_len)) {
1121 return false;
1122 }
1123 return write(writer);
1124}
1125
1127{
1128 yarp::os::idl::WireReader reader(connection);
1129 if (!reader.readListHeader()) {
1130 reader.fail();
1131 return false;
1132 }
1133 return read(reader);
1134}
1135
1137{
1138 if (!writeTag(writer)) {
1139 return false;
1140 }
1141 if (!writeArgs(writer)) {
1142 return false;
1143 }
1144 return true;
1145}
1146
1148{
1149 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1150 return false;
1151 }
1152 return true;
1153}
1154
1156{
1157 return true;
1158}
1159
1161{
1162 if (!readTag(reader)) {
1163 return false;
1164 }
1165 if (!readArgs(reader)) {
1166 return false;
1167 }
1168 return true;
1169}
1170
1172{
1173 std::string tag = reader.readTag(s_tag_len);
1174 if (reader.isError()) {
1175 return false;
1176 }
1177 if (tag != s_tag) {
1178 reader.fail();
1179 return false;
1180 }
1181 return true;
1182}
1183
1185{
1186 if (!reader.noMore()) {
1187 reader.fail();
1188 return false;
1189 }
1190 return true;
1191}
1192
1194{
1195 yarp::os::idl::WireWriter writer(connection);
1196 return write(writer);
1197}
1198
1200{
1201 yarp::os::idl::WireReader reader(connection);
1202 return read(reader);
1203}
1204
1206{
1207 if (!writer.isNull()) {
1208 if (!writer.write(return_helper)) {
1209 return false;
1210 }
1211 }
1212 return true;
1213}
1214
1216{
1217 if (reader.noMore()) {
1218 reader.fail();
1219 return false;
1220 }
1221 if (!reader.read(return_helper)) {
1222 reader.fail();
1223 return false;
1224 }
1225 return true;
1226}
1227
1232
1233// isRecording_RPC helper class implementation
1235{
1236 return cmd.write(connection);
1237}
1238
1240{
1241 return reply.read(connection);
1242}
1243
1245{
1246 yarp::os::idl::WireWriter writer(connection);
1247 if (!writer.writeListHeader(s_cmd_len)) {
1248 return false;
1249 }
1250 return write(writer);
1251}
1252
1254{
1255 yarp::os::idl::WireReader reader(connection);
1256 if (!reader.readListHeader()) {
1257 reader.fail();
1258 return false;
1259 }
1260 return read(reader);
1261}
1262
1264{
1265 if (!writeTag(writer)) {
1266 return false;
1267 }
1268 if (!writeArgs(writer)) {
1269 return false;
1270 }
1271 return true;
1272}
1273
1275{
1276 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1277 return false;
1278 }
1279 return true;
1280}
1281
1283{
1284 return true;
1285}
1286
1288{
1289 if (!readTag(reader)) {
1290 return false;
1291 }
1292 if (!readArgs(reader)) {
1293 return false;
1294 }
1295 return true;
1296}
1297
1299{
1300 std::string tag = reader.readTag(s_tag_len);
1301 if (reader.isError()) {
1302 return false;
1303 }
1304 if (tag != s_tag) {
1305 reader.fail();
1306 return false;
1307 }
1308 return true;
1309}
1310
1312{
1313 if (!reader.noMore()) {
1314 reader.fail();
1315 return false;
1316 }
1317 return true;
1318}
1319
1321{
1322 yarp::os::idl::WireWriter writer(connection);
1323 return write(writer);
1324}
1325
1327{
1328 yarp::os::idl::WireReader reader(connection);
1329 return read(reader);
1330}
1331
1333{
1334 if (!writer.isNull()) {
1335 if (!writer.writeListHeader(s_reply_len)) {
1336 return false;
1337 }
1338 if (!writer.write(return_helper)) {
1339 return false;
1340 }
1341 }
1342 return true;
1343}
1344
1346{
1347 if (!reader.readListReturn()) {
1348 return false;
1349 }
1350 if (reader.noMore()) {
1351 reader.fail();
1352 return false;
1353 }
1354 if (!reader.read(return_helper)) {
1355 reader.fail();
1356 return false;
1357 }
1358 return true;
1359}
1360
1365
1366// getSound_RPC helper class implementation
1367IAudioGrabberMsgs_getSound_RPC_helper::IAudioGrabberMsgs_getSound_RPC_helper(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s) :
1368 cmd{min_number_of_samples, max_number_of_samples, max_samples_timeout_s}
1369{
1370}
1371
1373{
1374 return cmd.write(connection);
1375}
1376
1378{
1379 return reply.read(connection);
1380}
1381
1382IAudioGrabberMsgs_getSound_RPC_helper::Command::Command(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s) :
1383 min_number_of_samples{min_number_of_samples},
1384 max_number_of_samples{max_number_of_samples},
1385 max_samples_timeout_s{max_samples_timeout_s}
1386{
1387}
1388
1390{
1391 yarp::os::idl::WireWriter writer(connection);
1392 if (!writer.writeListHeader(s_cmd_len)) {
1393 return false;
1394 }
1395 return write(writer);
1396}
1397
1399{
1400 yarp::os::idl::WireReader reader(connection);
1401 if (!reader.readListHeader()) {
1402 reader.fail();
1403 return false;
1404 }
1405 return read(reader);
1406}
1407
1409{
1410 if (!writeTag(writer)) {
1411 return false;
1412 }
1413 if (!writeArgs(writer)) {
1414 return false;
1415 }
1416 return true;
1417}
1418
1420{
1421 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1422 return false;
1423 }
1424 return true;
1425}
1426
1428{
1429 if (!writer.writeSizeT(min_number_of_samples)) {
1430 return false;
1431 }
1432 if (!writer.writeSizeT(max_number_of_samples)) {
1433 return false;
1434 }
1435 if (!writer.writeFloat64(max_samples_timeout_s)) {
1436 return false;
1437 }
1438 return true;
1439}
1440
1442{
1443 if (!readTag(reader)) {
1444 return false;
1445 }
1446 if (!readArgs(reader)) {
1447 return false;
1448 }
1449 return true;
1450}
1451
1453{
1454 std::string tag = reader.readTag(s_tag_len);
1455 if (reader.isError()) {
1456 return false;
1457 }
1458 if (tag != s_tag) {
1459 reader.fail();
1460 return false;
1461 }
1462 return true;
1463}
1464
1466{
1467 if (reader.noMore()) {
1468 reader.fail();
1469 return false;
1470 }
1471 if (!reader.readSizeT(min_number_of_samples)) {
1472 reader.fail();
1473 return false;
1474 }
1475 if (reader.noMore()) {
1476 reader.fail();
1477 return false;
1478 }
1479 if (!reader.readSizeT(max_number_of_samples)) {
1480 reader.fail();
1481 return false;
1482 }
1483 if (reader.noMore()) {
1484 reader.fail();
1485 return false;
1486 }
1487 if (!reader.readFloat64(max_samples_timeout_s)) {
1488 reader.fail();
1489 return false;
1490 }
1491 if (!reader.noMore()) {
1492 reader.fail();
1493 return false;
1494 }
1495 return true;
1496}
1497
1499{
1500 yarp::os::idl::WireWriter writer(connection);
1501 return write(writer);
1502}
1503
1505{
1506 yarp::os::idl::WireReader reader(connection);
1507 return read(reader);
1508}
1509
1511{
1512 if (!writer.isNull()) {
1513 if (!writer.writeListHeader(s_reply_len)) {
1514 return false;
1515 }
1516 if (!writer.write(return_helper)) {
1517 return false;
1518 }
1519 }
1520 return true;
1521}
1522
1524{
1525 if (!reader.readListReturn()) {
1526 return false;
1527 }
1528 if (reader.noMore()) {
1529 reader.fail();
1530 return false;
1531 }
1532 if (!reader.read(return_helper)) {
1533 reader.fail();
1534 return false;
1535 }
1536 return true;
1537}
1538
1543
1544// getRecordingAudioBufferMaxSize_RPC helper class implementation
1549
1554
1556{
1557 yarp::os::idl::WireWriter writer(connection);
1558 if (!writer.writeListHeader(s_cmd_len)) {
1559 return false;
1560 }
1561 return write(writer);
1562}
1563
1565{
1566 yarp::os::idl::WireReader reader(connection);
1567 if (!reader.readListHeader()) {
1568 reader.fail();
1569 return false;
1570 }
1571 return read(reader);
1572}
1573
1575{
1576 if (!writeTag(writer)) {
1577 return false;
1578 }
1579 if (!writeArgs(writer)) {
1580 return false;
1581 }
1582 return true;
1583}
1584
1586{
1587 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1588 return false;
1589 }
1590 return true;
1591}
1592
1594{
1595 return true;
1596}
1597
1599{
1600 if (!readTag(reader)) {
1601 return false;
1602 }
1603 if (!readArgs(reader)) {
1604 return false;
1605 }
1606 return true;
1607}
1608
1610{
1611 std::string tag = reader.readTag(s_tag_len);
1612 if (reader.isError()) {
1613 return false;
1614 }
1615 if (tag != s_tag) {
1616 reader.fail();
1617 return false;
1618 }
1619 return true;
1620}
1621
1623{
1624 if (!reader.noMore()) {
1625 reader.fail();
1626 return false;
1627 }
1628 return true;
1629}
1630
1636
1642
1644{
1645 if (!writer.isNull()) {
1646 if (!writer.writeListHeader(s_reply_len)) {
1647 return false;
1648 }
1649 if (!writer.write(return_helper)) {
1650 return false;
1651 }
1652 }
1653 return true;
1654}
1655
1657{
1658 if (!reader.readListReturn()) {
1659 return false;
1660 }
1661 if (reader.noMore()) {
1662 reader.fail();
1663 return false;
1664 }
1665 if (!reader.read(return_helper)) {
1666 reader.fail();
1667 return false;
1668 }
1669 return true;
1670}
1671
1676
1677// getRecordingAudioBufferCurrentSize_RPC helper class implementation
1682
1687
1689{
1690 yarp::os::idl::WireWriter writer(connection);
1691 if (!writer.writeListHeader(s_cmd_len)) {
1692 return false;
1693 }
1694 return write(writer);
1695}
1696
1698{
1699 yarp::os::idl::WireReader reader(connection);
1700 if (!reader.readListHeader()) {
1701 reader.fail();
1702 return false;
1703 }
1704 return read(reader);
1705}
1706
1708{
1709 if (!writeTag(writer)) {
1710 return false;
1711 }
1712 if (!writeArgs(writer)) {
1713 return false;
1714 }
1715 return true;
1716}
1717
1719{
1720 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1721 return false;
1722 }
1723 return true;
1724}
1725
1730
1732{
1733 if (!readTag(reader)) {
1734 return false;
1735 }
1736 if (!readArgs(reader)) {
1737 return false;
1738 }
1739 return true;
1740}
1741
1743{
1744 std::string tag = reader.readTag(s_tag_len);
1745 if (reader.isError()) {
1746 return false;
1747 }
1748 if (tag != s_tag) {
1749 reader.fail();
1750 return false;
1751 }
1752 return true;
1753}
1754
1756{
1757 if (!reader.noMore()) {
1758 reader.fail();
1759 return false;
1760 }
1761 return true;
1762}
1763
1769
1775
1777{
1778 if (!writer.isNull()) {
1779 if (!writer.writeListHeader(s_reply_len)) {
1780 return false;
1781 }
1782 if (!writer.write(return_helper)) {
1783 return false;
1784 }
1785 }
1786 return true;
1787}
1788
1790{
1791 if (!reader.readListReturn()) {
1792 return false;
1793 }
1794 if (reader.noMore()) {
1795 reader.fail();
1796 return false;
1797 }
1798 if (!reader.read(return_helper)) {
1799 reader.fail();
1800 return false;
1801 }
1802 return true;
1803}
1804
1809
1810// Constructor
1812{
1813 yarp().setOwner(*this);
1814}
1815
1817{
1818 if (!yarp().canWrite()) {
1819 yError("Missing server method '%s'?", IAudioGrabberMsgs_setHWGain_RPC_helper::s_prototype);
1820 }
1822 bool ok = yarp().write(helper, helper);
1823 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1824}
1825
1827{
1828 if (!yarp().canWrite()) {
1829 yError("Missing server method '%s'?", IAudioGrabberMsgs_setSWGain_RPC_helper::s_prototype);
1830 }
1832 bool ok = yarp().write(helper, helper);
1833 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1834}
1835
1837{
1838 if (!yarp().canWrite()) {
1840 }
1842 bool ok = yarp().write(helper, helper);
1843 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1844}
1845
1847{
1848 if (!yarp().canWrite()) {
1850 }
1852 bool ok = yarp().write(helper, helper);
1853 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1854}
1855
1857{
1858 if (!yarp().canWrite()) {
1860 }
1862 bool ok = yarp().write(helper, helper);
1863 return ok ? helper.reply.return_helper : yarp::dev::ReturnValue{};
1864}
1865
1867{
1868 if (!yarp().canWrite()) {
1869 yError("Missing server method '%s'?", IAudioGrabberMsgs_isRecording_RPC_helper::s_prototype);
1870 }
1872 bool ok = yarp().write(helper, helper);
1873 return ok ? helper.reply.return_helper : return_isRecording{};
1874}
1875
1876return_getSound IAudioGrabberMsgs::getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s)
1877{
1878 if (!yarp().canWrite()) {
1879 yError("Missing server method '%s'?", IAudioGrabberMsgs_getSound_RPC_helper::s_prototype);
1880 }
1881 IAudioGrabberMsgs_getSound_RPC_helper helper{min_number_of_samples, max_number_of_samples, max_samples_timeout_s};
1882 bool ok = yarp().write(helper, helper);
1883 return ok ? helper.reply.return_helper : return_getSound{};
1884}
1885
1887{
1888 if (!yarp().canWrite()) {
1890 }
1892 bool ok = yarp().write(helper, helper);
1893 return ok ? helper.reply.return_helper : return_getRecordingAudioBufferMaxSize{};
1894}
1895
1905
1906// help method
1907std::vector<std::string> IAudioGrabberMsgs::help(const std::string& functionName)
1908{
1909 bool showAll = (functionName == "--all");
1910 std::vector<std::string> helpString;
1911 if (showAll) {
1912 helpString.emplace_back("*** Available commands:");
1913 helpString.emplace_back(IAudioGrabberMsgs_setHWGain_RPC_helper::s_tag);
1914 helpString.emplace_back(IAudioGrabberMsgs_setSWGain_RPC_helper::s_tag);
1918 helpString.emplace_back(IAudioGrabberMsgs_isRecording_RPC_helper::s_tag);
1919 helpString.emplace_back(IAudioGrabberMsgs_getSound_RPC_helper::s_tag);
1922 helpString.emplace_back("help");
1923 } else {
1926 }
1929 }
1932 }
1935 }
1938 }
1941 }
1944 }
1947 }
1950 }
1951 if (functionName == "help") {
1952 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
1953 helpString.emplace_back("Return list of available commands, or help message for a specific function");
1954 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");
1955 helpString.emplace_back("@return list of strings (one string per line)");
1956 }
1957 }
1958 if (helpString.empty()) {
1959 helpString.emplace_back("Command not found");
1960 }
1961 return helpString;
1962}
1963
1964// read from ConnectionReader
1966{
1967 constexpr size_t max_tag_len = 2;
1968 size_t tag_len = 1;
1969
1970 yarp::os::idl::WireReader reader(connection);
1971 reader.expectAccept();
1972 if (!reader.readListHeader()) {
1973 reader.fail();
1974 return false;
1975 }
1976
1977 std::string tag = reader.readTag(1);
1978 bool direct = (tag == "__direct__");
1979 if (direct) {
1980 tag = reader.readTag(1);
1981 }
1982 while (tag_len <= max_tag_len && !reader.isError()) {
1985 if (!helper.cmd.readArgs(reader)) {
1986 return false;
1987 }
1988
1989 helper.call(this);
1990
1991 yarp::os::idl::WireWriter writer(reader);
1992 if (!helper.reply.write(writer)) {
1993 return false;
1994 }
1995 reader.accept();
1996 return true;
1997 }
2000 if (!helper.cmd.readArgs(reader)) {
2001 return false;
2002 }
2003
2004 helper.call(this);
2005
2006 yarp::os::idl::WireWriter writer(reader);
2007 if (!helper.reply.write(writer)) {
2008 return false;
2009 }
2010 reader.accept();
2011 return true;
2012 }
2015 if (!helper.cmd.readArgs(reader)) {
2016 return false;
2017 }
2018
2019 helper.call(this);
2020
2021 yarp::os::idl::WireWriter writer(reader);
2022 if (!helper.reply.write(writer)) {
2023 return false;
2024 }
2025 reader.accept();
2026 return true;
2027 }
2030 if (!helper.cmd.readArgs(reader)) {
2031 return false;
2032 }
2033
2034 helper.call(this);
2035
2036 yarp::os::idl::WireWriter writer(reader);
2037 if (!helper.reply.write(writer)) {
2038 return false;
2039 }
2040 reader.accept();
2041 return true;
2042 }
2045 if (!helper.cmd.readArgs(reader)) {
2046 return false;
2047 }
2048
2049 helper.call(this);
2050
2051 yarp::os::idl::WireWriter writer(reader);
2052 if (!helper.reply.write(writer)) {
2053 return false;
2054 }
2055 reader.accept();
2056 return true;
2057 }
2060 if (!helper.cmd.readArgs(reader)) {
2061 return false;
2062 }
2063
2064 helper.call(this);
2065
2066 yarp::os::idl::WireWriter writer(reader);
2067 if (!helper.reply.write(writer)) {
2068 return false;
2069 }
2070 reader.accept();
2071 return true;
2072 }
2075 if (!helper.cmd.readArgs(reader)) {
2076 return false;
2077 }
2078
2079 helper.call(this);
2080
2081 yarp::os::idl::WireWriter writer(reader);
2082 if (!helper.reply.write(writer)) {
2083 return false;
2084 }
2085 reader.accept();
2086 return true;
2087 }
2090 if (!helper.cmd.readArgs(reader)) {
2091 return false;
2092 }
2093
2094 helper.call(this);
2095
2096 yarp::os::idl::WireWriter writer(reader);
2097 if (!helper.reply.write(writer)) {
2098 return false;
2099 }
2100 reader.accept();
2101 return true;
2102 }
2105 if (!helper.cmd.readArgs(reader)) {
2106 return false;
2107 }
2108
2109 helper.call(this);
2110
2111 yarp::os::idl::WireWriter writer(reader);
2112 if (!helper.reply.write(writer)) {
2113 return false;
2114 }
2115 reader.accept();
2116 return true;
2117 }
2118 if (tag == "help") {
2119 std::string functionName;
2120 if (!reader.readString(functionName)) {
2121 functionName = "--all";
2122 }
2123 auto help_strings = help(functionName);
2124 yarp::os::idl::WireWriter writer(reader);
2125 if (!writer.isNull()) {
2126 if (!writer.writeListHeader(2)) {
2127 return false;
2128 }
2129 if (!writer.writeTag("many", 1, 0)) {
2130 return false;
2131 }
2132 if (!writer.writeListBegin(0, help_strings.size())) {
2133 return false;
2134 }
2135 for (const auto& help_string : help_strings) {
2136 if (!writer.writeString(help_string)) {
2137 return false;
2138 }
2139 }
2140 if (!writer.writeListEnd()) {
2141 return false;
2142 }
2143 }
2144 reader.accept();
2145 return true;
2146 }
2147 if (reader.noMore()) {
2148 reader.fail();
2149 return false;
2150 }
2151 std::string next_tag = reader.readTag(1);
2152 if (next_tag.empty()) {
2153 break;
2154 }
2155 tag.append("_").append(next_tag);
2156 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
2157 }
2158 return false;
2159}
size_t size_t
#define yError(...)
Definition Log.h:361
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_getRecordingAudioBufferCurrentSize(*)() funcptr_t
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 read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
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.
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
return_getSound(*)(const size_t, const size_t, const double) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_help
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool 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 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 writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool 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.
yarp::dev::ReturnValue(*)(const double) funcptr_t
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.
static constexpr const char * s_tag
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 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 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 double) 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 readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool 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 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 readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
virtual return_isRecording isRecording_RPC()
virtual yarp::dev::ReturnValue setHWGain_RPC(const double gain)
virtual return_getRecordingAudioBufferMaxSize getRecordingAudioBufferMaxSize_RPC()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_getRecordingAudioBufferCurrentSize getRecordingAudioBufferCurrentSize_RPC()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_getSound getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s)
virtual yarp::dev::ReturnValue startRecording_RPC()
virtual yarp::dev::ReturnValue setSWGain_RPC(const double gain)
virtual yarp::dev::ReturnValue resetRecordingAudioBuffer_RPC()
virtual yarp::dev::ReturnValue stopRecording_RPC()
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
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 readSizeT(std::size_t &x)
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
bool writeSizeT(std::size_t x, bool skip_tag=false) const
The main, catch-all namespace for YARP.
Definition dirs.h:16