24 jointPosition_isValid(0),
26 jointVelocity_isValid(0),
28 jointAcceleration_isValid(0),
30 motorPosition_isValid(0),
32 motorVelocity_isValid(0),
34 motorAcceleration_isValid(0),
38 pwmDutycycle_isValid(0),
42 controlMode_isValid(0),
44 interactionMode_isValid(0)
50 const bool jointPosition_isValid,
52 const bool jointVelocity_isValid,
54 const bool jointAcceleration_isValid,
56 const bool motorPosition_isValid,
58 const bool motorVelocity_isValid,
60 const bool motorAcceleration_isValid,
62 const bool torque_isValid,
64 const bool pwmDutycycle_isValid,
66 const bool current_isValid,
68 const bool controlMode_isValid,
70 const bool interactionMode_isValid) :
72 jointPosition(jointPosition),
73 jointPosition_isValid(jointPosition_isValid),
74 jointVelocity(jointVelocity),
75 jointVelocity_isValid(jointVelocity_isValid),
76 jointAcceleration(jointAcceleration),
77 jointAcceleration_isValid(jointAcceleration_isValid),
78 motorPosition(motorPosition),
79 motorPosition_isValid(motorPosition_isValid),
80 motorVelocity(motorVelocity),
81 motorVelocity_isValid(motorVelocity_isValid),
82 motorAcceleration(motorAcceleration),
83 motorAcceleration_isValid(motorAcceleration_isValid),
85 torque_isValid(torque_isValid),
86 pwmDutycycle(pwmDutycycle),
87 pwmDutycycle_isValid(pwmDutycycle_isValid),
89 current_isValid(current_isValid),
90 controlMode(controlMode),
91 controlMode_isValid(controlMode_isValid),
92 interactionMode(interactionMode),
93 interactionMode_isValid(interactionMode_isValid)
100 if (!read_jointPosition(reader)) {
103 if (!read_jointPosition_isValid(reader)) {
106 if (!read_jointVelocity(reader)) {
109 if (!read_jointVelocity_isValid(reader)) {
112 if (!read_jointAcceleration(reader)) {
115 if (!read_jointAcceleration_isValid(reader)) {
118 if (!read_motorPosition(reader)) {
121 if (!read_motorPosition_isValid(reader)) {
124 if (!read_motorVelocity(reader)) {
127 if (!read_motorVelocity_isValid(reader)) {
130 if (!read_motorAcceleration(reader)) {
133 if (!read_motorAcceleration_isValid(reader)) {
136 if (!read_torque(reader)) {
139 if (!read_torque_isValid(reader)) {
142 if (!read_pwmDutycycle(reader)) {
145 if (!read_pwmDutycycle_isValid(reader)) {
148 if (!read_current(reader)) {
151 if (!read_current_isValid(reader)) {
154 if (!read_controlMode(reader)) {
157 if (!read_controlMode_isValid(reader)) {
160 if (!read_interactionMode(reader)) {
163 if (!read_interactionMode_isValid(reader)) {
182 if (!write_jointPosition(writer)) {
185 if (!write_jointPosition_isValid(writer)) {
188 if (!write_jointVelocity(writer)) {
191 if (!write_jointVelocity_isValid(writer)) {
194 if (!write_jointAcceleration(writer)) {
197 if (!write_jointAcceleration_isValid(writer)) {
200 if (!write_motorPosition(writer)) {
203 if (!write_motorPosition_isValid(writer)) {
206 if (!write_motorVelocity(writer)) {
209 if (!write_motorVelocity_isValid(writer)) {
212 if (!write_motorAcceleration(writer)) {
215 if (!write_motorAcceleration_isValid(writer)) {
218 if (!write_torque(writer)) {
221 if (!write_torque_isValid(writer)) {
224 if (!write_pwmDutycycle(writer)) {
227 if (!write_pwmDutycycle_isValid(writer)) {
230 if (!write_current(writer)) {
233 if (!write_current_isValid(writer)) {
236 if (!write_controlMode(writer)) {
239 if (!write_controlMode_isValid(writer)) {
242 if (!write_interactionMode(writer)) {
245 if (!write_interactionMode_isValid(writer)) {
258 return write(writer);
285 yarp().setOwner(*
this);
311 return obj !=
nullptr;
330 if (group == 0 && is_dirty) {
337 will_set_jointPosition();
339 mark_dirty_jointPosition();
341 did_set_jointPosition();
347 return obj->jointPosition;
365 will_set_jointPosition_isValid();
367 mark_dirty_jointPosition_isValid();
369 did_set_jointPosition_isValid();
375 return obj->jointPosition_isValid;
393 will_set_jointVelocity();
395 mark_dirty_jointVelocity();
397 did_set_jointVelocity();
403 return obj->jointVelocity;
421 will_set_jointVelocity_isValid();
423 mark_dirty_jointVelocity_isValid();
425 did_set_jointVelocity_isValid();
431 return obj->jointVelocity_isValid;
449 will_set_jointAcceleration();
451 mark_dirty_jointAcceleration();
453 did_set_jointAcceleration();
459 return obj->jointAcceleration;
477 will_set_jointAcceleration_isValid();
479 mark_dirty_jointAcceleration_isValid();
481 did_set_jointAcceleration_isValid();
487 return obj->jointAcceleration_isValid;
505 will_set_motorPosition();
507 mark_dirty_motorPosition();
509 did_set_motorPosition();
515 return obj->motorPosition;
533 will_set_motorPosition_isValid();
535 mark_dirty_motorPosition_isValid();
537 did_set_motorPosition_isValid();
543 return obj->motorPosition_isValid;
561 will_set_motorVelocity();
563 mark_dirty_motorVelocity();
565 did_set_motorVelocity();
571 return obj->motorVelocity;
589 will_set_motorVelocity_isValid();
591 mark_dirty_motorVelocity_isValid();
593 did_set_motorVelocity_isValid();
599 return obj->motorVelocity_isValid;
617 will_set_motorAcceleration();
619 mark_dirty_motorAcceleration();
621 did_set_motorAcceleration();
627 return obj->motorAcceleration;
645 will_set_motorAcceleration_isValid();
647 mark_dirty_motorAcceleration_isValid();
649 did_set_motorAcceleration_isValid();
655 return obj->motorAcceleration_isValid;
701 will_set_torque_isValid();
703 mark_dirty_torque_isValid();
705 did_set_torque_isValid();
711 return obj->torque_isValid;
729 will_set_pwmDutycycle();
731 mark_dirty_pwmDutycycle();
733 did_set_pwmDutycycle();
739 return obj->pwmDutycycle;
757 will_set_pwmDutycycle_isValid();
759 mark_dirty_pwmDutycycle_isValid();
761 did_set_pwmDutycycle_isValid();
767 return obj->pwmDutycycle_isValid;
787 mark_dirty_current();
813 will_set_current_isValid();
815 mark_dirty_current_isValid();
817 did_set_current_isValid();
823 return obj->current_isValid;
841 will_set_controlMode();
843 mark_dirty_controlMode();
845 did_set_controlMode();
851 return obj->controlMode;
869 will_set_controlMode_isValid();
871 mark_dirty_controlMode_isValid();
873 did_set_controlMode_isValid();
879 return obj->controlMode_isValid;
897 will_set_interactionMode();
899 mark_dirty_interactionMode();
901 did_set_interactionMode();
907 return obj->interactionMode;
925 will_set_interactionMode_isValid();
927 mark_dirty_interactionMode_isValid();
929 did_set_interactionMode_isValid();
935 return obj->interactionMode_isValid;
976 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
991 if (!writer.
writeTag(
"many", 1, 0)) {
999 if (field ==
"jointPosition") {
1003 if (!writer.
writeString(
"yarp::sig::VectorOf<double> jointPosition")) {
1007 if (field ==
"jointPosition_isValid") {
1011 if (!writer.
writeString(
"bool jointPosition_isValid")) {
1015 if (field ==
"jointVelocity") {
1019 if (!writer.
writeString(
"yarp::sig::VectorOf<double> jointVelocity")) {
1023 if (field ==
"jointVelocity_isValid") {
1027 if (!writer.
writeString(
"bool jointVelocity_isValid")) {
1031 if (field ==
"jointAcceleration") {
1035 if (!writer.
writeString(
"yarp::sig::VectorOf<double> jointAcceleration")) {
1039 if (field ==
"jointAcceleration_isValid") {
1043 if (!writer.
writeString(
"bool jointAcceleration_isValid")) {
1047 if (field ==
"motorPosition") {
1051 if (!writer.
writeString(
"yarp::sig::VectorOf<double> motorPosition")) {
1055 if (field ==
"motorPosition_isValid") {
1059 if (!writer.
writeString(
"bool motorPosition_isValid")) {
1063 if (field ==
"motorVelocity") {
1067 if (!writer.
writeString(
"yarp::sig::VectorOf<double> motorVelocity")) {
1071 if (field ==
"motorVelocity_isValid") {
1075 if (!writer.
writeString(
"bool motorVelocity_isValid")) {
1079 if (field ==
"motorAcceleration") {
1083 if (!writer.
writeString(
"yarp::sig::VectorOf<double> motorAcceleration")) {
1087 if (field ==
"motorAcceleration_isValid") {
1091 if (!writer.
writeString(
"bool motorAcceleration_isValid")) {
1095 if (field ==
"torque") {
1099 if (!writer.
writeString(
"yarp::sig::VectorOf<double> torque")) {
1103 if (field ==
"torque_isValid") {
1111 if (field ==
"pwmDutycycle") {
1115 if (!writer.
writeString(
"yarp::sig::VectorOf<double> pwmDutycycle")) {
1119 if (field ==
"pwmDutycycle_isValid") {
1123 if (!writer.
writeString(
"bool pwmDutycycle_isValid")) {
1127 if (field ==
"current") {
1131 if (!writer.
writeString(
"yarp::sig::VectorOf<double> current")) {
1135 if (field ==
"current_isValid") {
1139 if (!writer.
writeString(
"bool current_isValid")) {
1143 if (field ==
"controlMode") {
1147 if (!writer.
writeString(
"yarp::sig::VectorOf<int> controlMode")) {
1151 if (field ==
"controlMode_isValid") {
1155 if (!writer.
writeString(
"bool controlMode_isValid")) {
1159 if (field ==
"interactionMode") {
1163 if (!writer.
writeString(
"yarp::sig::VectorOf<int> interactionMode")) {
1167 if (field ==
"interactionMode_isValid") {
1171 if (!writer.
writeString(
"bool interactionMode_isValid")) {
1205 bool have_act =
false;
1206 if (tag !=
"patch") {
1207 if (((len - 1) % 2) != 0) {
1210 len = 1 + ((len - 1) / 2);
1214 for (
int i = 1; i < len; ++i) {
1228 if (key ==
"jointPosition") {
1229 will_set_jointPosition();
1230 if (!obj->nested_read_jointPosition(reader)) {
1233 did_set_jointPosition();
1234 }
else if (key ==
"jointPosition_isValid") {
1235 will_set_jointPosition_isValid();
1236 if (!obj->nested_read_jointPosition_isValid(reader)) {
1239 did_set_jointPosition_isValid();
1240 }
else if (key ==
"jointVelocity") {
1241 will_set_jointVelocity();
1242 if (!obj->nested_read_jointVelocity(reader)) {
1245 did_set_jointVelocity();
1246 }
else if (key ==
"jointVelocity_isValid") {
1247 will_set_jointVelocity_isValid();
1248 if (!obj->nested_read_jointVelocity_isValid(reader)) {
1251 did_set_jointVelocity_isValid();
1252 }
else if (key ==
"jointAcceleration") {
1253 will_set_jointAcceleration();
1254 if (!obj->nested_read_jointAcceleration(reader)) {
1257 did_set_jointAcceleration();
1258 }
else if (key ==
"jointAcceleration_isValid") {
1259 will_set_jointAcceleration_isValid();
1260 if (!obj->nested_read_jointAcceleration_isValid(reader)) {
1263 did_set_jointAcceleration_isValid();
1264 }
else if (key ==
"motorPosition") {
1265 will_set_motorPosition();
1266 if (!obj->nested_read_motorPosition(reader)) {
1269 did_set_motorPosition();
1270 }
else if (key ==
"motorPosition_isValid") {
1271 will_set_motorPosition_isValid();
1272 if (!obj->nested_read_motorPosition_isValid(reader)) {
1275 did_set_motorPosition_isValid();
1276 }
else if (key ==
"motorVelocity") {
1277 will_set_motorVelocity();
1278 if (!obj->nested_read_motorVelocity(reader)) {
1281 did_set_motorVelocity();
1282 }
else if (key ==
"motorVelocity_isValid") {
1283 will_set_motorVelocity_isValid();
1284 if (!obj->nested_read_motorVelocity_isValid(reader)) {
1287 did_set_motorVelocity_isValid();
1288 }
else if (key ==
"motorAcceleration") {
1289 will_set_motorAcceleration();
1290 if (!obj->nested_read_motorAcceleration(reader)) {
1293 did_set_motorAcceleration();
1294 }
else if (key ==
"motorAcceleration_isValid") {
1295 will_set_motorAcceleration_isValid();
1296 if (!obj->nested_read_motorAcceleration_isValid(reader)) {
1299 did_set_motorAcceleration_isValid();
1300 }
else if (key ==
"torque") {
1302 if (!obj->nested_read_torque(reader)) {
1306 }
else if (key ==
"torque_isValid") {
1307 will_set_torque_isValid();
1308 if (!obj->nested_read_torque_isValid(reader)) {
1311 did_set_torque_isValid();
1312 }
else if (key ==
"pwmDutycycle") {
1313 will_set_pwmDutycycle();
1314 if (!obj->nested_read_pwmDutycycle(reader)) {
1317 did_set_pwmDutycycle();
1318 }
else if (key ==
"pwmDutycycle_isValid") {
1319 will_set_pwmDutycycle_isValid();
1320 if (!obj->nested_read_pwmDutycycle_isValid(reader)) {
1323 did_set_pwmDutycycle_isValid();
1324 }
else if (key ==
"current") {
1326 if (!obj->nested_read_current(reader)) {
1330 }
else if (key ==
"current_isValid") {
1331 will_set_current_isValid();
1332 if (!obj->nested_read_current_isValid(reader)) {
1335 did_set_current_isValid();
1336 }
else if (key ==
"controlMode") {
1337 will_set_controlMode();
1338 if (!obj->nested_read_controlMode(reader)) {
1341 did_set_controlMode();
1342 }
else if (key ==
"controlMode_isValid") {
1343 will_set_controlMode_isValid();
1344 if (!obj->nested_read_controlMode_isValid(reader)) {
1347 did_set_controlMode_isValid();
1348 }
else if (key ==
"interactionMode") {
1349 will_set_interactionMode();
1350 if (!obj->nested_read_interactionMode(reader)) {
1353 did_set_interactionMode();
1354 }
else if (key ==
"interactionMode_isValid") {
1355 will_set_interactionMode_isValid();
1356 if (!obj->nested_read_interactionMode_isValid(reader)) {
1359 did_set_interactionMode_isValid();
1387 if (is_dirty_jointPosition) {
1397 if (!obj->nested_write_jointPosition(writer)) {
1401 if (is_dirty_jointPosition_isValid) {
1408 if (!writer.
writeString(
"jointPosition_isValid")) {
1411 if (!obj->nested_write_jointPosition_isValid(writer)) {
1415 if (is_dirty_jointVelocity) {
1425 if (!obj->nested_write_jointVelocity(writer)) {
1429 if (is_dirty_jointVelocity_isValid) {
1436 if (!writer.
writeString(
"jointVelocity_isValid")) {
1439 if (!obj->nested_write_jointVelocity_isValid(writer)) {
1443 if (is_dirty_jointAcceleration) {
1453 if (!obj->nested_write_jointAcceleration(writer)) {
1457 if (is_dirty_jointAcceleration_isValid) {
1464 if (!writer.
writeString(
"jointAcceleration_isValid")) {
1467 if (!obj->nested_write_jointAcceleration_isValid(writer)) {
1471 if (is_dirty_motorPosition) {
1481 if (!obj->nested_write_motorPosition(writer)) {
1485 if (is_dirty_motorPosition_isValid) {
1492 if (!writer.
writeString(
"motorPosition_isValid")) {
1495 if (!obj->nested_write_motorPosition_isValid(writer)) {
1499 if (is_dirty_motorVelocity) {
1509 if (!obj->nested_write_motorVelocity(writer)) {
1513 if (is_dirty_motorVelocity_isValid) {
1520 if (!writer.
writeString(
"motorVelocity_isValid")) {
1523 if (!obj->nested_write_motorVelocity_isValid(writer)) {
1527 if (is_dirty_motorAcceleration) {
1537 if (!obj->nested_write_motorAcceleration(writer)) {
1541 if (is_dirty_motorAcceleration_isValid) {
1548 if (!writer.
writeString(
"motorAcceleration_isValid")) {
1551 if (!obj->nested_write_motorAcceleration_isValid(writer)) {
1555 if (is_dirty_torque) {
1565 if (!obj->nested_write_torque(writer)) {
1569 if (is_dirty_torque_isValid) {
1579 if (!obj->nested_write_torque_isValid(writer)) {
1583 if (is_dirty_pwmDutycycle) {
1593 if (!obj->nested_write_pwmDutycycle(writer)) {
1597 if (is_dirty_pwmDutycycle_isValid) {
1604 if (!writer.
writeString(
"pwmDutycycle_isValid")) {
1607 if (!obj->nested_write_pwmDutycycle_isValid(writer)) {
1611 if (is_dirty_current) {
1621 if (!obj->nested_write_current(writer)) {
1625 if (is_dirty_current_isValid) {
1635 if (!obj->nested_write_current_isValid(writer)) {
1639 if (is_dirty_controlMode) {
1649 if (!obj->nested_write_controlMode(writer)) {
1653 if (is_dirty_controlMode_isValid) {
1663 if (!obj->nested_write_controlMode_isValid(writer)) {
1667 if (is_dirty_interactionMode) {
1677 if (!obj->nested_write_interactionMode(writer)) {
1681 if (is_dirty_interactionMode_isValid) {
1688 if (!writer.
writeString(
"interactionMode_isValid")) {
1691 if (!obj->nested_write_interactionMode_isValid(writer)) {
1699 void jointData::Editor::communicate()
1704 if (
yarp().canWrite()) {
1705 yarp().write(*
this);
1711 void jointData::Editor::mark_dirty()
1717 void jointData::Editor::mark_dirty_jointPosition()
1719 if (is_dirty_jointPosition) {
1723 is_dirty_jointPosition =
true;
1728 void jointData::Editor::mark_dirty_jointPosition_isValid()
1730 if (is_dirty_jointPosition_isValid) {
1734 is_dirty_jointPosition_isValid =
true;
1739 void jointData::Editor::mark_dirty_jointVelocity()
1741 if (is_dirty_jointVelocity) {
1745 is_dirty_jointVelocity =
true;
1750 void jointData::Editor::mark_dirty_jointVelocity_isValid()
1752 if (is_dirty_jointVelocity_isValid) {
1756 is_dirty_jointVelocity_isValid =
true;
1761 void jointData::Editor::mark_dirty_jointAcceleration()
1763 if (is_dirty_jointAcceleration) {
1767 is_dirty_jointAcceleration =
true;
1772 void jointData::Editor::mark_dirty_jointAcceleration_isValid()
1774 if (is_dirty_jointAcceleration_isValid) {
1778 is_dirty_jointAcceleration_isValid =
true;
1783 void jointData::Editor::mark_dirty_motorPosition()
1785 if (is_dirty_motorPosition) {
1789 is_dirty_motorPosition =
true;
1794 void jointData::Editor::mark_dirty_motorPosition_isValid()
1796 if (is_dirty_motorPosition_isValid) {
1800 is_dirty_motorPosition_isValid =
true;
1805 void jointData::Editor::mark_dirty_motorVelocity()
1807 if (is_dirty_motorVelocity) {
1811 is_dirty_motorVelocity =
true;
1816 void jointData::Editor::mark_dirty_motorVelocity_isValid()
1818 if (is_dirty_motorVelocity_isValid) {
1822 is_dirty_motorVelocity_isValid =
true;
1827 void jointData::Editor::mark_dirty_motorAcceleration()
1829 if (is_dirty_motorAcceleration) {
1833 is_dirty_motorAcceleration =
true;
1838 void jointData::Editor::mark_dirty_motorAcceleration_isValid()
1840 if (is_dirty_motorAcceleration_isValid) {
1844 is_dirty_motorAcceleration_isValid =
true;
1849 void jointData::Editor::mark_dirty_torque()
1851 if (is_dirty_torque) {
1855 is_dirty_torque =
true;
1860 void jointData::Editor::mark_dirty_torque_isValid()
1862 if (is_dirty_torque_isValid) {
1866 is_dirty_torque_isValid =
true;
1871 void jointData::Editor::mark_dirty_pwmDutycycle()
1873 if (is_dirty_pwmDutycycle) {
1877 is_dirty_pwmDutycycle =
true;
1882 void jointData::Editor::mark_dirty_pwmDutycycle_isValid()
1884 if (is_dirty_pwmDutycycle_isValid) {
1888 is_dirty_pwmDutycycle_isValid =
true;
1893 void jointData::Editor::mark_dirty_current()
1895 if (is_dirty_current) {
1899 is_dirty_current =
true;
1904 void jointData::Editor::mark_dirty_current_isValid()
1906 if (is_dirty_current_isValid) {
1910 is_dirty_current_isValid =
true;
1915 void jointData::Editor::mark_dirty_controlMode()
1917 if (is_dirty_controlMode) {
1921 is_dirty_controlMode =
true;
1926 void jointData::Editor::mark_dirty_controlMode_isValid()
1928 if (is_dirty_controlMode_isValid) {
1932 is_dirty_controlMode_isValid =
true;
1937 void jointData::Editor::mark_dirty_interactionMode()
1939 if (is_dirty_interactionMode) {
1943 is_dirty_interactionMode =
true;
1948 void jointData::Editor::mark_dirty_interactionMode_isValid()
1950 if (is_dirty_interactionMode_isValid) {
1954 is_dirty_interactionMode_isValid =
true;
1959 void jointData::Editor::dirty_flags(
bool flag)
1962 is_dirty_jointPosition = flag;
1963 is_dirty_jointPosition_isValid = flag;
1964 is_dirty_jointVelocity = flag;
1965 is_dirty_jointVelocity_isValid = flag;
1966 is_dirty_jointAcceleration = flag;
1967 is_dirty_jointAcceleration_isValid = flag;
1968 is_dirty_motorPosition = flag;
1969 is_dirty_motorPosition_isValid = flag;
1970 is_dirty_motorVelocity = flag;
1971 is_dirty_motorVelocity_isValid = flag;
1972 is_dirty_motorAcceleration = flag;
1973 is_dirty_motorAcceleration_isValid = flag;
1974 is_dirty_torque = flag;
1975 is_dirty_torque_isValid = flag;
1976 is_dirty_pwmDutycycle = flag;
1977 is_dirty_pwmDutycycle_isValid = flag;
1978 is_dirty_current = flag;
1979 is_dirty_current_isValid = flag;
1980 is_dirty_controlMode = flag;
1981 is_dirty_controlMode_isValid = flag;
1982 is_dirty_interactionMode = flag;
1983 is_dirty_interactionMode_isValid = flag;
1984 dirty_count = flag ? 22 : 0;