Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
NaoJointPositionInterface.cpp
1 
2 /***************************************************************************
3  * NaoJointPositionInterface.cpp - Fawkes BlackBoard Interface - NaoJointPositionInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2008-2011 Tim Niemueller
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #include <interfaces/NaoJointPositionInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <cstring>
29 #include <cstdlib>
30 
31 namespace fawkes {
32 
33 /** @class NaoJointPositionInterface <interfaces/NaoJointPositionInterface.h>
34  * NaoJointPositionInterface Fawkes BlackBoard Interface.
35  *
36  This interface provides access to Nao joint positions and movements.
37 
38  * @ingroup FawkesInterfaces
39  */
40 
41 
42 /** SERVO_head_yaw constant */
44 /** SERVO_head_pitch constant */
46 /** SERVO_l_shoulder_pitch constant */
48 /** SERVO_l_shoulder_roll constant */
50 /** SERVO_l_elbow_yaw constant */
52 /** SERVO_l_elbow_roll constant */
54 /** SERVO_l_wrist_yaw constant */
56 /** SERVO_l_hand constant */
57 const uint32_t NaoJointPositionInterface::SERVO_l_hand = 128u;
58 /** SERVO_l_hip_yaw_pitch constant */
60 /** SERVO_l_hip_roll constant */
62 /** SERVO_l_hip_pitch constant */
64 /** SERVO_l_knee_pitch constant */
66 /** SERVO_l_ankle_pitch constant */
68 /** SERVO_l_ankle_roll constant */
70 /** SERVO_r_shoulder_pitch constant */
72 /** SERVO_r_shoulder_roll constant */
74 /** SERVO_r_elbow_yaw constant */
75 const uint32_t NaoJointPositionInterface::SERVO_r_elbow_yaw = 65536u;
76 /** SERVO_r_elbow_roll constant */
77 const uint32_t NaoJointPositionInterface::SERVO_r_elbow_roll = 131072u;
78 /** SERVO_r_wrist_yaw constant */
79 const uint32_t NaoJointPositionInterface::SERVO_r_wrist_yaw = 262144u;
80 /** SERVO_r_hand constant */
81 const uint32_t NaoJointPositionInterface::SERVO_r_hand = 524288u;
82 /** SERVO_r_hip_yaw_pitch constant */
83 const uint32_t NaoJointPositionInterface::SERVO_r_hip_yaw_pitch = 1048576u;
84 /** SERVO_r_hip_roll constant */
85 const uint32_t NaoJointPositionInterface::SERVO_r_hip_roll = 2097152u;
86 /** SERVO_r_hip_pitch constant */
87 const uint32_t NaoJointPositionInterface::SERVO_r_hip_pitch = 4194304u;
88 /** SERVO_r_knee_pitch constant */
89 const uint32_t NaoJointPositionInterface::SERVO_r_knee_pitch = 8388608u;
90 /** SERVO_r_ankle_pitch constant */
91 const uint32_t NaoJointPositionInterface::SERVO_r_ankle_pitch = 16777216u;
92 /** SERVO_r_ankle_roll constant */
93 const uint32_t NaoJointPositionInterface::SERVO_r_ankle_roll = 33554432u;
94 /** SERVO_min constant */
95 const uint32_t NaoJointPositionInterface::SERVO_min = 1u;
96 /** SERVO_max constant */
97 const uint32_t NaoJointPositionInterface::SERVO_max = 33554432u;
98 
99 /** Constructor */
100 NaoJointPositionInterface::NaoJointPositionInterface() : Interface()
101 {
102  data_size = sizeof(NaoJointPositionInterface_data_t);
103  data_ptr = malloc(data_size);
104  data = (NaoJointPositionInterface_data_t *)data_ptr;
105  data_ts = (interface_data_ts_t *)data_ptr;
106  memset(data_ptr, 0, data_size);
107  add_fieldinfo(IFT_ENUM, "robot_type", 1, &data->robot_type, "RobotType");
108  add_fieldinfo(IFT_UINT8, "robot_version", 4, &data->robot_version);
109  add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
110  add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
111  add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
112  add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
113  add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
114  add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
115  add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
116  add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
117  add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
118  add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
119  add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
120  add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
121  add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
122  add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
123  add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
124  add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
125  add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
126  add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
127  add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
128  add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
129  add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
130  add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
131  add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
132  add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
133  add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
134  add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
135  add_fieldinfo(IFT_INT32, "time", 1, &data->time);
136  add_messageinfo("SetServoMessage");
137  add_messageinfo("SetServosMessage");
138  add_messageinfo("MoveServoMessage");
139  add_messageinfo("MoveServosMessage");
140  unsigned char tmp_hash[] = {0x87, 0x3b, 0x41, 0x5d, 0x94, 0x57, 0x82, 0x55, 0x3, 0xbb, 0x3e, 0xf, 0x89, 0x50, 0x6b, 0x46};
141  set_hash(tmp_hash);
142 }
143 
144 /** Destructor */
145 NaoJointPositionInterface::~NaoJointPositionInterface()
146 {
147  free(data_ptr);
148 }
149 /** Convert RobotType constant to string.
150  * @param value value to convert to string
151  * @return constant value as string.
152  */
153 const char *
154 NaoJointPositionInterface::tostring_RobotType(RobotType value) const
155 {
156  switch (value) {
157  case ROBOTYPE_ACADEMIC: return "ROBOTYPE_ACADEMIC";
158  case ROBOTYPE_ROBOCUP: return "ROBOTYPE_ROBOCUP";
159  default: return "UNKNOWN";
160  }
161 }
162 /* Methods */
163 /** Get robot_type value.
164  * Robot type.
165  * @return robot_type value
166  */
168 NaoJointPositionInterface::robot_type() const
169 {
170  return (NaoJointPositionInterface::RobotType)data->robot_type;
171 }
172 
173 /** Get maximum length of robot_type value.
174  * @return length of robot_type value, can be length of the array or number of
175  * maximum number of characters for a string
176  */
177 size_t
178 NaoJointPositionInterface::maxlenof_robot_type() const
179 {
180  return 1;
181 }
182 
183 /** Set robot_type value.
184  * Robot type.
185  * @param new_robot_type new robot_type value
186  */
187 void
188 NaoJointPositionInterface::set_robot_type(const RobotType new_robot_type)
189 {
190  data->robot_type = new_robot_type;
191  data_changed = true;
192 }
193 
194 /** Get robot_version value.
195  *
196  Robot version. Fields are in ascending array index major, minor, micro and
197  patch level. Currently only the first two are used by Aldebaran, but due to
198  struct alignment we add two extra bytes.
199 
200  * @return robot_version value
201  */
202 uint8_t *
203 NaoJointPositionInterface::robot_version() const
204 {
205  return data->robot_version;
206 }
207 
208 /** Get robot_version value at given index.
209  *
210  Robot version. Fields are in ascending array index major, minor, micro and
211  patch level. Currently only the first two are used by Aldebaran, but due to
212  struct alignment we add two extra bytes.
213 
214  * @param index index of value
215  * @return robot_version value
216  * @exception Exception thrown if index is out of bounds
217  */
218 uint8_t
219 NaoJointPositionInterface::robot_version(unsigned int index) const
220 {
221  if (index > 4) {
222  throw Exception("Index value %u out of bounds (0..4)", index);
223  }
224  return data->robot_version[index];
225 }
226 
227 /** Get maximum length of robot_version value.
228  * @return length of robot_version value, can be length of the array or number of
229  * maximum number of characters for a string
230  */
231 size_t
232 NaoJointPositionInterface::maxlenof_robot_version() const
233 {
234  return 4;
235 }
236 
237 /** Set robot_version value.
238  *
239  Robot version. Fields are in ascending array index major, minor, micro and
240  patch level. Currently only the first two are used by Aldebaran, but due to
241  struct alignment we add two extra bytes.
242 
243  * @param new_robot_version new robot_version value
244  */
245 void
246 NaoJointPositionInterface::set_robot_version(const uint8_t * new_robot_version)
247 {
248  memcpy(data->robot_version, new_robot_version, sizeof(uint8_t) * 4);
249  data_changed = true;
250 }
251 
252 /** Set robot_version value at given index.
253  *
254  Robot version. Fields are in ascending array index major, minor, micro and
255  patch level. Currently only the first two are used by Aldebaran, but due to
256  struct alignment we add two extra bytes.
257 
258  * @param new_robot_version new robot_version value
259  * @param index index for of the value
260  */
261 void
262 NaoJointPositionInterface::set_robot_version(unsigned int index, const uint8_t new_robot_version)
263 {
264  if (index > 4) {
265  throw Exception("Index value %u out of bounds (0..4)", index);
266  }
267  data->robot_version[index] = new_robot_version;
268  data_changed = true;
269 }
270 /** Get head_yaw value.
271  * Head yaw
272  * @return head_yaw value
273  */
274 float
275 NaoJointPositionInterface::head_yaw() const
276 {
277  return data->head_yaw;
278 }
279 
280 /** Get maximum length of head_yaw value.
281  * @return length of head_yaw value, can be length of the array or number of
282  * maximum number of characters for a string
283  */
284 size_t
285 NaoJointPositionInterface::maxlenof_head_yaw() const
286 {
287  return 1;
288 }
289 
290 /** Set head_yaw value.
291  * Head yaw
292  * @param new_head_yaw new head_yaw value
293  */
294 void
295 NaoJointPositionInterface::set_head_yaw(const float new_head_yaw)
296 {
297  data->head_yaw = new_head_yaw;
298  data_changed = true;
299 }
300 
301 /** Get head_pitch value.
302  * Head pitch
303  * @return head_pitch value
304  */
305 float
306 NaoJointPositionInterface::head_pitch() const
307 {
308  return data->head_pitch;
309 }
310 
311 /** Get maximum length of head_pitch value.
312  * @return length of head_pitch value, can be length of the array or number of
313  * maximum number of characters for a string
314  */
315 size_t
316 NaoJointPositionInterface::maxlenof_head_pitch() const
317 {
318  return 1;
319 }
320 
321 /** Set head_pitch value.
322  * Head pitch
323  * @param new_head_pitch new head_pitch value
324  */
325 void
326 NaoJointPositionInterface::set_head_pitch(const float new_head_pitch)
327 {
328  data->head_pitch = new_head_pitch;
329  data_changed = true;
330 }
331 
332 /** Get l_shoulder_pitch value.
333  * Left shoulder pitch
334  * @return l_shoulder_pitch value
335  */
336 float
337 NaoJointPositionInterface::l_shoulder_pitch() const
338 {
339  return data->l_shoulder_pitch;
340 }
341 
342 /** Get maximum length of l_shoulder_pitch value.
343  * @return length of l_shoulder_pitch value, can be length of the array or number of
344  * maximum number of characters for a string
345  */
346 size_t
347 NaoJointPositionInterface::maxlenof_l_shoulder_pitch() const
348 {
349  return 1;
350 }
351 
352 /** Set l_shoulder_pitch value.
353  * Left shoulder pitch
354  * @param new_l_shoulder_pitch new l_shoulder_pitch value
355  */
356 void
357 NaoJointPositionInterface::set_l_shoulder_pitch(const float new_l_shoulder_pitch)
358 {
359  data->l_shoulder_pitch = new_l_shoulder_pitch;
360  data_changed = true;
361 }
362 
363 /** Get l_shoulder_roll value.
364  * Left shoulder roll
365  * @return l_shoulder_roll value
366  */
367 float
368 NaoJointPositionInterface::l_shoulder_roll() const
369 {
370  return data->l_shoulder_roll;
371 }
372 
373 /** Get maximum length of l_shoulder_roll value.
374  * @return length of l_shoulder_roll value, can be length of the array or number of
375  * maximum number of characters for a string
376  */
377 size_t
378 NaoJointPositionInterface::maxlenof_l_shoulder_roll() const
379 {
380  return 1;
381 }
382 
383 /** Set l_shoulder_roll value.
384  * Left shoulder roll
385  * @param new_l_shoulder_roll new l_shoulder_roll value
386  */
387 void
388 NaoJointPositionInterface::set_l_shoulder_roll(const float new_l_shoulder_roll)
389 {
390  data->l_shoulder_roll = new_l_shoulder_roll;
391  data_changed = true;
392 }
393 
394 /** Get l_elbow_yaw value.
395  * Left elbow yaw
396  * @return l_elbow_yaw value
397  */
398 float
399 NaoJointPositionInterface::l_elbow_yaw() const
400 {
401  return data->l_elbow_yaw;
402 }
403 
404 /** Get maximum length of l_elbow_yaw value.
405  * @return length of l_elbow_yaw value, can be length of the array or number of
406  * maximum number of characters for a string
407  */
408 size_t
409 NaoJointPositionInterface::maxlenof_l_elbow_yaw() const
410 {
411  return 1;
412 }
413 
414 /** Set l_elbow_yaw value.
415  * Left elbow yaw
416  * @param new_l_elbow_yaw new l_elbow_yaw value
417  */
418 void
419 NaoJointPositionInterface::set_l_elbow_yaw(const float new_l_elbow_yaw)
420 {
421  data->l_elbow_yaw = new_l_elbow_yaw;
422  data_changed = true;
423 }
424 
425 /** Get l_elbow_roll value.
426  * Left elbow roll
427  * @return l_elbow_roll value
428  */
429 float
430 NaoJointPositionInterface::l_elbow_roll() const
431 {
432  return data->l_elbow_roll;
433 }
434 
435 /** Get maximum length of l_elbow_roll value.
436  * @return length of l_elbow_roll value, can be length of the array or number of
437  * maximum number of characters for a string
438  */
439 size_t
440 NaoJointPositionInterface::maxlenof_l_elbow_roll() const
441 {
442  return 1;
443 }
444 
445 /** Set l_elbow_roll value.
446  * Left elbow roll
447  * @param new_l_elbow_roll new l_elbow_roll value
448  */
449 void
450 NaoJointPositionInterface::set_l_elbow_roll(const float new_l_elbow_roll)
451 {
452  data->l_elbow_roll = new_l_elbow_roll;
453  data_changed = true;
454 }
455 
456 /** Get l_wrist_yaw value.
457  * Left wrist yaw
458  * @return l_wrist_yaw value
459  */
460 float
461 NaoJointPositionInterface::l_wrist_yaw() const
462 {
463  return data->l_wrist_yaw;
464 }
465 
466 /** Get maximum length of l_wrist_yaw value.
467  * @return length of l_wrist_yaw value, can be length of the array or number of
468  * maximum number of characters for a string
469  */
470 size_t
471 NaoJointPositionInterface::maxlenof_l_wrist_yaw() const
472 {
473  return 1;
474 }
475 
476 /** Set l_wrist_yaw value.
477  * Left wrist yaw
478  * @param new_l_wrist_yaw new l_wrist_yaw value
479  */
480 void
481 NaoJointPositionInterface::set_l_wrist_yaw(const float new_l_wrist_yaw)
482 {
483  data->l_wrist_yaw = new_l_wrist_yaw;
484  data_changed = true;
485 }
486 
487 /** Get l_hand value.
488  * Left hand
489  * @return l_hand value
490  */
491 float
492 NaoJointPositionInterface::l_hand() const
493 {
494  return data->l_hand;
495 }
496 
497 /** Get maximum length of l_hand value.
498  * @return length of l_hand value, can be length of the array or number of
499  * maximum number of characters for a string
500  */
501 size_t
502 NaoJointPositionInterface::maxlenof_l_hand() const
503 {
504  return 1;
505 }
506 
507 /** Set l_hand value.
508  * Left hand
509  * @param new_l_hand new l_hand value
510  */
511 void
512 NaoJointPositionInterface::set_l_hand(const float new_l_hand)
513 {
514  data->l_hand = new_l_hand;
515  data_changed = true;
516 }
517 
518 /** Get l_hip_yaw_pitch value.
519  * Left hip yaw pitch
520  * @return l_hip_yaw_pitch value
521  */
522 float
523 NaoJointPositionInterface::l_hip_yaw_pitch() const
524 {
525  return data->l_hip_yaw_pitch;
526 }
527 
528 /** Get maximum length of l_hip_yaw_pitch value.
529  * @return length of l_hip_yaw_pitch value, can be length of the array or number of
530  * maximum number of characters for a string
531  */
532 size_t
533 NaoJointPositionInterface::maxlenof_l_hip_yaw_pitch() const
534 {
535  return 1;
536 }
537 
538 /** Set l_hip_yaw_pitch value.
539  * Left hip yaw pitch
540  * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
541  */
542 void
543 NaoJointPositionInterface::set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
544 {
545  data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
546  data_changed = true;
547 }
548 
549 /** Get l_hip_roll value.
550  * Left hip roll
551  * @return l_hip_roll value
552  */
553 float
554 NaoJointPositionInterface::l_hip_roll() const
555 {
556  return data->l_hip_roll;
557 }
558 
559 /** Get maximum length of l_hip_roll value.
560  * @return length of l_hip_roll value, can be length of the array or number of
561  * maximum number of characters for a string
562  */
563 size_t
564 NaoJointPositionInterface::maxlenof_l_hip_roll() const
565 {
566  return 1;
567 }
568 
569 /** Set l_hip_roll value.
570  * Left hip roll
571  * @param new_l_hip_roll new l_hip_roll value
572  */
573 void
574 NaoJointPositionInterface::set_l_hip_roll(const float new_l_hip_roll)
575 {
576  data->l_hip_roll = new_l_hip_roll;
577  data_changed = true;
578 }
579 
580 /** Get l_hip_pitch value.
581  * Left hip pitch
582  * @return l_hip_pitch value
583  */
584 float
585 NaoJointPositionInterface::l_hip_pitch() const
586 {
587  return data->l_hip_pitch;
588 }
589 
590 /** Get maximum length of l_hip_pitch value.
591  * @return length of l_hip_pitch value, can be length of the array or number of
592  * maximum number of characters for a string
593  */
594 size_t
595 NaoJointPositionInterface::maxlenof_l_hip_pitch() const
596 {
597  return 1;
598 }
599 
600 /** Set l_hip_pitch value.
601  * Left hip pitch
602  * @param new_l_hip_pitch new l_hip_pitch value
603  */
604 void
605 NaoJointPositionInterface::set_l_hip_pitch(const float new_l_hip_pitch)
606 {
607  data->l_hip_pitch = new_l_hip_pitch;
608  data_changed = true;
609 }
610 
611 /** Get l_knee_pitch value.
612  * Left knee pitch
613  * @return l_knee_pitch value
614  */
615 float
616 NaoJointPositionInterface::l_knee_pitch() const
617 {
618  return data->l_knee_pitch;
619 }
620 
621 /** Get maximum length of l_knee_pitch value.
622  * @return length of l_knee_pitch value, can be length of the array or number of
623  * maximum number of characters for a string
624  */
625 size_t
626 NaoJointPositionInterface::maxlenof_l_knee_pitch() const
627 {
628  return 1;
629 }
630 
631 /** Set l_knee_pitch value.
632  * Left knee pitch
633  * @param new_l_knee_pitch new l_knee_pitch value
634  */
635 void
636 NaoJointPositionInterface::set_l_knee_pitch(const float new_l_knee_pitch)
637 {
638  data->l_knee_pitch = new_l_knee_pitch;
639  data_changed = true;
640 }
641 
642 /** Get l_ankle_pitch value.
643  * Left ankle pitch
644  * @return l_ankle_pitch value
645  */
646 float
647 NaoJointPositionInterface::l_ankle_pitch() const
648 {
649  return data->l_ankle_pitch;
650 }
651 
652 /** Get maximum length of l_ankle_pitch value.
653  * @return length of l_ankle_pitch value, can be length of the array or number of
654  * maximum number of characters for a string
655  */
656 size_t
657 NaoJointPositionInterface::maxlenof_l_ankle_pitch() const
658 {
659  return 1;
660 }
661 
662 /** Set l_ankle_pitch value.
663  * Left ankle pitch
664  * @param new_l_ankle_pitch new l_ankle_pitch value
665  */
666 void
667 NaoJointPositionInterface::set_l_ankle_pitch(const float new_l_ankle_pitch)
668 {
669  data->l_ankle_pitch = new_l_ankle_pitch;
670  data_changed = true;
671 }
672 
673 /** Get l_ankle_roll value.
674  * Left ankle roll
675  * @return l_ankle_roll value
676  */
677 float
678 NaoJointPositionInterface::l_ankle_roll() const
679 {
680  return data->l_ankle_roll;
681 }
682 
683 /** Get maximum length of l_ankle_roll value.
684  * @return length of l_ankle_roll value, can be length of the array or number of
685  * maximum number of characters for a string
686  */
687 size_t
688 NaoJointPositionInterface::maxlenof_l_ankle_roll() const
689 {
690  return 1;
691 }
692 
693 /** Set l_ankle_roll value.
694  * Left ankle roll
695  * @param new_l_ankle_roll new l_ankle_roll value
696  */
697 void
698 NaoJointPositionInterface::set_l_ankle_roll(const float new_l_ankle_roll)
699 {
700  data->l_ankle_roll = new_l_ankle_roll;
701  data_changed = true;
702 }
703 
704 /** Get r_shoulder_pitch value.
705  * Right shoulder pitch
706  * @return r_shoulder_pitch value
707  */
708 float
709 NaoJointPositionInterface::r_shoulder_pitch() const
710 {
711  return data->r_shoulder_pitch;
712 }
713 
714 /** Get maximum length of r_shoulder_pitch value.
715  * @return length of r_shoulder_pitch value, can be length of the array or number of
716  * maximum number of characters for a string
717  */
718 size_t
719 NaoJointPositionInterface::maxlenof_r_shoulder_pitch() const
720 {
721  return 1;
722 }
723 
724 /** Set r_shoulder_pitch value.
725  * Right shoulder pitch
726  * @param new_r_shoulder_pitch new r_shoulder_pitch value
727  */
728 void
729 NaoJointPositionInterface::set_r_shoulder_pitch(const float new_r_shoulder_pitch)
730 {
731  data->r_shoulder_pitch = new_r_shoulder_pitch;
732  data_changed = true;
733 }
734 
735 /** Get r_shoulder_roll value.
736  * Right shoulder roll
737  * @return r_shoulder_roll value
738  */
739 float
740 NaoJointPositionInterface::r_shoulder_roll() const
741 {
742  return data->r_shoulder_roll;
743 }
744 
745 /** Get maximum length of r_shoulder_roll value.
746  * @return length of r_shoulder_roll value, can be length of the array or number of
747  * maximum number of characters for a string
748  */
749 size_t
750 NaoJointPositionInterface::maxlenof_r_shoulder_roll() const
751 {
752  return 1;
753 }
754 
755 /** Set r_shoulder_roll value.
756  * Right shoulder roll
757  * @param new_r_shoulder_roll new r_shoulder_roll value
758  */
759 void
760 NaoJointPositionInterface::set_r_shoulder_roll(const float new_r_shoulder_roll)
761 {
762  data->r_shoulder_roll = new_r_shoulder_roll;
763  data_changed = true;
764 }
765 
766 /** Get r_elbow_yaw value.
767  * Right elbow yaw
768  * @return r_elbow_yaw value
769  */
770 float
771 NaoJointPositionInterface::r_elbow_yaw() const
772 {
773  return data->r_elbow_yaw;
774 }
775 
776 /** Get maximum length of r_elbow_yaw value.
777  * @return length of r_elbow_yaw value, can be length of the array or number of
778  * maximum number of characters for a string
779  */
780 size_t
781 NaoJointPositionInterface::maxlenof_r_elbow_yaw() const
782 {
783  return 1;
784 }
785 
786 /** Set r_elbow_yaw value.
787  * Right elbow yaw
788  * @param new_r_elbow_yaw new r_elbow_yaw value
789  */
790 void
791 NaoJointPositionInterface::set_r_elbow_yaw(const float new_r_elbow_yaw)
792 {
793  data->r_elbow_yaw = new_r_elbow_yaw;
794  data_changed = true;
795 }
796 
797 /** Get r_elbow_roll value.
798  * Right elbow roll
799  * @return r_elbow_roll value
800  */
801 float
802 NaoJointPositionInterface::r_elbow_roll() const
803 {
804  return data->r_elbow_roll;
805 }
806 
807 /** Get maximum length of r_elbow_roll value.
808  * @return length of r_elbow_roll value, can be length of the array or number of
809  * maximum number of characters for a string
810  */
811 size_t
812 NaoJointPositionInterface::maxlenof_r_elbow_roll() const
813 {
814  return 1;
815 }
816 
817 /** Set r_elbow_roll value.
818  * Right elbow roll
819  * @param new_r_elbow_roll new r_elbow_roll value
820  */
821 void
822 NaoJointPositionInterface::set_r_elbow_roll(const float new_r_elbow_roll)
823 {
824  data->r_elbow_roll = new_r_elbow_roll;
825  data_changed = true;
826 }
827 
828 /** Get r_wrist_yaw value.
829  * Right wrist yaw
830  * @return r_wrist_yaw value
831  */
832 float
833 NaoJointPositionInterface::r_wrist_yaw() const
834 {
835  return data->r_wrist_yaw;
836 }
837 
838 /** Get maximum length of r_wrist_yaw value.
839  * @return length of r_wrist_yaw value, can be length of the array or number of
840  * maximum number of characters for a string
841  */
842 size_t
843 NaoJointPositionInterface::maxlenof_r_wrist_yaw() const
844 {
845  return 1;
846 }
847 
848 /** Set r_wrist_yaw value.
849  * Right wrist yaw
850  * @param new_r_wrist_yaw new r_wrist_yaw value
851  */
852 void
853 NaoJointPositionInterface::set_r_wrist_yaw(const float new_r_wrist_yaw)
854 {
855  data->r_wrist_yaw = new_r_wrist_yaw;
856  data_changed = true;
857 }
858 
859 /** Get r_hand value.
860  * Right hand
861  * @return r_hand value
862  */
863 float
864 NaoJointPositionInterface::r_hand() const
865 {
866  return data->r_hand;
867 }
868 
869 /** Get maximum length of r_hand value.
870  * @return length of r_hand value, can be length of the array or number of
871  * maximum number of characters for a string
872  */
873 size_t
874 NaoJointPositionInterface::maxlenof_r_hand() const
875 {
876  return 1;
877 }
878 
879 /** Set r_hand value.
880  * Right hand
881  * @param new_r_hand new r_hand value
882  */
883 void
884 NaoJointPositionInterface::set_r_hand(const float new_r_hand)
885 {
886  data->r_hand = new_r_hand;
887  data_changed = true;
888 }
889 
890 /** Get r_hip_yaw_pitch value.
891  * Right hip yaw pitch
892  * @return r_hip_yaw_pitch value
893  */
894 float
895 NaoJointPositionInterface::r_hip_yaw_pitch() const
896 {
897  return data->r_hip_yaw_pitch;
898 }
899 
900 /** Get maximum length of r_hip_yaw_pitch value.
901  * @return length of r_hip_yaw_pitch value, can be length of the array or number of
902  * maximum number of characters for a string
903  */
904 size_t
905 NaoJointPositionInterface::maxlenof_r_hip_yaw_pitch() const
906 {
907  return 1;
908 }
909 
910 /** Set r_hip_yaw_pitch value.
911  * Right hip yaw pitch
912  * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
913  */
914 void
915 NaoJointPositionInterface::set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
916 {
917  data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
918  data_changed = true;
919 }
920 
921 /** Get r_hip_roll value.
922  * Right hip roll
923  * @return r_hip_roll value
924  */
925 float
926 NaoJointPositionInterface::r_hip_roll() const
927 {
928  return data->r_hip_roll;
929 }
930 
931 /** Get maximum length of r_hip_roll value.
932  * @return length of r_hip_roll value, can be length of the array or number of
933  * maximum number of characters for a string
934  */
935 size_t
936 NaoJointPositionInterface::maxlenof_r_hip_roll() const
937 {
938  return 1;
939 }
940 
941 /** Set r_hip_roll value.
942  * Right hip roll
943  * @param new_r_hip_roll new r_hip_roll value
944  */
945 void
946 NaoJointPositionInterface::set_r_hip_roll(const float new_r_hip_roll)
947 {
948  data->r_hip_roll = new_r_hip_roll;
949  data_changed = true;
950 }
951 
952 /** Get r_hip_pitch value.
953  * Right hip pitch
954  * @return r_hip_pitch value
955  */
956 float
957 NaoJointPositionInterface::r_hip_pitch() const
958 {
959  return data->r_hip_pitch;
960 }
961 
962 /** Get maximum length of r_hip_pitch value.
963  * @return length of r_hip_pitch value, can be length of the array or number of
964  * maximum number of characters for a string
965  */
966 size_t
967 NaoJointPositionInterface::maxlenof_r_hip_pitch() const
968 {
969  return 1;
970 }
971 
972 /** Set r_hip_pitch value.
973  * Right hip pitch
974  * @param new_r_hip_pitch new r_hip_pitch value
975  */
976 void
977 NaoJointPositionInterface::set_r_hip_pitch(const float new_r_hip_pitch)
978 {
979  data->r_hip_pitch = new_r_hip_pitch;
980  data_changed = true;
981 }
982 
983 /** Get r_knee_pitch value.
984  * Right knee pitch
985  * @return r_knee_pitch value
986  */
987 float
988 NaoJointPositionInterface::r_knee_pitch() const
989 {
990  return data->r_knee_pitch;
991 }
992 
993 /** Get maximum length of r_knee_pitch value.
994  * @return length of r_knee_pitch value, can be length of the array or number of
995  * maximum number of characters for a string
996  */
997 size_t
998 NaoJointPositionInterface::maxlenof_r_knee_pitch() const
999 {
1000  return 1;
1001 }
1002 
1003 /** Set r_knee_pitch value.
1004  * Right knee pitch
1005  * @param new_r_knee_pitch new r_knee_pitch value
1006  */
1007 void
1008 NaoJointPositionInterface::set_r_knee_pitch(const float new_r_knee_pitch)
1009 {
1010  data->r_knee_pitch = new_r_knee_pitch;
1011  data_changed = true;
1012 }
1013 
1014 /** Get r_ankle_pitch value.
1015  * Right ankle pitch
1016  * @return r_ankle_pitch value
1017  */
1018 float
1019 NaoJointPositionInterface::r_ankle_pitch() const
1020 {
1021  return data->r_ankle_pitch;
1022 }
1023 
1024 /** Get maximum length of r_ankle_pitch value.
1025  * @return length of r_ankle_pitch value, can be length of the array or number of
1026  * maximum number of characters for a string
1027  */
1028 size_t
1029 NaoJointPositionInterface::maxlenof_r_ankle_pitch() const
1030 {
1031  return 1;
1032 }
1033 
1034 /** Set r_ankle_pitch value.
1035  * Right ankle pitch
1036  * @param new_r_ankle_pitch new r_ankle_pitch value
1037  */
1038 void
1039 NaoJointPositionInterface::set_r_ankle_pitch(const float new_r_ankle_pitch)
1040 {
1041  data->r_ankle_pitch = new_r_ankle_pitch;
1042  data_changed = true;
1043 }
1044 
1045 /** Get r_ankle_roll value.
1046  * Right ankle roll
1047  * @return r_ankle_roll value
1048  */
1049 float
1050 NaoJointPositionInterface::r_ankle_roll() const
1051 {
1052  return data->r_ankle_roll;
1053 }
1054 
1055 /** Get maximum length of r_ankle_roll value.
1056  * @return length of r_ankle_roll value, can be length of the array or number of
1057  * maximum number of characters for a string
1058  */
1059 size_t
1060 NaoJointPositionInterface::maxlenof_r_ankle_roll() const
1061 {
1062  return 1;
1063 }
1064 
1065 /** Set r_ankle_roll value.
1066  * Right ankle roll
1067  * @param new_r_ankle_roll new r_ankle_roll value
1068  */
1069 void
1070 NaoJointPositionInterface::set_r_ankle_roll(const float new_r_ankle_roll)
1071 {
1072  data->r_ankle_roll = new_r_ankle_roll;
1073  data_changed = true;
1074 }
1075 
1076 /** Get time value.
1077  *
1078  Current reference time in ms. For real hardware this is the DCM time.
1079  Times in messages are always offsets to the current time and the current
1080  time is added before executing the command.
1081 
1082  * @return time value
1083  */
1084 int32_t
1085 NaoJointPositionInterface::time() const
1086 {
1087  return data->time;
1088 }
1089 
1090 /** Get maximum length of time value.
1091  * @return length of time value, can be length of the array or number of
1092  * maximum number of characters for a string
1093  */
1094 size_t
1095 NaoJointPositionInterface::maxlenof_time() const
1096 {
1097  return 1;
1098 }
1099 
1100 /** Set time value.
1101  *
1102  Current reference time in ms. For real hardware this is the DCM time.
1103  Times in messages are always offsets to the current time and the current
1104  time is added before executing the command.
1105 
1106  * @param new_time new time value
1107  */
1108 void
1109 NaoJointPositionInterface::set_time(const int32_t new_time)
1110 {
1111  data->time = new_time;
1112  data_changed = true;
1113 }
1114 
1115 /* =========== message create =========== */
1116 Message *
1117 NaoJointPositionInterface::create_message(const char *type) const
1118 {
1119  if ( strncmp("SetServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1120  return new SetServoMessage();
1121  } else if ( strncmp("SetServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1122  return new SetServosMessage();
1123  } else if ( strncmp("MoveServoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1124  return new MoveServoMessage();
1125  } else if ( strncmp("MoveServosMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1126  return new MoveServosMessage();
1127  } else {
1128  throw UnknownTypeException("The given type '%s' does not match any known "
1129  "message type for this interface type.", type);
1130  }
1131 }
1132 
1133 
1134 /** Copy values from other interface.
1135  * @param other other interface to copy values from
1136  */
1137 void
1138 NaoJointPositionInterface::copy_values(const Interface *other)
1139 {
1140  const NaoJointPositionInterface *oi = dynamic_cast<const NaoJointPositionInterface *>(other);
1141  if (oi == NULL) {
1142  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1143  type(), other->type());
1144  }
1145  memcpy(data, oi->data, sizeof(NaoJointPositionInterface_data_t));
1146 }
1147 
1148 const char *
1149 NaoJointPositionInterface::enum_tostring(const char *enumtype, int val) const
1150 {
1151  if (strcmp(enumtype, "RobotType") == 0) {
1152  return tostring_RobotType((RobotType)val);
1153  }
1154  throw UnknownTypeException("Unknown enum type %s", enumtype);
1155 }
1156 
1157 /* =========== messages =========== */
1158 /** @class NaoJointPositionInterface::SetServoMessage <interfaces/NaoJointPositionInterface.h>
1159  * SetServoMessage Fawkes BlackBoard Interface Message.
1160  *
1161 
1162  */
1163 
1164 
1165 /** Constructor with initial values.
1166  * @param ini_servo initial value for servo
1167  * @param ini_value initial value for value
1168  * @param ini_time initial value for time
1169  */
1170 NaoJointPositionInterface::SetServoMessage::SetServoMessage(const uint32_t ini_servo, const float ini_value, const int32_t ini_time) : Message("SetServoMessage")
1171 {
1172  data_size = sizeof(SetServoMessage_data_t);
1173  data_ptr = malloc(data_size);
1174  memset(data_ptr, 0, data_size);
1175  data = (SetServoMessage_data_t *)data_ptr;
1177  data->servo = ini_servo;
1178  data->value = ini_value;
1179  data->time = ini_time;
1180  add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
1181  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1182  add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1183 }
1184 /** Constructor */
1186 {
1187  data_size = sizeof(SetServoMessage_data_t);
1188  data_ptr = malloc(data_size);
1189  memset(data_ptr, 0, data_size);
1190  data = (SetServoMessage_data_t *)data_ptr;
1192  add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
1193  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1194  add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1195 }
1196 
1197 /** Destructor */
1199 {
1200  free(data_ptr);
1201 }
1202 
1203 /** Copy constructor.
1204  * @param m message to copy from
1205  */
1207 {
1208  data_size = m->data_size;
1209  data_ptr = malloc(data_size);
1210  memcpy(data_ptr, m->data_ptr, data_size);
1211  data = (SetServoMessage_data_t *)data_ptr;
1213 }
1214 
1215 /* Methods */
1216 /** Get servo value.
1217  * A concatenated list of SERVO_* constants to
1218  define the servos that should execute the movement. The list shall consist of
1219  binary or'ed SERVO_* constants.
1220  * @return servo value
1221  */
1222 uint32_t
1224 {
1225  return data->servo;
1226 }
1227 
1228 /** Get maximum length of servo value.
1229  * @return length of servo value, can be length of the array or number of
1230  * maximum number of characters for a string
1231  */
1232 size_t
1234 {
1235  return 1;
1236 }
1237 
1238 /** Set servo value.
1239  * A concatenated list of SERVO_* constants to
1240  define the servos that should execute the movement. The list shall consist of
1241  binary or'ed SERVO_* constants.
1242  * @param new_servo new servo value
1243  */
1244 void
1246 {
1247  data->servo = new_servo;
1248 }
1249 
1250 /** Get value value.
1251  * Servo value to set for servos.
1252  * @return value value
1253  */
1254 float
1256 {
1257  return data->value;
1258 }
1259 
1260 /** Get maximum length of value value.
1261  * @return length of value value, can be length of the array or number of
1262  * maximum number of characters for a string
1263  */
1264 size_t
1266 {
1267  return 1;
1268 }
1269 
1270 /** Set value value.
1271  * Servo value to set for servos.
1272  * @param new_value new value value
1273  */
1274 void
1276 {
1277  data->value = new_value;
1278 }
1279 
1280 /** Get time value.
1281  *
1282  Current reference time in ms. For real hardware this is the DCM time.
1283  Times in messages are always offsets to the current time and the current
1284  time is added before executing the command.
1285 
1286  * @return time value
1287  */
1288 int32_t
1290 {
1291  return data->time;
1292 }
1293 
1294 /** Get maximum length of time value.
1295  * @return length of time value, can be length of the array or number of
1296  * maximum number of characters for a string
1297  */
1298 size_t
1300 {
1301  return 1;
1302 }
1303 
1304 /** Set time value.
1305  *
1306  Current reference time in ms. For real hardware this is the DCM time.
1307  Times in messages are always offsets to the current time and the current
1308  time is added before executing the command.
1309 
1310  * @param new_time new time value
1311  */
1312 void
1314 {
1315  data->time = new_time;
1316 }
1317 
1318 /** Clone this message.
1319  * Produces a message of the same type as this message and copies the
1320  * data to the new message.
1321  * @return clone of this message
1322  */
1323 Message *
1325 {
1327 }
1328 /** @class NaoJointPositionInterface::SetServosMessage <interfaces/NaoJointPositionInterface.h>
1329  * SetServosMessage Fawkes BlackBoard Interface Message.
1330  *
1331 
1332  */
1333 
1334 
1335 /** Constructor with initial values.
1336  * @param ini_head_yaw initial value for head_yaw
1337  * @param ini_head_pitch initial value for head_pitch
1338  * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch
1339  * @param ini_l_shoulder_roll initial value for l_shoulder_roll
1340  * @param ini_l_elbow_yaw initial value for l_elbow_yaw
1341  * @param ini_l_elbow_roll initial value for l_elbow_roll
1342  * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch
1343  * @param ini_l_hip_roll initial value for l_hip_roll
1344  * @param ini_l_hip_pitch initial value for l_hip_pitch
1345  * @param ini_l_knee_pitch initial value for l_knee_pitch
1346  * @param ini_l_ankle_pitch initial value for l_ankle_pitch
1347  * @param ini_l_ankle_roll initial value for l_ankle_roll
1348  * @param ini_l_wrist_yaw initial value for l_wrist_yaw
1349  * @param ini_l_hand initial value for l_hand
1350  * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch
1351  * @param ini_r_shoulder_roll initial value for r_shoulder_roll
1352  * @param ini_r_elbow_yaw initial value for r_elbow_yaw
1353  * @param ini_r_elbow_roll initial value for r_elbow_roll
1354  * @param ini_r_wrist_yaw initial value for r_wrist_yaw
1355  * @param ini_r_hand initial value for r_hand
1356  * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch
1357  * @param ini_r_hip_roll initial value for r_hip_roll
1358  * @param ini_r_hip_pitch initial value for r_hip_pitch
1359  * @param ini_r_knee_pitch initial value for r_knee_pitch
1360  * @param ini_r_ankle_pitch initial value for r_ankle_pitch
1361  * @param ini_r_ankle_roll initial value for r_ankle_roll
1362  * @param ini_time initial value for time
1363  */
1364 NaoJointPositionInterface::SetServosMessage::SetServosMessage(const float ini_head_yaw, const float ini_head_pitch, const float ini_l_shoulder_pitch, const float ini_l_shoulder_roll, const float ini_l_elbow_yaw, const float ini_l_elbow_roll, const float ini_l_hip_yaw_pitch, const float ini_l_hip_roll, const float ini_l_hip_pitch, const float ini_l_knee_pitch, const float ini_l_ankle_pitch, const float ini_l_ankle_roll, const float ini_l_wrist_yaw, const float ini_l_hand, const float ini_r_shoulder_pitch, const float ini_r_shoulder_roll, const float ini_r_elbow_yaw, const float ini_r_elbow_roll, const float ini_r_wrist_yaw, const float ini_r_hand, const float ini_r_hip_yaw_pitch, const float ini_r_hip_roll, const float ini_r_hip_pitch, const float ini_r_knee_pitch, const float ini_r_ankle_pitch, const float ini_r_ankle_roll, const int32_t ini_time) : Message("SetServosMessage")
1365 {
1366  data_size = sizeof(SetServosMessage_data_t);
1367  data_ptr = malloc(data_size);
1368  memset(data_ptr, 0, data_size);
1369  data = (SetServosMessage_data_t *)data_ptr;
1371  data->head_yaw = ini_head_yaw;
1372  data->head_pitch = ini_head_pitch;
1373  data->l_shoulder_pitch = ini_l_shoulder_pitch;
1374  data->l_shoulder_roll = ini_l_shoulder_roll;
1375  data->l_elbow_yaw = ini_l_elbow_yaw;
1376  data->l_elbow_roll = ini_l_elbow_roll;
1377  data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
1378  data->l_hip_roll = ini_l_hip_roll;
1379  data->l_hip_pitch = ini_l_hip_pitch;
1380  data->l_knee_pitch = ini_l_knee_pitch;
1381  data->l_ankle_pitch = ini_l_ankle_pitch;
1382  data->l_ankle_roll = ini_l_ankle_roll;
1383  data->l_wrist_yaw = ini_l_wrist_yaw;
1384  data->l_hand = ini_l_hand;
1385  data->r_shoulder_pitch = ini_r_shoulder_pitch;
1386  data->r_shoulder_roll = ini_r_shoulder_roll;
1387  data->r_elbow_yaw = ini_r_elbow_yaw;
1388  data->r_elbow_roll = ini_r_elbow_roll;
1389  data->r_wrist_yaw = ini_r_wrist_yaw;
1390  data->r_hand = ini_r_hand;
1391  data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
1392  data->r_hip_roll = ini_r_hip_roll;
1393  data->r_hip_pitch = ini_r_hip_pitch;
1394  data->r_knee_pitch = ini_r_knee_pitch;
1395  data->r_ankle_pitch = ini_r_ankle_pitch;
1396  data->r_ankle_roll = ini_r_ankle_roll;
1397  data->time = ini_time;
1398  add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
1399  add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
1400  add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
1401  add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
1402  add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
1403  add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
1404  add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
1405  add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
1406  add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
1407  add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
1408  add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
1409  add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
1410  add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
1411  add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
1412  add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
1413  add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
1414  add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
1415  add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
1416  add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
1417  add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
1418  add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
1419  add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
1420  add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
1421  add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
1422  add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
1423  add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
1424  add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1425 }
1426 /** Constructor */
1428 {
1429  data_size = sizeof(SetServosMessage_data_t);
1430  data_ptr = malloc(data_size);
1431  memset(data_ptr, 0, data_size);
1432  data = (SetServosMessage_data_t *)data_ptr;
1434  add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
1435  add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
1436  add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
1437  add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
1438  add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
1439  add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
1440  add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
1441  add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
1442  add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
1443  add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
1444  add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
1445  add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
1446  add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
1447  add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
1448  add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
1449  add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
1450  add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
1451  add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
1452  add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
1453  add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
1454  add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
1455  add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
1456  add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
1457  add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
1458  add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
1459  add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
1460  add_fieldinfo(IFT_INT32, "time", 1, &data->time);
1461 }
1462 
1463 /** Destructor */
1465 {
1466  free(data_ptr);
1467 }
1468 
1469 /** Copy constructor.
1470  * @param m message to copy from
1471  */
1473 {
1474  data_size = m->data_size;
1475  data_ptr = malloc(data_size);
1476  memcpy(data_ptr, m->data_ptr, data_size);
1477  data = (SetServosMessage_data_t *)data_ptr;
1479 }
1480 
1481 /* Methods */
1482 /** Get head_yaw value.
1483  * Head yaw
1484  * @return head_yaw value
1485  */
1486 float
1488 {
1489  return data->head_yaw;
1490 }
1491 
1492 /** Get maximum length of head_yaw value.
1493  * @return length of head_yaw value, can be length of the array or number of
1494  * maximum number of characters for a string
1495  */
1496 size_t
1498 {
1499  return 1;
1500 }
1501 
1502 /** Set head_yaw value.
1503  * Head yaw
1504  * @param new_head_yaw new head_yaw value
1505  */
1506 void
1508 {
1509  data->head_yaw = new_head_yaw;
1510 }
1511 
1512 /** Get head_pitch value.
1513  * Head pitch
1514  * @return head_pitch value
1515  */
1516 float
1518 {
1519  return data->head_pitch;
1520 }
1521 
1522 /** Get maximum length of head_pitch value.
1523  * @return length of head_pitch value, can be length of the array or number of
1524  * maximum number of characters for a string
1525  */
1526 size_t
1528 {
1529  return 1;
1530 }
1531 
1532 /** Set head_pitch value.
1533  * Head pitch
1534  * @param new_head_pitch new head_pitch value
1535  */
1536 void
1538 {
1539  data->head_pitch = new_head_pitch;
1540 }
1541 
1542 /** Get l_shoulder_pitch value.
1543  * Left shoulder pitch
1544  * @return l_shoulder_pitch value
1545  */
1546 float
1548 {
1549  return data->l_shoulder_pitch;
1550 }
1551 
1552 /** Get maximum length of l_shoulder_pitch value.
1553  * @return length of l_shoulder_pitch value, can be length of the array or number of
1554  * maximum number of characters for a string
1555  */
1556 size_t
1558 {
1559  return 1;
1560 }
1561 
1562 /** Set l_shoulder_pitch value.
1563  * Left shoulder pitch
1564  * @param new_l_shoulder_pitch new l_shoulder_pitch value
1565  */
1566 void
1568 {
1569  data->l_shoulder_pitch = new_l_shoulder_pitch;
1570 }
1571 
1572 /** Get l_shoulder_roll value.
1573  * Left shoulder roll
1574  * @return l_shoulder_roll value
1575  */
1576 float
1578 {
1579  return data->l_shoulder_roll;
1580 }
1581 
1582 /** Get maximum length of l_shoulder_roll value.
1583  * @return length of l_shoulder_roll value, can be length of the array or number of
1584  * maximum number of characters for a string
1585  */
1586 size_t
1588 {
1589  return 1;
1590 }
1591 
1592 /** Set l_shoulder_roll value.
1593  * Left shoulder roll
1594  * @param new_l_shoulder_roll new l_shoulder_roll value
1595  */
1596 void
1598 {
1599  data->l_shoulder_roll = new_l_shoulder_roll;
1600 }
1601 
1602 /** Get l_elbow_yaw value.
1603  * Left elbow yaw
1604  * @return l_elbow_yaw value
1605  */
1606 float
1608 {
1609  return data->l_elbow_yaw;
1610 }
1611 
1612 /** Get maximum length of l_elbow_yaw value.
1613  * @return length of l_elbow_yaw value, can be length of the array or number of
1614  * maximum number of characters for a string
1615  */
1616 size_t
1618 {
1619  return 1;
1620 }
1621 
1622 /** Set l_elbow_yaw value.
1623  * Left elbow yaw
1624  * @param new_l_elbow_yaw new l_elbow_yaw value
1625  */
1626 void
1628 {
1629  data->l_elbow_yaw = new_l_elbow_yaw;
1630 }
1631 
1632 /** Get l_elbow_roll value.
1633  * Left elbow roll
1634  * @return l_elbow_roll value
1635  */
1636 float
1638 {
1639  return data->l_elbow_roll;
1640 }
1641 
1642 /** Get maximum length of l_elbow_roll value.
1643  * @return length of l_elbow_roll value, can be length of the array or number of
1644  * maximum number of characters for a string
1645  */
1646 size_t
1648 {
1649  return 1;
1650 }
1651 
1652 /** Set l_elbow_roll value.
1653  * Left elbow roll
1654  * @param new_l_elbow_roll new l_elbow_roll value
1655  */
1656 void
1658 {
1659  data->l_elbow_roll = new_l_elbow_roll;
1660 }
1661 
1662 /** Get l_hip_yaw_pitch value.
1663  * Left hip yaw pitch
1664  * @return l_hip_yaw_pitch value
1665  */
1666 float
1668 {
1669  return data->l_hip_yaw_pitch;
1670 }
1671 
1672 /** Get maximum length of l_hip_yaw_pitch value.
1673  * @return length of l_hip_yaw_pitch value, can be length of the array or number of
1674  * maximum number of characters for a string
1675  */
1676 size_t
1678 {
1679  return 1;
1680 }
1681 
1682 /** Set l_hip_yaw_pitch value.
1683  * Left hip yaw pitch
1684  * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
1685  */
1686 void
1688 {
1689  data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
1690 }
1691 
1692 /** Get l_hip_roll value.
1693  * Left hip roll
1694  * @return l_hip_roll value
1695  */
1696 float
1698 {
1699  return data->l_hip_roll;
1700 }
1701 
1702 /** Get maximum length of l_hip_roll value.
1703  * @return length of l_hip_roll value, can be length of the array or number of
1704  * maximum number of characters for a string
1705  */
1706 size_t
1708 {
1709  return 1;
1710 }
1711 
1712 /** Set l_hip_roll value.
1713  * Left hip roll
1714  * @param new_l_hip_roll new l_hip_roll value
1715  */
1716 void
1718 {
1719  data->l_hip_roll = new_l_hip_roll;
1720 }
1721 
1722 /** Get l_hip_pitch value.
1723  * Left hip pitch
1724  * @return l_hip_pitch value
1725  */
1726 float
1728 {
1729  return data->l_hip_pitch;
1730 }
1731 
1732 /** Get maximum length of l_hip_pitch value.
1733  * @return length of l_hip_pitch value, can be length of the array or number of
1734  * maximum number of characters for a string
1735  */
1736 size_t
1738 {
1739  return 1;
1740 }
1741 
1742 /** Set l_hip_pitch value.
1743  * Left hip pitch
1744  * @param new_l_hip_pitch new l_hip_pitch value
1745  */
1746 void
1748 {
1749  data->l_hip_pitch = new_l_hip_pitch;
1750 }
1751 
1752 /** Get l_knee_pitch value.
1753  * Left knee pitch
1754  * @return l_knee_pitch value
1755  */
1756 float
1758 {
1759  return data->l_knee_pitch;
1760 }
1761 
1762 /** Get maximum length of l_knee_pitch value.
1763  * @return length of l_knee_pitch value, can be length of the array or number of
1764  * maximum number of characters for a string
1765  */
1766 size_t
1768 {
1769  return 1;
1770 }
1771 
1772 /** Set l_knee_pitch value.
1773  * Left knee pitch
1774  * @param new_l_knee_pitch new l_knee_pitch value
1775  */
1776 void
1778 {
1779  data->l_knee_pitch = new_l_knee_pitch;
1780 }
1781 
1782 /** Get l_ankle_pitch value.
1783  * Left ankle pitch
1784  * @return l_ankle_pitch value
1785  */
1786 float
1788 {
1789  return data->l_ankle_pitch;
1790 }
1791 
1792 /** Get maximum length of l_ankle_pitch value.
1793  * @return length of l_ankle_pitch value, can be length of the array or number of
1794  * maximum number of characters for a string
1795  */
1796 size_t
1798 {
1799  return 1;
1800 }
1801 
1802 /** Set l_ankle_pitch value.
1803  * Left ankle pitch
1804  * @param new_l_ankle_pitch new l_ankle_pitch value
1805  */
1806 void
1808 {
1809  data->l_ankle_pitch = new_l_ankle_pitch;
1810 }
1811 
1812 /** Get l_ankle_roll value.
1813  * Left ankle roll
1814  * @return l_ankle_roll value
1815  */
1816 float
1818 {
1819  return data->l_ankle_roll;
1820 }
1821 
1822 /** Get maximum length of l_ankle_roll value.
1823  * @return length of l_ankle_roll value, can be length of the array or number of
1824  * maximum number of characters for a string
1825  */
1826 size_t
1828 {
1829  return 1;
1830 }
1831 
1832 /** Set l_ankle_roll value.
1833  * Left ankle roll
1834  * @param new_l_ankle_roll new l_ankle_roll value
1835  */
1836 void
1838 {
1839  data->l_ankle_roll = new_l_ankle_roll;
1840 }
1841 
1842 /** Get l_wrist_yaw value.
1843  * Left wrist yaw
1844  * @return l_wrist_yaw value
1845  */
1846 float
1848 {
1849  return data->l_wrist_yaw;
1850 }
1851 
1852 /** Get maximum length of l_wrist_yaw value.
1853  * @return length of l_wrist_yaw value, can be length of the array or number of
1854  * maximum number of characters for a string
1855  */
1856 size_t
1858 {
1859  return 1;
1860 }
1861 
1862 /** Set l_wrist_yaw value.
1863  * Left wrist yaw
1864  * @param new_l_wrist_yaw new l_wrist_yaw value
1865  */
1866 void
1868 {
1869  data->l_wrist_yaw = new_l_wrist_yaw;
1870 }
1871 
1872 /** Get l_hand value.
1873  * Left hand
1874  * @return l_hand value
1875  */
1876 float
1878 {
1879  return data->l_hand;
1880 }
1881 
1882 /** Get maximum length of l_hand value.
1883  * @return length of l_hand value, can be length of the array or number of
1884  * maximum number of characters for a string
1885  */
1886 size_t
1888 {
1889  return 1;
1890 }
1891 
1892 /** Set l_hand value.
1893  * Left hand
1894  * @param new_l_hand new l_hand value
1895  */
1896 void
1898 {
1899  data->l_hand = new_l_hand;
1900 }
1901 
1902 /** Get r_shoulder_pitch value.
1903  * Right shoulder pitch
1904  * @return r_shoulder_pitch value
1905  */
1906 float
1908 {
1909  return data->r_shoulder_pitch;
1910 }
1911 
1912 /** Get maximum length of r_shoulder_pitch value.
1913  * @return length of r_shoulder_pitch value, can be length of the array or number of
1914  * maximum number of characters for a string
1915  */
1916 size_t
1918 {
1919  return 1;
1920 }
1921 
1922 /** Set r_shoulder_pitch value.
1923  * Right shoulder pitch
1924  * @param new_r_shoulder_pitch new r_shoulder_pitch value
1925  */
1926 void
1928 {
1929  data->r_shoulder_pitch = new_r_shoulder_pitch;
1930 }
1931 
1932 /** Get r_shoulder_roll value.
1933  * Right shoulder roll
1934  * @return r_shoulder_roll value
1935  */
1936 float
1938 {
1939  return data->r_shoulder_roll;
1940 }
1941 
1942 /** Get maximum length of r_shoulder_roll value.
1943  * @return length of r_shoulder_roll value, can be length of the array or number of
1944  * maximum number of characters for a string
1945  */
1946 size_t
1948 {
1949  return 1;
1950 }
1951 
1952 /** Set r_shoulder_roll value.
1953  * Right shoulder roll
1954  * @param new_r_shoulder_roll new r_shoulder_roll value
1955  */
1956 void
1958 {
1959  data->r_shoulder_roll = new_r_shoulder_roll;
1960 }
1961 
1962 /** Get r_elbow_yaw value.
1963  * Right elbow yaw
1964  * @return r_elbow_yaw value
1965  */
1966 float
1968 {
1969  return data->r_elbow_yaw;
1970 }
1971 
1972 /** Get maximum length of r_elbow_yaw value.
1973  * @return length of r_elbow_yaw value, can be length of the array or number of
1974  * maximum number of characters for a string
1975  */
1976 size_t
1978 {
1979  return 1;
1980 }
1981 
1982 /** Set r_elbow_yaw value.
1983  * Right elbow yaw
1984  * @param new_r_elbow_yaw new r_elbow_yaw value
1985  */
1986 void
1988 {
1989  data->r_elbow_yaw = new_r_elbow_yaw;
1990 }
1991 
1992 /** Get r_elbow_roll value.
1993  * Right elbow roll
1994  * @return r_elbow_roll value
1995  */
1996 float
1998 {
1999  return data->r_elbow_roll;
2000 }
2001 
2002 /** Get maximum length of r_elbow_roll value.
2003  * @return length of r_elbow_roll value, can be length of the array or number of
2004  * maximum number of characters for a string
2005  */
2006 size_t
2008 {
2009  return 1;
2010 }
2011 
2012 /** Set r_elbow_roll value.
2013  * Right elbow roll
2014  * @param new_r_elbow_roll new r_elbow_roll value
2015  */
2016 void
2018 {
2019  data->r_elbow_roll = new_r_elbow_roll;
2020 }
2021 
2022 /** Get r_wrist_yaw value.
2023  * Right wrist yaw
2024  * @return r_wrist_yaw value
2025  */
2026 float
2028 {
2029  return data->r_wrist_yaw;
2030 }
2031 
2032 /** Get maximum length of r_wrist_yaw value.
2033  * @return length of r_wrist_yaw value, can be length of the array or number of
2034  * maximum number of characters for a string
2035  */
2036 size_t
2038 {
2039  return 1;
2040 }
2041 
2042 /** Set r_wrist_yaw value.
2043  * Right wrist yaw
2044  * @param new_r_wrist_yaw new r_wrist_yaw value
2045  */
2046 void
2048 {
2049  data->r_wrist_yaw = new_r_wrist_yaw;
2050 }
2051 
2052 /** Get r_hand value.
2053  * Right hand
2054  * @return r_hand value
2055  */
2056 float
2058 {
2059  return data->r_hand;
2060 }
2061 
2062 /** Get maximum length of r_hand value.
2063  * @return length of r_hand value, can be length of the array or number of
2064  * maximum number of characters for a string
2065  */
2066 size_t
2068 {
2069  return 1;
2070 }
2071 
2072 /** Set r_hand value.
2073  * Right hand
2074  * @param new_r_hand new r_hand value
2075  */
2076 void
2078 {
2079  data->r_hand = new_r_hand;
2080 }
2081 
2082 /** Get r_hip_yaw_pitch value.
2083  * Right hip yaw pitch
2084  * @return r_hip_yaw_pitch value
2085  */
2086 float
2088 {
2089  return data->r_hip_yaw_pitch;
2090 }
2091 
2092 /** Get maximum length of r_hip_yaw_pitch value.
2093  * @return length of r_hip_yaw_pitch value, can be length of the array or number of
2094  * maximum number of characters for a string
2095  */
2096 size_t
2098 {
2099  return 1;
2100 }
2101 
2102 /** Set r_hip_yaw_pitch value.
2103  * Right hip yaw pitch
2104  * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
2105  */
2106 void
2108 {
2109  data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
2110 }
2111 
2112 /** Get r_hip_roll value.
2113  * Right hip roll
2114  * @return r_hip_roll value
2115  */
2116 float
2118 {
2119  return data->r_hip_roll;
2120 }
2121 
2122 /** Get maximum length of r_hip_roll value.
2123  * @return length of r_hip_roll value, can be length of the array or number of
2124  * maximum number of characters for a string
2125  */
2126 size_t
2128 {
2129  return 1;
2130 }
2131 
2132 /** Set r_hip_roll value.
2133  * Right hip roll
2134  * @param new_r_hip_roll new r_hip_roll value
2135  */
2136 void
2138 {
2139  data->r_hip_roll = new_r_hip_roll;
2140 }
2141 
2142 /** Get r_hip_pitch value.
2143  * Right hip pitch
2144  * @return r_hip_pitch value
2145  */
2146 float
2148 {
2149  return data->r_hip_pitch;
2150 }
2151 
2152 /** Get maximum length of r_hip_pitch value.
2153  * @return length of r_hip_pitch value, can be length of the array or number of
2154  * maximum number of characters for a string
2155  */
2156 size_t
2158 {
2159  return 1;
2160 }
2161 
2162 /** Set r_hip_pitch value.
2163  * Right hip pitch
2164  * @param new_r_hip_pitch new r_hip_pitch value
2165  */
2166 void
2168 {
2169  data->r_hip_pitch = new_r_hip_pitch;
2170 }
2171 
2172 /** Get r_knee_pitch value.
2173  * Right knee pitch
2174  * @return r_knee_pitch value
2175  */
2176 float
2178 {
2179  return data->r_knee_pitch;
2180 }
2181 
2182 /** Get maximum length of r_knee_pitch value.
2183  * @return length of r_knee_pitch value, can be length of the array or number of
2184  * maximum number of characters for a string
2185  */
2186 size_t
2188 {
2189  return 1;
2190 }
2191 
2192 /** Set r_knee_pitch value.
2193  * Right knee pitch
2194  * @param new_r_knee_pitch new r_knee_pitch value
2195  */
2196 void
2198 {
2199  data->r_knee_pitch = new_r_knee_pitch;
2200 }
2201 
2202 /** Get r_ankle_pitch value.
2203  * Right ankle pitch
2204  * @return r_ankle_pitch value
2205  */
2206 float
2208 {
2209  return data->r_ankle_pitch;
2210 }
2211 
2212 /** Get maximum length of r_ankle_pitch value.
2213  * @return length of r_ankle_pitch value, can be length of the array or number of
2214  * maximum number of characters for a string
2215  */
2216 size_t
2218 {
2219  return 1;
2220 }
2221 
2222 /** Set r_ankle_pitch value.
2223  * Right ankle pitch
2224  * @param new_r_ankle_pitch new r_ankle_pitch value
2225  */
2226 void
2228 {
2229  data->r_ankle_pitch = new_r_ankle_pitch;
2230 }
2231 
2232 /** Get r_ankle_roll value.
2233  * Right ankle roll
2234  * @return r_ankle_roll value
2235  */
2236 float
2238 {
2239  return data->r_ankle_roll;
2240 }
2241 
2242 /** Get maximum length of r_ankle_roll value.
2243  * @return length of r_ankle_roll value, can be length of the array or number of
2244  * maximum number of characters for a string
2245  */
2246 size_t
2248 {
2249  return 1;
2250 }
2251 
2252 /** Set r_ankle_roll value.
2253  * Right ankle roll
2254  * @param new_r_ankle_roll new r_ankle_roll value
2255  */
2256 void
2258 {
2259  data->r_ankle_roll = new_r_ankle_roll;
2260 }
2261 
2262 /** Get time value.
2263  *
2264  Current reference time in ms. For real hardware this is the DCM time.
2265  Times in messages are always offsets to the current time and the current
2266  time is added before executing the command.
2267 
2268  * @return time value
2269  */
2270 int32_t
2272 {
2273  return data->time;
2274 }
2275 
2276 /** Get maximum length of time value.
2277  * @return length of time value, can be length of the array or number of
2278  * maximum number of characters for a string
2279  */
2280 size_t
2282 {
2283  return 1;
2284 }
2285 
2286 /** Set time value.
2287  *
2288  Current reference time in ms. For real hardware this is the DCM time.
2289  Times in messages are always offsets to the current time and the current
2290  time is added before executing the command.
2291 
2292  * @param new_time new time value
2293  */
2294 void
2296 {
2297  data->time = new_time;
2298 }
2299 
2300 /** Clone this message.
2301  * Produces a message of the same type as this message and copies the
2302  * data to the new message.
2303  * @return clone of this message
2304  */
2305 Message *
2307 {
2309 }
2310 /** @class NaoJointPositionInterface::MoveServoMessage <interfaces/NaoJointPositionInterface.h>
2311  * MoveServoMessage Fawkes BlackBoard Interface Message.
2312  *
2313 
2314  */
2315 
2316 
2317 /** Constructor with initial values.
2318  * @param ini_servo initial value for servo
2319  * @param ini_value initial value for value
2320  * @param ini_speed initial value for speed
2321  */
2322 NaoJointPositionInterface::MoveServoMessage::MoveServoMessage(const uint32_t ini_servo, const float ini_value, const float ini_speed) : Message("MoveServoMessage")
2323 {
2324  data_size = sizeof(MoveServoMessage_data_t);
2325  data_ptr = malloc(data_size);
2326  memset(data_ptr, 0, data_size);
2327  data = (MoveServoMessage_data_t *)data_ptr;
2329  data->servo = ini_servo;
2330  data->value = ini_value;
2331  data->speed = ini_speed;
2332  add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
2333  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
2334  add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2335 }
2336 /** Constructor */
2338 {
2339  data_size = sizeof(MoveServoMessage_data_t);
2340  data_ptr = malloc(data_size);
2341  memset(data_ptr, 0, data_size);
2342  data = (MoveServoMessage_data_t *)data_ptr;
2344  add_fieldinfo(IFT_UINT32, "servo", 1, &data->servo);
2345  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
2346  add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2347 }
2348 
2349 /** Destructor */
2351 {
2352  free(data_ptr);
2353 }
2354 
2355 /** Copy constructor.
2356  * @param m message to copy from
2357  */
2359 {
2360  data_size = m->data_size;
2361  data_ptr = malloc(data_size);
2362  memcpy(data_ptr, m->data_ptr, data_size);
2363  data = (MoveServoMessage_data_t *)data_ptr;
2365 }
2366 
2367 /* Methods */
2368 /** Get servo value.
2369  *
2370  A concatenated list of SERVO_* constants to define the servos
2371  that should execute the movement. The list shall consist of
2372  binary or'ed SERVO_* constants.
2373 
2374  * @return servo value
2375  */
2376 uint32_t
2378 {
2379  return data->servo;
2380 }
2381 
2382 /** Get maximum length of servo value.
2383  * @return length of servo value, can be length of the array or number of
2384  * maximum number of characters for a string
2385  */
2386 size_t
2388 {
2389  return 1;
2390 }
2391 
2392 /** Set servo value.
2393  *
2394  A concatenated list of SERVO_* constants to define the servos
2395  that should execute the movement. The list shall consist of
2396  binary or'ed SERVO_* constants.
2397 
2398  * @param new_servo new servo value
2399  */
2400 void
2402 {
2403  data->servo = new_servo;
2404 }
2405 
2406 /** Get value value.
2407  * Servo value to set for servos.
2408  * @return value value
2409  */
2410 float
2412 {
2413  return data->value;
2414 }
2415 
2416 /** Get maximum length of value value.
2417  * @return length of value value, can be length of the array or number of
2418  * maximum number of characters for a string
2419  */
2420 size_t
2422 {
2423  return 1;
2424 }
2425 
2426 /** Set value value.
2427  * Servo value to set for servos.
2428  * @param new_value new value value
2429  */
2430 void
2432 {
2433  data->value = new_value;
2434 }
2435 
2436 /** Get speed value.
2437  *
2438  Fraction of max speed in range [0.0..1.0].
2439 
2440  * @return speed value
2441  */
2442 float
2444 {
2445  return data->speed;
2446 }
2447 
2448 /** Get maximum length of speed value.
2449  * @return length of speed value, can be length of the array or number of
2450  * maximum number of characters for a string
2451  */
2452 size_t
2454 {
2455  return 1;
2456 }
2457 
2458 /** Set speed value.
2459  *
2460  Fraction of max speed in range [0.0..1.0].
2461 
2462  * @param new_speed new speed value
2463  */
2464 void
2466 {
2467  data->speed = new_speed;
2468 }
2469 
2470 /** Clone this message.
2471  * Produces a message of the same type as this message and copies the
2472  * data to the new message.
2473  * @return clone of this message
2474  */
2475 Message *
2477 {
2479 }
2480 /** @class NaoJointPositionInterface::MoveServosMessage <interfaces/NaoJointPositionInterface.h>
2481  * MoveServosMessage Fawkes BlackBoard Interface Message.
2482  *
2483 
2484  */
2485 
2486 
2487 /** Constructor with initial values.
2488  * @param ini_speed initial value for speed
2489  * @param ini_head_yaw initial value for head_yaw
2490  * @param ini_head_pitch initial value for head_pitch
2491  * @param ini_l_shoulder_pitch initial value for l_shoulder_pitch
2492  * @param ini_l_shoulder_roll initial value for l_shoulder_roll
2493  * @param ini_l_elbow_yaw initial value for l_elbow_yaw
2494  * @param ini_l_elbow_roll initial value for l_elbow_roll
2495  * @param ini_l_wrist_yaw initial value for l_wrist_yaw
2496  * @param ini_l_hand initial value for l_hand
2497  * @param ini_l_hip_yaw_pitch initial value for l_hip_yaw_pitch
2498  * @param ini_l_hip_roll initial value for l_hip_roll
2499  * @param ini_l_hip_pitch initial value for l_hip_pitch
2500  * @param ini_l_knee_pitch initial value for l_knee_pitch
2501  * @param ini_l_ankle_pitch initial value for l_ankle_pitch
2502  * @param ini_l_ankle_roll initial value for l_ankle_roll
2503  * @param ini_r_shoulder_pitch initial value for r_shoulder_pitch
2504  * @param ini_r_shoulder_roll initial value for r_shoulder_roll
2505  * @param ini_r_elbow_yaw initial value for r_elbow_yaw
2506  * @param ini_r_elbow_roll initial value for r_elbow_roll
2507  * @param ini_r_wrist_yaw initial value for r_wrist_yaw
2508  * @param ini_r_hand initial value for r_hand
2509  * @param ini_r_hip_yaw_pitch initial value for r_hip_yaw_pitch
2510  * @param ini_r_hip_roll initial value for r_hip_roll
2511  * @param ini_r_hip_pitch initial value for r_hip_pitch
2512  * @param ini_r_knee_pitch initial value for r_knee_pitch
2513  * @param ini_r_ankle_pitch initial value for r_ankle_pitch
2514  * @param ini_r_ankle_roll initial value for r_ankle_roll
2515  */
2516 NaoJointPositionInterface::MoveServosMessage::MoveServosMessage(const float ini_speed, const float ini_head_yaw, const float ini_head_pitch, const float ini_l_shoulder_pitch, const float ini_l_shoulder_roll, const float ini_l_elbow_yaw, const float ini_l_elbow_roll, const float ini_l_wrist_yaw, const float ini_l_hand, const float ini_l_hip_yaw_pitch, const float ini_l_hip_roll, const float ini_l_hip_pitch, const float ini_l_knee_pitch, const float ini_l_ankle_pitch, const float ini_l_ankle_roll, const float ini_r_shoulder_pitch, const float ini_r_shoulder_roll, const float ini_r_elbow_yaw, const float ini_r_elbow_roll, const float ini_r_wrist_yaw, const float ini_r_hand, const float ini_r_hip_yaw_pitch, const float ini_r_hip_roll, const float ini_r_hip_pitch, const float ini_r_knee_pitch, const float ini_r_ankle_pitch, const float ini_r_ankle_roll) : Message("MoveServosMessage")
2517 {
2518  data_size = sizeof(MoveServosMessage_data_t);
2519  data_ptr = malloc(data_size);
2520  memset(data_ptr, 0, data_size);
2521  data = (MoveServosMessage_data_t *)data_ptr;
2523  data->speed = ini_speed;
2524  data->head_yaw = ini_head_yaw;
2525  data->head_pitch = ini_head_pitch;
2526  data->l_shoulder_pitch = ini_l_shoulder_pitch;
2527  data->l_shoulder_roll = ini_l_shoulder_roll;
2528  data->l_elbow_yaw = ini_l_elbow_yaw;
2529  data->l_elbow_roll = ini_l_elbow_roll;
2530  data->l_wrist_yaw = ini_l_wrist_yaw;
2531  data->l_hand = ini_l_hand;
2532  data->l_hip_yaw_pitch = ini_l_hip_yaw_pitch;
2533  data->l_hip_roll = ini_l_hip_roll;
2534  data->l_hip_pitch = ini_l_hip_pitch;
2535  data->l_knee_pitch = ini_l_knee_pitch;
2536  data->l_ankle_pitch = ini_l_ankle_pitch;
2537  data->l_ankle_roll = ini_l_ankle_roll;
2538  data->r_shoulder_pitch = ini_r_shoulder_pitch;
2539  data->r_shoulder_roll = ini_r_shoulder_roll;
2540  data->r_elbow_yaw = ini_r_elbow_yaw;
2541  data->r_elbow_roll = ini_r_elbow_roll;
2542  data->r_wrist_yaw = ini_r_wrist_yaw;
2543  data->r_hand = ini_r_hand;
2544  data->r_hip_yaw_pitch = ini_r_hip_yaw_pitch;
2545  data->r_hip_roll = ini_r_hip_roll;
2546  data->r_hip_pitch = ini_r_hip_pitch;
2547  data->r_knee_pitch = ini_r_knee_pitch;
2548  data->r_ankle_pitch = ini_r_ankle_pitch;
2549  data->r_ankle_roll = ini_r_ankle_roll;
2550  add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2551  add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
2552  add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
2553  add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
2554  add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
2555  add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
2556  add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
2557  add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
2558  add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
2559  add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
2560  add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
2561  add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
2562  add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
2563  add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
2564  add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
2565  add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
2566  add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
2567  add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
2568  add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
2569  add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
2570  add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
2571  add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
2572  add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
2573  add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
2574  add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
2575  add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
2576  add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
2577 }
2578 /** Constructor */
2580 {
2581  data_size = sizeof(MoveServosMessage_data_t);
2582  data_ptr = malloc(data_size);
2583  memset(data_ptr, 0, data_size);
2584  data = (MoveServosMessage_data_t *)data_ptr;
2586  add_fieldinfo(IFT_FLOAT, "speed", 1, &data->speed);
2587  add_fieldinfo(IFT_FLOAT, "head_yaw", 1, &data->head_yaw);
2588  add_fieldinfo(IFT_FLOAT, "head_pitch", 1, &data->head_pitch);
2589  add_fieldinfo(IFT_FLOAT, "l_shoulder_pitch", 1, &data->l_shoulder_pitch);
2590  add_fieldinfo(IFT_FLOAT, "l_shoulder_roll", 1, &data->l_shoulder_roll);
2591  add_fieldinfo(IFT_FLOAT, "l_elbow_yaw", 1, &data->l_elbow_yaw);
2592  add_fieldinfo(IFT_FLOAT, "l_elbow_roll", 1, &data->l_elbow_roll);
2593  add_fieldinfo(IFT_FLOAT, "l_wrist_yaw", 1, &data->l_wrist_yaw);
2594  add_fieldinfo(IFT_FLOAT, "l_hand", 1, &data->l_hand);
2595  add_fieldinfo(IFT_FLOAT, "l_hip_yaw_pitch", 1, &data->l_hip_yaw_pitch);
2596  add_fieldinfo(IFT_FLOAT, "l_hip_roll", 1, &data->l_hip_roll);
2597  add_fieldinfo(IFT_FLOAT, "l_hip_pitch", 1, &data->l_hip_pitch);
2598  add_fieldinfo(IFT_FLOAT, "l_knee_pitch", 1, &data->l_knee_pitch);
2599  add_fieldinfo(IFT_FLOAT, "l_ankle_pitch", 1, &data->l_ankle_pitch);
2600  add_fieldinfo(IFT_FLOAT, "l_ankle_roll", 1, &data->l_ankle_roll);
2601  add_fieldinfo(IFT_FLOAT, "r_shoulder_pitch", 1, &data->r_shoulder_pitch);
2602  add_fieldinfo(IFT_FLOAT, "r_shoulder_roll", 1, &data->r_shoulder_roll);
2603  add_fieldinfo(IFT_FLOAT, "r_elbow_yaw", 1, &data->r_elbow_yaw);
2604  add_fieldinfo(IFT_FLOAT, "r_elbow_roll", 1, &data->r_elbow_roll);
2605  add_fieldinfo(IFT_FLOAT, "r_wrist_yaw", 1, &data->r_wrist_yaw);
2606  add_fieldinfo(IFT_FLOAT, "r_hand", 1, &data->r_hand);
2607  add_fieldinfo(IFT_FLOAT, "r_hip_yaw_pitch", 1, &data->r_hip_yaw_pitch);
2608  add_fieldinfo(IFT_FLOAT, "r_hip_roll", 1, &data->r_hip_roll);
2609  add_fieldinfo(IFT_FLOAT, "r_hip_pitch", 1, &data->r_hip_pitch);
2610  add_fieldinfo(IFT_FLOAT, "r_knee_pitch", 1, &data->r_knee_pitch);
2611  add_fieldinfo(IFT_FLOAT, "r_ankle_pitch", 1, &data->r_ankle_pitch);
2612  add_fieldinfo(IFT_FLOAT, "r_ankle_roll", 1, &data->r_ankle_roll);
2613 }
2614 
2615 /** Destructor */
2617 {
2618  free(data_ptr);
2619 }
2620 
2621 /** Copy constructor.
2622  * @param m message to copy from
2623  */
2625 {
2626  data_size = m->data_size;
2627  data_ptr = malloc(data_size);
2628  memcpy(data_ptr, m->data_ptr, data_size);
2629  data = (MoveServosMessage_data_t *)data_ptr;
2631 }
2632 
2633 /* Methods */
2634 /** Get speed value.
2635  *
2636  Fraction of max speed in range [0.0..1.0].
2637 
2638  * @return speed value
2639  */
2640 float
2642 {
2643  return data->speed;
2644 }
2645 
2646 /** Get maximum length of speed value.
2647  * @return length of speed value, can be length of the array or number of
2648  * maximum number of characters for a string
2649  */
2650 size_t
2652 {
2653  return 1;
2654 }
2655 
2656 /** Set speed value.
2657  *
2658  Fraction of max speed in range [0.0..1.0].
2659 
2660  * @param new_speed new speed value
2661  */
2662 void
2664 {
2665  data->speed = new_speed;
2666 }
2667 
2668 /** Get head_yaw value.
2669  * Head yaw
2670  * @return head_yaw value
2671  */
2672 float
2674 {
2675  return data->head_yaw;
2676 }
2677 
2678 /** Get maximum length of head_yaw value.
2679  * @return length of head_yaw value, can be length of the array or number of
2680  * maximum number of characters for a string
2681  */
2682 size_t
2684 {
2685  return 1;
2686 }
2687 
2688 /** Set head_yaw value.
2689  * Head yaw
2690  * @param new_head_yaw new head_yaw value
2691  */
2692 void
2694 {
2695  data->head_yaw = new_head_yaw;
2696 }
2697 
2698 /** Get head_pitch value.
2699  * Head pitch
2700  * @return head_pitch value
2701  */
2702 float
2704 {
2705  return data->head_pitch;
2706 }
2707 
2708 /** Get maximum length of head_pitch value.
2709  * @return length of head_pitch value, can be length of the array or number of
2710  * maximum number of characters for a string
2711  */
2712 size_t
2714 {
2715  return 1;
2716 }
2717 
2718 /** Set head_pitch value.
2719  * Head pitch
2720  * @param new_head_pitch new head_pitch value
2721  */
2722 void
2724 {
2725  data->head_pitch = new_head_pitch;
2726 }
2727 
2728 /** Get l_shoulder_pitch value.
2729  * Left shoulder pitch
2730  * @return l_shoulder_pitch value
2731  */
2732 float
2734 {
2735  return data->l_shoulder_pitch;
2736 }
2737 
2738 /** Get maximum length of l_shoulder_pitch value.
2739  * @return length of l_shoulder_pitch value, can be length of the array or number of
2740  * maximum number of characters for a string
2741  */
2742 size_t
2744 {
2745  return 1;
2746 }
2747 
2748 /** Set l_shoulder_pitch value.
2749  * Left shoulder pitch
2750  * @param new_l_shoulder_pitch new l_shoulder_pitch value
2751  */
2752 void
2754 {
2755  data->l_shoulder_pitch = new_l_shoulder_pitch;
2756 }
2757 
2758 /** Get l_shoulder_roll value.
2759  * Left shoulder roll
2760  * @return l_shoulder_roll value
2761  */
2762 float
2764 {
2765  return data->l_shoulder_roll;
2766 }
2767 
2768 /** Get maximum length of l_shoulder_roll value.
2769  * @return length of l_shoulder_roll value, can be length of the array or number of
2770  * maximum number of characters for a string
2771  */
2772 size_t
2774 {
2775  return 1;
2776 }
2777 
2778 /** Set l_shoulder_roll value.
2779  * Left shoulder roll
2780  * @param new_l_shoulder_roll new l_shoulder_roll value
2781  */
2782 void
2784 {
2785  data->l_shoulder_roll = new_l_shoulder_roll;
2786 }
2787 
2788 /** Get l_elbow_yaw value.
2789  * Left elbow yaw
2790  * @return l_elbow_yaw value
2791  */
2792 float
2794 {
2795  return data->l_elbow_yaw;
2796 }
2797 
2798 /** Get maximum length of l_elbow_yaw value.
2799  * @return length of l_elbow_yaw value, can be length of the array or number of
2800  * maximum number of characters for a string
2801  */
2802 size_t
2804 {
2805  return 1;
2806 }
2807 
2808 /** Set l_elbow_yaw value.
2809  * Left elbow yaw
2810  * @param new_l_elbow_yaw new l_elbow_yaw value
2811  */
2812 void
2814 {
2815  data->l_elbow_yaw = new_l_elbow_yaw;
2816 }
2817 
2818 /** Get l_elbow_roll value.
2819  * Left elbow roll
2820  * @return l_elbow_roll value
2821  */
2822 float
2824 {
2825  return data->l_elbow_roll;
2826 }
2827 
2828 /** Get maximum length of l_elbow_roll value.
2829  * @return length of l_elbow_roll value, can be length of the array or number of
2830  * maximum number of characters for a string
2831  */
2832 size_t
2834 {
2835  return 1;
2836 }
2837 
2838 /** Set l_elbow_roll value.
2839  * Left elbow roll
2840  * @param new_l_elbow_roll new l_elbow_roll value
2841  */
2842 void
2844 {
2845  data->l_elbow_roll = new_l_elbow_roll;
2846 }
2847 
2848 /** Get l_wrist_yaw value.
2849  * Left wrist yaw
2850  * @return l_wrist_yaw value
2851  */
2852 float
2854 {
2855  return data->l_wrist_yaw;
2856 }
2857 
2858 /** Get maximum length of l_wrist_yaw value.
2859  * @return length of l_wrist_yaw value, can be length of the array or number of
2860  * maximum number of characters for a string
2861  */
2862 size_t
2864 {
2865  return 1;
2866 }
2867 
2868 /** Set l_wrist_yaw value.
2869  * Left wrist yaw
2870  * @param new_l_wrist_yaw new l_wrist_yaw value
2871  */
2872 void
2874 {
2875  data->l_wrist_yaw = new_l_wrist_yaw;
2876 }
2877 
2878 /** Get l_hand value.
2879  * Left hand
2880  * @return l_hand value
2881  */
2882 float
2884 {
2885  return data->l_hand;
2886 }
2887 
2888 /** Get maximum length of l_hand value.
2889  * @return length of l_hand value, can be length of the array or number of
2890  * maximum number of characters for a string
2891  */
2892 size_t
2894 {
2895  return 1;
2896 }
2897 
2898 /** Set l_hand value.
2899  * Left hand
2900  * @param new_l_hand new l_hand value
2901  */
2902 void
2904 {
2905  data->l_hand = new_l_hand;
2906 }
2907 
2908 /** Get l_hip_yaw_pitch value.
2909  * Left hip yaw pitch
2910  * @return l_hip_yaw_pitch value
2911  */
2912 float
2914 {
2915  return data->l_hip_yaw_pitch;
2916 }
2917 
2918 /** Get maximum length of l_hip_yaw_pitch value.
2919  * @return length of l_hip_yaw_pitch value, can be length of the array or number of
2920  * maximum number of characters for a string
2921  */
2922 size_t
2924 {
2925  return 1;
2926 }
2927 
2928 /** Set l_hip_yaw_pitch value.
2929  * Left hip yaw pitch
2930  * @param new_l_hip_yaw_pitch new l_hip_yaw_pitch value
2931  */
2932 void
2934 {
2935  data->l_hip_yaw_pitch = new_l_hip_yaw_pitch;
2936 }
2937 
2938 /** Get l_hip_roll value.
2939  * Left hip roll
2940  * @return l_hip_roll value
2941  */
2942 float
2944 {
2945  return data->l_hip_roll;
2946 }
2947 
2948 /** Get maximum length of l_hip_roll value.
2949  * @return length of l_hip_roll value, can be length of the array or number of
2950  * maximum number of characters for a string
2951  */
2952 size_t
2954 {
2955  return 1;
2956 }
2957 
2958 /** Set l_hip_roll value.
2959  * Left hip roll
2960  * @param new_l_hip_roll new l_hip_roll value
2961  */
2962 void
2964 {
2965  data->l_hip_roll = new_l_hip_roll;
2966 }
2967 
2968 /** Get l_hip_pitch value.
2969  * Left hip pitch
2970  * @return l_hip_pitch value
2971  */
2972 float
2974 {
2975  return data->l_hip_pitch;
2976 }
2977 
2978 /** Get maximum length of l_hip_pitch value.
2979  * @return length of l_hip_pitch value, can be length of the array or number of
2980  * maximum number of characters for a string
2981  */
2982 size_t
2984 {
2985  return 1;
2986 }
2987 
2988 /** Set l_hip_pitch value.
2989  * Left hip pitch
2990  * @param new_l_hip_pitch new l_hip_pitch value
2991  */
2992 void
2994 {
2995  data->l_hip_pitch = new_l_hip_pitch;
2996 }
2997 
2998 /** Get l_knee_pitch value.
2999  * Left knee pitch
3000  * @return l_knee_pitch value
3001  */
3002 float
3004 {
3005  return data->l_knee_pitch;
3006 }
3007 
3008 /** Get maximum length of l_knee_pitch value.
3009  * @return length of l_knee_pitch value, can be length of the array or number of
3010  * maximum number of characters for a string
3011  */
3012 size_t
3014 {
3015  return 1;
3016 }
3017 
3018 /** Set l_knee_pitch value.
3019  * Left knee pitch
3020  * @param new_l_knee_pitch new l_knee_pitch value
3021  */
3022 void
3024 {
3025  data->l_knee_pitch = new_l_knee_pitch;
3026 }
3027 
3028 /** Get l_ankle_pitch value.
3029  * Left ankle pitch
3030  * @return l_ankle_pitch value
3031  */
3032 float
3034 {
3035  return data->l_ankle_pitch;
3036 }
3037 
3038 /** Get maximum length of l_ankle_pitch value.
3039  * @return length of l_ankle_pitch value, can be length of the array or number of
3040  * maximum number of characters for a string
3041  */
3042 size_t
3044 {
3045  return 1;
3046 }
3047 
3048 /** Set l_ankle_pitch value.
3049  * Left ankle pitch
3050  * @param new_l_ankle_pitch new l_ankle_pitch value
3051  */
3052 void
3054 {
3055  data->l_ankle_pitch = new_l_ankle_pitch;
3056 }
3057 
3058 /** Get l_ankle_roll value.
3059  * Left ankle roll
3060  * @return l_ankle_roll value
3061  */
3062 float
3064 {
3065  return data->l_ankle_roll;
3066 }
3067 
3068 /** Get maximum length of l_ankle_roll value.
3069  * @return length of l_ankle_roll value, can be length of the array or number of
3070  * maximum number of characters for a string
3071  */
3072 size_t
3074 {
3075  return 1;
3076 }
3077 
3078 /** Set l_ankle_roll value.
3079  * Left ankle roll
3080  * @param new_l_ankle_roll new l_ankle_roll value
3081  */
3082 void
3084 {
3085  data->l_ankle_roll = new_l_ankle_roll;
3086 }
3087 
3088 /** Get r_shoulder_pitch value.
3089  * Right shoulder pitch
3090  * @return r_shoulder_pitch value
3091  */
3092 float
3094 {
3095  return data->r_shoulder_pitch;
3096 }
3097 
3098 /** Get maximum length of r_shoulder_pitch value.
3099  * @return length of r_shoulder_pitch value, can be length of the array or number of
3100  * maximum number of characters for a string
3101  */
3102 size_t
3104 {
3105  return 1;
3106 }
3107 
3108 /** Set r_shoulder_pitch value.
3109  * Right shoulder pitch
3110  * @param new_r_shoulder_pitch new r_shoulder_pitch value
3111  */
3112 void
3114 {
3115  data->r_shoulder_pitch = new_r_shoulder_pitch;
3116 }
3117 
3118 /** Get r_shoulder_roll value.
3119  * Right shoulder roll
3120  * @return r_shoulder_roll value
3121  */
3122 float
3124 {
3125  return data->r_shoulder_roll;
3126 }
3127 
3128 /** Get maximum length of r_shoulder_roll value.
3129  * @return length of r_shoulder_roll value, can be length of the array or number of
3130  * maximum number of characters for a string
3131  */
3132 size_t
3134 {
3135  return 1;
3136 }
3137 
3138 /** Set r_shoulder_roll value.
3139  * Right shoulder roll
3140  * @param new_r_shoulder_roll new r_shoulder_roll value
3141  */
3142 void
3144 {
3145  data->r_shoulder_roll = new_r_shoulder_roll;
3146 }
3147 
3148 /** Get r_elbow_yaw value.
3149  * Right elbow yaw
3150  * @return r_elbow_yaw value
3151  */
3152 float
3154 {
3155  return data->r_elbow_yaw;
3156 }
3157 
3158 /** Get maximum length of r_elbow_yaw value.
3159  * @return length of r_elbow_yaw value, can be length of the array or number of
3160  * maximum number of characters for a string
3161  */
3162 size_t
3164 {
3165  return 1;
3166 }
3167 
3168 /** Set r_elbow_yaw value.
3169  * Right elbow yaw
3170  * @param new_r_elbow_yaw new r_elbow_yaw value
3171  */
3172 void
3174 {
3175  data->r_elbow_yaw = new_r_elbow_yaw;
3176 }
3177 
3178 /** Get r_elbow_roll value.
3179  * Right elbow roll
3180  * @return r_elbow_roll value
3181  */
3182 float
3184 {
3185  return data->r_elbow_roll;
3186 }
3187 
3188 /** Get maximum length of r_elbow_roll value.
3189  * @return length of r_elbow_roll value, can be length of the array or number of
3190  * maximum number of characters for a string
3191  */
3192 size_t
3194 {
3195  return 1;
3196 }
3197 
3198 /** Set r_elbow_roll value.
3199  * Right elbow roll
3200  * @param new_r_elbow_roll new r_elbow_roll value
3201  */
3202 void
3204 {
3205  data->r_elbow_roll = new_r_elbow_roll;
3206 }
3207 
3208 /** Get r_wrist_yaw value.
3209  * Right wrist yaw
3210  * @return r_wrist_yaw value
3211  */
3212 float
3214 {
3215  return data->r_wrist_yaw;
3216 }
3217 
3218 /** Get maximum length of r_wrist_yaw value.
3219  * @return length of r_wrist_yaw value, can be length of the array or number of
3220  * maximum number of characters for a string
3221  */
3222 size_t
3224 {
3225  return 1;
3226 }
3227 
3228 /** Set r_wrist_yaw value.
3229  * Right wrist yaw
3230  * @param new_r_wrist_yaw new r_wrist_yaw value
3231  */
3232 void
3234 {
3235  data->r_wrist_yaw = new_r_wrist_yaw;
3236 }
3237 
3238 /** Get r_hand value.
3239  * Right hand
3240  * @return r_hand value
3241  */
3242 float
3244 {
3245  return data->r_hand;
3246 }
3247 
3248 /** Get maximum length of r_hand value.
3249  * @return length of r_hand value, can be length of the array or number of
3250  * maximum number of characters for a string
3251  */
3252 size_t
3254 {
3255  return 1;
3256 }
3257 
3258 /** Set r_hand value.
3259  * Right hand
3260  * @param new_r_hand new r_hand value
3261  */
3262 void
3264 {
3265  data->r_hand = new_r_hand;
3266 }
3267 
3268 /** Get r_hip_yaw_pitch value.
3269  * Right hip yaw pitch
3270  * @return r_hip_yaw_pitch value
3271  */
3272 float
3274 {
3275  return data->r_hip_yaw_pitch;
3276 }
3277 
3278 /** Get maximum length of r_hip_yaw_pitch value.
3279  * @return length of r_hip_yaw_pitch value, can be length of the array or number of
3280  * maximum number of characters for a string
3281  */
3282 size_t
3284 {
3285  return 1;
3286 }
3287 
3288 /** Set r_hip_yaw_pitch value.
3289  * Right hip yaw pitch
3290  * @param new_r_hip_yaw_pitch new r_hip_yaw_pitch value
3291  */
3292 void
3294 {
3295  data->r_hip_yaw_pitch = new_r_hip_yaw_pitch;
3296 }
3297 
3298 /** Get r_hip_roll value.
3299  * Right hip roll
3300  * @return r_hip_roll value
3301  */
3302 float
3304 {
3305  return data->r_hip_roll;
3306 }
3307 
3308 /** Get maximum length of r_hip_roll value.
3309  * @return length of r_hip_roll value, can be length of the array or number of
3310  * maximum number of characters for a string
3311  */
3312 size_t
3314 {
3315  return 1;
3316 }
3317 
3318 /** Set r_hip_roll value.
3319  * Right hip roll
3320  * @param new_r_hip_roll new r_hip_roll value
3321  */
3322 void
3324 {
3325  data->r_hip_roll = new_r_hip_roll;
3326 }
3327 
3328 /** Get r_hip_pitch value.
3329  * Right hip pitch
3330  * @return r_hip_pitch value
3331  */
3332 float
3334 {
3335  return data->r_hip_pitch;
3336 }
3337 
3338 /** Get maximum length of r_hip_pitch value.
3339  * @return length of r_hip_pitch value, can be length of the array or number of
3340  * maximum number of characters for a string
3341  */
3342 size_t
3344 {
3345  return 1;
3346 }
3347 
3348 /** Set r_hip_pitch value.
3349  * Right hip pitch
3350  * @param new_r_hip_pitch new r_hip_pitch value
3351  */
3352 void
3354 {
3355  data->r_hip_pitch = new_r_hip_pitch;
3356 }
3357 
3358 /** Get r_knee_pitch value.
3359  * Right knee pitch
3360  * @return r_knee_pitch value
3361  */
3362 float
3364 {
3365  return data->r_knee_pitch;
3366 }
3367 
3368 /** Get maximum length of r_knee_pitch value.
3369  * @return length of r_knee_pitch value, can be length of the array or number of
3370  * maximum number of characters for a string
3371  */
3372 size_t
3374 {
3375  return 1;
3376 }
3377 
3378 /** Set r_knee_pitch value.
3379  * Right knee pitch
3380  * @param new_r_knee_pitch new r_knee_pitch value
3381  */
3382 void
3384 {
3385  data->r_knee_pitch = new_r_knee_pitch;
3386 }
3387 
3388 /** Get r_ankle_pitch value.
3389  * Right ankle pitch
3390  * @return r_ankle_pitch value
3391  */
3392 float
3394 {
3395  return data->r_ankle_pitch;
3396 }
3397 
3398 /** Get maximum length of r_ankle_pitch value.
3399  * @return length of r_ankle_pitch value, can be length of the array or number of
3400  * maximum number of characters for a string
3401  */
3402 size_t
3404 {
3405  return 1;
3406 }
3407 
3408 /** Set r_ankle_pitch value.
3409  * Right ankle pitch
3410  * @param new_r_ankle_pitch new r_ankle_pitch value
3411  */
3412 void
3414 {
3415  data->r_ankle_pitch = new_r_ankle_pitch;
3416 }
3417 
3418 /** Get r_ankle_roll value.
3419  * Right ankle roll
3420  * @return r_ankle_roll value
3421  */
3422 float
3424 {
3425  return data->r_ankle_roll;
3426 }
3427 
3428 /** Get maximum length of r_ankle_roll value.
3429  * @return length of r_ankle_roll value, can be length of the array or number of
3430  * maximum number of characters for a string
3431  */
3432 size_t
3434 {
3435  return 1;
3436 }
3437 
3438 /** Set r_ankle_roll value.
3439  * Right ankle roll
3440  * @param new_r_ankle_roll new r_ankle_roll value
3441  */
3442 void
3444 {
3445  data->r_ankle_roll = new_r_ankle_roll;
3446 }
3447 
3448 /** Clone this message.
3449  * Produces a message of the same type as this message and copies the
3450  * data to the new message.
3451  * @return clone of this message
3452  */
3453 Message *
3455 {
3457 }
3458 /** Check if message is valid and can be enqueued.
3459  * @param message Message to check
3460  * @return true if the message is valid, false otherwise.
3461  */
3462 bool
3464 {
3465  const SetServoMessage *m0 = dynamic_cast<const SetServoMessage *>(message);
3466  if ( m0 != NULL ) {
3467  return true;
3468  }
3469  const SetServosMessage *m1 = dynamic_cast<const SetServosMessage *>(message);
3470  if ( m1 != NULL ) {
3471  return true;
3472  }
3473  const MoveServoMessage *m2 = dynamic_cast<const MoveServoMessage *>(message);
3474  if ( m2 != NULL ) {
3475  return true;
3476  }
3477  const MoveServosMessage *m3 = dynamic_cast<const MoveServosMessage *>(message);
3478  if ( m3 != NULL ) {
3479  return true;
3480  }
3481  return false;
3482 }
3483 
3484 /// @cond INTERNALS
3485 EXPORT_INTERFACE(NaoJointPositionInterface)
3486 /// @endcond
3487 
3488 
3489 } // end namespace fawkes
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
NaoJointPositionInterface Fawkes BlackBoard Interface.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
static const uint32_t SERVO_l_ankle_roll
SERVO_l_ankle_roll constant.
SetServoMessage Fawkes BlackBoard Interface Message.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:114
static const uint32_t SERVO_min
SERVO_min constant.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:43
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
SetServosMessage Fawkes BlackBoard Interface Message.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
void set_servo(const uint32_t new_servo)
Set servo value.
static const uint32_t SERVO_r_hip_roll
SERVO_r_hip_roll constant.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_value(const float new_value)
Set value value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
static const uint32_t SERVO_max
SERVO_max constant.
void set_speed(const float new_speed)
Set speed value.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
void set_time(const int32_t new_time)
Set time value.
static const uint32_t SERVO_l_wrist_yaw
SERVO_l_wrist_yaw constant.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
Definition: message.h:119
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
MoveServosMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
size_t maxlenof_servo() const
Get maximum length of servo value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
static const uint32_t SERVO_l_elbow_yaw
SERVO_l_elbow_yaw constant.
float r_shoulder_roll() const
Get r_shoulder_roll value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
void set_value(const float new_value)
Set value value.
float l_shoulder_roll() const
Get l_shoulder_roll value.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:123
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:115
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
static const uint32_t SERVO_r_hand
SERVO_r_hand constant.
static const uint32_t SERVO_r_ankle_roll
SERVO_r_ankle_roll constant.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:206
Base class for exceptions in Fawkes.
Definition: exception.h:36
void set_servo(const uint32_t new_servo)
Set servo value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_servo() const
Get maximum length of servo value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
static const uint32_t SERVO_r_ankle_pitch
SERVO_r_ankle_pitch constant.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
static const uint32_t SERVO_r_knee_pitch
SERVO_r_knee_pitch constant.
static const uint32_t SERVO_l_hand
SERVO_l_hand constant.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
float field
Definition: types.h:43
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
virtual Message * clone() const
Clone this message.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
32 bit integer field
Definition: types.h:39
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
size_t maxlenof_speed() const
Get maximum length of speed value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
static const uint32_t SERVO_l_hip_pitch
SERVO_l_hip_pitch constant.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
virtual Message * clone() const
Clone this message.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
size_t maxlenof_value() const
Get maximum length of value value.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
MoveServoMessage Fawkes BlackBoard Interface Message.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0)
Add an entry to the info list.
Definition: message.cpp:435
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
float l_shoulder_roll() const
Get l_shoulder_roll value.
void set_speed(const float new_speed)
Set speed value.
virtual Message * clone() const
Clone this message.
static const uint32_t SERVO_r_hip_pitch
SERVO_r_hip_pitch constant.
static const uint32_t SERVO_r_hip_yaw_pitch
SERVO_r_hip_yaw_pitch constant.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
void set_r_hand(const float new_r_hand)
Set r_hand value.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
void set_time(const int32_t new_time)
Set time value.
const char * type() const
Get type of interface.
Definition: interface.cpp:635
size_t maxlenof_speed() const
Get maximum length of speed value.
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
size_t maxlenof_time() const
Get maximum length of time value.
32 bit unsigned integer field
Definition: types.h:40
RobotType
Enumeration describing the actual version of the robot that&#39;s being used.
size_t maxlenof_time() const
Get maximum length of time value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.