YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IJoypadControlMsgs.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, "IJoypadControlMsgs")
23}
24
25namespace yarp::dev {
26
27//IJoypadControlMsgs_getRemoteProtocolVersion_helper declaration
38
40{
41 yarp::os::idl::WireWriter writer(connection);
42 if (!writer.writeListHeader(1)) {
43 return false;
44 }
45 if (!writer.writeString("getRemoteProtocolVersion")) {
46 return false;
47 }
48 return true;
49}
50
51bool IJoypadControlMsgs_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
52 {
53 yarp::os::idl::WireReader reader(connection);
54 if (!reader.readListHeader()) {
55 reader.fail();
56 return false;
57 }
58
59 if (!helper_proto.read(connection)) {
60 reader.fail();
61 return false;
62 }
63 return true;
64}
65
66//ProtocolVersion, client side
68 {
69 if(!yarp().canWrite()) {
70 yError(" Missing server method IJoypadControlMsgs::getRemoteProtocolVersion");
71 }
73 bool ok = yarp().write(helper, helper);
74 if (ok) {
75 return helper.helper_proto;}
76 else {
78 return failureproto;}
79}
80
81//ProtocolVersion, client side
83 {
84 auto locproto = this->getLocalProtocolVersion();
85 auto remproto = this->getRemoteProtocolVersion();
86 if (remproto.protocol_version != locproto.protocol_version)
87 {
88 yCError(SERVICE_LOG_COMPONENT) << "Invalid communication protocol.";
89 yCError(SERVICE_LOG_COMPONENT) << "Local Protocol Version: " << locproto.toString();
90 yCError(SERVICE_LOG_COMPONENT) << "Remote Protocol Version: " << remproto.toString();
91 return false;
92 }
93 return true;
94}
95
96//ProtocolVersion, server side
98{
100 //myproto.protocol_version using default value = 0
101 //to change this value add the following line to the .thrift file:
102 //const i16 protocol_version = <your_number_here>
103 myproto.protocol_version = 0;
107 return myproto;
108}
109
110// getAxisCount helper class declaration
112 public yarp::os::Portable
113{
114public:
116 bool write(yarp::os::ConnectionWriter& connection) const override;
117 bool read(yarp::os::ConnectionReader& connection) override;
118
119 class Command :
121 {
122 public:
123 Command() = default;
124 ~Command() override = default;
125
126 bool write(yarp::os::ConnectionWriter& connection) const override;
127 bool read(yarp::os::ConnectionReader& connection) override;
128
129 bool write(const yarp::os::idl::WireWriter& writer) const override;
130 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
131 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
132
133 bool read(yarp::os::idl::WireReader& reader) override;
136 };
137
138 class Reply :
140 {
141 public:
142 Reply() = default;
143 ~Reply() override = default;
144
145 bool write(yarp::os::ConnectionWriter& connection) const override;
146 bool read(yarp::os::ConnectionReader& connection) override;
147
148 bool write(const yarp::os::idl::WireWriter& writer) const override;
149 bool read(yarp::os::idl::WireReader& reader) override;
150
152 };
153
155 void call(IJoypadControlMsgs* ptr);
156
159
160 static constexpr const char* s_tag{"getAxisCount"};
161 static constexpr size_t s_tag_len{1};
162 static constexpr size_t s_cmd_len{1};
163 static constexpr size_t s_reply_len{2};
164 static constexpr const char* s_prototype{"return_getAxisCount IJoypadControlMsgs::getAxisCount()"};
165 static constexpr const char* s_help{""};
166};
167
168// getButtonCount helper class declaration
170 public yarp::os::Portable
171{
172public:
174 bool write(yarp::os::ConnectionWriter& connection) const override;
175 bool read(yarp::os::ConnectionReader& connection) override;
176
177 class Command :
179 {
180 public:
181 Command() = default;
182 ~Command() override = default;
183
184 bool write(yarp::os::ConnectionWriter& connection) const override;
185 bool read(yarp::os::ConnectionReader& connection) override;
186
187 bool write(const yarp::os::idl::WireWriter& writer) const override;
188 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
189 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
190
191 bool read(yarp::os::idl::WireReader& reader) override;
194 };
195
196 class Reply :
198 {
199 public:
200 Reply() = default;
201 ~Reply() override = default;
202
203 bool write(yarp::os::ConnectionWriter& connection) const override;
204 bool read(yarp::os::ConnectionReader& connection) override;
205
206 bool write(const yarp::os::idl::WireWriter& writer) const override;
207 bool read(yarp::os::idl::WireReader& reader) override;
208
210 };
211
213 void call(IJoypadControlMsgs* ptr);
214
217
218 static constexpr const char* s_tag{"getButtonCount"};
219 static constexpr size_t s_tag_len{1};
220 static constexpr size_t s_cmd_len{1};
221 static constexpr size_t s_reply_len{2};
222 static constexpr const char* s_prototype{"return_getButtonCount IJoypadControlMsgs::getButtonCount()"};
223 static constexpr const char* s_help{""};
224};
225
226// getTrackballCount helper class declaration
228 public yarp::os::Portable
229{
230public:
232 bool write(yarp::os::ConnectionWriter& connection) const override;
233 bool read(yarp::os::ConnectionReader& connection) override;
234
235 class Command :
237 {
238 public:
239 Command() = default;
240 ~Command() override = default;
241
242 bool write(yarp::os::ConnectionWriter& connection) const override;
243 bool read(yarp::os::ConnectionReader& connection) override;
244
245 bool write(const yarp::os::idl::WireWriter& writer) const override;
246 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
247 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
248
249 bool read(yarp::os::idl::WireReader& reader) override;
252 };
253
254 class Reply :
256 {
257 public:
258 Reply() = default;
259 ~Reply() override = default;
260
261 bool write(yarp::os::ConnectionWriter& connection) const override;
262 bool read(yarp::os::ConnectionReader& connection) override;
263
264 bool write(const yarp::os::idl::WireWriter& writer) const override;
265 bool read(yarp::os::idl::WireReader& reader) override;
266
268 };
269
271 void call(IJoypadControlMsgs* ptr);
272
275
276 static constexpr const char* s_tag{"getTrackballCount"};
277 static constexpr size_t s_tag_len{1};
278 static constexpr size_t s_cmd_len{1};
279 static constexpr size_t s_reply_len{2};
280 static constexpr const char* s_prototype{"return_getTrackballCount IJoypadControlMsgs::getTrackballCount()"};
281 static constexpr const char* s_help{""};
282};
283
284// getHatCount helper class declaration
286 public yarp::os::Portable
287{
288public:
290 bool write(yarp::os::ConnectionWriter& connection) const override;
291 bool read(yarp::os::ConnectionReader& connection) override;
292
293 class Command :
295 {
296 public:
297 Command() = default;
298 ~Command() override = default;
299
300 bool write(yarp::os::ConnectionWriter& connection) const override;
301 bool read(yarp::os::ConnectionReader& connection) override;
302
303 bool write(const yarp::os::idl::WireWriter& writer) const override;
304 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
305 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
306
307 bool read(yarp::os::idl::WireReader& reader) override;
310 };
311
312 class Reply :
314 {
315 public:
316 Reply() = default;
317 ~Reply() override = default;
318
319 bool write(yarp::os::ConnectionWriter& connection) const override;
320 bool read(yarp::os::ConnectionReader& connection) override;
321
322 bool write(const yarp::os::idl::WireWriter& writer) const override;
323 bool read(yarp::os::idl::WireReader& reader) override;
324
326 };
327
329 void call(IJoypadControlMsgs* ptr);
330
333
334 static constexpr const char* s_tag{"getHatCount"};
335 static constexpr size_t s_tag_len{1};
336 static constexpr size_t s_cmd_len{1};
337 static constexpr size_t s_reply_len{2};
338 static constexpr const char* s_prototype{"return_getHatCount IJoypadControlMsgs::getHatCount()"};
339 static constexpr const char* s_help{""};
340};
341
342// getTouchSurfaceCount helper class declaration
344 public yarp::os::Portable
345{
346public:
348 bool write(yarp::os::ConnectionWriter& connection) const override;
349 bool read(yarp::os::ConnectionReader& connection) override;
350
351 class Command :
353 {
354 public:
355 Command() = default;
356 ~Command() override = default;
357
358 bool write(yarp::os::ConnectionWriter& connection) const override;
359 bool read(yarp::os::ConnectionReader& connection) override;
360
361 bool write(const yarp::os::idl::WireWriter& writer) const override;
362 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
363 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
364
365 bool read(yarp::os::idl::WireReader& reader) override;
368 };
369
370 class Reply :
372 {
373 public:
374 Reply() = default;
375 ~Reply() override = default;
376
377 bool write(yarp::os::ConnectionWriter& connection) const override;
378 bool read(yarp::os::ConnectionReader& connection) override;
379
380 bool write(const yarp::os::idl::WireWriter& writer) const override;
381 bool read(yarp::os::idl::WireReader& reader) override;
382
384 };
385
387 void call(IJoypadControlMsgs* ptr);
388
391
392 static constexpr const char* s_tag{"getTouchSurfaceCount"};
393 static constexpr size_t s_tag_len{1};
394 static constexpr size_t s_cmd_len{1};
395 static constexpr size_t s_reply_len{2};
396 static constexpr const char* s_prototype{"return_getTouchSurfaceCount IJoypadControlMsgs::getTouchSurfaceCount()"};
397 static constexpr const char* s_help{""};
398};
399
400// getStickCount helper class declaration
402 public yarp::os::Portable
403{
404public:
406 bool write(yarp::os::ConnectionWriter& connection) const override;
407 bool read(yarp::os::ConnectionReader& connection) override;
408
409 class Command :
411 {
412 public:
413 Command() = default;
414 ~Command() override = default;
415
416 bool write(yarp::os::ConnectionWriter& connection) const override;
417 bool read(yarp::os::ConnectionReader& connection) override;
418
419 bool write(const yarp::os::idl::WireWriter& writer) const override;
420 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
421 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
422
423 bool read(yarp::os::idl::WireReader& reader) override;
426 };
427
428 class Reply :
430 {
431 public:
432 Reply() = default;
433 ~Reply() override = default;
434
435 bool write(yarp::os::ConnectionWriter& connection) const override;
436 bool read(yarp::os::ConnectionReader& connection) override;
437
438 bool write(const yarp::os::idl::WireWriter& writer) const override;
439 bool read(yarp::os::idl::WireReader& reader) override;
440
442 };
443
445 void call(IJoypadControlMsgs* ptr);
446
449
450 static constexpr const char* s_tag{"getStickCount"};
451 static constexpr size_t s_tag_len{1};
452 static constexpr size_t s_cmd_len{1};
453 static constexpr size_t s_reply_len{2};
454 static constexpr const char* s_prototype{"return_getStickCount IJoypadControlMsgs::getStickCount()"};
455 static constexpr const char* s_help{""};
456};
457
458// getButton helper class declaration
460 public yarp::os::Portable
461{
462public:
464 explicit IJoypadControlMsgs_getButton_helper(const std::int32_t button_id);
465 bool write(yarp::os::ConnectionWriter& connection) const override;
466 bool read(yarp::os::ConnectionReader& connection) override;
467
468 class Command :
470 {
471 public:
472 Command() = default;
473 explicit Command(const std::int32_t button_id);
474
475 ~Command() override = default;
476
477 bool write(yarp::os::ConnectionWriter& connection) const override;
478 bool read(yarp::os::ConnectionReader& connection) override;
479
480 bool write(const yarp::os::idl::WireWriter& writer) const override;
481 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
482 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
483
484 bool read(yarp::os::idl::WireReader& reader) override;
487
488 std::int32_t button_id{0};
489 };
490
491 class Reply :
493 {
494 public:
495 Reply() = default;
496 ~Reply() override = default;
497
498 bool write(yarp::os::ConnectionWriter& connection) const override;
499 bool read(yarp::os::ConnectionReader& connection) override;
500
501 bool write(const yarp::os::idl::WireWriter& writer) const override;
502 bool read(yarp::os::idl::WireReader& reader) override;
503
505 };
506
507 using funcptr_t = return_getButton (*)(const std::int32_t);
508 void call(IJoypadControlMsgs* ptr);
509
512
513 static constexpr const char* s_tag{"getButton"};
514 static constexpr size_t s_tag_len{1};
515 static constexpr size_t s_cmd_len{2};
516 static constexpr size_t s_reply_len{2};
517 static constexpr const char* s_prototype{"return_getButton IJoypadControlMsgs::getButton(const std::int32_t button_id)"};
518 static constexpr const char* s_help{""};
519};
520
521// getTrackball helper class declaration
523 public yarp::os::Portable
524{
525public:
527 explicit IJoypadControlMsgs_getTrackball_helper(const std::int32_t trackball_id);
528 bool write(yarp::os::ConnectionWriter& connection) const override;
529 bool read(yarp::os::ConnectionReader& connection) override;
530
531 class Command :
533 {
534 public:
535 Command() = default;
536 explicit Command(const std::int32_t trackball_id);
537
538 ~Command() override = default;
539
540 bool write(yarp::os::ConnectionWriter& connection) const override;
541 bool read(yarp::os::ConnectionReader& connection) override;
542
543 bool write(const yarp::os::idl::WireWriter& writer) const override;
544 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
545 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
546
547 bool read(yarp::os::idl::WireReader& reader) override;
550
551 std::int32_t trackball_id{0};
552 };
553
554 class Reply :
556 {
557 public:
558 Reply() = default;
559 ~Reply() override = default;
560
561 bool write(yarp::os::ConnectionWriter& connection) const override;
562 bool read(yarp::os::ConnectionReader& connection) override;
563
564 bool write(const yarp::os::idl::WireWriter& writer) const override;
565 bool read(yarp::os::idl::WireReader& reader) override;
566
568 };
569
570 using funcptr_t = return_getTrackball (*)(const std::int32_t);
571 void call(IJoypadControlMsgs* ptr);
572
575
576 static constexpr const char* s_tag{"getTrackball"};
577 static constexpr size_t s_tag_len{1};
578 static constexpr size_t s_cmd_len{2};
579 static constexpr size_t s_reply_len{2};
580 static constexpr const char* s_prototype{"return_getTrackball IJoypadControlMsgs::getTrackball(const std::int32_t trackball_id)"};
581 static constexpr const char* s_help{""};
582};
583
584// getHat helper class declaration
586 public yarp::os::Portable
587{
588public:
590 explicit IJoypadControlMsgs_getHat_helper(const std::int32_t hat_id);
591 bool write(yarp::os::ConnectionWriter& connection) const override;
592 bool read(yarp::os::ConnectionReader& connection) override;
593
594 class Command :
596 {
597 public:
598 Command() = default;
599 explicit Command(const std::int32_t hat_id);
600
601 ~Command() override = default;
602
603 bool write(yarp::os::ConnectionWriter& connection) const override;
604 bool read(yarp::os::ConnectionReader& connection) override;
605
606 bool write(const yarp::os::idl::WireWriter& writer) const override;
607 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
608 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
609
610 bool read(yarp::os::idl::WireReader& reader) override;
613
614 std::int32_t hat_id{0};
615 };
616
617 class Reply :
619 {
620 public:
621 Reply() = default;
622 ~Reply() override = default;
623
624 bool write(yarp::os::ConnectionWriter& connection) const override;
625 bool read(yarp::os::ConnectionReader& connection) override;
626
627 bool write(const yarp::os::idl::WireWriter& writer) const override;
628 bool read(yarp::os::idl::WireReader& reader) override;
629
631 };
632
633 using funcptr_t = return_getHat (*)(const std::int32_t);
634 void call(IJoypadControlMsgs* ptr);
635
638
639 static constexpr const char* s_tag{"getHat"};
640 static constexpr size_t s_tag_len{1};
641 static constexpr size_t s_cmd_len{2};
642 static constexpr size_t s_reply_len{2};
643 static constexpr const char* s_prototype{"return_getHat IJoypadControlMsgs::getHat(const std::int32_t hat_id)"};
644 static constexpr const char* s_help{""};
645};
646
647// getAxis helper class declaration
649 public yarp::os::Portable
650{
651public:
653 explicit IJoypadControlMsgs_getAxis_helper(const std::int32_t axis_id);
654 bool write(yarp::os::ConnectionWriter& connection) const override;
655 bool read(yarp::os::ConnectionReader& connection) override;
656
657 class Command :
659 {
660 public:
661 Command() = default;
662 explicit Command(const std::int32_t axis_id);
663
664 ~Command() override = default;
665
666 bool write(yarp::os::ConnectionWriter& connection) const override;
667 bool read(yarp::os::ConnectionReader& connection) override;
668
669 bool write(const yarp::os::idl::WireWriter& writer) const override;
670 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
671 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
672
673 bool read(yarp::os::idl::WireReader& reader) override;
676
677 std::int32_t axis_id{0};
678 };
679
680 class Reply :
682 {
683 public:
684 Reply() = default;
685 ~Reply() override = default;
686
687 bool write(yarp::os::ConnectionWriter& connection) const override;
688 bool read(yarp::os::ConnectionReader& connection) override;
689
690 bool write(const yarp::os::idl::WireWriter& writer) const override;
691 bool read(yarp::os::idl::WireReader& reader) override;
692
694 };
695
696 using funcptr_t = return_getAxis (*)(const std::int32_t);
697 void call(IJoypadControlMsgs* ptr);
698
701
702 static constexpr const char* s_tag{"getAxis"};
703 static constexpr size_t s_tag_len{1};
704 static constexpr size_t s_cmd_len{2};
705 static constexpr size_t s_reply_len{2};
706 static constexpr const char* s_prototype{"return_getAxis IJoypadControlMsgs::getAxis(const std::int32_t axis_id)"};
707 static constexpr const char* s_help{""};
708};
709
710// getAllAxes helper class declaration
712 public yarp::os::Portable
713{
714public:
716 bool write(yarp::os::ConnectionWriter& connection) const override;
717 bool read(yarp::os::ConnectionReader& connection) override;
718
719 class Command :
721 {
722 public:
723 Command() = default;
724 ~Command() override = default;
725
726 bool write(yarp::os::ConnectionWriter& connection) const override;
727 bool read(yarp::os::ConnectionReader& connection) override;
728
729 bool write(const yarp::os::idl::WireWriter& writer) const override;
730 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
731 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
732
733 bool read(yarp::os::idl::WireReader& reader) override;
736 };
737
738 class Reply :
740 {
741 public:
742 Reply() = default;
743 ~Reply() override = default;
744
745 bool write(yarp::os::ConnectionWriter& connection) const override;
746 bool read(yarp::os::ConnectionReader& connection) override;
747
748 bool write(const yarp::os::idl::WireWriter& writer) const override;
749 bool read(yarp::os::idl::WireReader& reader) override;
750
752 };
753
755 void call(IJoypadControlMsgs* ptr);
756
759
760 static constexpr const char* s_tag{"getAllAxes"};
761 static constexpr size_t s_tag_len{1};
762 static constexpr size_t s_cmd_len{1};
763 static constexpr size_t s_reply_len{2};
764 static constexpr const char* s_prototype{"return_getAllAxes IJoypadControlMsgs::getAllAxes()"};
765 static constexpr const char* s_help{""};
766};
767
768// getStick helper class declaration
770 public yarp::os::Portable
771{
772public:
775 bool write(yarp::os::ConnectionWriter& connection) const override;
776 bool read(yarp::os::ConnectionReader& connection) override;
777
778 class Command :
780 {
781 public:
782 Command() = default;
784
785 ~Command() override = default;
786
787 bool write(yarp::os::ConnectionWriter& connection) const override;
788 bool read(yarp::os::ConnectionReader& connection) override;
789
790 bool write(const yarp::os::idl::WireWriter& writer) const override;
791 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
792 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
793
794 bool read(yarp::os::idl::WireReader& reader) override;
797
798 std::int32_t stick_id{0};
800 };
801
802 class Reply :
804 {
805 public:
806 Reply() = default;
807 ~Reply() override = default;
808
809 bool write(yarp::os::ConnectionWriter& connection) const override;
810 bool read(yarp::os::ConnectionReader& connection) override;
811
812 bool write(const yarp::os::idl::WireWriter& writer) const override;
813 bool read(yarp::os::idl::WireReader& reader) override;
814
816 };
817
819 void call(IJoypadControlMsgs* ptr);
820
823
824 static constexpr const char* s_tag{"getStick"};
825 static constexpr size_t s_tag_len{1};
826 static constexpr size_t s_cmd_len{3};
827 static constexpr size_t s_reply_len{3};
828 static constexpr const char* s_prototype{"return_getStick IJoypadControlMsgs::getStick(const std::int32_t stick_id, const yarp::dev::IJoypadController::JoypadCtrl_coordinateMode mode)"};
829 static constexpr const char* s_help{""};
830};
831
832// getTouch helper class declaration
834 public yarp::os::Portable
835{
836public:
838 explicit IJoypadControlMsgs_getTouch_helper(const std::int32_t touch_id);
839 bool write(yarp::os::ConnectionWriter& connection) const override;
840 bool read(yarp::os::ConnectionReader& connection) override;
841
842 class Command :
844 {
845 public:
846 Command() = default;
847 explicit Command(const std::int32_t touch_id);
848
849 ~Command() override = default;
850
851 bool write(yarp::os::ConnectionWriter& connection) const override;
852 bool read(yarp::os::ConnectionReader& connection) override;
853
854 bool write(const yarp::os::idl::WireWriter& writer) const override;
855 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
856 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
857
858 bool read(yarp::os::idl::WireReader& reader) override;
861
862 std::int32_t touch_id{0};
863 };
864
865 class Reply :
867 {
868 public:
869 Reply() = default;
870 ~Reply() override = default;
871
872 bool write(yarp::os::ConnectionWriter& connection) const override;
873 bool read(yarp::os::ConnectionReader& connection) override;
874
875 bool write(const yarp::os::idl::WireWriter& writer) const override;
876 bool read(yarp::os::idl::WireReader& reader) override;
877
879 };
880
881 using funcptr_t = return_getTouch (*)(const std::int32_t);
882 void call(IJoypadControlMsgs* ptr);
883
886
887 static constexpr const char* s_tag{"getTouch"};
888 static constexpr size_t s_tag_len{1};
889 static constexpr size_t s_cmd_len{2};
890 static constexpr size_t s_reply_len{2};
891 static constexpr const char* s_prototype{"return_getTouch IJoypadControlMsgs::getTouch(const std::int32_t touch_id)"};
892 static constexpr const char* s_help{""};
893};
894
895// getAxisCount helper class implementation
897{
898 return cmd.write(connection);
899}
900
902{
903 return reply.read(connection);
904}
905
907{
908 yarp::os::idl::WireWriter writer(connection);
909 if (!writer.writeListHeader(s_cmd_len)) {
910 return false;
911 }
912 return write(writer);
913}
914
916{
917 yarp::os::idl::WireReader reader(connection);
918 if (!reader.readListHeader()) {
919 reader.fail();
920 return false;
921 }
922 return read(reader);
923}
924
926{
927 if (!writeTag(writer)) {
928 return false;
929 }
930 if (!writeArgs(writer)) {
931 return false;
932 }
933 return true;
934}
935
937{
938 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
939 return false;
940 }
941 return true;
942}
943
945{
946 return true;
947}
948
950{
951 if (!readTag(reader)) {
952 return false;
953 }
954 if (!readArgs(reader)) {
955 return false;
956 }
957 return true;
958}
959
961{
962 std::string tag = reader.readTag(s_tag_len);
963 if (reader.isError()) {
964 return false;
965 }
966 if (tag != s_tag) {
967 reader.fail();
968 return false;
969 }
970 return true;
971}
972
974{
975 if (!reader.noMore()) {
976 reader.fail();
977 return false;
978 }
979 return true;
980}
981
983{
984 yarp::os::idl::WireWriter writer(connection);
985 return write(writer);
986}
987
989{
990 yarp::os::idl::WireReader reader(connection);
991 return read(reader);
992}
993
995{
996 if (!writer.isNull()) {
997 if (!writer.writeListHeader(s_reply_len)) {
998 return false;
999 }
1000 if (!writer.write(return_helper)) {
1001 return false;
1002 }
1003 }
1004 return true;
1005}
1006
1008{
1009 if (!reader.readListReturn()) {
1010 return false;
1011 }
1012 if (reader.noMore()) {
1013 reader.fail();
1014 return false;
1015 }
1016 if (!reader.read(return_helper)) {
1017 reader.fail();
1018 return false;
1019 }
1020 return true;
1021}
1022
1027
1028// getButtonCount helper class implementation
1030{
1031 return cmd.write(connection);
1032}
1033
1035{
1036 return reply.read(connection);
1037}
1038
1040{
1041 yarp::os::idl::WireWriter writer(connection);
1042 if (!writer.writeListHeader(s_cmd_len)) {
1043 return false;
1044 }
1045 return write(writer);
1046}
1047
1049{
1050 yarp::os::idl::WireReader reader(connection);
1051 if (!reader.readListHeader()) {
1052 reader.fail();
1053 return false;
1054 }
1055 return read(reader);
1056}
1057
1059{
1060 if (!writeTag(writer)) {
1061 return false;
1062 }
1063 if (!writeArgs(writer)) {
1064 return false;
1065 }
1066 return true;
1067}
1068
1070{
1071 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1072 return false;
1073 }
1074 return true;
1075}
1076
1078{
1079 return true;
1080}
1081
1083{
1084 if (!readTag(reader)) {
1085 return false;
1086 }
1087 if (!readArgs(reader)) {
1088 return false;
1089 }
1090 return true;
1091}
1092
1094{
1095 std::string tag = reader.readTag(s_tag_len);
1096 if (reader.isError()) {
1097 return false;
1098 }
1099 if (tag != s_tag) {
1100 reader.fail();
1101 return false;
1102 }
1103 return true;
1104}
1105
1107{
1108 if (!reader.noMore()) {
1109 reader.fail();
1110 return false;
1111 }
1112 return true;
1113}
1114
1116{
1117 yarp::os::idl::WireWriter writer(connection);
1118 return write(writer);
1119}
1120
1122{
1123 yarp::os::idl::WireReader reader(connection);
1124 return read(reader);
1125}
1126
1128{
1129 if (!writer.isNull()) {
1130 if (!writer.writeListHeader(s_reply_len)) {
1131 return false;
1132 }
1133 if (!writer.write(return_helper)) {
1134 return false;
1135 }
1136 }
1137 return true;
1138}
1139
1141{
1142 if (!reader.readListReturn()) {
1143 return false;
1144 }
1145 if (reader.noMore()) {
1146 reader.fail();
1147 return false;
1148 }
1149 if (!reader.read(return_helper)) {
1150 reader.fail();
1151 return false;
1152 }
1153 return true;
1154}
1155
1160
1161// getTrackballCount helper class implementation
1163{
1164 return cmd.write(connection);
1165}
1166
1171
1173{
1174 yarp::os::idl::WireWriter writer(connection);
1175 if (!writer.writeListHeader(s_cmd_len)) {
1176 return false;
1177 }
1178 return write(writer);
1179}
1180
1182{
1183 yarp::os::idl::WireReader reader(connection);
1184 if (!reader.readListHeader()) {
1185 reader.fail();
1186 return false;
1187 }
1188 return read(reader);
1189}
1190
1192{
1193 if (!writeTag(writer)) {
1194 return false;
1195 }
1196 if (!writeArgs(writer)) {
1197 return false;
1198 }
1199 return true;
1200}
1201
1203{
1204 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1205 return false;
1206 }
1207 return true;
1208}
1209
1211{
1212 return true;
1213}
1214
1216{
1217 if (!readTag(reader)) {
1218 return false;
1219 }
1220 if (!readArgs(reader)) {
1221 return false;
1222 }
1223 return true;
1224}
1225
1227{
1228 std::string tag = reader.readTag(s_tag_len);
1229 if (reader.isError()) {
1230 return false;
1231 }
1232 if (tag != s_tag) {
1233 reader.fail();
1234 return false;
1235 }
1236 return true;
1237}
1238
1240{
1241 if (!reader.noMore()) {
1242 reader.fail();
1243 return false;
1244 }
1245 return true;
1246}
1247
1249{
1250 yarp::os::idl::WireWriter writer(connection);
1251 return write(writer);
1252}
1253
1255{
1256 yarp::os::idl::WireReader reader(connection);
1257 return read(reader);
1258}
1259
1261{
1262 if (!writer.isNull()) {
1263 if (!writer.writeListHeader(s_reply_len)) {
1264 return false;
1265 }
1266 if (!writer.write(return_helper)) {
1267 return false;
1268 }
1269 }
1270 return true;
1271}
1272
1274{
1275 if (!reader.readListReturn()) {
1276 return false;
1277 }
1278 if (reader.noMore()) {
1279 reader.fail();
1280 return false;
1281 }
1282 if (!reader.read(return_helper)) {
1283 reader.fail();
1284 return false;
1285 }
1286 return true;
1287}
1288
1293
1294// getHatCount helper class implementation
1296{
1297 return cmd.write(connection);
1298}
1299
1301{
1302 return reply.read(connection);
1303}
1304
1306{
1307 yarp::os::idl::WireWriter writer(connection);
1308 if (!writer.writeListHeader(s_cmd_len)) {
1309 return false;
1310 }
1311 return write(writer);
1312}
1313
1315{
1316 yarp::os::idl::WireReader reader(connection);
1317 if (!reader.readListHeader()) {
1318 reader.fail();
1319 return false;
1320 }
1321 return read(reader);
1322}
1323
1325{
1326 if (!writeTag(writer)) {
1327 return false;
1328 }
1329 if (!writeArgs(writer)) {
1330 return false;
1331 }
1332 return true;
1333}
1334
1336{
1337 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1338 return false;
1339 }
1340 return true;
1341}
1342
1344{
1345 return true;
1346}
1347
1349{
1350 if (!readTag(reader)) {
1351 return false;
1352 }
1353 if (!readArgs(reader)) {
1354 return false;
1355 }
1356 return true;
1357}
1358
1360{
1361 std::string tag = reader.readTag(s_tag_len);
1362 if (reader.isError()) {
1363 return false;
1364 }
1365 if (tag != s_tag) {
1366 reader.fail();
1367 return false;
1368 }
1369 return true;
1370}
1371
1373{
1374 if (!reader.noMore()) {
1375 reader.fail();
1376 return false;
1377 }
1378 return true;
1379}
1380
1382{
1383 yarp::os::idl::WireWriter writer(connection);
1384 return write(writer);
1385}
1386
1388{
1389 yarp::os::idl::WireReader reader(connection);
1390 return read(reader);
1391}
1392
1394{
1395 if (!writer.isNull()) {
1396 if (!writer.writeListHeader(s_reply_len)) {
1397 return false;
1398 }
1399 if (!writer.write(return_helper)) {
1400 return false;
1401 }
1402 }
1403 return true;
1404}
1405
1407{
1408 if (!reader.readListReturn()) {
1409 return false;
1410 }
1411 if (reader.noMore()) {
1412 reader.fail();
1413 return false;
1414 }
1415 if (!reader.read(return_helper)) {
1416 reader.fail();
1417 return false;
1418 }
1419 return true;
1420}
1421
1426
1427// getTouchSurfaceCount helper class implementation
1429{
1430 return cmd.write(connection);
1431}
1432
1437
1439{
1440 yarp::os::idl::WireWriter writer(connection);
1441 if (!writer.writeListHeader(s_cmd_len)) {
1442 return false;
1443 }
1444 return write(writer);
1445}
1446
1448{
1449 yarp::os::idl::WireReader reader(connection);
1450 if (!reader.readListHeader()) {
1451 reader.fail();
1452 return false;
1453 }
1454 return read(reader);
1455}
1456
1458{
1459 if (!writeTag(writer)) {
1460 return false;
1461 }
1462 if (!writeArgs(writer)) {
1463 return false;
1464 }
1465 return true;
1466}
1467
1469{
1470 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1471 return false;
1472 }
1473 return true;
1474}
1475
1477{
1478 return true;
1479}
1480
1482{
1483 if (!readTag(reader)) {
1484 return false;
1485 }
1486 if (!readArgs(reader)) {
1487 return false;
1488 }
1489 return true;
1490}
1491
1493{
1494 std::string tag = reader.readTag(s_tag_len);
1495 if (reader.isError()) {
1496 return false;
1497 }
1498 if (tag != s_tag) {
1499 reader.fail();
1500 return false;
1501 }
1502 return true;
1503}
1504
1506{
1507 if (!reader.noMore()) {
1508 reader.fail();
1509 return false;
1510 }
1511 return true;
1512}
1513
1515{
1516 yarp::os::idl::WireWriter writer(connection);
1517 return write(writer);
1518}
1519
1521{
1522 yarp::os::idl::WireReader reader(connection);
1523 return read(reader);
1524}
1525
1527{
1528 if (!writer.isNull()) {
1529 if (!writer.writeListHeader(s_reply_len)) {
1530 return false;
1531 }
1532 if (!writer.write(return_helper)) {
1533 return false;
1534 }
1535 }
1536 return true;
1537}
1538
1540{
1541 if (!reader.readListReturn()) {
1542 return false;
1543 }
1544 if (reader.noMore()) {
1545 reader.fail();
1546 return false;
1547 }
1548 if (!reader.read(return_helper)) {
1549 reader.fail();
1550 return false;
1551 }
1552 return true;
1553}
1554
1559
1560// getStickCount helper class implementation
1562{
1563 return cmd.write(connection);
1564}
1565
1567{
1568 return reply.read(connection);
1569}
1570
1572{
1573 yarp::os::idl::WireWriter writer(connection);
1574 if (!writer.writeListHeader(s_cmd_len)) {
1575 return false;
1576 }
1577 return write(writer);
1578}
1579
1581{
1582 yarp::os::idl::WireReader reader(connection);
1583 if (!reader.readListHeader()) {
1584 reader.fail();
1585 return false;
1586 }
1587 return read(reader);
1588}
1589
1591{
1592 if (!writeTag(writer)) {
1593 return false;
1594 }
1595 if (!writeArgs(writer)) {
1596 return false;
1597 }
1598 return true;
1599}
1600
1602{
1603 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1604 return false;
1605 }
1606 return true;
1607}
1608
1610{
1611 return true;
1612}
1613
1615{
1616 if (!readTag(reader)) {
1617 return false;
1618 }
1619 if (!readArgs(reader)) {
1620 return false;
1621 }
1622 return true;
1623}
1624
1626{
1627 std::string tag = reader.readTag(s_tag_len);
1628 if (reader.isError()) {
1629 return false;
1630 }
1631 if (tag != s_tag) {
1632 reader.fail();
1633 return false;
1634 }
1635 return true;
1636}
1637
1639{
1640 if (!reader.noMore()) {
1641 reader.fail();
1642 return false;
1643 }
1644 return true;
1645}
1646
1648{
1649 yarp::os::idl::WireWriter writer(connection);
1650 return write(writer);
1651}
1652
1654{
1655 yarp::os::idl::WireReader reader(connection);
1656 return read(reader);
1657}
1658
1660{
1661 if (!writer.isNull()) {
1662 if (!writer.writeListHeader(s_reply_len)) {
1663 return false;
1664 }
1665 if (!writer.write(return_helper)) {
1666 return false;
1667 }
1668 }
1669 return true;
1670}
1671
1673{
1674 if (!reader.readListReturn()) {
1675 return false;
1676 }
1677 if (reader.noMore()) {
1678 reader.fail();
1679 return false;
1680 }
1681 if (!reader.read(return_helper)) {
1682 reader.fail();
1683 return false;
1684 }
1685 return true;
1686}
1687
1692
1693// getButton helper class implementation
1695 cmd{button_id}
1696{
1697}
1698
1700{
1701 return cmd.write(connection);
1702}
1703
1705{
1706 return reply.read(connection);
1707}
1708
1710 button_id{button_id}
1711{
1712}
1713
1715{
1716 yarp::os::idl::WireWriter writer(connection);
1717 if (!writer.writeListHeader(s_cmd_len)) {
1718 return false;
1719 }
1720 return write(writer);
1721}
1722
1724{
1725 yarp::os::idl::WireReader reader(connection);
1726 if (!reader.readListHeader()) {
1727 reader.fail();
1728 return false;
1729 }
1730 return read(reader);
1731}
1732
1734{
1735 if (!writeTag(writer)) {
1736 return false;
1737 }
1738 if (!writeArgs(writer)) {
1739 return false;
1740 }
1741 return true;
1742}
1743
1745{
1746 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1747 return false;
1748 }
1749 return true;
1750}
1751
1753{
1754 if (!writer.writeI32(button_id)) {
1755 return false;
1756 }
1757 return true;
1758}
1759
1761{
1762 if (!readTag(reader)) {
1763 return false;
1764 }
1765 if (!readArgs(reader)) {
1766 return false;
1767 }
1768 return true;
1769}
1770
1772{
1773 std::string tag = reader.readTag(s_tag_len);
1774 if (reader.isError()) {
1775 return false;
1776 }
1777 if (tag != s_tag) {
1778 reader.fail();
1779 return false;
1780 }
1781 return true;
1782}
1783
1785{
1786 if (reader.noMore()) {
1787 reader.fail();
1788 return false;
1789 }
1790 if (!reader.readI32(button_id)) {
1791 reader.fail();
1792 return false;
1793 }
1794 if (!reader.noMore()) {
1795 reader.fail();
1796 return false;
1797 }
1798 return true;
1799}
1800
1802{
1803 yarp::os::idl::WireWriter writer(connection);
1804 return write(writer);
1805}
1806
1808{
1809 yarp::os::idl::WireReader reader(connection);
1810 return read(reader);
1811}
1812
1814{
1815 if (!writer.isNull()) {
1816 if (!writer.writeListHeader(s_reply_len)) {
1817 return false;
1818 }
1819 if (!writer.write(return_helper)) {
1820 return false;
1821 }
1822 }
1823 return true;
1824}
1825
1827{
1828 if (!reader.readListReturn()) {
1829 return false;
1830 }
1831 if (reader.noMore()) {
1832 reader.fail();
1833 return false;
1834 }
1835 if (!reader.read(return_helper)) {
1836 reader.fail();
1837 return false;
1838 }
1839 return true;
1840}
1841
1846
1847// getTrackball helper class implementation
1849 cmd{trackball_id}
1850{
1851}
1852
1854{
1855 return cmd.write(connection);
1856}
1857
1859{
1860 return reply.read(connection);
1861}
1862
1864 trackball_id{trackball_id}
1865{
1866}
1867
1869{
1870 yarp::os::idl::WireWriter writer(connection);
1871 if (!writer.writeListHeader(s_cmd_len)) {
1872 return false;
1873 }
1874 return write(writer);
1875}
1876
1878{
1879 yarp::os::idl::WireReader reader(connection);
1880 if (!reader.readListHeader()) {
1881 reader.fail();
1882 return false;
1883 }
1884 return read(reader);
1885}
1886
1888{
1889 if (!writeTag(writer)) {
1890 return false;
1891 }
1892 if (!writeArgs(writer)) {
1893 return false;
1894 }
1895 return true;
1896}
1897
1899{
1900 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1901 return false;
1902 }
1903 return true;
1904}
1905
1907{
1908 if (!writer.writeI32(trackball_id)) {
1909 return false;
1910 }
1911 return true;
1912}
1913
1915{
1916 if (!readTag(reader)) {
1917 return false;
1918 }
1919 if (!readArgs(reader)) {
1920 return false;
1921 }
1922 return true;
1923}
1924
1926{
1927 std::string tag = reader.readTag(s_tag_len);
1928 if (reader.isError()) {
1929 return false;
1930 }
1931 if (tag != s_tag) {
1932 reader.fail();
1933 return false;
1934 }
1935 return true;
1936}
1937
1939{
1940 if (reader.noMore()) {
1941 reader.fail();
1942 return false;
1943 }
1944 if (!reader.readI32(trackball_id)) {
1945 reader.fail();
1946 return false;
1947 }
1948 if (!reader.noMore()) {
1949 reader.fail();
1950 return false;
1951 }
1952 return true;
1953}
1954
1956{
1957 yarp::os::idl::WireWriter writer(connection);
1958 return write(writer);
1959}
1960
1962{
1963 yarp::os::idl::WireReader reader(connection);
1964 return read(reader);
1965}
1966
1968{
1969 if (!writer.isNull()) {
1970 if (!writer.writeListHeader(s_reply_len)) {
1971 return false;
1972 }
1973 if (!writer.write(return_helper)) {
1974 return false;
1975 }
1976 }
1977 return true;
1978}
1979
1981{
1982 if (!reader.readListReturn()) {
1983 return false;
1984 }
1985 if (reader.noMore()) {
1986 reader.fail();
1987 return false;
1988 }
1989 if (!reader.read(return_helper)) {
1990 reader.fail();
1991 return false;
1992 }
1993 return true;
1994}
1995
2000
2001// getHat helper class implementation
2003 cmd{hat_id}
2004{
2005}
2006
2008{
2009 return cmd.write(connection);
2010}
2011
2013{
2014 return reply.read(connection);
2015}
2016
2018 hat_id{hat_id}
2019{
2020}
2021
2023{
2024 yarp::os::idl::WireWriter writer(connection);
2025 if (!writer.writeListHeader(s_cmd_len)) {
2026 return false;
2027 }
2028 return write(writer);
2029}
2030
2032{
2033 yarp::os::idl::WireReader reader(connection);
2034 if (!reader.readListHeader()) {
2035 reader.fail();
2036 return false;
2037 }
2038 return read(reader);
2039}
2040
2042{
2043 if (!writeTag(writer)) {
2044 return false;
2045 }
2046 if (!writeArgs(writer)) {
2047 return false;
2048 }
2049 return true;
2050}
2051
2053{
2054 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2055 return false;
2056 }
2057 return true;
2058}
2059
2061{
2062 if (!writer.writeI32(hat_id)) {
2063 return false;
2064 }
2065 return true;
2066}
2067
2069{
2070 if (!readTag(reader)) {
2071 return false;
2072 }
2073 if (!readArgs(reader)) {
2074 return false;
2075 }
2076 return true;
2077}
2078
2080{
2081 std::string tag = reader.readTag(s_tag_len);
2082 if (reader.isError()) {
2083 return false;
2084 }
2085 if (tag != s_tag) {
2086 reader.fail();
2087 return false;
2088 }
2089 return true;
2090}
2091
2093{
2094 if (reader.noMore()) {
2095 reader.fail();
2096 return false;
2097 }
2098 if (!reader.readI32(hat_id)) {
2099 reader.fail();
2100 return false;
2101 }
2102 if (!reader.noMore()) {
2103 reader.fail();
2104 return false;
2105 }
2106 return true;
2107}
2108
2110{
2111 yarp::os::idl::WireWriter writer(connection);
2112 return write(writer);
2113}
2114
2116{
2117 yarp::os::idl::WireReader reader(connection);
2118 return read(reader);
2119}
2120
2122{
2123 if (!writer.isNull()) {
2124 if (!writer.writeListHeader(s_reply_len)) {
2125 return false;
2126 }
2127 if (!writer.write(return_helper)) {
2128 return false;
2129 }
2130 }
2131 return true;
2132}
2133
2135{
2136 if (!reader.readListReturn()) {
2137 return false;
2138 }
2139 if (reader.noMore()) {
2140 reader.fail();
2141 return false;
2142 }
2143 if (!reader.read(return_helper)) {
2144 reader.fail();
2145 return false;
2146 }
2147 return true;
2148}
2149
2154
2155// getAxis helper class implementation
2157 cmd{axis_id}
2158{
2159}
2160
2162{
2163 return cmd.write(connection);
2164}
2165
2167{
2168 return reply.read(connection);
2169}
2170
2172 axis_id{axis_id}
2173{
2174}
2175
2177{
2178 yarp::os::idl::WireWriter writer(connection);
2179 if (!writer.writeListHeader(s_cmd_len)) {
2180 return false;
2181 }
2182 return write(writer);
2183}
2184
2186{
2187 yarp::os::idl::WireReader reader(connection);
2188 if (!reader.readListHeader()) {
2189 reader.fail();
2190 return false;
2191 }
2192 return read(reader);
2193}
2194
2196{
2197 if (!writeTag(writer)) {
2198 return false;
2199 }
2200 if (!writeArgs(writer)) {
2201 return false;
2202 }
2203 return true;
2204}
2205
2207{
2208 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2209 return false;
2210 }
2211 return true;
2212}
2213
2215{
2216 if (!writer.writeI32(axis_id)) {
2217 return false;
2218 }
2219 return true;
2220}
2221
2223{
2224 if (!readTag(reader)) {
2225 return false;
2226 }
2227 if (!readArgs(reader)) {
2228 return false;
2229 }
2230 return true;
2231}
2232
2234{
2235 std::string tag = reader.readTag(s_tag_len);
2236 if (reader.isError()) {
2237 return false;
2238 }
2239 if (tag != s_tag) {
2240 reader.fail();
2241 return false;
2242 }
2243 return true;
2244}
2245
2247{
2248 if (reader.noMore()) {
2249 reader.fail();
2250 return false;
2251 }
2252 if (!reader.readI32(axis_id)) {
2253 reader.fail();
2254 return false;
2255 }
2256 if (!reader.noMore()) {
2257 reader.fail();
2258 return false;
2259 }
2260 return true;
2261}
2262
2264{
2265 yarp::os::idl::WireWriter writer(connection);
2266 return write(writer);
2267}
2268
2270{
2271 yarp::os::idl::WireReader reader(connection);
2272 return read(reader);
2273}
2274
2276{
2277 if (!writer.isNull()) {
2278 if (!writer.writeListHeader(s_reply_len)) {
2279 return false;
2280 }
2281 if (!writer.write(return_helper)) {
2282 return false;
2283 }
2284 }
2285 return true;
2286}
2287
2289{
2290 if (!reader.readListReturn()) {
2291 return false;
2292 }
2293 if (reader.noMore()) {
2294 reader.fail();
2295 return false;
2296 }
2297 if (!reader.read(return_helper)) {
2298 reader.fail();
2299 return false;
2300 }
2301 return true;
2302}
2303
2308
2309// getAllAxes helper class implementation
2311{
2312 return cmd.write(connection);
2313}
2314
2316{
2317 return reply.read(connection);
2318}
2319
2321{
2322 yarp::os::idl::WireWriter writer(connection);
2323 if (!writer.writeListHeader(s_cmd_len)) {
2324 return false;
2325 }
2326 return write(writer);
2327}
2328
2330{
2331 yarp::os::idl::WireReader reader(connection);
2332 if (!reader.readListHeader()) {
2333 reader.fail();
2334 return false;
2335 }
2336 return read(reader);
2337}
2338
2340{
2341 if (!writeTag(writer)) {
2342 return false;
2343 }
2344 if (!writeArgs(writer)) {
2345 return false;
2346 }
2347 return true;
2348}
2349
2351{
2352 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2353 return false;
2354 }
2355 return true;
2356}
2357
2359{
2360 return true;
2361}
2362
2364{
2365 if (!readTag(reader)) {
2366 return false;
2367 }
2368 if (!readArgs(reader)) {
2369 return false;
2370 }
2371 return true;
2372}
2373
2375{
2376 std::string tag = reader.readTag(s_tag_len);
2377 if (reader.isError()) {
2378 return false;
2379 }
2380 if (tag != s_tag) {
2381 reader.fail();
2382 return false;
2383 }
2384 return true;
2385}
2386
2388{
2389 if (!reader.noMore()) {
2390 reader.fail();
2391 return false;
2392 }
2393 return true;
2394}
2395
2397{
2398 yarp::os::idl::WireWriter writer(connection);
2399 return write(writer);
2400}
2401
2403{
2404 yarp::os::idl::WireReader reader(connection);
2405 return read(reader);
2406}
2407
2409{
2410 if (!writer.isNull()) {
2411 if (!writer.writeListHeader(s_reply_len)) {
2412 return false;
2413 }
2414 if (!writer.write(return_helper)) {
2415 return false;
2416 }
2417 }
2418 return true;
2419}
2420
2422{
2423 if (!reader.readListReturn()) {
2424 return false;
2425 }
2426 if (reader.noMore()) {
2427 reader.fail();
2428 return false;
2429 }
2430 if (!reader.read(return_helper)) {
2431 reader.fail();
2432 return false;
2433 }
2434 return true;
2435}
2436
2441
2442// getStick helper class implementation
2447
2449{
2450 return cmd.write(connection);
2451}
2452
2454{
2455 return reply.read(connection);
2456}
2457
2459 stick_id{stick_id},
2460 mode{mode}
2461{
2462}
2463
2465{
2466 yarp::os::idl::WireWriter writer(connection);
2467 if (!writer.writeListHeader(s_cmd_len)) {
2468 return false;
2469 }
2470 return write(writer);
2471}
2472
2474{
2475 yarp::os::idl::WireReader reader(connection);
2476 if (!reader.readListHeader()) {
2477 reader.fail();
2478 return false;
2479 }
2480 return read(reader);
2481}
2482
2484{
2485 if (!writeTag(writer)) {
2486 return false;
2487 }
2488 if (!writeArgs(writer)) {
2489 return false;
2490 }
2491 return true;
2492}
2493
2495{
2496 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2497 return false;
2498 }
2499 return true;
2500}
2501
2503{
2504 if (!writer.writeI32(stick_id)) {
2505 return false;
2506 }
2507 if (!writer.writeI32(static_cast<int32_t>(mode))) {
2508 return false;
2509 }
2510 return true;
2511}
2512
2514{
2515 if (!readTag(reader)) {
2516 return false;
2517 }
2518 if (!readArgs(reader)) {
2519 return false;
2520 }
2521 return true;
2522}
2523
2525{
2526 std::string tag = reader.readTag(s_tag_len);
2527 if (reader.isError()) {
2528 return false;
2529 }
2530 if (tag != s_tag) {
2531 reader.fail();
2532 return false;
2533 }
2534 return true;
2535}
2536
2538{
2539 if (reader.noMore()) {
2540 reader.fail();
2541 return false;
2542 }
2543 if (!reader.readI32(stick_id)) {
2544 reader.fail();
2545 return false;
2546 }
2547 if (reader.noMore()) {
2548 reader.fail();
2549 return false;
2550 }
2551 int32_t _ecast;
2552 if (!reader.readI32(_ecast)) {
2553 reader.fail();
2554 return false;
2555 }
2557 if (!reader.noMore()) {
2558 reader.fail();
2559 return false;
2560 }
2561 return true;
2562}
2563
2565{
2566 yarp::os::idl::WireWriter writer(connection);
2567 return write(writer);
2568}
2569
2571{
2572 yarp::os::idl::WireReader reader(connection);
2573 return read(reader);
2574}
2575
2577{
2578 if (!writer.isNull()) {
2579 if (!writer.writeListHeader(s_reply_len)) {
2580 return false;
2581 }
2582 if (!writer.write(return_helper)) {
2583 return false;
2584 }
2585 }
2586 return true;
2587}
2588
2590{
2591 if (!reader.readListReturn()) {
2592 return false;
2593 }
2594 if (reader.noMore()) {
2595 reader.fail();
2596 return false;
2597 }
2598 if (!reader.read(return_helper)) {
2599 reader.fail();
2600 return false;
2601 }
2602 return true;
2603}
2604
2609
2610// getTouch helper class implementation
2612 cmd{touch_id}
2613{
2614}
2615
2617{
2618 return cmd.write(connection);
2619}
2620
2622{
2623 return reply.read(connection);
2624}
2625
2627 touch_id{touch_id}
2628{
2629}
2630
2632{
2633 yarp::os::idl::WireWriter writer(connection);
2634 if (!writer.writeListHeader(s_cmd_len)) {
2635 return false;
2636 }
2637 return write(writer);
2638}
2639
2641{
2642 yarp::os::idl::WireReader reader(connection);
2643 if (!reader.readListHeader()) {
2644 reader.fail();
2645 return false;
2646 }
2647 return read(reader);
2648}
2649
2651{
2652 if (!writeTag(writer)) {
2653 return false;
2654 }
2655 if (!writeArgs(writer)) {
2656 return false;
2657 }
2658 return true;
2659}
2660
2662{
2663 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2664 return false;
2665 }
2666 return true;
2667}
2668
2670{
2671 if (!writer.writeI32(touch_id)) {
2672 return false;
2673 }
2674 return true;
2675}
2676
2678{
2679 if (!readTag(reader)) {
2680 return false;
2681 }
2682 if (!readArgs(reader)) {
2683 return false;
2684 }
2685 return true;
2686}
2687
2689{
2690 std::string tag = reader.readTag(s_tag_len);
2691 if (reader.isError()) {
2692 return false;
2693 }
2694 if (tag != s_tag) {
2695 reader.fail();
2696 return false;
2697 }
2698 return true;
2699}
2700
2702{
2703 if (reader.noMore()) {
2704 reader.fail();
2705 return false;
2706 }
2707 if (!reader.readI32(touch_id)) {
2708 reader.fail();
2709 return false;
2710 }
2711 if (!reader.noMore()) {
2712 reader.fail();
2713 return false;
2714 }
2715 return true;
2716}
2717
2719{
2720 yarp::os::idl::WireWriter writer(connection);
2721 return write(writer);
2722}
2723
2725{
2726 yarp::os::idl::WireReader reader(connection);
2727 return read(reader);
2728}
2729
2731{
2732 if (!writer.isNull()) {
2733 if (!writer.writeListHeader(s_reply_len)) {
2734 return false;
2735 }
2736 if (!writer.write(return_helper)) {
2737 return false;
2738 }
2739 }
2740 return true;
2741}
2742
2744{
2745 if (!reader.readListReturn()) {
2746 return false;
2747 }
2748 if (reader.noMore()) {
2749 reader.fail();
2750 return false;
2751 }
2752 if (!reader.read(return_helper)) {
2753 reader.fail();
2754 return false;
2755 }
2756 return true;
2757}
2758
2763
2764// Constructor
2766{
2767 yarp().setOwner(*this);
2768}
2769
2771{
2772 if (!yarp().canWrite()) {
2773 yError("Missing server method '%s'?", IJoypadControlMsgs_getAxisCount_helper::s_prototype);
2774 }
2776 bool ok = yarp().write(helper, helper);
2777 return ok ? helper.reply.return_helper : return_getAxisCount{};
2778}
2779
2781{
2782 if (!yarp().canWrite()) {
2783 yError("Missing server method '%s'?", IJoypadControlMsgs_getButtonCount_helper::s_prototype);
2784 }
2786 bool ok = yarp().write(helper, helper);
2787 return ok ? helper.reply.return_helper : return_getButtonCount{};
2788}
2789
2791{
2792 if (!yarp().canWrite()) {
2794 }
2796 bool ok = yarp().write(helper, helper);
2797 return ok ? helper.reply.return_helper : return_getTrackballCount{};
2798}
2799
2801{
2802 if (!yarp().canWrite()) {
2803 yError("Missing server method '%s'?", IJoypadControlMsgs_getHatCount_helper::s_prototype);
2804 }
2806 bool ok = yarp().write(helper, helper);
2807 return ok ? helper.reply.return_helper : return_getHatCount{};
2808}
2809
2811{
2812 if (!yarp().canWrite()) {
2814 }
2816 bool ok = yarp().write(helper, helper);
2817 return ok ? helper.reply.return_helper : return_getTouchSurfaceCount{};
2818}
2819
2821{
2822 if (!yarp().canWrite()) {
2823 yError("Missing server method '%s'?", IJoypadControlMsgs_getStickCount_helper::s_prototype);
2824 }
2826 bool ok = yarp().write(helper, helper);
2827 return ok ? helper.reply.return_helper : return_getStickCount{};
2828}
2829
2831{
2832 if (!yarp().canWrite()) {
2833 yError("Missing server method '%s'?", IJoypadControlMsgs_getButton_helper::s_prototype);
2834 }
2835 IJoypadControlMsgs_getButton_helper helper{button_id};
2836 bool ok = yarp().write(helper, helper);
2837 return ok ? helper.reply.return_helper : return_getButton{};
2838}
2839
2841{
2842 if (!yarp().canWrite()) {
2843 yError("Missing server method '%s'?", IJoypadControlMsgs_getTrackball_helper::s_prototype);
2844 }
2845 IJoypadControlMsgs_getTrackball_helper helper{trackball_id};
2846 bool ok = yarp().write(helper, helper);
2847 return ok ? helper.reply.return_helper : return_getTrackball{};
2848}
2849
2851{
2852 if (!yarp().canWrite()) {
2853 yError("Missing server method '%s'?", IJoypadControlMsgs_getHat_helper::s_prototype);
2854 }
2855 IJoypadControlMsgs_getHat_helper helper{hat_id};
2856 bool ok = yarp().write(helper, helper);
2857 return ok ? helper.reply.return_helper : return_getHat{};
2858}
2859
2861{
2862 if (!yarp().canWrite()) {
2863 yError("Missing server method '%s'?", IJoypadControlMsgs_getAxis_helper::s_prototype);
2864 }
2865 IJoypadControlMsgs_getAxis_helper helper{axis_id};
2866 bool ok = yarp().write(helper, helper);
2867 return ok ? helper.reply.return_helper : return_getAxis{};
2868}
2869
2871{
2872 if (!yarp().canWrite()) {
2873 yError("Missing server method '%s'?", IJoypadControlMsgs_getAllAxes_helper::s_prototype);
2874 }
2876 bool ok = yarp().write(helper, helper);
2877 return ok ? helper.reply.return_helper : return_getAllAxes{};
2878}
2879
2881{
2882 if (!yarp().canWrite()) {
2883 yError("Missing server method '%s'?", IJoypadControlMsgs_getStick_helper::s_prototype);
2884 }
2885 IJoypadControlMsgs_getStick_helper helper{stick_id, mode};
2886 bool ok = yarp().write(helper, helper);
2887 return ok ? helper.reply.return_helper : return_getStick{};
2888}
2889
2891{
2892 if (!yarp().canWrite()) {
2893 yError("Missing server method '%s'?", IJoypadControlMsgs_getTouch_helper::s_prototype);
2894 }
2895 IJoypadControlMsgs_getTouch_helper helper{touch_id};
2896 bool ok = yarp().write(helper, helper);
2897 return ok ? helper.reply.return_helper : return_getTouch{};
2898}
2899
2900// help method
2901std::vector<std::string> IJoypadControlMsgs::help(const std::string& functionName)
2902{
2903 bool showAll = (functionName == "--all");
2904 std::vector<std::string> helpString;
2905 if (showAll) {
2906 helpString.emplace_back("*** Available commands:");
2907 helpString.emplace_back(IJoypadControlMsgs_getAxisCount_helper::s_tag);
2908 helpString.emplace_back(IJoypadControlMsgs_getButtonCount_helper::s_tag);
2910 helpString.emplace_back(IJoypadControlMsgs_getHatCount_helper::s_tag);
2912 helpString.emplace_back(IJoypadControlMsgs_getStickCount_helper::s_tag);
2913 helpString.emplace_back(IJoypadControlMsgs_getButton_helper::s_tag);
2914 helpString.emplace_back(IJoypadControlMsgs_getTrackball_helper::s_tag);
2915 helpString.emplace_back(IJoypadControlMsgs_getHat_helper::s_tag);
2916 helpString.emplace_back(IJoypadControlMsgs_getAxis_helper::s_tag);
2917 helpString.emplace_back(IJoypadControlMsgs_getAllAxes_helper::s_tag);
2918 helpString.emplace_back(IJoypadControlMsgs_getStick_helper::s_tag);
2919 helpString.emplace_back(IJoypadControlMsgs_getTouch_helper::s_tag);
2920 helpString.emplace_back("help");
2921 } else {
2924 }
2927 }
2930 }
2933 }
2936 }
2939 }
2940 if (functionName == IJoypadControlMsgs_getButton_helper::s_tag) {
2941 helpString.emplace_back(IJoypadControlMsgs_getButton_helper::s_prototype);
2942 }
2945 }
2946 if (functionName == IJoypadControlMsgs_getHat_helper::s_tag) {
2947 helpString.emplace_back(IJoypadControlMsgs_getHat_helper::s_prototype);
2948 }
2949 if (functionName == IJoypadControlMsgs_getAxis_helper::s_tag) {
2950 helpString.emplace_back(IJoypadControlMsgs_getAxis_helper::s_prototype);
2951 }
2952 if (functionName == IJoypadControlMsgs_getAllAxes_helper::s_tag) {
2954 }
2955 if (functionName == IJoypadControlMsgs_getStick_helper::s_tag) {
2956 helpString.emplace_back(IJoypadControlMsgs_getStick_helper::s_prototype);
2957 }
2958 if (functionName == IJoypadControlMsgs_getTouch_helper::s_tag) {
2959 helpString.emplace_back(IJoypadControlMsgs_getTouch_helper::s_prototype);
2960 }
2961 if (functionName == "help") {
2962 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
2963 helpString.emplace_back("Return list of available commands, or help message for a specific function");
2964 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");
2965 helpString.emplace_back("@return list of strings (one string per line)");
2966 }
2967 }
2968 if (helpString.empty()) {
2969 helpString.emplace_back("Command not found");
2970 }
2971 return helpString;
2972}
2973
2974// read from ConnectionReader
2976{
2977 constexpr size_t max_tag_len = 1;
2978 size_t tag_len = 1;
2979
2980 yarp::os::idl::WireReader reader(connection);
2981 reader.expectAccept();
2982 if (!reader.readListHeader()) {
2983 reader.fail();
2984 return false;
2985 }
2986
2987 std::string tag = reader.readTag(1);
2988 bool direct = (tag == "__direct__");
2989 if (direct) {
2990 tag = reader.readTag(1);
2991 }
2992 while (tag_len <= max_tag_len && !reader.isError()) {
2993 if(tag == "getRemoteProtocolVersion") {
2994 if (!reader.noMore()) {
2995 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
2996 reader.fail();
2997 return false;
2998 }
2999
3000 auto proto = getLocalProtocolVersion();
3001
3002 yarp::os::idl::WireWriter writer(reader);
3003 if (!writer.writeListHeader(1)) {
3004 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
3005 return false;}
3006 if (!writer.write(proto)) {
3007 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
3008 return false;
3009 }
3010 reader.accept();
3011 return true;
3012 }
3015 if (!helper.cmd.readArgs(reader)) {
3016 return false;
3017 }
3018
3019 helper.call(this);
3020
3021 yarp::os::idl::WireWriter writer(reader);
3022 if (!helper.reply.write(writer)) {
3023 return false;
3024 }
3025 reader.accept();
3026 return true;
3027 }
3030 if (!helper.cmd.readArgs(reader)) {
3031 return false;
3032 }
3033
3034 helper.call(this);
3035
3036 yarp::os::idl::WireWriter writer(reader);
3037 if (!helper.reply.write(writer)) {
3038 return false;
3039 }
3040 reader.accept();
3041 return true;
3042 }
3045 if (!helper.cmd.readArgs(reader)) {
3046 return false;
3047 }
3048
3049 helper.call(this);
3050
3051 yarp::os::idl::WireWriter writer(reader);
3052 if (!helper.reply.write(writer)) {
3053 return false;
3054 }
3055 reader.accept();
3056 return true;
3057 }
3060 if (!helper.cmd.readArgs(reader)) {
3061 return false;
3062 }
3063
3064 helper.call(this);
3065
3066 yarp::os::idl::WireWriter writer(reader);
3067 if (!helper.reply.write(writer)) {
3068 return false;
3069 }
3070 reader.accept();
3071 return true;
3072 }
3075 if (!helper.cmd.readArgs(reader)) {
3076 return false;
3077 }
3078
3079 helper.call(this);
3080
3081 yarp::os::idl::WireWriter writer(reader);
3082 if (!helper.reply.write(writer)) {
3083 return false;
3084 }
3085 reader.accept();
3086 return true;
3087 }
3090 if (!helper.cmd.readArgs(reader)) {
3091 return false;
3092 }
3093
3094 helper.call(this);
3095
3096 yarp::os::idl::WireWriter writer(reader);
3097 if (!helper.reply.write(writer)) {
3098 return false;
3099 }
3100 reader.accept();
3101 return true;
3102 }
3105 if (!helper.cmd.readArgs(reader)) {
3106 return false;
3107 }
3108
3109 helper.call(this);
3110
3111 yarp::os::idl::WireWriter writer(reader);
3112 if (!helper.reply.write(writer)) {
3113 return false;
3114 }
3115 reader.accept();
3116 return true;
3117 }
3120 if (!helper.cmd.readArgs(reader)) {
3121 return false;
3122 }
3123
3124 helper.call(this);
3125
3126 yarp::os::idl::WireWriter writer(reader);
3127 if (!helper.reply.write(writer)) {
3128 return false;
3129 }
3130 reader.accept();
3131 return true;
3132 }
3135 if (!helper.cmd.readArgs(reader)) {
3136 return false;
3137 }
3138
3139 helper.call(this);
3140
3141 yarp::os::idl::WireWriter writer(reader);
3142 if (!helper.reply.write(writer)) {
3143 return false;
3144 }
3145 reader.accept();
3146 return true;
3147 }
3150 if (!helper.cmd.readArgs(reader)) {
3151 return false;
3152 }
3153
3154 helper.call(this);
3155
3156 yarp::os::idl::WireWriter writer(reader);
3157 if (!helper.reply.write(writer)) {
3158 return false;
3159 }
3160 reader.accept();
3161 return true;
3162 }
3165 if (!helper.cmd.readArgs(reader)) {
3166 return false;
3167 }
3168
3169 helper.call(this);
3170
3171 yarp::os::idl::WireWriter writer(reader);
3172 if (!helper.reply.write(writer)) {
3173 return false;
3174 }
3175 reader.accept();
3176 return true;
3177 }
3180 if (!helper.cmd.readArgs(reader)) {
3181 return false;
3182 }
3183
3184 helper.call(this);
3185
3186 yarp::os::idl::WireWriter writer(reader);
3187 if (!helper.reply.write(writer)) {
3188 return false;
3189 }
3190 reader.accept();
3191 return true;
3192 }
3195 if (!helper.cmd.readArgs(reader)) {
3196 return false;
3197 }
3198
3199 helper.call(this);
3200
3201 yarp::os::idl::WireWriter writer(reader);
3202 if (!helper.reply.write(writer)) {
3203 return false;
3204 }
3205 reader.accept();
3206 return true;
3207 }
3208 if (tag == "help") {
3209 std::string functionName;
3210 if (!reader.readString(functionName)) {
3211 functionName = "--all";
3212 }
3213 auto help_strings = help(functionName);
3214 yarp::os::idl::WireWriter writer(reader);
3215 if (!writer.isNull()) {
3216 if (!writer.writeListHeader(2)) {
3217 return false;
3218 }
3219 if (!writer.writeTag("many", 1, 0)) {
3220 return false;
3221 }
3222 if (!writer.writeListBegin(0, help_strings.size())) {
3223 return false;
3224 }
3225 for (const auto& help_string : help_strings) {
3226 if (!writer.writeString(help_string)) {
3227 return false;
3228 }
3229 }
3230 if (!writer.writeListEnd()) {
3231 return false;
3232 }
3233 }
3234 reader.accept();
3235 return true;
3236 }
3237 if (reader.noMore()) {
3238 reader.fail();
3239 return false;
3240 }
3241 std::string next_tag = reader.readTag(1);
3242 if (next_tag.empty()) {
3243 break;
3244 }
3245 tag.append("_").append(next_tag);
3246 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
3247 }
3248 return false;
3249}
3250
3251} // namespace yarp::dev
#define yError(...)
Definition Log.h:361
#define __YFUNCTION__
Definition Log.h:24
#define yWarning(...)
Definition Log.h:340
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool 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 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 writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
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_getAxis(*)(const std::int32_t) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool 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 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 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.
return_getButton(*)(const std::int32_t) funcptr_t
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 writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool 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 read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_getHat(*)(const std::int32_t) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::os::ApplicationNetworkProtocolVersion helper_proto
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool 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 read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
yarp::dev::IJoypadController::JoypadCtrl_coordinateMode mode
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.
return_getStick(*)(const std::int32_t, const yarp::dev::IJoypadController::JoypadCtrl_coordinateMode) 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 writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
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 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_getTouch(*)(const std::int32_t) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool 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 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 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 write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_getTrackball(*)(const std::int32_t) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_getAxis getAxis(const std::int32_t axis_id)
virtual return_getHat getHat(const std::int32_t hat_id)
virtual return_getHatCount getHatCount()
virtual return_getAllAxes getAllAxes()
virtual return_getAxisCount getAxisCount()
virtual return_getTrackballCount getTrackballCount()
virtual return_getStick getStick(const std::int32_t stick_id, const yarp::dev::IJoypadController::JoypadCtrl_coordinateMode mode)
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_getButton getButton(const std::int32_t button_id)
virtual return_getTouchSurfaceCount getTouchSurfaceCount()
virtual return_getTouch getTouch(const std::int32_t touch_id)
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_getButtonCount getButtonCount()
virtual return_getTrackball getTrackball(const std::int32_t trackball_id)
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
virtual return_getStickCount getStickCount()
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition Portable.h:25
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
Definition Wire.h:28
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
Definition WireReader.h:27
bool readString(std::string &str, bool *is_vocab=nullptr)
bool readI32(std::int32_t &x)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
IDL-friendly connection writer.
Definition WireWriter.h:28
bool write(const WirePortable &obj) const
bool writeI32(std::int32_t x, bool skip_tag=false) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeListBegin(int tag, size_t len) const
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
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