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 (based on compiler 0.14.1-yarped)
7// yarpidl_thrift version 2.0 - 11/11/2026
8// Protocol version: protocol_version=0, yarp_major=4, yarp_minor=0, yarp_patch=2
9// This is an automatically generated file.
10// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
11
12#include <yarp/conf/version.h>
15#include <yarp/os/LogStream.h>
16
18
19#include <algorithm>
20
21namespace
22{
23 YARP_LOG_COMPONENT(SERVICE_LOG_COMPONENT, "IJoypadControlMsgs")
24}
25
26namespace yarp::dev {
27
28//IJoypadControlMsgs_getRemoteProtocolVersion_helper declaration
39
41{
42 yarp::os::idl::WireWriter writer(connection);
43 if (!writer.writeListHeader(1)) {
44 return false;
45 }
46 if (!writer.writeString("getRemoteProtocolVersion")) {
47 return false;
48 }
49 return true;
50}
51
52bool IJoypadControlMsgs_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
53 {
54 yarp::os::idl::WireReader reader(connection);
55 if (!reader.readListHeader()) {
56 reader.fail();
57 return false;
58 }
59
60 if (!helper_proto.read(connection)) {
61 reader.fail();
62 return false;
63 }
64 return true;
65}
66
67//ProtocolVersion, client side
69 {
70 if(!yarp().canWrite()) {
71 yError(" Missing server method IJoypadControlMsgs::getRemoteProtocolVersion");
72 }
74 bool ok = yarp().write(helper, helper);
75 if (ok) {
76 return helper.helper_proto;}
77 else {
79 return failureproto;}
80}
81
82//ProtocolVersion, client side
84 {
85 auto locproto = this->getLocalProtocolVersion();
86 auto remproto = this->getRemoteProtocolVersion();
87 if (remproto.protocol_version != locproto.protocol_version)
88 {
89 yCError(SERVICE_LOG_COMPONENT) << "Invalid communication protocol.";
90 yCError(SERVICE_LOG_COMPONENT) << "Local Protocol Version: " << locproto.toString();
91 yCError(SERVICE_LOG_COMPONENT) << "Remote Protocol Version: " << remproto.toString();
92 return false;
93 }
94 return true;
95}
96
97//ProtocolVersion, server side
99{
101 //myproto.protocol_version using default value = 0
102 //to change this value add the following line to the .thrift file:
103 //const i16 protocol_version = <your_number_here>
104 myproto.protocol_version = 0;
108 return myproto;
109}
110
111// getAxisCount helper class declaration
113 public yarp::os::Portable
114{
115public:
117 bool write(yarp::os::ConnectionWriter& connection) const override;
118 bool read(yarp::os::ConnectionReader& connection) override;
119
120 class Command :
122 {
123 public:
124 Command() = default;
125 ~Command() override = default;
126
127 bool write(yarp::os::ConnectionWriter& connection) const override;
128 bool read(yarp::os::ConnectionReader& connection) override;
129
130 bool write(const yarp::os::idl::WireWriter& writer) const override;
131 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
132 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
133
134 bool read(yarp::os::idl::WireReader& reader) override;
137 };
138
139 class Reply :
141 {
142 public:
143 Reply() = default;
144 ~Reply() override = default;
145
146 bool write(yarp::os::ConnectionWriter& connection) const override;
147 bool read(yarp::os::ConnectionReader& connection) override;
148
149 bool write(const yarp::os::idl::WireWriter& writer) const override;
150 bool read(yarp::os::idl::WireReader& reader) override;
151
153 };
154
156 void call(IJoypadControlMsgs* ptr);
157
160
161 static constexpr const char* s_tag{"getAxisCount"};
162 static constexpr size_t s_tag_len{1};
163 static constexpr size_t s_cmd_len{1};
164 static constexpr size_t s_reply_len{2};
165 static constexpr const char* s_prototype{"return_getAxisCount IJoypadControlMsgs::getAxisCount()"};
166 static constexpr const char* s_help{""};
167};
168
169// getButtonCount helper class declaration
171 public yarp::os::Portable
172{
173public:
175 bool write(yarp::os::ConnectionWriter& connection) const override;
176 bool read(yarp::os::ConnectionReader& connection) override;
177
178 class Command :
180 {
181 public:
182 Command() = default;
183 ~Command() override = default;
184
185 bool write(yarp::os::ConnectionWriter& connection) const override;
186 bool read(yarp::os::ConnectionReader& connection) override;
187
188 bool write(const yarp::os::idl::WireWriter& writer) const override;
189 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
190 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
191
192 bool read(yarp::os::idl::WireReader& reader) override;
195 };
196
197 class Reply :
199 {
200 public:
201 Reply() = default;
202 ~Reply() override = default;
203
204 bool write(yarp::os::ConnectionWriter& connection) const override;
205 bool read(yarp::os::ConnectionReader& connection) override;
206
207 bool write(const yarp::os::idl::WireWriter& writer) const override;
208 bool read(yarp::os::idl::WireReader& reader) override;
209
211 };
212
214 void call(IJoypadControlMsgs* ptr);
215
218
219 static constexpr const char* s_tag{"getButtonCount"};
220 static constexpr size_t s_tag_len{1};
221 static constexpr size_t s_cmd_len{1};
222 static constexpr size_t s_reply_len{2};
223 static constexpr const char* s_prototype{"return_getButtonCount IJoypadControlMsgs::getButtonCount()"};
224 static constexpr const char* s_help{""};
225};
226
227// getTrackballCount helper class declaration
229 public yarp::os::Portable
230{
231public:
233 bool write(yarp::os::ConnectionWriter& connection) const override;
234 bool read(yarp::os::ConnectionReader& connection) override;
235
236 class Command :
238 {
239 public:
240 Command() = default;
241 ~Command() override = default;
242
243 bool write(yarp::os::ConnectionWriter& connection) const override;
244 bool read(yarp::os::ConnectionReader& connection) override;
245
246 bool write(const yarp::os::idl::WireWriter& writer) const override;
247 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
248 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
249
250 bool read(yarp::os::idl::WireReader& reader) override;
253 };
254
255 class Reply :
257 {
258 public:
259 Reply() = default;
260 ~Reply() override = default;
261
262 bool write(yarp::os::ConnectionWriter& connection) const override;
263 bool read(yarp::os::ConnectionReader& connection) override;
264
265 bool write(const yarp::os::idl::WireWriter& writer) const override;
266 bool read(yarp::os::idl::WireReader& reader) override;
267
269 };
270
272 void call(IJoypadControlMsgs* ptr);
273
276
277 static constexpr const char* s_tag{"getTrackballCount"};
278 static constexpr size_t s_tag_len{1};
279 static constexpr size_t s_cmd_len{1};
280 static constexpr size_t s_reply_len{2};
281 static constexpr const char* s_prototype{"return_getTrackballCount IJoypadControlMsgs::getTrackballCount()"};
282 static constexpr const char* s_help{""};
283};
284
285// getHatCount helper class declaration
287 public yarp::os::Portable
288{
289public:
291 bool write(yarp::os::ConnectionWriter& connection) const override;
292 bool read(yarp::os::ConnectionReader& connection) override;
293
294 class Command :
296 {
297 public:
298 Command() = default;
299 ~Command() override = default;
300
301 bool write(yarp::os::ConnectionWriter& connection) const override;
302 bool read(yarp::os::ConnectionReader& connection) override;
303
304 bool write(const yarp::os::idl::WireWriter& writer) const override;
305 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
306 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
307
308 bool read(yarp::os::idl::WireReader& reader) override;
311 };
312
313 class Reply :
315 {
316 public:
317 Reply() = default;
318 ~Reply() override = default;
319
320 bool write(yarp::os::ConnectionWriter& connection) const override;
321 bool read(yarp::os::ConnectionReader& connection) override;
322
323 bool write(const yarp::os::idl::WireWriter& writer) const override;
324 bool read(yarp::os::idl::WireReader& reader) override;
325
327 };
328
330 void call(IJoypadControlMsgs* ptr);
331
334
335 static constexpr const char* s_tag{"getHatCount"};
336 static constexpr size_t s_tag_len{1};
337 static constexpr size_t s_cmd_len{1};
338 static constexpr size_t s_reply_len{2};
339 static constexpr const char* s_prototype{"return_getHatCount IJoypadControlMsgs::getHatCount()"};
340 static constexpr const char* s_help{""};
341};
342
343// getTouchSurfaceCount helper class declaration
345 public yarp::os::Portable
346{
347public:
349 bool write(yarp::os::ConnectionWriter& connection) const override;
350 bool read(yarp::os::ConnectionReader& connection) override;
351
352 class Command :
354 {
355 public:
356 Command() = default;
357 ~Command() override = default;
358
359 bool write(yarp::os::ConnectionWriter& connection) const override;
360 bool read(yarp::os::ConnectionReader& connection) override;
361
362 bool write(const yarp::os::idl::WireWriter& writer) const override;
363 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
364 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
365
366 bool read(yarp::os::idl::WireReader& reader) override;
369 };
370
371 class Reply :
373 {
374 public:
375 Reply() = default;
376 ~Reply() override = default;
377
378 bool write(yarp::os::ConnectionWriter& connection) const override;
379 bool read(yarp::os::ConnectionReader& connection) override;
380
381 bool write(const yarp::os::idl::WireWriter& writer) const override;
382 bool read(yarp::os::idl::WireReader& reader) override;
383
385 };
386
388 void call(IJoypadControlMsgs* ptr);
389
392
393 static constexpr const char* s_tag{"getTouchSurfaceCount"};
394 static constexpr size_t s_tag_len{1};
395 static constexpr size_t s_cmd_len{1};
396 static constexpr size_t s_reply_len{2};
397 static constexpr const char* s_prototype{"return_getTouchSurfaceCount IJoypadControlMsgs::getTouchSurfaceCount()"};
398 static constexpr const char* s_help{""};
399};
400
401// getStickCount helper class declaration
403 public yarp::os::Portable
404{
405public:
407 bool write(yarp::os::ConnectionWriter& connection) const override;
408 bool read(yarp::os::ConnectionReader& connection) override;
409
410 class Command :
412 {
413 public:
414 Command() = default;
415 ~Command() 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 writeTag(const yarp::os::idl::WireWriter& writer) const;
422 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
423
424 bool read(yarp::os::idl::WireReader& reader) override;
427 };
428
429 class Reply :
431 {
432 public:
433 Reply() = default;
434 ~Reply() override = default;
435
436 bool write(yarp::os::ConnectionWriter& connection) const override;
437 bool read(yarp::os::ConnectionReader& connection) override;
438
439 bool write(const yarp::os::idl::WireWriter& writer) const override;
440 bool read(yarp::os::idl::WireReader& reader) override;
441
443 };
444
446 void call(IJoypadControlMsgs* ptr);
447
450
451 static constexpr const char* s_tag{"getStickCount"};
452 static constexpr size_t s_tag_len{1};
453 static constexpr size_t s_cmd_len{1};
454 static constexpr size_t s_reply_len{2};
455 static constexpr const char* s_prototype{"return_getStickCount IJoypadControlMsgs::getStickCount()"};
456 static constexpr const char* s_help{""};
457};
458
459// getButton helper class declaration
461 public yarp::os::Portable
462{
463public:
465 explicit IJoypadControlMsgs_getButton_helper(const std::int32_t button_id);
466 bool write(yarp::os::ConnectionWriter& connection) const override;
467 bool read(yarp::os::ConnectionReader& connection) override;
468
469 class Command :
471 {
472 public:
473 Command() = default;
474 explicit Command(const std::int32_t button_id);
475
476 ~Command() override = default;
477
478 bool write(yarp::os::ConnectionWriter& connection) const override;
479 bool read(yarp::os::ConnectionReader& connection) override;
480
481 bool write(const yarp::os::idl::WireWriter& writer) const override;
482 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
483 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
484
485 bool read(yarp::os::idl::WireReader& reader) override;
488
489 std::int32_t button_id{0};
490 };
491
492 class Reply :
494 {
495 public:
496 Reply() = default;
497 ~Reply() override = default;
498
499 bool write(yarp::os::ConnectionWriter& connection) const override;
500 bool read(yarp::os::ConnectionReader& connection) override;
501
502 bool write(const yarp::os::idl::WireWriter& writer) const override;
503 bool read(yarp::os::idl::WireReader& reader) override;
504
506 };
507
508 using funcptr_t = return_getButton (*)(const std::int32_t);
509 void call(IJoypadControlMsgs* ptr);
510
513
514 static constexpr const char* s_tag{"getButton"};
515 static constexpr size_t s_tag_len{1};
516 static constexpr size_t s_cmd_len{2};
517 static constexpr size_t s_reply_len{2};
518 static constexpr const char* s_prototype{"return_getButton IJoypadControlMsgs::getButton(const std::int32_t button_id)"};
519 static constexpr const char* s_help{""};
520};
521
522// getTrackball helper class declaration
524 public yarp::os::Portable
525{
526public:
528 explicit IJoypadControlMsgs_getTrackball_helper(const std::int32_t trackball_id);
529 bool write(yarp::os::ConnectionWriter& connection) const override;
530 bool read(yarp::os::ConnectionReader& connection) override;
531
532 class Command :
534 {
535 public:
536 Command() = default;
537 explicit Command(const std::int32_t trackball_id);
538
539 ~Command() override = default;
540
541 bool write(yarp::os::ConnectionWriter& connection) const override;
542 bool read(yarp::os::ConnectionReader& connection) override;
543
544 bool write(const yarp::os::idl::WireWriter& writer) const override;
545 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
546 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
547
548 bool read(yarp::os::idl::WireReader& reader) override;
551
552 std::int32_t trackball_id{0};
553 };
554
555 class Reply :
557 {
558 public:
559 Reply() = default;
560 ~Reply() override = default;
561
562 bool write(yarp::os::ConnectionWriter& connection) const override;
563 bool read(yarp::os::ConnectionReader& connection) override;
564
565 bool write(const yarp::os::idl::WireWriter& writer) const override;
566 bool read(yarp::os::idl::WireReader& reader) override;
567
569 };
570
571 using funcptr_t = return_getTrackball (*)(const std::int32_t);
572 void call(IJoypadControlMsgs* ptr);
573
576
577 static constexpr const char* s_tag{"getTrackball"};
578 static constexpr size_t s_tag_len{1};
579 static constexpr size_t s_cmd_len{2};
580 static constexpr size_t s_reply_len{2};
581 static constexpr const char* s_prototype{"return_getTrackball IJoypadControlMsgs::getTrackball(const std::int32_t trackball_id)"};
582 static constexpr const char* s_help{""};
583};
584
585// getHat helper class declaration
587 public yarp::os::Portable
588{
589public:
591 explicit IJoypadControlMsgs_getHat_helper(const std::int32_t hat_id);
592 bool write(yarp::os::ConnectionWriter& connection) const override;
593 bool read(yarp::os::ConnectionReader& connection) override;
594
595 class Command :
597 {
598 public:
599 Command() = default;
600 explicit Command(const std::int32_t hat_id);
601
602 ~Command() override = default;
603
604 bool write(yarp::os::ConnectionWriter& connection) const override;
605 bool read(yarp::os::ConnectionReader& connection) override;
606
607 bool write(const yarp::os::idl::WireWriter& writer) const override;
608 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
609 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
610
611 bool read(yarp::os::idl::WireReader& reader) override;
614
615 std::int32_t hat_id{0};
616 };
617
618 class Reply :
620 {
621 public:
622 Reply() = default;
623 ~Reply() override = default;
624
625 bool write(yarp::os::ConnectionWriter& connection) const override;
626 bool read(yarp::os::ConnectionReader& connection) override;
627
628 bool write(const yarp::os::idl::WireWriter& writer) const override;
629 bool read(yarp::os::idl::WireReader& reader) override;
630
632 };
633
634 using funcptr_t = return_getHat (*)(const std::int32_t);
635 void call(IJoypadControlMsgs* ptr);
636
639
640 static constexpr const char* s_tag{"getHat"};
641 static constexpr size_t s_tag_len{1};
642 static constexpr size_t s_cmd_len{2};
643 static constexpr size_t s_reply_len{2};
644 static constexpr const char* s_prototype{"return_getHat IJoypadControlMsgs::getHat(const std::int32_t hat_id)"};
645 static constexpr const char* s_help{""};
646};
647
648// getAxis helper class declaration
650 public yarp::os::Portable
651{
652public:
654 explicit IJoypadControlMsgs_getAxis_helper(const std::int32_t axis_id);
655 bool write(yarp::os::ConnectionWriter& connection) const override;
656 bool read(yarp::os::ConnectionReader& connection) override;
657
658 class Command :
660 {
661 public:
662 Command() = default;
663 explicit Command(const std::int32_t axis_id);
664
665 ~Command() override = default;
666
667 bool write(yarp::os::ConnectionWriter& connection) const override;
668 bool read(yarp::os::ConnectionReader& connection) override;
669
670 bool write(const yarp::os::idl::WireWriter& writer) const override;
671 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
672 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
673
674 bool read(yarp::os::idl::WireReader& reader) override;
677
678 std::int32_t axis_id{0};
679 };
680
681 class Reply :
683 {
684 public:
685 Reply() = default;
686 ~Reply() override = default;
687
688 bool write(yarp::os::ConnectionWriter& connection) const override;
689 bool read(yarp::os::ConnectionReader& connection) override;
690
691 bool write(const yarp::os::idl::WireWriter& writer) const override;
692 bool read(yarp::os::idl::WireReader& reader) override;
693
695 };
696
697 using funcptr_t = return_getAxis (*)(const std::int32_t);
698 void call(IJoypadControlMsgs* ptr);
699
702
703 static constexpr const char* s_tag{"getAxis"};
704 static constexpr size_t s_tag_len{1};
705 static constexpr size_t s_cmd_len{2};
706 static constexpr size_t s_reply_len{2};
707 static constexpr const char* s_prototype{"return_getAxis IJoypadControlMsgs::getAxis(const std::int32_t axis_id)"};
708 static constexpr const char* s_help{""};
709};
710
711// getAllAxes helper class declaration
713 public yarp::os::Portable
714{
715public:
717 bool write(yarp::os::ConnectionWriter& connection) const override;
718 bool read(yarp::os::ConnectionReader& connection) override;
719
720 class Command :
722 {
723 public:
724 Command() = default;
725 ~Command() override = default;
726
727 bool write(yarp::os::ConnectionWriter& connection) const override;
728 bool read(yarp::os::ConnectionReader& connection) override;
729
730 bool write(const yarp::os::idl::WireWriter& writer) const override;
731 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
732 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
733
734 bool read(yarp::os::idl::WireReader& reader) override;
737 };
738
739 class Reply :
741 {
742 public:
743 Reply() = default;
744 ~Reply() override = default;
745
746 bool write(yarp::os::ConnectionWriter& connection) const override;
747 bool read(yarp::os::ConnectionReader& connection) override;
748
749 bool write(const yarp::os::idl::WireWriter& writer) const override;
750 bool read(yarp::os::idl::WireReader& reader) override;
751
753 };
754
756 void call(IJoypadControlMsgs* ptr);
757
760
761 static constexpr const char* s_tag{"getAllAxes"};
762 static constexpr size_t s_tag_len{1};
763 static constexpr size_t s_cmd_len{1};
764 static constexpr size_t s_reply_len{2};
765 static constexpr const char* s_prototype{"return_getAllAxes IJoypadControlMsgs::getAllAxes()"};
766 static constexpr const char* s_help{""};
767};
768
769// getStick helper class declaration
771 public yarp::os::Portable
772{
773public:
776 bool write(yarp::os::ConnectionWriter& connection) const override;
777 bool read(yarp::os::ConnectionReader& connection) override;
778
779 class Command :
781 {
782 public:
783 Command() = default;
785
786 ~Command() override = default;
787
788 bool write(yarp::os::ConnectionWriter& connection) const override;
789 bool read(yarp::os::ConnectionReader& connection) override;
790
791 bool write(const yarp::os::idl::WireWriter& writer) const override;
792 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
793 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
794
795 bool read(yarp::os::idl::WireReader& reader) override;
798
799 std::int32_t stick_id{0};
801 };
802
803 class Reply :
805 {
806 public:
807 Reply() = default;
808 ~Reply() override = default;
809
810 bool write(yarp::os::ConnectionWriter& connection) const override;
811 bool read(yarp::os::ConnectionReader& connection) override;
812
813 bool write(const yarp::os::idl::WireWriter& writer) const override;
814 bool read(yarp::os::idl::WireReader& reader) override;
815
817 };
818
820 void call(IJoypadControlMsgs* ptr);
821
824
825 static constexpr const char* s_tag{"getStick"};
826 static constexpr size_t s_tag_len{1};
827 static constexpr size_t s_cmd_len{3};
828 static constexpr size_t s_reply_len{3};
829 static constexpr const char* s_prototype{"return_getStick IJoypadControlMsgs::getStick(const std::int32_t stick_id, const yarp::dev::IJoypadController::JoypadCtrl_coordinateMode mode)"};
830 static constexpr const char* s_help{""};
831};
832
833// getTouch helper class declaration
835 public yarp::os::Portable
836{
837public:
839 explicit IJoypadControlMsgs_getTouch_helper(const std::int32_t touch_id);
840 bool write(yarp::os::ConnectionWriter& connection) const override;
841 bool read(yarp::os::ConnectionReader& connection) override;
842
843 class Command :
845 {
846 public:
847 Command() = default;
848 explicit Command(const std::int32_t touch_id);
849
850 ~Command() override = default;
851
852 bool write(yarp::os::ConnectionWriter& connection) const override;
853 bool read(yarp::os::ConnectionReader& connection) override;
854
855 bool write(const yarp::os::idl::WireWriter& writer) const override;
856 bool writeTag(const yarp::os::idl::WireWriter& writer) const;
857 bool writeArgs(const yarp::os::idl::WireWriter& writer) const;
858
859 bool read(yarp::os::idl::WireReader& reader) override;
862
863 std::int32_t touch_id{0};
864 };
865
866 class Reply :
868 {
869 public:
870 Reply() = default;
871 ~Reply() override = default;
872
873 bool write(yarp::os::ConnectionWriter& connection) const override;
874 bool read(yarp::os::ConnectionReader& connection) override;
875
876 bool write(const yarp::os::idl::WireWriter& writer) const override;
877 bool read(yarp::os::idl::WireReader& reader) override;
878
880 };
881
882 using funcptr_t = return_getTouch (*)(const std::int32_t);
883 void call(IJoypadControlMsgs* ptr);
884
887
888 static constexpr const char* s_tag{"getTouch"};
889 static constexpr size_t s_tag_len{1};
890 static constexpr size_t s_cmd_len{2};
891 static constexpr size_t s_reply_len{2};
892 static constexpr const char* s_prototype{"return_getTouch IJoypadControlMsgs::getTouch(const std::int32_t touch_id)"};
893 static constexpr const char* s_help{""};
894};
895
896// getAxisCount helper class implementation
898{
899 return cmd.write(connection);
900}
901
903{
904 return reply.read(connection);
905}
906
908{
909 yarp::os::idl::WireWriter writer(connection);
910 if (!writer.writeListHeader(s_cmd_len)) {
911 return false;
912 }
913 return write(writer);
914}
915
917{
918 yarp::os::idl::WireReader reader(connection);
919 if (!reader.readListHeader()) {
920 reader.fail();
921 return false;
922 }
923 return read(reader);
924}
925
927{
928 if (!writeTag(writer)) {
929 return false;
930 }
931 if (!writeArgs(writer)) {
932 return false;
933 }
934 return true;
935}
936
938{
939 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
940 return false;
941 }
942 return true;
943}
944
946{
947 return true;
948}
949
951{
952 if (!readTag(reader)) {
953 return false;
954 }
955 if (!readArgs(reader)) {
956 return false;
957 }
958 return true;
959}
960
962{
963 std::string tag = reader.readTag(s_tag_len);
964 if (reader.isError()) {
965 return false;
966 }
967 if (tag != s_tag) {
968 reader.fail();
969 return false;
970 }
971 return true;
972}
973
975{
976 if (!reader.noMore()) {
977 reader.fail();
978 return false;
979 }
980 return true;
981}
982
984{
985 yarp::os::idl::WireWriter writer(connection);
986 return write(writer);
987}
988
990{
991 yarp::os::idl::WireReader reader(connection);
992 return read(reader);
993}
994
996{
997 if (!writer.isNull()) {
998 if (!writer.writeListHeader(s_reply_len)) {
999 return false;
1000 }
1001 if (!writer.write(return_helper)) {
1002 return false;
1003 }
1004 }
1005 return true;
1006}
1007
1009{
1010 if (!reader.readListReturn()) {
1011 return false;
1012 }
1013 if (reader.noMore()) {
1014 reader.fail();
1015 return false;
1016 }
1017 if (!reader.read(return_helper)) {
1018 reader.fail();
1019 return false;
1020 }
1021 return true;
1022}
1023
1028
1029// getButtonCount helper class implementation
1031{
1032 return cmd.write(connection);
1033}
1034
1036{
1037 return reply.read(connection);
1038}
1039
1041{
1042 yarp::os::idl::WireWriter writer(connection);
1043 if (!writer.writeListHeader(s_cmd_len)) {
1044 return false;
1045 }
1046 return write(writer);
1047}
1048
1050{
1051 yarp::os::idl::WireReader reader(connection);
1052 if (!reader.readListHeader()) {
1053 reader.fail();
1054 return false;
1055 }
1056 return read(reader);
1057}
1058
1060{
1061 if (!writeTag(writer)) {
1062 return false;
1063 }
1064 if (!writeArgs(writer)) {
1065 return false;
1066 }
1067 return true;
1068}
1069
1071{
1072 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1073 return false;
1074 }
1075 return true;
1076}
1077
1079{
1080 return true;
1081}
1082
1084{
1085 if (!readTag(reader)) {
1086 return false;
1087 }
1088 if (!readArgs(reader)) {
1089 return false;
1090 }
1091 return true;
1092}
1093
1095{
1096 std::string tag = reader.readTag(s_tag_len);
1097 if (reader.isError()) {
1098 return false;
1099 }
1100 if (tag != s_tag) {
1101 reader.fail();
1102 return false;
1103 }
1104 return true;
1105}
1106
1108{
1109 if (!reader.noMore()) {
1110 reader.fail();
1111 return false;
1112 }
1113 return true;
1114}
1115
1117{
1118 yarp::os::idl::WireWriter writer(connection);
1119 return write(writer);
1120}
1121
1123{
1124 yarp::os::idl::WireReader reader(connection);
1125 return read(reader);
1126}
1127
1129{
1130 if (!writer.isNull()) {
1131 if (!writer.writeListHeader(s_reply_len)) {
1132 return false;
1133 }
1134 if (!writer.write(return_helper)) {
1135 return false;
1136 }
1137 }
1138 return true;
1139}
1140
1142{
1143 if (!reader.readListReturn()) {
1144 return false;
1145 }
1146 if (reader.noMore()) {
1147 reader.fail();
1148 return false;
1149 }
1150 if (!reader.read(return_helper)) {
1151 reader.fail();
1152 return false;
1153 }
1154 return true;
1155}
1156
1161
1162// getTrackballCount helper class implementation
1164{
1165 return cmd.write(connection);
1166}
1167
1172
1174{
1175 yarp::os::idl::WireWriter writer(connection);
1176 if (!writer.writeListHeader(s_cmd_len)) {
1177 return false;
1178 }
1179 return write(writer);
1180}
1181
1183{
1184 yarp::os::idl::WireReader reader(connection);
1185 if (!reader.readListHeader()) {
1186 reader.fail();
1187 return false;
1188 }
1189 return read(reader);
1190}
1191
1193{
1194 if (!writeTag(writer)) {
1195 return false;
1196 }
1197 if (!writeArgs(writer)) {
1198 return false;
1199 }
1200 return true;
1201}
1202
1204{
1205 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1206 return false;
1207 }
1208 return true;
1209}
1210
1212{
1213 return true;
1214}
1215
1217{
1218 if (!readTag(reader)) {
1219 return false;
1220 }
1221 if (!readArgs(reader)) {
1222 return false;
1223 }
1224 return true;
1225}
1226
1228{
1229 std::string tag = reader.readTag(s_tag_len);
1230 if (reader.isError()) {
1231 return false;
1232 }
1233 if (tag != s_tag) {
1234 reader.fail();
1235 return false;
1236 }
1237 return true;
1238}
1239
1241{
1242 if (!reader.noMore()) {
1243 reader.fail();
1244 return false;
1245 }
1246 return true;
1247}
1248
1250{
1251 yarp::os::idl::WireWriter writer(connection);
1252 return write(writer);
1253}
1254
1256{
1257 yarp::os::idl::WireReader reader(connection);
1258 return read(reader);
1259}
1260
1262{
1263 if (!writer.isNull()) {
1264 if (!writer.writeListHeader(s_reply_len)) {
1265 return false;
1266 }
1267 if (!writer.write(return_helper)) {
1268 return false;
1269 }
1270 }
1271 return true;
1272}
1273
1275{
1276 if (!reader.readListReturn()) {
1277 return false;
1278 }
1279 if (reader.noMore()) {
1280 reader.fail();
1281 return false;
1282 }
1283 if (!reader.read(return_helper)) {
1284 reader.fail();
1285 return false;
1286 }
1287 return true;
1288}
1289
1294
1295// getHatCount helper class implementation
1297{
1298 return cmd.write(connection);
1299}
1300
1302{
1303 return reply.read(connection);
1304}
1305
1307{
1308 yarp::os::idl::WireWriter writer(connection);
1309 if (!writer.writeListHeader(s_cmd_len)) {
1310 return false;
1311 }
1312 return write(writer);
1313}
1314
1316{
1317 yarp::os::idl::WireReader reader(connection);
1318 if (!reader.readListHeader()) {
1319 reader.fail();
1320 return false;
1321 }
1322 return read(reader);
1323}
1324
1326{
1327 if (!writeTag(writer)) {
1328 return false;
1329 }
1330 if (!writeArgs(writer)) {
1331 return false;
1332 }
1333 return true;
1334}
1335
1337{
1338 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1339 return false;
1340 }
1341 return true;
1342}
1343
1345{
1346 return true;
1347}
1348
1350{
1351 if (!readTag(reader)) {
1352 return false;
1353 }
1354 if (!readArgs(reader)) {
1355 return false;
1356 }
1357 return true;
1358}
1359
1361{
1362 std::string tag = reader.readTag(s_tag_len);
1363 if (reader.isError()) {
1364 return false;
1365 }
1366 if (tag != s_tag) {
1367 reader.fail();
1368 return false;
1369 }
1370 return true;
1371}
1372
1374{
1375 if (!reader.noMore()) {
1376 reader.fail();
1377 return false;
1378 }
1379 return true;
1380}
1381
1383{
1384 yarp::os::idl::WireWriter writer(connection);
1385 return write(writer);
1386}
1387
1389{
1390 yarp::os::idl::WireReader reader(connection);
1391 return read(reader);
1392}
1393
1395{
1396 if (!writer.isNull()) {
1397 if (!writer.writeListHeader(s_reply_len)) {
1398 return false;
1399 }
1400 if (!writer.write(return_helper)) {
1401 return false;
1402 }
1403 }
1404 return true;
1405}
1406
1408{
1409 if (!reader.readListReturn()) {
1410 return false;
1411 }
1412 if (reader.noMore()) {
1413 reader.fail();
1414 return false;
1415 }
1416 if (!reader.read(return_helper)) {
1417 reader.fail();
1418 return false;
1419 }
1420 return true;
1421}
1422
1427
1428// getTouchSurfaceCount helper class implementation
1430{
1431 return cmd.write(connection);
1432}
1433
1438
1440{
1441 yarp::os::idl::WireWriter writer(connection);
1442 if (!writer.writeListHeader(s_cmd_len)) {
1443 return false;
1444 }
1445 return write(writer);
1446}
1447
1449{
1450 yarp::os::idl::WireReader reader(connection);
1451 if (!reader.readListHeader()) {
1452 reader.fail();
1453 return false;
1454 }
1455 return read(reader);
1456}
1457
1459{
1460 if (!writeTag(writer)) {
1461 return false;
1462 }
1463 if (!writeArgs(writer)) {
1464 return false;
1465 }
1466 return true;
1467}
1468
1470{
1471 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1472 return false;
1473 }
1474 return true;
1475}
1476
1478{
1479 return true;
1480}
1481
1483{
1484 if (!readTag(reader)) {
1485 return false;
1486 }
1487 if (!readArgs(reader)) {
1488 return false;
1489 }
1490 return true;
1491}
1492
1494{
1495 std::string tag = reader.readTag(s_tag_len);
1496 if (reader.isError()) {
1497 return false;
1498 }
1499 if (tag != s_tag) {
1500 reader.fail();
1501 return false;
1502 }
1503 return true;
1504}
1505
1507{
1508 if (!reader.noMore()) {
1509 reader.fail();
1510 return false;
1511 }
1512 return true;
1513}
1514
1516{
1517 yarp::os::idl::WireWriter writer(connection);
1518 return write(writer);
1519}
1520
1522{
1523 yarp::os::idl::WireReader reader(connection);
1524 return read(reader);
1525}
1526
1528{
1529 if (!writer.isNull()) {
1530 if (!writer.writeListHeader(s_reply_len)) {
1531 return false;
1532 }
1533 if (!writer.write(return_helper)) {
1534 return false;
1535 }
1536 }
1537 return true;
1538}
1539
1541{
1542 if (!reader.readListReturn()) {
1543 return false;
1544 }
1545 if (reader.noMore()) {
1546 reader.fail();
1547 return false;
1548 }
1549 if (!reader.read(return_helper)) {
1550 reader.fail();
1551 return false;
1552 }
1553 return true;
1554}
1555
1560
1561// getStickCount helper class implementation
1563{
1564 return cmd.write(connection);
1565}
1566
1568{
1569 return reply.read(connection);
1570}
1571
1573{
1574 yarp::os::idl::WireWriter writer(connection);
1575 if (!writer.writeListHeader(s_cmd_len)) {
1576 return false;
1577 }
1578 return write(writer);
1579}
1580
1582{
1583 yarp::os::idl::WireReader reader(connection);
1584 if (!reader.readListHeader()) {
1585 reader.fail();
1586 return false;
1587 }
1588 return read(reader);
1589}
1590
1592{
1593 if (!writeTag(writer)) {
1594 return false;
1595 }
1596 if (!writeArgs(writer)) {
1597 return false;
1598 }
1599 return true;
1600}
1601
1603{
1604 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1605 return false;
1606 }
1607 return true;
1608}
1609
1611{
1612 return true;
1613}
1614
1616{
1617 if (!readTag(reader)) {
1618 return false;
1619 }
1620 if (!readArgs(reader)) {
1621 return false;
1622 }
1623 return true;
1624}
1625
1627{
1628 std::string tag = reader.readTag(s_tag_len);
1629 if (reader.isError()) {
1630 return false;
1631 }
1632 if (tag != s_tag) {
1633 reader.fail();
1634 return false;
1635 }
1636 return true;
1637}
1638
1640{
1641 if (!reader.noMore()) {
1642 reader.fail();
1643 return false;
1644 }
1645 return true;
1646}
1647
1649{
1650 yarp::os::idl::WireWriter writer(connection);
1651 return write(writer);
1652}
1653
1655{
1656 yarp::os::idl::WireReader reader(connection);
1657 return read(reader);
1658}
1659
1661{
1662 if (!writer.isNull()) {
1663 if (!writer.writeListHeader(s_reply_len)) {
1664 return false;
1665 }
1666 if (!writer.write(return_helper)) {
1667 return false;
1668 }
1669 }
1670 return true;
1671}
1672
1674{
1675 if (!reader.readListReturn()) {
1676 return false;
1677 }
1678 if (reader.noMore()) {
1679 reader.fail();
1680 return false;
1681 }
1682 if (!reader.read(return_helper)) {
1683 reader.fail();
1684 return false;
1685 }
1686 return true;
1687}
1688
1693
1694// getButton helper class implementation
1696 cmd{button_id}
1697{
1698}
1699
1701{
1702 return cmd.write(connection);
1703}
1704
1706{
1707 return reply.read(connection);
1708}
1709
1711 button_id{button_id}
1712{
1713}
1714
1716{
1717 yarp::os::idl::WireWriter writer(connection);
1718 if (!writer.writeListHeader(s_cmd_len)) {
1719 return false;
1720 }
1721 return write(writer);
1722}
1723
1725{
1726 yarp::os::idl::WireReader reader(connection);
1727 if (!reader.readListHeader()) {
1728 reader.fail();
1729 return false;
1730 }
1731 return read(reader);
1732}
1733
1735{
1736 if (!writeTag(writer)) {
1737 return false;
1738 }
1739 if (!writeArgs(writer)) {
1740 return false;
1741 }
1742 return true;
1743}
1744
1746{
1747 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1748 return false;
1749 }
1750 return true;
1751}
1752
1754{
1755 if (!writer.writeI32(button_id)) {
1756 return false;
1757 }
1758 return true;
1759}
1760
1762{
1763 if (!readTag(reader)) {
1764 return false;
1765 }
1766 if (!readArgs(reader)) {
1767 return false;
1768 }
1769 return true;
1770}
1771
1773{
1774 std::string tag = reader.readTag(s_tag_len);
1775 if (reader.isError()) {
1776 return false;
1777 }
1778 if (tag != s_tag) {
1779 reader.fail();
1780 return false;
1781 }
1782 return true;
1783}
1784
1786{
1787 if (reader.noMore()) {
1788 reader.fail();
1789 return false;
1790 }
1791 if (!reader.readI32(button_id)) {
1792 reader.fail();
1793 return false;
1794 }
1795 if (!reader.noMore()) {
1796 reader.fail();
1797 return false;
1798 }
1799 return true;
1800}
1801
1803{
1804 yarp::os::idl::WireWriter writer(connection);
1805 return write(writer);
1806}
1807
1809{
1810 yarp::os::idl::WireReader reader(connection);
1811 return read(reader);
1812}
1813
1815{
1816 if (!writer.isNull()) {
1817 if (!writer.writeListHeader(s_reply_len)) {
1818 return false;
1819 }
1820 if (!writer.write(return_helper)) {
1821 return false;
1822 }
1823 }
1824 return true;
1825}
1826
1828{
1829 if (!reader.readListReturn()) {
1830 return false;
1831 }
1832 if (reader.noMore()) {
1833 reader.fail();
1834 return false;
1835 }
1836 if (!reader.read(return_helper)) {
1837 reader.fail();
1838 return false;
1839 }
1840 return true;
1841}
1842
1847
1848// getTrackball helper class implementation
1850 cmd{trackball_id}
1851{
1852}
1853
1855{
1856 return cmd.write(connection);
1857}
1858
1860{
1861 return reply.read(connection);
1862}
1863
1865 trackball_id{trackball_id}
1866{
1867}
1868
1870{
1871 yarp::os::idl::WireWriter writer(connection);
1872 if (!writer.writeListHeader(s_cmd_len)) {
1873 return false;
1874 }
1875 return write(writer);
1876}
1877
1879{
1880 yarp::os::idl::WireReader reader(connection);
1881 if (!reader.readListHeader()) {
1882 reader.fail();
1883 return false;
1884 }
1885 return read(reader);
1886}
1887
1889{
1890 if (!writeTag(writer)) {
1891 return false;
1892 }
1893 if (!writeArgs(writer)) {
1894 return false;
1895 }
1896 return true;
1897}
1898
1900{
1901 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
1902 return false;
1903 }
1904 return true;
1905}
1906
1908{
1909 if (!writer.writeI32(trackball_id)) {
1910 return false;
1911 }
1912 return true;
1913}
1914
1916{
1917 if (!readTag(reader)) {
1918 return false;
1919 }
1920 if (!readArgs(reader)) {
1921 return false;
1922 }
1923 return true;
1924}
1925
1927{
1928 std::string tag = reader.readTag(s_tag_len);
1929 if (reader.isError()) {
1930 return false;
1931 }
1932 if (tag != s_tag) {
1933 reader.fail();
1934 return false;
1935 }
1936 return true;
1937}
1938
1940{
1941 if (reader.noMore()) {
1942 reader.fail();
1943 return false;
1944 }
1945 if (!reader.readI32(trackball_id)) {
1946 reader.fail();
1947 return false;
1948 }
1949 if (!reader.noMore()) {
1950 reader.fail();
1951 return false;
1952 }
1953 return true;
1954}
1955
1957{
1958 yarp::os::idl::WireWriter writer(connection);
1959 return write(writer);
1960}
1961
1963{
1964 yarp::os::idl::WireReader reader(connection);
1965 return read(reader);
1966}
1967
1969{
1970 if (!writer.isNull()) {
1971 if (!writer.writeListHeader(s_reply_len)) {
1972 return false;
1973 }
1974 if (!writer.write(return_helper)) {
1975 return false;
1976 }
1977 }
1978 return true;
1979}
1980
1982{
1983 if (!reader.readListReturn()) {
1984 return false;
1985 }
1986 if (reader.noMore()) {
1987 reader.fail();
1988 return false;
1989 }
1990 if (!reader.read(return_helper)) {
1991 reader.fail();
1992 return false;
1993 }
1994 return true;
1995}
1996
2001
2002// getHat helper class implementation
2004 cmd{hat_id}
2005{
2006}
2007
2009{
2010 return cmd.write(connection);
2011}
2012
2014{
2015 return reply.read(connection);
2016}
2017
2019 hat_id{hat_id}
2020{
2021}
2022
2024{
2025 yarp::os::idl::WireWriter writer(connection);
2026 if (!writer.writeListHeader(s_cmd_len)) {
2027 return false;
2028 }
2029 return write(writer);
2030}
2031
2033{
2034 yarp::os::idl::WireReader reader(connection);
2035 if (!reader.readListHeader()) {
2036 reader.fail();
2037 return false;
2038 }
2039 return read(reader);
2040}
2041
2043{
2044 if (!writeTag(writer)) {
2045 return false;
2046 }
2047 if (!writeArgs(writer)) {
2048 return false;
2049 }
2050 return true;
2051}
2052
2054{
2055 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2056 return false;
2057 }
2058 return true;
2059}
2060
2062{
2063 if (!writer.writeI32(hat_id)) {
2064 return false;
2065 }
2066 return true;
2067}
2068
2070{
2071 if (!readTag(reader)) {
2072 return false;
2073 }
2074 if (!readArgs(reader)) {
2075 return false;
2076 }
2077 return true;
2078}
2079
2081{
2082 std::string tag = reader.readTag(s_tag_len);
2083 if (reader.isError()) {
2084 return false;
2085 }
2086 if (tag != s_tag) {
2087 reader.fail();
2088 return false;
2089 }
2090 return true;
2091}
2092
2094{
2095 if (reader.noMore()) {
2096 reader.fail();
2097 return false;
2098 }
2099 if (!reader.readI32(hat_id)) {
2100 reader.fail();
2101 return false;
2102 }
2103 if (!reader.noMore()) {
2104 reader.fail();
2105 return false;
2106 }
2107 return true;
2108}
2109
2111{
2112 yarp::os::idl::WireWriter writer(connection);
2113 return write(writer);
2114}
2115
2117{
2118 yarp::os::idl::WireReader reader(connection);
2119 return read(reader);
2120}
2121
2123{
2124 if (!writer.isNull()) {
2125 if (!writer.writeListHeader(s_reply_len)) {
2126 return false;
2127 }
2128 if (!writer.write(return_helper)) {
2129 return false;
2130 }
2131 }
2132 return true;
2133}
2134
2136{
2137 if (!reader.readListReturn()) {
2138 return false;
2139 }
2140 if (reader.noMore()) {
2141 reader.fail();
2142 return false;
2143 }
2144 if (!reader.read(return_helper)) {
2145 reader.fail();
2146 return false;
2147 }
2148 return true;
2149}
2150
2155
2156// getAxis helper class implementation
2158 cmd{axis_id}
2159{
2160}
2161
2163{
2164 return cmd.write(connection);
2165}
2166
2168{
2169 return reply.read(connection);
2170}
2171
2173 axis_id{axis_id}
2174{
2175}
2176
2178{
2179 yarp::os::idl::WireWriter writer(connection);
2180 if (!writer.writeListHeader(s_cmd_len)) {
2181 return false;
2182 }
2183 return write(writer);
2184}
2185
2187{
2188 yarp::os::idl::WireReader reader(connection);
2189 if (!reader.readListHeader()) {
2190 reader.fail();
2191 return false;
2192 }
2193 return read(reader);
2194}
2195
2197{
2198 if (!writeTag(writer)) {
2199 return false;
2200 }
2201 if (!writeArgs(writer)) {
2202 return false;
2203 }
2204 return true;
2205}
2206
2208{
2209 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2210 return false;
2211 }
2212 return true;
2213}
2214
2216{
2217 if (!writer.writeI32(axis_id)) {
2218 return false;
2219 }
2220 return true;
2221}
2222
2224{
2225 if (!readTag(reader)) {
2226 return false;
2227 }
2228 if (!readArgs(reader)) {
2229 return false;
2230 }
2231 return true;
2232}
2233
2235{
2236 std::string tag = reader.readTag(s_tag_len);
2237 if (reader.isError()) {
2238 return false;
2239 }
2240 if (tag != s_tag) {
2241 reader.fail();
2242 return false;
2243 }
2244 return true;
2245}
2246
2248{
2249 if (reader.noMore()) {
2250 reader.fail();
2251 return false;
2252 }
2253 if (!reader.readI32(axis_id)) {
2254 reader.fail();
2255 return false;
2256 }
2257 if (!reader.noMore()) {
2258 reader.fail();
2259 return false;
2260 }
2261 return true;
2262}
2263
2265{
2266 yarp::os::idl::WireWriter writer(connection);
2267 return write(writer);
2268}
2269
2271{
2272 yarp::os::idl::WireReader reader(connection);
2273 return read(reader);
2274}
2275
2277{
2278 if (!writer.isNull()) {
2279 if (!writer.writeListHeader(s_reply_len)) {
2280 return false;
2281 }
2282 if (!writer.write(return_helper)) {
2283 return false;
2284 }
2285 }
2286 return true;
2287}
2288
2290{
2291 if (!reader.readListReturn()) {
2292 return false;
2293 }
2294 if (reader.noMore()) {
2295 reader.fail();
2296 return false;
2297 }
2298 if (!reader.read(return_helper)) {
2299 reader.fail();
2300 return false;
2301 }
2302 return true;
2303}
2304
2309
2310// getAllAxes helper class implementation
2312{
2313 return cmd.write(connection);
2314}
2315
2317{
2318 return reply.read(connection);
2319}
2320
2322{
2323 yarp::os::idl::WireWriter writer(connection);
2324 if (!writer.writeListHeader(s_cmd_len)) {
2325 return false;
2326 }
2327 return write(writer);
2328}
2329
2331{
2332 yarp::os::idl::WireReader reader(connection);
2333 if (!reader.readListHeader()) {
2334 reader.fail();
2335 return false;
2336 }
2337 return read(reader);
2338}
2339
2341{
2342 if (!writeTag(writer)) {
2343 return false;
2344 }
2345 if (!writeArgs(writer)) {
2346 return false;
2347 }
2348 return true;
2349}
2350
2352{
2353 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2354 return false;
2355 }
2356 return true;
2357}
2358
2360{
2361 return true;
2362}
2363
2365{
2366 if (!readTag(reader)) {
2367 return false;
2368 }
2369 if (!readArgs(reader)) {
2370 return false;
2371 }
2372 return true;
2373}
2374
2376{
2377 std::string tag = reader.readTag(s_tag_len);
2378 if (reader.isError()) {
2379 return false;
2380 }
2381 if (tag != s_tag) {
2382 reader.fail();
2383 return false;
2384 }
2385 return true;
2386}
2387
2389{
2390 if (!reader.noMore()) {
2391 reader.fail();
2392 return false;
2393 }
2394 return true;
2395}
2396
2398{
2399 yarp::os::idl::WireWriter writer(connection);
2400 return write(writer);
2401}
2402
2404{
2405 yarp::os::idl::WireReader reader(connection);
2406 return read(reader);
2407}
2408
2410{
2411 if (!writer.isNull()) {
2412 if (!writer.writeListHeader(s_reply_len)) {
2413 return false;
2414 }
2415 if (!writer.write(return_helper)) {
2416 return false;
2417 }
2418 }
2419 return true;
2420}
2421
2423{
2424 if (!reader.readListReturn()) {
2425 return false;
2426 }
2427 if (reader.noMore()) {
2428 reader.fail();
2429 return false;
2430 }
2431 if (!reader.read(return_helper)) {
2432 reader.fail();
2433 return false;
2434 }
2435 return true;
2436}
2437
2442
2443// getStick helper class implementation
2448
2450{
2451 return cmd.write(connection);
2452}
2453
2455{
2456 return reply.read(connection);
2457}
2458
2460 stick_id{stick_id},
2461 mode{mode}
2462{
2463}
2464
2466{
2467 yarp::os::idl::WireWriter writer(connection);
2468 if (!writer.writeListHeader(s_cmd_len)) {
2469 return false;
2470 }
2471 return write(writer);
2472}
2473
2475{
2476 yarp::os::idl::WireReader reader(connection);
2477 if (!reader.readListHeader()) {
2478 reader.fail();
2479 return false;
2480 }
2481 return read(reader);
2482}
2483
2485{
2486 if (!writeTag(writer)) {
2487 return false;
2488 }
2489 if (!writeArgs(writer)) {
2490 return false;
2491 }
2492 return true;
2493}
2494
2496{
2497 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2498 return false;
2499 }
2500 return true;
2501}
2502
2504{
2505 if (!writer.writeI32(stick_id)) {
2506 return false;
2507 }
2508 if (!writer.writeI32(static_cast<int32_t>(mode))) {
2509 return false;
2510 }
2511 return true;
2512}
2513
2515{
2516 if (!readTag(reader)) {
2517 return false;
2518 }
2519 if (!readArgs(reader)) {
2520 return false;
2521 }
2522 return true;
2523}
2524
2526{
2527 std::string tag = reader.readTag(s_tag_len);
2528 if (reader.isError()) {
2529 return false;
2530 }
2531 if (tag != s_tag) {
2532 reader.fail();
2533 return false;
2534 }
2535 return true;
2536}
2537
2539{
2540 if (reader.noMore()) {
2541 reader.fail();
2542 return false;
2543 }
2544 if (!reader.readI32(stick_id)) {
2545 reader.fail();
2546 return false;
2547 }
2548 if (reader.noMore()) {
2549 reader.fail();
2550 return false;
2551 }
2552 int32_t _ecast;
2553 if (!reader.readI32(_ecast)) {
2554 reader.fail();
2555 return false;
2556 }
2558 if (!reader.noMore()) {
2559 reader.fail();
2560 return false;
2561 }
2562 return true;
2563}
2564
2566{
2567 yarp::os::idl::WireWriter writer(connection);
2568 return write(writer);
2569}
2570
2572{
2573 yarp::os::idl::WireReader reader(connection);
2574 return read(reader);
2575}
2576
2578{
2579 if (!writer.isNull()) {
2580 if (!writer.writeListHeader(s_reply_len)) {
2581 return false;
2582 }
2583 if (!writer.write(return_helper)) {
2584 return false;
2585 }
2586 }
2587 return true;
2588}
2589
2591{
2592 if (!reader.readListReturn()) {
2593 return false;
2594 }
2595 if (reader.noMore()) {
2596 reader.fail();
2597 return false;
2598 }
2599 if (!reader.read(return_helper)) {
2600 reader.fail();
2601 return false;
2602 }
2603 return true;
2604}
2605
2610
2611// getTouch helper class implementation
2613 cmd{touch_id}
2614{
2615}
2616
2618{
2619 return cmd.write(connection);
2620}
2621
2623{
2624 return reply.read(connection);
2625}
2626
2628 touch_id{touch_id}
2629{
2630}
2631
2633{
2634 yarp::os::idl::WireWriter writer(connection);
2635 if (!writer.writeListHeader(s_cmd_len)) {
2636 return false;
2637 }
2638 return write(writer);
2639}
2640
2642{
2643 yarp::os::idl::WireReader reader(connection);
2644 if (!reader.readListHeader()) {
2645 reader.fail();
2646 return false;
2647 }
2648 return read(reader);
2649}
2650
2652{
2653 if (!writeTag(writer)) {
2654 return false;
2655 }
2656 if (!writeArgs(writer)) {
2657 return false;
2658 }
2659 return true;
2660}
2661
2663{
2664 if (!writer.writeTag(s_tag, 1, s_tag_len)) {
2665 return false;
2666 }
2667 return true;
2668}
2669
2671{
2672 if (!writer.writeI32(touch_id)) {
2673 return false;
2674 }
2675 return true;
2676}
2677
2679{
2680 if (!readTag(reader)) {
2681 return false;
2682 }
2683 if (!readArgs(reader)) {
2684 return false;
2685 }
2686 return true;
2687}
2688
2690{
2691 std::string tag = reader.readTag(s_tag_len);
2692 if (reader.isError()) {
2693 return false;
2694 }
2695 if (tag != s_tag) {
2696 reader.fail();
2697 return false;
2698 }
2699 return true;
2700}
2701
2703{
2704 if (reader.noMore()) {
2705 reader.fail();
2706 return false;
2707 }
2708 if (!reader.readI32(touch_id)) {
2709 reader.fail();
2710 return false;
2711 }
2712 if (!reader.noMore()) {
2713 reader.fail();
2714 return false;
2715 }
2716 return true;
2717}
2718
2720{
2721 yarp::os::idl::WireWriter writer(connection);
2722 return write(writer);
2723}
2724
2726{
2727 yarp::os::idl::WireReader reader(connection);
2728 return read(reader);
2729}
2730
2732{
2733 if (!writer.isNull()) {
2734 if (!writer.writeListHeader(s_reply_len)) {
2735 return false;
2736 }
2737 if (!writer.write(return_helper)) {
2738 return false;
2739 }
2740 }
2741 return true;
2742}
2743
2745{
2746 if (!reader.readListReturn()) {
2747 return false;
2748 }
2749 if (reader.noMore()) {
2750 reader.fail();
2751 return false;
2752 }
2753 if (!reader.read(return_helper)) {
2754 reader.fail();
2755 return false;
2756 }
2757 return true;
2758}
2759
2764
2765// Constructor
2767{
2768 yarp().setOwner(*this);
2769}
2770
2772{
2773 if (!yarp().canWrite()) {
2774 yError("Missing server method '%s'?", IJoypadControlMsgs_getAxisCount_helper::s_prototype);
2775 }
2777 bool ok = yarp().write(helper, helper);
2778 if (!ok) {
2779 return_getAxisCount failed_reply{};
2781 return failed_reply;
2782 }
2783 return helper.reply.return_helper;
2784}
2785
2787{
2788 if (!yarp().canWrite()) {
2789 yError("Missing server method '%s'?", IJoypadControlMsgs_getButtonCount_helper::s_prototype);
2790 }
2792 bool ok = yarp().write(helper, helper);
2793 if (!ok) {
2794 return_getButtonCount failed_reply{};
2796 return failed_reply;
2797 }
2798 return helper.reply.return_helper;
2799}
2800
2802{
2803 if (!yarp().canWrite()) {
2805 }
2807 bool ok = yarp().write(helper, helper);
2808 if (!ok) {
2809 return_getTrackballCount failed_reply{};
2811 return failed_reply;
2812 }
2813 return helper.reply.return_helper;
2814}
2815
2817{
2818 if (!yarp().canWrite()) {
2819 yError("Missing server method '%s'?", IJoypadControlMsgs_getHatCount_helper::s_prototype);
2820 }
2822 bool ok = yarp().write(helper, helper);
2823 if (!ok) {
2824 return_getHatCount failed_reply{};
2826 return failed_reply;
2827 }
2828 return helper.reply.return_helper;
2829}
2830
2832{
2833 if (!yarp().canWrite()) {
2835 }
2837 bool ok = yarp().write(helper, helper);
2838 if (!ok) {
2839 return_getTouchSurfaceCount failed_reply{};
2841 return failed_reply;
2842 }
2843 return helper.reply.return_helper;
2844}
2845
2847{
2848 if (!yarp().canWrite()) {
2849 yError("Missing server method '%s'?", IJoypadControlMsgs_getStickCount_helper::s_prototype);
2850 }
2852 bool ok = yarp().write(helper, helper);
2853 if (!ok) {
2854 return_getStickCount failed_reply{};
2856 return failed_reply;
2857 }
2858 return helper.reply.return_helper;
2859}
2860
2862{
2863 if (!yarp().canWrite()) {
2864 yError("Missing server method '%s'?", IJoypadControlMsgs_getButton_helper::s_prototype);
2865 }
2866 IJoypadControlMsgs_getButton_helper helper{button_id};
2867 bool ok = yarp().write(helper, helper);
2868 if (!ok) {
2869 return_getButton failed_reply{};
2871 return failed_reply;
2872 }
2873 return helper.reply.return_helper;
2874}
2875
2877{
2878 if (!yarp().canWrite()) {
2879 yError("Missing server method '%s'?", IJoypadControlMsgs_getTrackball_helper::s_prototype);
2880 }
2881 IJoypadControlMsgs_getTrackball_helper helper{trackball_id};
2882 bool ok = yarp().write(helper, helper);
2883 if (!ok) {
2884 return_getTrackball failed_reply{};
2886 return failed_reply;
2887 }
2888 return helper.reply.return_helper;
2889}
2890
2892{
2893 if (!yarp().canWrite()) {
2894 yError("Missing server method '%s'?", IJoypadControlMsgs_getHat_helper::s_prototype);
2895 }
2896 IJoypadControlMsgs_getHat_helper helper{hat_id};
2897 bool ok = yarp().write(helper, helper);
2898 if (!ok) {
2899 return_getHat failed_reply{};
2901 return failed_reply;
2902 }
2903 return helper.reply.return_helper;
2904}
2905
2907{
2908 if (!yarp().canWrite()) {
2909 yError("Missing server method '%s'?", IJoypadControlMsgs_getAxis_helper::s_prototype);
2910 }
2911 IJoypadControlMsgs_getAxis_helper helper{axis_id};
2912 bool ok = yarp().write(helper, helper);
2913 if (!ok) {
2914 return_getAxis failed_reply{};
2916 return failed_reply;
2917 }
2918 return helper.reply.return_helper;
2919}
2920
2922{
2923 if (!yarp().canWrite()) {
2924 yError("Missing server method '%s'?", IJoypadControlMsgs_getAllAxes_helper::s_prototype);
2925 }
2927 bool ok = yarp().write(helper, helper);
2928 if (!ok) {
2929 return_getAllAxes failed_reply{};
2931 return failed_reply;
2932 }
2933 return helper.reply.return_helper;
2934}
2935
2937{
2938 if (!yarp().canWrite()) {
2939 yError("Missing server method '%s'?", IJoypadControlMsgs_getStick_helper::s_prototype);
2940 }
2941 IJoypadControlMsgs_getStick_helper helper{stick_id, mode};
2942 bool ok = yarp().write(helper, helper);
2943 if (!ok) {
2944 return_getStick failed_reply{};
2946 return failed_reply;
2947 }
2948 return helper.reply.return_helper;
2949}
2950
2952{
2953 if (!yarp().canWrite()) {
2954 yError("Missing server method '%s'?", IJoypadControlMsgs_getTouch_helper::s_prototype);
2955 }
2956 IJoypadControlMsgs_getTouch_helper helper{touch_id};
2957 bool ok = yarp().write(helper, helper);
2958 if (!ok) {
2959 return_getTouch failed_reply{};
2961 return failed_reply;
2962 }
2963 return helper.reply.return_helper;
2964}
2965
2966// help method
2967std::vector<std::string> IJoypadControlMsgs::help(const std::string& functionName)
2968{
2969 bool showAll = (functionName == "--all");
2970 std::vector<std::string> helpString;
2971 if (showAll) {
2972 helpString.emplace_back("*** Available commands:");
2973 helpString.emplace_back(IJoypadControlMsgs_getAxisCount_helper::s_tag);
2974 helpString.emplace_back(IJoypadControlMsgs_getButtonCount_helper::s_tag);
2976 helpString.emplace_back(IJoypadControlMsgs_getHatCount_helper::s_tag);
2978 helpString.emplace_back(IJoypadControlMsgs_getStickCount_helper::s_tag);
2979 helpString.emplace_back(IJoypadControlMsgs_getButton_helper::s_tag);
2980 helpString.emplace_back(IJoypadControlMsgs_getTrackball_helper::s_tag);
2981 helpString.emplace_back(IJoypadControlMsgs_getHat_helper::s_tag);
2982 helpString.emplace_back(IJoypadControlMsgs_getAxis_helper::s_tag);
2983 helpString.emplace_back(IJoypadControlMsgs_getAllAxes_helper::s_tag);
2984 helpString.emplace_back(IJoypadControlMsgs_getStick_helper::s_tag);
2985 helpString.emplace_back(IJoypadControlMsgs_getTouch_helper::s_tag);
2986 helpString.emplace_back("help");
2987 } else {
2990 }
2993 }
2996 }
2999 }
3002 }
3005 }
3006 if (functionName == IJoypadControlMsgs_getButton_helper::s_tag) {
3007 helpString.emplace_back(IJoypadControlMsgs_getButton_helper::s_prototype);
3008 }
3011 }
3012 if (functionName == IJoypadControlMsgs_getHat_helper::s_tag) {
3013 helpString.emplace_back(IJoypadControlMsgs_getHat_helper::s_prototype);
3014 }
3015 if (functionName == IJoypadControlMsgs_getAxis_helper::s_tag) {
3016 helpString.emplace_back(IJoypadControlMsgs_getAxis_helper::s_prototype);
3017 }
3018 if (functionName == IJoypadControlMsgs_getAllAxes_helper::s_tag) {
3020 }
3021 if (functionName == IJoypadControlMsgs_getStick_helper::s_tag) {
3022 helpString.emplace_back(IJoypadControlMsgs_getStick_helper::s_prototype);
3023 }
3024 if (functionName == IJoypadControlMsgs_getTouch_helper::s_tag) {
3025 helpString.emplace_back(IJoypadControlMsgs_getTouch_helper::s_prototype);
3026 }
3027 if (functionName == "help") {
3028 helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
3029 helpString.emplace_back("Return list of available commands, or help message for a specific function");
3030 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");
3031 helpString.emplace_back("@return list of strings (one string per line)");
3032 }
3033 }
3034 if (helpString.empty()) {
3035 helpString.emplace_back("Command not found");
3036 }
3037 return helpString;
3038}
3039
3040// read from ConnectionReader
3042{
3043 constexpr size_t max_tag_len = 1;
3044 size_t tag_len = 1;
3045
3046 yarp::os::idl::WireReader reader(connection);
3047 reader.expectAccept();
3048 if (!reader.readListHeader()) {
3049 reader.fail();
3050 return false;
3051 }
3052
3053 std::string tag = reader.readTag(1);
3054 bool direct = (tag == "__direct__");
3055 if (direct) {
3056 tag = reader.readTag(1);
3057 }
3058 while (tag_len <= max_tag_len && !reader.isError()) {
3059 if(tag == "getRemoteProtocolVersion") {
3060 if (!reader.noMore()) {
3061 yError("Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
3062 reader.fail();
3063 return false;
3064 }
3065
3066 auto proto = getLocalProtocolVersion();
3067
3068 yarp::os::idl::WireWriter writer(reader);
3069 if (!writer.writeListHeader(1)) {
3070 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
3071 return false;}
3072 if (!writer.write(proto)) {
3073 yWarning("Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
3074 return false;
3075 }
3076 reader.accept();
3077 return true;
3078 }
3081 if (!helper.cmd.readArgs(reader)) {
3082 return false;
3083 }
3084
3085 helper.call(this);
3086
3087 yarp::os::idl::WireWriter writer(reader);
3088 if (!helper.reply.write(writer)) {
3089 return false;
3090 }
3091 reader.accept();
3092 return true;
3093 }
3096 if (!helper.cmd.readArgs(reader)) {
3097 return false;
3098 }
3099
3100 helper.call(this);
3101
3102 yarp::os::idl::WireWriter writer(reader);
3103 if (!helper.reply.write(writer)) {
3104 return false;
3105 }
3106 reader.accept();
3107 return true;
3108 }
3111 if (!helper.cmd.readArgs(reader)) {
3112 return false;
3113 }
3114
3115 helper.call(this);
3116
3117 yarp::os::idl::WireWriter writer(reader);
3118 if (!helper.reply.write(writer)) {
3119 return false;
3120 }
3121 reader.accept();
3122 return true;
3123 }
3126 if (!helper.cmd.readArgs(reader)) {
3127 return false;
3128 }
3129
3130 helper.call(this);
3131
3132 yarp::os::idl::WireWriter writer(reader);
3133 if (!helper.reply.write(writer)) {
3134 return false;
3135 }
3136 reader.accept();
3137 return true;
3138 }
3141 if (!helper.cmd.readArgs(reader)) {
3142 return false;
3143 }
3144
3145 helper.call(this);
3146
3147 yarp::os::idl::WireWriter writer(reader);
3148 if (!helper.reply.write(writer)) {
3149 return false;
3150 }
3151 reader.accept();
3152 return true;
3153 }
3156 if (!helper.cmd.readArgs(reader)) {
3157 return false;
3158 }
3159
3160 helper.call(this);
3161
3162 yarp::os::idl::WireWriter writer(reader);
3163 if (!helper.reply.write(writer)) {
3164 return false;
3165 }
3166 reader.accept();
3167 return true;
3168 }
3171 if (!helper.cmd.readArgs(reader)) {
3172 return false;
3173 }
3174
3175 helper.call(this);
3176
3177 yarp::os::idl::WireWriter writer(reader);
3178 if (!helper.reply.write(writer)) {
3179 return false;
3180 }
3181 reader.accept();
3182 return true;
3183 }
3186 if (!helper.cmd.readArgs(reader)) {
3187 return false;
3188 }
3189
3190 helper.call(this);
3191
3192 yarp::os::idl::WireWriter writer(reader);
3193 if (!helper.reply.write(writer)) {
3194 return false;
3195 }
3196 reader.accept();
3197 return true;
3198 }
3201 if (!helper.cmd.readArgs(reader)) {
3202 return false;
3203 }
3204
3205 helper.call(this);
3206
3207 yarp::os::idl::WireWriter writer(reader);
3208 if (!helper.reply.write(writer)) {
3209 return false;
3210 }
3211 reader.accept();
3212 return true;
3213 }
3216 if (!helper.cmd.readArgs(reader)) {
3217 return false;
3218 }
3219
3220 helper.call(this);
3221
3222 yarp::os::idl::WireWriter writer(reader);
3223 if (!helper.reply.write(writer)) {
3224 return false;
3225 }
3226 reader.accept();
3227 return true;
3228 }
3231 if (!helper.cmd.readArgs(reader)) {
3232 return false;
3233 }
3234
3235 helper.call(this);
3236
3237 yarp::os::idl::WireWriter writer(reader);
3238 if (!helper.reply.write(writer)) {
3239 return false;
3240 }
3241 reader.accept();
3242 return true;
3243 }
3246 if (!helper.cmd.readArgs(reader)) {
3247 return false;
3248 }
3249
3250 helper.call(this);
3251
3252 yarp::os::idl::WireWriter writer(reader);
3253 if (!helper.reply.write(writer)) {
3254 return false;
3255 }
3256 reader.accept();
3257 return true;
3258 }
3261 if (!helper.cmd.readArgs(reader)) {
3262 return false;
3263 }
3264
3265 helper.call(this);
3266
3267 yarp::os::idl::WireWriter writer(reader);
3268 if (!helper.reply.write(writer)) {
3269 return false;
3270 }
3271 reader.accept();
3272 return true;
3273 }
3274 if (tag == "help") {
3275 std::string functionName;
3276 if (!reader.readString(functionName)) {
3277 functionName = "--all";
3278 }
3279 auto help_strings = help(functionName);
3280 yarp::os::idl::WireWriter writer(reader);
3281 if (!writer.isNull()) {
3282 if (!writer.writeListHeader(2)) {
3283 return false;
3284 }
3285 if (!writer.writeTag("many", 1, 0)) {
3286 return false;
3287 }
3288 if (!writer.writeListBegin(0, help_strings.size())) {
3289 return false;
3290 }
3291 for (const auto& help_string : help_strings) {
3292 if (!writer.writeString(help_string)) {
3293 return false;
3294 }
3295 }
3296 if (!writer.writeListEnd()) {
3297 return false;
3298 }
3299 }
3300 reader.accept();
3301 return true;
3302 }
3303 if (reader.noMore()) {
3304 reader.fail();
3305 return false;
3306 }
3307 std::string next_tag = reader.readTag(1);
3308 if (next_tag.empty()) {
3309 break;
3310 }
3311 tag.append("_").append(next_tag);
3312 tag_len = std::count(tag.begin(), tag.end(), '_') + 1;
3313 }
3314 return false;
3315}
3316
3317} // namespace yarp::dev
FeatureMode mode
#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()
@ return_value_error_nws_nwc_communication_error
Method is not (yet) implemented.
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
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