60 if (!read_ThreeAxisGyroscopes(reader)) {
63 if (!read_ThreeAxisLinearAccelerometers(reader)) {
66 if (!read_ThreeAxisMagnetometers(reader)) {
69 if (!read_OrientationSensors(reader)) {
72 if (!read_TemperatureSensors(reader)) {
75 if (!read_SixAxisForceTorqueSensors(reader)) {
78 if (!read_ContactLoadCellArrays(reader)) {
81 if (!read_EncoderArrays(reader)) {
84 if (!read_SkinPatches(reader)) {
87 if (!read_PositionSensors(reader)) {
106 if (!write_ThreeAxisGyroscopes(writer)) {
109 if (!write_ThreeAxisLinearAccelerometers(writer)) {
112 if (!write_ThreeAxisMagnetometers(writer)) {
115 if (!write_OrientationSensors(writer)) {
118 if (!write_TemperatureSensors(writer)) {
121 if (!write_SixAxisForceTorqueSensors(writer)) {
124 if (!write_ContactLoadCellArrays(writer)) {
127 if (!write_EncoderArrays(writer)) {
130 if (!write_SkinPatches(writer)) {
133 if (!write_PositionSensors(writer)) {
146 return write(writer);
173 yarp().setOwner(*
this);
199 return obj !=
nullptr;
218 if (group == 0 && is_dirty) {
225 will_set_ThreeAxisGyroscopes();
227 mark_dirty_ThreeAxisGyroscopes();
229 did_set_ThreeAxisGyroscopes();
235 will_set_ThreeAxisGyroscopes();
236 obj->ThreeAxisGyroscopes[index] = elem;
237 mark_dirty_ThreeAxisGyroscopes();
239 did_set_ThreeAxisGyroscopes();
245 return obj->ThreeAxisGyroscopes;
263 will_set_ThreeAxisLinearAccelerometers();
265 mark_dirty_ThreeAxisLinearAccelerometers();
267 did_set_ThreeAxisLinearAccelerometers();
273 will_set_ThreeAxisLinearAccelerometers();
274 obj->ThreeAxisLinearAccelerometers[index] = elem;
275 mark_dirty_ThreeAxisLinearAccelerometers();
277 did_set_ThreeAxisLinearAccelerometers();
283 return obj->ThreeAxisLinearAccelerometers;
301 will_set_ThreeAxisMagnetometers();
303 mark_dirty_ThreeAxisMagnetometers();
305 did_set_ThreeAxisMagnetometers();
311 will_set_ThreeAxisMagnetometers();
312 obj->ThreeAxisMagnetometers[index] = elem;
313 mark_dirty_ThreeAxisMagnetometers();
315 did_set_ThreeAxisMagnetometers();
321 return obj->ThreeAxisMagnetometers;
339 will_set_OrientationSensors();
341 mark_dirty_OrientationSensors();
343 did_set_OrientationSensors();
349 will_set_OrientationSensors();
350 obj->OrientationSensors[index] = elem;
351 mark_dirty_OrientationSensors();
353 did_set_OrientationSensors();
359 return obj->OrientationSensors;
377 will_set_TemperatureSensors();
379 mark_dirty_TemperatureSensors();
381 did_set_TemperatureSensors();
387 will_set_TemperatureSensors();
388 obj->TemperatureSensors[index] = elem;
389 mark_dirty_TemperatureSensors();
391 did_set_TemperatureSensors();
397 return obj->TemperatureSensors;
415 will_set_SixAxisForceTorqueSensors();
417 mark_dirty_SixAxisForceTorqueSensors();
419 did_set_SixAxisForceTorqueSensors();
425 will_set_SixAxisForceTorqueSensors();
426 obj->SixAxisForceTorqueSensors[index] = elem;
427 mark_dirty_SixAxisForceTorqueSensors();
429 did_set_SixAxisForceTorqueSensors();
435 return obj->SixAxisForceTorqueSensors;
453 will_set_ContactLoadCellArrays();
455 mark_dirty_ContactLoadCellArrays();
457 did_set_ContactLoadCellArrays();
463 will_set_ContactLoadCellArrays();
464 obj->ContactLoadCellArrays[index] = elem;
465 mark_dirty_ContactLoadCellArrays();
467 did_set_ContactLoadCellArrays();
473 return obj->ContactLoadCellArrays;
491 will_set_EncoderArrays();
493 mark_dirty_EncoderArrays();
495 did_set_EncoderArrays();
501 will_set_EncoderArrays();
502 obj->EncoderArrays[index] = elem;
503 mark_dirty_EncoderArrays();
505 did_set_EncoderArrays();
511 return obj->EncoderArrays;
529 will_set_SkinPatches();
531 mark_dirty_SkinPatches();
533 did_set_SkinPatches();
539 will_set_SkinPatches();
540 obj->SkinPatches[index] = elem;
541 mark_dirty_SkinPatches();
543 did_set_SkinPatches();
549 return obj->SkinPatches;
567 will_set_PositionSensors();
569 mark_dirty_PositionSensors();
571 did_set_PositionSensors();
577 will_set_PositionSensors();
578 obj->PositionSensors[index] = elem;
579 mark_dirty_PositionSensors();
581 did_set_PositionSensors();
587 return obj->PositionSensors;
628 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
643 if (!writer.
writeTag(
"many", 1, 0)) {
651 if (field ==
"ThreeAxisGyroscopes") {
655 if (!writer.
writeString(
"std::vector<SensorMetadata> ThreeAxisGyroscopes")) {
659 if (field ==
"ThreeAxisLinearAccelerometers") {
663 if (!writer.
writeString(
"std::vector<SensorMetadata> ThreeAxisLinearAccelerometers")) {
667 if (field ==
"ThreeAxisMagnetometers") {
671 if (!writer.
writeString(
"std::vector<SensorMetadata> ThreeAxisMagnetometers")) {
675 if (field ==
"OrientationSensors") {
679 if (!writer.
writeString(
"std::vector<SensorMetadata> OrientationSensors")) {
683 if (field ==
"TemperatureSensors") {
687 if (!writer.
writeString(
"std::vector<SensorMetadata> TemperatureSensors")) {
691 if (field ==
"SixAxisForceTorqueSensors") {
695 if (!writer.
writeString(
"std::vector<SensorMetadata> SixAxisForceTorqueSensors")) {
699 if (field ==
"ContactLoadCellArrays") {
703 if (!writer.
writeString(
"std::vector<SensorMetadata> ContactLoadCellArrays")) {
707 if (field ==
"EncoderArrays") {
711 if (!writer.
writeString(
"std::vector<SensorMetadata> EncoderArrays")) {
715 if (field ==
"SkinPatches") {
719 if (!writer.
writeString(
"std::vector<SensorMetadata> SkinPatches")) {
723 if (field ==
"PositionSensors") {
727 if (!writer.
writeString(
"std::vector<SensorMetadata> PositionSensors")) {
737 writer.
writeString(
"ThreeAxisLinearAccelerometers");
749 bool have_act =
false;
750 if (tag !=
"patch") {
751 if (((len - 1) % 2) != 0) {
754 len = 1 + ((len - 1) / 2);
758 for (
int i = 1; i < len; ++i) {
772 if (key ==
"ThreeAxisGyroscopes") {
773 will_set_ThreeAxisGyroscopes();
774 if (!obj->nested_read_ThreeAxisGyroscopes(reader)) {
777 did_set_ThreeAxisGyroscopes();
778 }
else if (key ==
"ThreeAxisLinearAccelerometers") {
779 will_set_ThreeAxisLinearAccelerometers();
780 if (!obj->nested_read_ThreeAxisLinearAccelerometers(reader)) {
783 did_set_ThreeAxisLinearAccelerometers();
784 }
else if (key ==
"ThreeAxisMagnetometers") {
785 will_set_ThreeAxisMagnetometers();
786 if (!obj->nested_read_ThreeAxisMagnetometers(reader)) {
789 did_set_ThreeAxisMagnetometers();
790 }
else if (key ==
"OrientationSensors") {
791 will_set_OrientationSensors();
792 if (!obj->nested_read_OrientationSensors(reader)) {
795 did_set_OrientationSensors();
796 }
else if (key ==
"TemperatureSensors") {
797 will_set_TemperatureSensors();
798 if (!obj->nested_read_TemperatureSensors(reader)) {
801 did_set_TemperatureSensors();
802 }
else if (key ==
"SixAxisForceTorqueSensors") {
803 will_set_SixAxisForceTorqueSensors();
804 if (!obj->nested_read_SixAxisForceTorqueSensors(reader)) {
807 did_set_SixAxisForceTorqueSensors();
808 }
else if (key ==
"ContactLoadCellArrays") {
809 will_set_ContactLoadCellArrays();
810 if (!obj->nested_read_ContactLoadCellArrays(reader)) {
813 did_set_ContactLoadCellArrays();
814 }
else if (key ==
"EncoderArrays") {
815 will_set_EncoderArrays();
816 if (!obj->nested_read_EncoderArrays(reader)) {
819 did_set_EncoderArrays();
820 }
else if (key ==
"SkinPatches") {
821 will_set_SkinPatches();
822 if (!obj->nested_read_SkinPatches(reader)) {
825 did_set_SkinPatches();
826 }
else if (key ==
"PositionSensors") {
827 will_set_PositionSensors();
828 if (!obj->nested_read_PositionSensors(reader)) {
831 did_set_PositionSensors();
859 if (is_dirty_ThreeAxisGyroscopes) {
869 if (!obj->nested_write_ThreeAxisGyroscopes(writer)) {
873 if (is_dirty_ThreeAxisLinearAccelerometers) {
880 if (!writer.
writeString(
"ThreeAxisLinearAccelerometers")) {
883 if (!obj->nested_write_ThreeAxisLinearAccelerometers(writer)) {
887 if (is_dirty_ThreeAxisMagnetometers) {
894 if (!writer.
writeString(
"ThreeAxisMagnetometers")) {
897 if (!obj->nested_write_ThreeAxisMagnetometers(writer)) {
901 if (is_dirty_OrientationSensors) {
911 if (!obj->nested_write_OrientationSensors(writer)) {
915 if (is_dirty_TemperatureSensors) {
925 if (!obj->nested_write_TemperatureSensors(writer)) {
929 if (is_dirty_SixAxisForceTorqueSensors) {
936 if (!writer.
writeString(
"SixAxisForceTorqueSensors")) {
939 if (!obj->nested_write_SixAxisForceTorqueSensors(writer)) {
943 if (is_dirty_ContactLoadCellArrays) {
950 if (!writer.
writeString(
"ContactLoadCellArrays")) {
953 if (!obj->nested_write_ContactLoadCellArrays(writer)) {
957 if (is_dirty_EncoderArrays) {
967 if (!obj->nested_write_EncoderArrays(writer)) {
971 if (is_dirty_SkinPatches) {
981 if (!obj->nested_write_SkinPatches(writer)) {
985 if (is_dirty_PositionSensors) {
995 if (!obj->nested_write_PositionSensors(writer)) {
1003 void SensorRPCData::Editor::communicate()
1008 if (
yarp().canWrite()) {
1009 yarp().write(*
this);
1015 void SensorRPCData::Editor::mark_dirty()
1021 void SensorRPCData::Editor::mark_dirty_ThreeAxisGyroscopes()
1023 if (is_dirty_ThreeAxisGyroscopes) {
1027 is_dirty_ThreeAxisGyroscopes =
true;
1032 void SensorRPCData::Editor::mark_dirty_ThreeAxisLinearAccelerometers()
1034 if (is_dirty_ThreeAxisLinearAccelerometers) {
1038 is_dirty_ThreeAxisLinearAccelerometers =
true;
1043 void SensorRPCData::Editor::mark_dirty_ThreeAxisMagnetometers()
1045 if (is_dirty_ThreeAxisMagnetometers) {
1049 is_dirty_ThreeAxisMagnetometers =
true;
1054 void SensorRPCData::Editor::mark_dirty_OrientationSensors()
1056 if (is_dirty_OrientationSensors) {
1060 is_dirty_OrientationSensors =
true;
1065 void SensorRPCData::Editor::mark_dirty_TemperatureSensors()
1067 if (is_dirty_TemperatureSensors) {
1071 is_dirty_TemperatureSensors =
true;
1076 void SensorRPCData::Editor::mark_dirty_SixAxisForceTorqueSensors()
1078 if (is_dirty_SixAxisForceTorqueSensors) {
1082 is_dirty_SixAxisForceTorqueSensors =
true;
1087 void SensorRPCData::Editor::mark_dirty_ContactLoadCellArrays()
1089 if (is_dirty_ContactLoadCellArrays) {
1093 is_dirty_ContactLoadCellArrays =
true;
1098 void SensorRPCData::Editor::mark_dirty_EncoderArrays()
1100 if (is_dirty_EncoderArrays) {
1104 is_dirty_EncoderArrays =
true;
1109 void SensorRPCData::Editor::mark_dirty_SkinPatches()
1111 if (is_dirty_SkinPatches) {
1115 is_dirty_SkinPatches =
true;
1120 void SensorRPCData::Editor::mark_dirty_PositionSensors()
1122 if (is_dirty_PositionSensors) {
1126 is_dirty_PositionSensors =
true;
1131 void SensorRPCData::Editor::dirty_flags(
bool flag)
1134 is_dirty_ThreeAxisGyroscopes = flag;
1135 is_dirty_ThreeAxisLinearAccelerometers = flag;
1136 is_dirty_ThreeAxisMagnetometers = flag;
1137 is_dirty_OrientationSensors = flag;
1138 is_dirty_TemperatureSensors = flag;
1139 is_dirty_SixAxisForceTorqueSensors = flag;
1140 is_dirty_ContactLoadCellArrays = flag;
1141 is_dirty_EncoderArrays = flag;
1142 is_dirty_SkinPatches = flag;
1143 is_dirty_PositionSensors = flag;
1144 dirty_count = flag ? 10 : 0;
1155 for (
size_t _i16 = 0; _i16 < _size12; ++_i16) {
1190 for (
size_t _i22 = 0; _i22 < _size18; ++_i22) {
1225 for (
size_t _i28 = 0; _i28 < _size24; ++_i28) {
1260 for (
size_t _i34 = 0; _i34 < _size30; ++_i34) {
1295 for (
size_t _i40 = 0; _i40 < _size36; ++_i40) {
1330 for (
size_t _i46 = 0; _i46 < _size42; ++_i46) {
1365 for (
size_t _i52 = 0; _i52 < _size48; ++_i52) {
1400 for (
size_t _i58 = 0; _i58 < _size54; ++_i58) {
1435 for (
size_t _i64 = 0; _i64 < _size60; ++_i64) {
1470 for (
size_t _i70 = 0; _i70 < _size66; ++_i70) {
1505 for (
size_t _i76 = 0; _i76 < _size72; ++_i76) {
1540 for (
size_t _i82 = 0; _i82 < _size78; ++_i82) {
1575 for (
size_t _i88 = 0; _i88 < _size84; ++_i88) {
1610 for (
size_t _i94 = 0; _i94 < _size90; ++_i94) {
1645 for (
size_t _i100 = 0; _i100 < _size96; ++_i100) {
1680 for (
size_t _i106 = 0; _i106 < _size102; ++_i106) {
1715 for (
size_t _i112 = 0; _i112 < _size108; ++_i112) {
1750 for (
size_t _i118 = 0; _i118 < _size114; ++_i118) {
1785 for (
size_t _i124 = 0; _i124 < _size120; ++_i124) {
1820 for (
size_t _i130 = 0; _i130 < _size126; ++_i130) {