Fawkes API  Fawkes Development Version
NaoSensorInterface.cpp
1 
2 /***************************************************************************
3  * NaoSensorInterface.cpp - Fawkes BlackBoard Interface - NaoSensorInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2008 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/NaoSensorInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <map>
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 
33 namespace fawkes {
34 
35 /** @class NaoSensorInterface <interfaces/NaoSensorInterface.h>
36  * NaoSensorInterface Fawkes BlackBoard Interface.
37  *
38  This interface provides access to Nao sensors.
39 
40  * @ingroup FawkesInterfaces
41  */
42 
43 
44 
45 /** Constructor */
46 NaoSensorInterface::NaoSensorInterface() : Interface()
47 {
48  data_size = sizeof(NaoSensorInterface_data_t);
49  data_ptr = malloc(data_size);
50  data = (NaoSensorInterface_data_t *)data_ptr;
51  data_ts = (interface_data_ts_t *)data_ptr;
52  memset(data_ptr, 0, data_size);
53  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
54  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
55  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
56  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
57  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
58  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
59  add_fieldinfo(IFT_FLOAT, "accel_x", 1, &data->accel_x);
60  add_fieldinfo(IFT_FLOAT, "accel_y", 1, &data->accel_y);
61  add_fieldinfo(IFT_FLOAT, "accel_z", 1, &data->accel_z);
62  add_fieldinfo(IFT_FLOAT, "gyro_x", 1, &data->gyro_x);
63  add_fieldinfo(IFT_FLOAT, "gyro_y", 1, &data->gyro_y);
64  add_fieldinfo(IFT_FLOAT, "gyro_ref", 1, &data->gyro_ref);
65  add_fieldinfo(IFT_FLOAT, "angle_x", 1, &data->angle_x);
66  add_fieldinfo(IFT_FLOAT, "angle_y", 1, &data->angle_y);
67  add_fieldinfo(IFT_FLOAT, "l_fsr_fl", 1, &data->l_fsr_fl);
68  add_fieldinfo(IFT_FLOAT, "l_fsr_fr", 1, &data->l_fsr_fr);
69  add_fieldinfo(IFT_FLOAT, "l_fsr_rl", 1, &data->l_fsr_rl);
70  add_fieldinfo(IFT_FLOAT, "l_fsr_rr", 1, &data->l_fsr_rr);
71  add_fieldinfo(IFT_FLOAT, "r_fsr_fl", 1, &data->r_fsr_fl);
72  add_fieldinfo(IFT_FLOAT, "r_fsr_fr", 1, &data->r_fsr_fr);
73  add_fieldinfo(IFT_FLOAT, "r_fsr_rl", 1, &data->r_fsr_rl);
74  add_fieldinfo(IFT_FLOAT, "r_fsr_rr", 1, &data->r_fsr_rr);
75  add_fieldinfo(IFT_FLOAT, "l_total_weight", 1, &data->l_total_weight);
76  add_fieldinfo(IFT_FLOAT, "r_total_weight", 1, &data->r_total_weight);
77  add_fieldinfo(IFT_FLOAT, "l_cop_x", 1, &data->l_cop_x);
78  add_fieldinfo(IFT_FLOAT, "l_cop_y", 1, &data->l_cop_y);
79  add_fieldinfo(IFT_FLOAT, "r_cop_x", 1, &data->r_cop_x);
80  add_fieldinfo(IFT_FLOAT, "r_cop_y", 1, &data->r_cop_y);
81  add_fieldinfo(IFT_FLOAT, "ultrasonic_distance_left", 4, &data->ultrasonic_distance_left);
82  add_fieldinfo(IFT_FLOAT, "ultrasonic_distance_right", 4, &data->ultrasonic_distance_right);
83  add_fieldinfo(IFT_ENUM, "ultrasonic_direction", 1, &data->ultrasonic_direction, "UltrasonicDirection", &enum_map_UltrasonicDirection);
84  add_fieldinfo(IFT_UINT8, "l_foot_bumper_l", 1, &data->l_foot_bumper_l);
85  add_fieldinfo(IFT_UINT8, "l_foot_bumper_r", 1, &data->l_foot_bumper_r);
86  add_fieldinfo(IFT_UINT8, "r_foot_bumper_l", 1, &data->r_foot_bumper_l);
87  add_fieldinfo(IFT_UINT8, "r_foot_bumper_r", 1, &data->r_foot_bumper_r);
88  add_fieldinfo(IFT_UINT8, "head_touch_front", 1, &data->head_touch_front);
89  add_fieldinfo(IFT_UINT8, "head_touch_middle", 1, &data->head_touch_middle);
90  add_fieldinfo(IFT_UINT8, "head_touch_rear", 1, &data->head_touch_rear);
91  add_fieldinfo(IFT_UINT8, "chest_button", 1, &data->chest_button);
92  add_fieldinfo(IFT_FLOAT, "battery_charge", 1, &data->battery_charge);
93  add_messageinfo("EmitUltrasonicWaveMessage");
94  add_messageinfo("StartUltrasonicMessage");
95  add_messageinfo("StopUltrasonicMessage");
96  unsigned char tmp_hash[] = {0x41, 0x41, 0x54, 0x94, 0xca, 0xe8, 0x3d, 0x7a, 0xb8, 0xaa, 0xc2, 0x4e, 0x2c, 0xac, 0xcb, 0x15};
97  set_hash(tmp_hash);
98 }
99 
100 /** Destructor */
101 NaoSensorInterface::~NaoSensorInterface()
102 {
103  free(data_ptr);
104 }
105 /** Convert UltrasonicDirection constant to string.
106  * @param value value to convert to string
107  * @return constant value as string.
108  */
109 const char *
111 {
112  switch (value) {
113  case USD_NONE: return "USD_NONE";
114  case USD_LEFT_LEFT: return "USD_LEFT_LEFT";
115  case USD_LEFT_RIGHT: return "USD_LEFT_RIGHT";
116  case USD_RIGHT_RIGHT: return "USD_RIGHT_RIGHT";
117  case USD_RIGHT_LEFT: return "USD_RIGHT_LEFT";
118  case USD_BOTH_BOTH: return "USD_BOTH_BOTH";
119  default: return "UNKNOWN";
120  }
121 }
122 /* Methods */
123 /** Get accel_x value.
124  * Accelerometer x
125  * @return accel_x value
126  */
127 float
129 {
130  return data->accel_x;
131 }
132 
133 /** Get maximum length of accel_x value.
134  * @return length of accel_x value, can be length of the array or number of
135  * maximum number of characters for a string
136  */
137 size_t
139 {
140  return 1;
141 }
142 
143 /** Set accel_x value.
144  * Accelerometer x
145  * @param new_accel_x new accel_x value
146  */
147 void
148 NaoSensorInterface::set_accel_x(const float new_accel_x)
149 {
150  data_changed |= change_field(data->accel_x, new_accel_x);
151 }
152 
153 /** Get accel_y value.
154  * Accelerometer y
155  * @return accel_y value
156  */
157 float
159 {
160  return data->accel_y;
161 }
162 
163 /** Get maximum length of accel_y value.
164  * @return length of accel_y value, can be length of the array or number of
165  * maximum number of characters for a string
166  */
167 size_t
169 {
170  return 1;
171 }
172 
173 /** Set accel_y value.
174  * Accelerometer y
175  * @param new_accel_y new accel_y value
176  */
177 void
178 NaoSensorInterface::set_accel_y(const float new_accel_y)
179 {
180  data_changed |= change_field(data->accel_y, new_accel_y);
181 }
182 
183 /** Get accel_z value.
184  * Accelerometer z
185  * @return accel_z value
186  */
187 float
189 {
190  return data->accel_z;
191 }
192 
193 /** Get maximum length of accel_z value.
194  * @return length of accel_z value, can be length of the array or number of
195  * maximum number of characters for a string
196  */
197 size_t
199 {
200  return 1;
201 }
202 
203 /** Set accel_z value.
204  * Accelerometer z
205  * @param new_accel_z new accel_z value
206  */
207 void
208 NaoSensorInterface::set_accel_z(const float new_accel_z)
209 {
210  data_changed |= change_field(data->accel_z, new_accel_z);
211 }
212 
213 /** Get gyro_x value.
214  * Gyrometer x
215  * @return gyro_x value
216  */
217 float
219 {
220  return data->gyro_x;
221 }
222 
223 /** Get maximum length of gyro_x value.
224  * @return length of gyro_x value, can be length of the array or number of
225  * maximum number of characters for a string
226  */
227 size_t
229 {
230  return 1;
231 }
232 
233 /** Set gyro_x value.
234  * Gyrometer x
235  * @param new_gyro_x new gyro_x value
236  */
237 void
238 NaoSensorInterface::set_gyro_x(const float new_gyro_x)
239 {
240  data_changed |= change_field(data->gyro_x, new_gyro_x);
241 }
242 
243 /** Get gyro_y value.
244  * Gyrometer y
245  * @return gyro_y value
246  */
247 float
249 {
250  return data->gyro_y;
251 }
252 
253 /** Get maximum length of gyro_y value.
254  * @return length of gyro_y value, can be length of the array or number of
255  * maximum number of characters for a string
256  */
257 size_t
259 {
260  return 1;
261 }
262 
263 /** Set gyro_y value.
264  * Gyrometer y
265  * @param new_gyro_y new gyro_y value
266  */
267 void
268 NaoSensorInterface::set_gyro_y(const float new_gyro_y)
269 {
270  data_changed |= change_field(data->gyro_y, new_gyro_y);
271 }
272 
273 /** Get gyro_ref value.
274  * Gyrometer reference
275  * @return gyro_ref value
276  */
277 float
279 {
280  return data->gyro_ref;
281 }
282 
283 /** Get maximum length of gyro_ref value.
284  * @return length of gyro_ref value, can be length of the array or number of
285  * maximum number of characters for a string
286  */
287 size_t
289 {
290  return 1;
291 }
292 
293 /** Set gyro_ref value.
294  * Gyrometer reference
295  * @param new_gyro_ref new gyro_ref value
296  */
297 void
298 NaoSensorInterface::set_gyro_ref(const float new_gyro_ref)
299 {
300  data_changed |= change_field(data->gyro_ref, new_gyro_ref);
301 }
302 
303 /** Get angle_x value.
304  * Angle x
305  * @return angle_x value
306  */
307 float
309 {
310  return data->angle_x;
311 }
312 
313 /** Get maximum length of angle_x value.
314  * @return length of angle_x value, can be length of the array or number of
315  * maximum number of characters for a string
316  */
317 size_t
319 {
320  return 1;
321 }
322 
323 /** Set angle_x value.
324  * Angle x
325  * @param new_angle_x new angle_x value
326  */
327 void
328 NaoSensorInterface::set_angle_x(const float new_angle_x)
329 {
330  data_changed |= change_field(data->angle_x, new_angle_x);
331 }
332 
333 /** Get angle_y value.
334  * Angle y
335  * @return angle_y value
336  */
337 float
339 {
340  return data->angle_y;
341 }
342 
343 /** Get maximum length of angle_y value.
344  * @return length of angle_y value, can be length of the array or number of
345  * maximum number of characters for a string
346  */
347 size_t
349 {
350  return 1;
351 }
352 
353 /** Set angle_y value.
354  * Angle y
355  * @param new_angle_y new angle_y value
356  */
357 void
358 NaoSensorInterface::set_angle_y(const float new_angle_y)
359 {
360  data_changed |= change_field(data->angle_y, new_angle_y);
361 }
362 
363 /** Get l_fsr_fl value.
364  * Left FSR front left
365  * @return l_fsr_fl value
366  */
367 float
369 {
370  return data->l_fsr_fl;
371 }
372 
373 /** Get maximum length of l_fsr_fl value.
374  * @return length of l_fsr_fl value, can be length of the array or number of
375  * maximum number of characters for a string
376  */
377 size_t
379 {
380  return 1;
381 }
382 
383 /** Set l_fsr_fl value.
384  * Left FSR front left
385  * @param new_l_fsr_fl new l_fsr_fl value
386  */
387 void
388 NaoSensorInterface::set_l_fsr_fl(const float new_l_fsr_fl)
389 {
390  data_changed |= change_field(data->l_fsr_fl, new_l_fsr_fl);
391 }
392 
393 /** Get l_fsr_fr value.
394  * Left FSR front right
395  * @return l_fsr_fr value
396  */
397 float
399 {
400  return data->l_fsr_fr;
401 }
402 
403 /** Get maximum length of l_fsr_fr value.
404  * @return length of l_fsr_fr value, can be length of the array or number of
405  * maximum number of characters for a string
406  */
407 size_t
409 {
410  return 1;
411 }
412 
413 /** Set l_fsr_fr value.
414  * Left FSR front right
415  * @param new_l_fsr_fr new l_fsr_fr value
416  */
417 void
418 NaoSensorInterface::set_l_fsr_fr(const float new_l_fsr_fr)
419 {
420  data_changed |= change_field(data->l_fsr_fr, new_l_fsr_fr);
421 }
422 
423 /** Get l_fsr_rl value.
424  * Left FSR rear left
425  * @return l_fsr_rl value
426  */
427 float
429 {
430  return data->l_fsr_rl;
431 }
432 
433 /** Get maximum length of l_fsr_rl value.
434  * @return length of l_fsr_rl value, can be length of the array or number of
435  * maximum number of characters for a string
436  */
437 size_t
439 {
440  return 1;
441 }
442 
443 /** Set l_fsr_rl value.
444  * Left FSR rear left
445  * @param new_l_fsr_rl new l_fsr_rl value
446  */
447 void
448 NaoSensorInterface::set_l_fsr_rl(const float new_l_fsr_rl)
449 {
450  data_changed |= change_field(data->l_fsr_rl, new_l_fsr_rl);
451 }
452 
453 /** Get l_fsr_rr value.
454  * Left FSR rear right
455  * @return l_fsr_rr value
456  */
457 float
459 {
460  return data->l_fsr_rr;
461 }
462 
463 /** Get maximum length of l_fsr_rr value.
464  * @return length of l_fsr_rr value, can be length of the array or number of
465  * maximum number of characters for a string
466  */
467 size_t
469 {
470  return 1;
471 }
472 
473 /** Set l_fsr_rr value.
474  * Left FSR rear right
475  * @param new_l_fsr_rr new l_fsr_rr value
476  */
477 void
478 NaoSensorInterface::set_l_fsr_rr(const float new_l_fsr_rr)
479 {
480  data_changed |= change_field(data->l_fsr_rr, new_l_fsr_rr);
481 }
482 
483 /** Get r_fsr_fl value.
484  * Right FSR front left
485  * @return r_fsr_fl value
486  */
487 float
489 {
490  return data->r_fsr_fl;
491 }
492 
493 /** Get maximum length of r_fsr_fl value.
494  * @return length of r_fsr_fl value, can be length of the array or number of
495  * maximum number of characters for a string
496  */
497 size_t
499 {
500  return 1;
501 }
502 
503 /** Set r_fsr_fl value.
504  * Right FSR front left
505  * @param new_r_fsr_fl new r_fsr_fl value
506  */
507 void
508 NaoSensorInterface::set_r_fsr_fl(const float new_r_fsr_fl)
509 {
510  data_changed |= change_field(data->r_fsr_fl, new_r_fsr_fl);
511 }
512 
513 /** Get r_fsr_fr value.
514  * Right FSR front right
515  * @return r_fsr_fr value
516  */
517 float
519 {
520  return data->r_fsr_fr;
521 }
522 
523 /** Get maximum length of r_fsr_fr value.
524  * @return length of r_fsr_fr value, can be length of the array or number of
525  * maximum number of characters for a string
526  */
527 size_t
529 {
530  return 1;
531 }
532 
533 /** Set r_fsr_fr value.
534  * Right FSR front right
535  * @param new_r_fsr_fr new r_fsr_fr value
536  */
537 void
538 NaoSensorInterface::set_r_fsr_fr(const float new_r_fsr_fr)
539 {
540  data_changed |= change_field(data->r_fsr_fr, new_r_fsr_fr);
541 }
542 
543 /** Get r_fsr_rl value.
544  * Right FSR rear left
545  * @return r_fsr_rl value
546  */
547 float
549 {
550  return data->r_fsr_rl;
551 }
552 
553 /** Get maximum length of r_fsr_rl value.
554  * @return length of r_fsr_rl value, can be length of the array or number of
555  * maximum number of characters for a string
556  */
557 size_t
559 {
560  return 1;
561 }
562 
563 /** Set r_fsr_rl value.
564  * Right FSR rear left
565  * @param new_r_fsr_rl new r_fsr_rl value
566  */
567 void
568 NaoSensorInterface::set_r_fsr_rl(const float new_r_fsr_rl)
569 {
570  data_changed |= change_field(data->r_fsr_rl, new_r_fsr_rl);
571 }
572 
573 /** Get r_fsr_rr value.
574  * Right FSR rear right
575  * @return r_fsr_rr value
576  */
577 float
579 {
580  return data->r_fsr_rr;
581 }
582 
583 /** Get maximum length of r_fsr_rr value.
584  * @return length of r_fsr_rr value, can be length of the array or number of
585  * maximum number of characters for a string
586  */
587 size_t
589 {
590  return 1;
591 }
592 
593 /** Set r_fsr_rr value.
594  * Right FSR rear right
595  * @param new_r_fsr_rr new r_fsr_rr value
596  */
597 void
598 NaoSensorInterface::set_r_fsr_rr(const float new_r_fsr_rr)
599 {
600  data_changed |= change_field(data->r_fsr_rr, new_r_fsr_rr);
601 }
602 
603 /** Get l_total_weight value.
604  * Total weight on left foot
605  * @return l_total_weight value
606  */
607 float
609 {
610  return data->l_total_weight;
611 }
612 
613 /** Get maximum length of l_total_weight value.
614  * @return length of l_total_weight value, can be length of the array or number of
615  * maximum number of characters for a string
616  */
617 size_t
619 {
620  return 1;
621 }
622 
623 /** Set l_total_weight value.
624  * Total weight on left foot
625  * @param new_l_total_weight new l_total_weight value
626  */
627 void
628 NaoSensorInterface::set_l_total_weight(const float new_l_total_weight)
629 {
630  data_changed |= change_field(data->l_total_weight, new_l_total_weight);
631 }
632 
633 /** Get r_total_weight value.
634  * Total weight on right foot
635  * @return r_total_weight value
636  */
637 float
639 {
640  return data->r_total_weight;
641 }
642 
643 /** Get maximum length of r_total_weight value.
644  * @return length of r_total_weight value, can be length of the array or number of
645  * maximum number of characters for a string
646  */
647 size_t
649 {
650  return 1;
651 }
652 
653 /** Set r_total_weight value.
654  * Total weight on right foot
655  * @param new_r_total_weight new r_total_weight value
656  */
657 void
658 NaoSensorInterface::set_r_total_weight(const float new_r_total_weight)
659 {
660  data_changed |= change_field(data->r_total_weight, new_r_total_weight);
661 }
662 
663 /** Get l_cop_x value.
664  * Center of pressure X for left foot.
665  * @return l_cop_x value
666  */
667 float
669 {
670  return data->l_cop_x;
671 }
672 
673 /** Get maximum length of l_cop_x value.
674  * @return length of l_cop_x value, can be length of the array or number of
675  * maximum number of characters for a string
676  */
677 size_t
679 {
680  return 1;
681 }
682 
683 /** Set l_cop_x value.
684  * Center of pressure X for left foot.
685  * @param new_l_cop_x new l_cop_x value
686  */
687 void
688 NaoSensorInterface::set_l_cop_x(const float new_l_cop_x)
689 {
690  data_changed |= change_field(data->l_cop_x, new_l_cop_x);
691 }
692 
693 /** Get l_cop_y value.
694  * Center of pressure Y for left foot.
695  * @return l_cop_y value
696  */
697 float
699 {
700  return data->l_cop_y;
701 }
702 
703 /** Get maximum length of l_cop_y value.
704  * @return length of l_cop_y value, can be length of the array or number of
705  * maximum number of characters for a string
706  */
707 size_t
709 {
710  return 1;
711 }
712 
713 /** Set l_cop_y value.
714  * Center of pressure Y for left foot.
715  * @param new_l_cop_y new l_cop_y value
716  */
717 void
718 NaoSensorInterface::set_l_cop_y(const float new_l_cop_y)
719 {
720  data_changed |= change_field(data->l_cop_y, new_l_cop_y);
721 }
722 
723 /** Get r_cop_x value.
724  * Center of pressure X for right foot.
725  * @return r_cop_x value
726  */
727 float
729 {
730  return data->r_cop_x;
731 }
732 
733 /** Get maximum length of r_cop_x value.
734  * @return length of r_cop_x value, can be length of the array or number of
735  * maximum number of characters for a string
736  */
737 size_t
739 {
740  return 1;
741 }
742 
743 /** Set r_cop_x value.
744  * Center of pressure X for right foot.
745  * @param new_r_cop_x new r_cop_x value
746  */
747 void
748 NaoSensorInterface::set_r_cop_x(const float new_r_cop_x)
749 {
750  data_changed |= change_field(data->r_cop_x, new_r_cop_x);
751 }
752 
753 /** Get r_cop_y value.
754  * Center of pressure Y for right foot.
755  * @return r_cop_y value
756  */
757 float
759 {
760  return data->r_cop_y;
761 }
762 
763 /** Get maximum length of r_cop_y value.
764  * @return length of r_cop_y value, can be length of the array or number of
765  * maximum number of characters for a string
766  */
767 size_t
769 {
770  return 1;
771 }
772 
773 /** Set r_cop_y value.
774  * Center of pressure Y for right foot.
775  * @param new_r_cop_y new r_cop_y value
776  */
777 void
778 NaoSensorInterface::set_r_cop_y(const float new_r_cop_y)
779 {
780  data_changed |= change_field(data->r_cop_y, new_r_cop_y);
781 }
782 
783 /** Get ultrasonic_distance_left value.
784  *
785  First four ultrasonic sensor readings from left receiver. Distance
786  to detected object is in meters.
787 
788  * @return ultrasonic_distance_left value
789  */
790 float *
792 {
793  return data->ultrasonic_distance_left;
794 }
795 
796 /** Get ultrasonic_distance_left value at given index.
797  *
798  First four ultrasonic sensor readings from left receiver. Distance
799  to detected object is in meters.
800 
801  * @param index index of value
802  * @return ultrasonic_distance_left value
803  * @exception Exception thrown if index is out of bounds
804  */
805 float
807 {
808  if (index > 3) {
809  throw Exception("Index value %u out of bounds (0..3)", index);
810  }
811  return data->ultrasonic_distance_left[index];
812 }
813 
814 /** Get maximum length of ultrasonic_distance_left value.
815  * @return length of ultrasonic_distance_left value, can be length of the array or number of
816  * maximum number of characters for a string
817  */
818 size_t
820 {
821  return 4;
822 }
823 
824 /** Set ultrasonic_distance_left value.
825  *
826  First four ultrasonic sensor readings from left receiver. Distance
827  to detected object is in meters.
828 
829  * @param new_ultrasonic_distance_left new ultrasonic_distance_left value
830  */
831 void
832 NaoSensorInterface::set_ultrasonic_distance_left(const float * new_ultrasonic_distance_left)
833 {
834  data_changed |= change_field(data->ultrasonic_distance_left, new_ultrasonic_distance_left);
835 }
836 
837 /** Set ultrasonic_distance_left value at given index.
838  *
839  First four ultrasonic sensor readings from left receiver. Distance
840  to detected object is in meters.
841 
842  * @param new_ultrasonic_distance_left new ultrasonic_distance_left value
843  * @param index index for of the value
844  */
845 void
846 NaoSensorInterface::set_ultrasonic_distance_left(unsigned int index, const float new_ultrasonic_distance_left)
847 {
848  data_changed |= change_field(data->ultrasonic_distance_left, index, new_ultrasonic_distance_left);
849 }
850 /** Get ultrasonic_distance_right value.
851  *
852  First four ultrasonic sensor readings from right receiver. Distance
853  to detected object is in meters.
854 
855  * @return ultrasonic_distance_right value
856  */
857 float *
859 {
860  return data->ultrasonic_distance_right;
861 }
862 
863 /** Get ultrasonic_distance_right value at given index.
864  *
865  First four ultrasonic sensor readings from right receiver. Distance
866  to detected object is in meters.
867 
868  * @param index index of value
869  * @return ultrasonic_distance_right value
870  * @exception Exception thrown if index is out of bounds
871  */
872 float
874 {
875  if (index > 3) {
876  throw Exception("Index value %u out of bounds (0..3)", index);
877  }
878  return data->ultrasonic_distance_right[index];
879 }
880 
881 /** Get maximum length of ultrasonic_distance_right value.
882  * @return length of ultrasonic_distance_right value, can be length of the array or number of
883  * maximum number of characters for a string
884  */
885 size_t
887 {
888  return 4;
889 }
890 
891 /** Set ultrasonic_distance_right value.
892  *
893  First four ultrasonic sensor readings from right receiver. Distance
894  to detected object is in meters.
895 
896  * @param new_ultrasonic_distance_right new ultrasonic_distance_right value
897  */
898 void
899 NaoSensorInterface::set_ultrasonic_distance_right(const float * new_ultrasonic_distance_right)
900 {
901  data_changed |= change_field(data->ultrasonic_distance_right, new_ultrasonic_distance_right);
902 }
903 
904 /** Set ultrasonic_distance_right value at given index.
905  *
906  First four ultrasonic sensor readings from right receiver. Distance
907  to detected object is in meters.
908 
909  * @param new_ultrasonic_distance_right new ultrasonic_distance_right value
910  * @param index index for of the value
911  */
912 void
913 NaoSensorInterface::set_ultrasonic_distance_right(unsigned int index, const float new_ultrasonic_distance_right)
914 {
915  data_changed |= change_field(data->ultrasonic_distance_right, index, new_ultrasonic_distance_right);
916 }
917 /** Get ultrasonic_direction value.
918  *
919  Direction that was used to gather the ultrasonic readings.
920 
921  * @return ultrasonic_direction value
922  */
925 {
926  return (NaoSensorInterface::UltrasonicDirection)data->ultrasonic_direction;
927 }
928 
929 /** Get maximum length of ultrasonic_direction value.
930  * @return length of ultrasonic_direction value, can be length of the array or number of
931  * maximum number of characters for a string
932  */
933 size_t
935 {
936  return 1;
937 }
938 
939 /** Set ultrasonic_direction value.
940  *
941  Direction that was used to gather the ultrasonic readings.
942 
943  * @param new_ultrasonic_direction new ultrasonic_direction value
944  */
945 void
947 {
948  data_changed |= change_field(data->ultrasonic_direction, new_ultrasonic_direction);
949 }
950 
951 /** Get l_foot_bumper_l value.
952  * Left foot bumper left side
953  * @return l_foot_bumper_l value
954  */
955 uint8_t
957 {
958  return data->l_foot_bumper_l;
959 }
960 
961 /** Get maximum length of l_foot_bumper_l value.
962  * @return length of l_foot_bumper_l value, can be length of the array or number of
963  * maximum number of characters for a string
964  */
965 size_t
967 {
968  return 1;
969 }
970 
971 /** Set l_foot_bumper_l value.
972  * Left foot bumper left side
973  * @param new_l_foot_bumper_l new l_foot_bumper_l value
974  */
975 void
976 NaoSensorInterface::set_l_foot_bumper_l(const uint8_t new_l_foot_bumper_l)
977 {
978  data_changed |= change_field(data->l_foot_bumper_l, new_l_foot_bumper_l);
979 }
980 
981 /** Get l_foot_bumper_r value.
982  * Left foot bumper right side
983  * @return l_foot_bumper_r value
984  */
985 uint8_t
987 {
988  return data->l_foot_bumper_r;
989 }
990 
991 /** Get maximum length of l_foot_bumper_r value.
992  * @return length of l_foot_bumper_r value, can be length of the array or number of
993  * maximum number of characters for a string
994  */
995 size_t
997 {
998  return 1;
999 }
1000 
1001 /** Set l_foot_bumper_r value.
1002  * Left foot bumper right side
1003  * @param new_l_foot_bumper_r new l_foot_bumper_r value
1004  */
1005 void
1006 NaoSensorInterface::set_l_foot_bumper_r(const uint8_t new_l_foot_bumper_r)
1007 {
1008  data_changed |= change_field(data->l_foot_bumper_r, new_l_foot_bumper_r);
1009 }
1010 
1011 /** Get r_foot_bumper_l value.
1012  * Right foot bumper left side
1013  * @return r_foot_bumper_l value
1014  */
1015 uint8_t
1017 {
1018  return data->r_foot_bumper_l;
1019 }
1020 
1021 /** Get maximum length of r_foot_bumper_l value.
1022  * @return length of r_foot_bumper_l value, can be length of the array or number of
1023  * maximum number of characters for a string
1024  */
1025 size_t
1027 {
1028  return 1;
1029 }
1030 
1031 /** Set r_foot_bumper_l value.
1032  * Right foot bumper left side
1033  * @param new_r_foot_bumper_l new r_foot_bumper_l value
1034  */
1035 void
1036 NaoSensorInterface::set_r_foot_bumper_l(const uint8_t new_r_foot_bumper_l)
1037 {
1038  data_changed |= change_field(data->r_foot_bumper_l, new_r_foot_bumper_l);
1039 }
1040 
1041 /** Get r_foot_bumper_r value.
1042  * Right foot bumper right side
1043  * @return r_foot_bumper_r value
1044  */
1045 uint8_t
1047 {
1048  return data->r_foot_bumper_r;
1049 }
1050 
1051 /** Get maximum length of r_foot_bumper_r value.
1052  * @return length of r_foot_bumper_r value, can be length of the array or number of
1053  * maximum number of characters for a string
1054  */
1055 size_t
1057 {
1058  return 1;
1059 }
1060 
1061 /** Set r_foot_bumper_r value.
1062  * Right foot bumper right side
1063  * @param new_r_foot_bumper_r new r_foot_bumper_r value
1064  */
1065 void
1066 NaoSensorInterface::set_r_foot_bumper_r(const uint8_t new_r_foot_bumper_r)
1067 {
1068  data_changed |= change_field(data->r_foot_bumper_r, new_r_foot_bumper_r);
1069 }
1070 
1071 /** Get head_touch_front value.
1072  * Front part of head touch sensor (only Academics robot)
1073  * @return head_touch_front value
1074  */
1075 uint8_t
1077 {
1078  return data->head_touch_front;
1079 }
1080 
1081 /** Get maximum length of head_touch_front value.
1082  * @return length of head_touch_front value, can be length of the array or number of
1083  * maximum number of characters for a string
1084  */
1085 size_t
1087 {
1088  return 1;
1089 }
1090 
1091 /** Set head_touch_front value.
1092  * Front part of head touch sensor (only Academics robot)
1093  * @param new_head_touch_front new head_touch_front value
1094  */
1095 void
1096 NaoSensorInterface::set_head_touch_front(const uint8_t new_head_touch_front)
1097 {
1098  data_changed |= change_field(data->head_touch_front, new_head_touch_front);
1099 }
1100 
1101 /** Get head_touch_middle value.
1102  * Middle part of head touch sensor (only Academics robot)
1103  * @return head_touch_middle value
1104  */
1105 uint8_t
1107 {
1108  return data->head_touch_middle;
1109 }
1110 
1111 /** Get maximum length of head_touch_middle value.
1112  * @return length of head_touch_middle value, can be length of the array or number of
1113  * maximum number of characters for a string
1114  */
1115 size_t
1117 {
1118  return 1;
1119 }
1120 
1121 /** Set head_touch_middle value.
1122  * Middle part of head touch sensor (only Academics robot)
1123  * @param new_head_touch_middle new head_touch_middle value
1124  */
1125 void
1126 NaoSensorInterface::set_head_touch_middle(const uint8_t new_head_touch_middle)
1127 {
1128  data_changed |= change_field(data->head_touch_middle, new_head_touch_middle);
1129 }
1130 
1131 /** Get head_touch_rear value.
1132  * Rear part of head touch sensor (only Academics robot)
1133  * @return head_touch_rear value
1134  */
1135 uint8_t
1137 {
1138  return data->head_touch_rear;
1139 }
1140 
1141 /** Get maximum length of head_touch_rear value.
1142  * @return length of head_touch_rear value, can be length of the array or number of
1143  * maximum number of characters for a string
1144  */
1145 size_t
1147 {
1148  return 1;
1149 }
1150 
1151 /** Set head_touch_rear value.
1152  * Rear part of head touch sensor (only Academics robot)
1153  * @param new_head_touch_rear new head_touch_rear value
1154  */
1155 void
1156 NaoSensorInterface::set_head_touch_rear(const uint8_t new_head_touch_rear)
1157 {
1158  data_changed |= change_field(data->head_touch_rear, new_head_touch_rear);
1159 }
1160 
1161 /** Get chest_button value.
1162  * Chest button state
1163  * @return chest_button value
1164  */
1165 uint8_t
1167 {
1168  return data->chest_button;
1169 }
1170 
1171 /** Get maximum length of chest_button value.
1172  * @return length of chest_button value, can be length of the array or number of
1173  * maximum number of characters for a string
1174  */
1175 size_t
1177 {
1178  return 1;
1179 }
1180 
1181 /** Set chest_button value.
1182  * Chest button state
1183  * @param new_chest_button new chest_button value
1184  */
1185 void
1186 NaoSensorInterface::set_chest_button(const uint8_t new_chest_button)
1187 {
1188  data_changed |= change_field(data->chest_button, new_chest_button);
1189 }
1190 
1191 /** Get battery_charge value.
1192  * Battery charge
1193  * @return battery_charge value
1194  */
1195 float
1197 {
1198  return data->battery_charge;
1199 }
1200 
1201 /** Get maximum length of battery_charge value.
1202  * @return length of battery_charge value, can be length of the array or number of
1203  * maximum number of characters for a string
1204  */
1205 size_t
1207 {
1208  return 1;
1209 }
1210 
1211 /** Set battery_charge value.
1212  * Battery charge
1213  * @param new_battery_charge new battery_charge value
1214  */
1215 void
1216 NaoSensorInterface::set_battery_charge(const float new_battery_charge)
1217 {
1218  data_changed |= change_field(data->battery_charge, new_battery_charge);
1219 }
1220 
1221 /* =========== message create =========== */
1222 Message *
1223 NaoSensorInterface::create_message(const char *type) const
1224 {
1225  if ( strncmp("EmitUltrasonicWaveMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1226  return new EmitUltrasonicWaveMessage();
1227  } else if ( strncmp("StartUltrasonicMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1228  return new StartUltrasonicMessage();
1229  } else if ( strncmp("StopUltrasonicMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
1230  return new StopUltrasonicMessage();
1231  } else {
1232  throw UnknownTypeException("The given type '%s' does not match any known "
1233  "message type for this interface type.", type);
1234  }
1235 }
1236 
1237 
1238 /** Copy values from other interface.
1239  * @param other other interface to copy values from
1240  */
1241 void
1243 {
1244  const NaoSensorInterface *oi = dynamic_cast<const NaoSensorInterface *>(other);
1245  if (oi == NULL) {
1246  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1247  type(), other->type());
1248  }
1249  memcpy(data, oi->data, sizeof(NaoSensorInterface_data_t));
1250 }
1251 
1252 const char *
1253 NaoSensorInterface::enum_tostring(const char *enumtype, int val) const
1254 {
1255  if (strcmp(enumtype, "UltrasonicDirection") == 0) {
1257  }
1258  throw UnknownTypeException("Unknown enum type %s", enumtype);
1259 }
1260 
1261 /* =========== messages =========== */
1262 /** @class NaoSensorInterface::EmitUltrasonicWaveMessage <interfaces/NaoSensorInterface.h>
1263  * EmitUltrasonicWaveMessage Fawkes BlackBoard Interface Message.
1264  *
1265 
1266  */
1267 
1268 
1269 /** Constructor with initial values.
1270  * @param ini_ultrasonic_direction initial value for ultrasonic_direction
1271  */
1273 {
1274  data_size = sizeof(EmitUltrasonicWaveMessage_data_t);
1275  data_ptr = malloc(data_size);
1276  memset(data_ptr, 0, data_size);
1277  data = (EmitUltrasonicWaveMessage_data_t *)data_ptr;
1279  data->ultrasonic_direction = ini_ultrasonic_direction;
1280  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
1281  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
1282  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
1283  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
1284  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
1285  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
1286  add_fieldinfo(IFT_ENUM, "ultrasonic_direction", 1, &data->ultrasonic_direction, "UltrasonicDirection", &enum_map_UltrasonicDirection);
1287 }
1288 /** Constructor */
1290 {
1291  data_size = sizeof(EmitUltrasonicWaveMessage_data_t);
1292  data_ptr = malloc(data_size);
1293  memset(data_ptr, 0, data_size);
1294  data = (EmitUltrasonicWaveMessage_data_t *)data_ptr;
1296  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
1297  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
1298  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
1299  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
1300  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
1301  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
1302  add_fieldinfo(IFT_ENUM, "ultrasonic_direction", 1, &data->ultrasonic_direction, "UltrasonicDirection", &enum_map_UltrasonicDirection);
1303 }
1304 
1305 /** Destructor */
1307 {
1308  free(data_ptr);
1309 }
1310 
1311 /** Copy constructor.
1312  * @param m message to copy from
1313  */
1315 {
1316  data_size = m->data_size;
1317  data_ptr = malloc(data_size);
1318  memcpy(data_ptr, m->data_ptr, data_size);
1319  data = (EmitUltrasonicWaveMessage_data_t *)data_ptr;
1321 }
1322 
1323 /* Methods */
1324 /** Get ultrasonic_direction value.
1325  *
1326  Direction that was used to gather the ultrasonic readings.
1327 
1328  * @return ultrasonic_direction value
1329  */
1332 {
1333  return (NaoSensorInterface::UltrasonicDirection)data->ultrasonic_direction;
1334 }
1335 
1336 /** Get maximum length of ultrasonic_direction value.
1337  * @return length of ultrasonic_direction value, can be length of the array or number of
1338  * maximum number of characters for a string
1339  */
1340 size_t
1342 {
1343  return 1;
1344 }
1345 
1346 /** Set ultrasonic_direction value.
1347  *
1348  Direction that was used to gather the ultrasonic readings.
1349 
1350  * @param new_ultrasonic_direction new ultrasonic_direction value
1351  */
1352 void
1354 {
1355  change_field(data->ultrasonic_direction, new_ultrasonic_direction);
1356 }
1357 
1358 /** Clone this message.
1359  * Produces a message of the same type as this message and copies the
1360  * data to the new message.
1361  * @return clone of this message
1362  */
1363 Message *
1365 {
1367 }
1368 /** @class NaoSensorInterface::StartUltrasonicMessage <interfaces/NaoSensorInterface.h>
1369  * StartUltrasonicMessage Fawkes BlackBoard Interface Message.
1370  *
1371 
1372  */
1373 
1374 
1375 /** Constructor with initial values.
1376  * @param ini_ultrasonic_direction initial value for ultrasonic_direction
1377  */
1379 {
1380  data_size = sizeof(StartUltrasonicMessage_data_t);
1381  data_ptr = malloc(data_size);
1382  memset(data_ptr, 0, data_size);
1383  data = (StartUltrasonicMessage_data_t *)data_ptr;
1385  data->ultrasonic_direction = ini_ultrasonic_direction;
1386  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
1387  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
1388  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
1389  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
1390  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
1391  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
1392  add_fieldinfo(IFT_ENUM, "ultrasonic_direction", 1, &data->ultrasonic_direction, "UltrasonicDirection", &enum_map_UltrasonicDirection);
1393 }
1394 /** Constructor */
1396 {
1397  data_size = sizeof(StartUltrasonicMessage_data_t);
1398  data_ptr = malloc(data_size);
1399  memset(data_ptr, 0, data_size);
1400  data = (StartUltrasonicMessage_data_t *)data_ptr;
1402  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
1403  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
1404  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
1405  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
1406  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
1407  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
1408  add_fieldinfo(IFT_ENUM, "ultrasonic_direction", 1, &data->ultrasonic_direction, "UltrasonicDirection", &enum_map_UltrasonicDirection);
1409 }
1410 
1411 /** Destructor */
1413 {
1414  free(data_ptr);
1415 }
1416 
1417 /** Copy constructor.
1418  * @param m message to copy from
1419  */
1421 {
1422  data_size = m->data_size;
1423  data_ptr = malloc(data_size);
1424  memcpy(data_ptr, m->data_ptr, data_size);
1425  data = (StartUltrasonicMessage_data_t *)data_ptr;
1427 }
1428 
1429 /* Methods */
1430 /** Get ultrasonic_direction value.
1431  *
1432  Direction that was used to gather the ultrasonic readings.
1433 
1434  * @return ultrasonic_direction value
1435  */
1438 {
1439  return (NaoSensorInterface::UltrasonicDirection)data->ultrasonic_direction;
1440 }
1441 
1442 /** Get maximum length of ultrasonic_direction value.
1443  * @return length of ultrasonic_direction value, can be length of the array or number of
1444  * maximum number of characters for a string
1445  */
1446 size_t
1448 {
1449  return 1;
1450 }
1451 
1452 /** Set ultrasonic_direction value.
1453  *
1454  Direction that was used to gather the ultrasonic readings.
1455 
1456  * @param new_ultrasonic_direction new ultrasonic_direction value
1457  */
1458 void
1460 {
1461  change_field(data->ultrasonic_direction, new_ultrasonic_direction);
1462 }
1463 
1464 /** Clone this message.
1465  * Produces a message of the same type as this message and copies the
1466  * data to the new message.
1467  * @return clone of this message
1468  */
1469 Message *
1471 {
1473 }
1474 /** @class NaoSensorInterface::StopUltrasonicMessage <interfaces/NaoSensorInterface.h>
1475  * StopUltrasonicMessage Fawkes BlackBoard Interface Message.
1476  *
1477 
1478  */
1479 
1480 
1481 /** Constructor */
1483 {
1484  data_size = sizeof(StopUltrasonicMessage_data_t);
1485  data_ptr = malloc(data_size);
1486  memset(data_ptr, 0, data_size);
1487  data = (StopUltrasonicMessage_data_t *)data_ptr;
1489  enum_map_UltrasonicDirection[(int)USD_NONE] = "USD_NONE";
1490  enum_map_UltrasonicDirection[(int)USD_LEFT_LEFT] = "USD_LEFT_LEFT";
1491  enum_map_UltrasonicDirection[(int)USD_LEFT_RIGHT] = "USD_LEFT_RIGHT";
1492  enum_map_UltrasonicDirection[(int)USD_RIGHT_RIGHT] = "USD_RIGHT_RIGHT";
1493  enum_map_UltrasonicDirection[(int)USD_RIGHT_LEFT] = "USD_RIGHT_LEFT";
1494  enum_map_UltrasonicDirection[(int)USD_BOTH_BOTH] = "USD_BOTH_BOTH";
1495 }
1496 
1497 /** Destructor */
1499 {
1500  free(data_ptr);
1501 }
1502 
1503 /** Copy constructor.
1504  * @param m message to copy from
1505  */
1507 {
1508  data_size = m->data_size;
1509  data_ptr = malloc(data_size);
1510  memcpy(data_ptr, m->data_ptr, data_size);
1511  data = (StopUltrasonicMessage_data_t *)data_ptr;
1513 }
1514 
1515 /* Methods */
1516 /** Clone this message.
1517  * Produces a message of the same type as this message and copies the
1518  * data to the new message.
1519  * @return clone of this message
1520  */
1521 Message *
1523 {
1525 }
1526 /** Check if message is valid and can be enqueued.
1527  * @param message Message to check
1528  * @return true if the message is valid, false otherwise.
1529  */
1530 bool
1532 {
1533  const EmitUltrasonicWaveMessage *m0 = dynamic_cast<const EmitUltrasonicWaveMessage *>(message);
1534  if ( m0 != NULL ) {
1535  return true;
1536  }
1537  const StartUltrasonicMessage *m1 = dynamic_cast<const StartUltrasonicMessage *>(message);
1538  if ( m1 != NULL ) {
1539  return true;
1540  }
1541  const StopUltrasonicMessage *m2 = dynamic_cast<const StopUltrasonicMessage *>(message);
1542  if ( m2 != NULL ) {
1543  return true;
1544  }
1545  return false;
1546 }
1547 
1548 /// @cond INTERNALS
1549 EXPORT_INTERFACE(NaoSensorInterface)
1550 /// @endcond
1551 
1552 
1553 } // end namespace fawkes
fawkes::NaoSensorInterface::gyro_x
float gyro_x() const
Get gyro_x value.
Definition: NaoSensorInterface.cpp:218
fawkes::NaoSensorInterface::accel_y
float accel_y() const
Get accel_y value.
Definition: NaoSensorInterface.cpp:158
fawkes::NaoSensorInterface::StopUltrasonicMessage
StopUltrasonicMessage Fawkes BlackBoard Interface Message.
Definition: NaoSensorInterface.h:165
fawkes::NaoSensorInterface::set_angle_y
void set_angle_y(const float new_angle_y)
Set angle_y value.
Definition: NaoSensorInterface.cpp:358
fawkes::NaoSensorInterface::l_total_weight
float l_total_weight() const
Get l_total_weight value.
Definition: NaoSensorInterface.cpp:608
fawkes::NaoSensorInterface::set_l_foot_bumper_l
void set_l_foot_bumper_l(const uint8_t new_l_foot_bumper_l)
Set l_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:976
fawkes::Interface::data_ptr
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:224
fawkes::NaoSensorInterface::set_gyro_y
void set_gyro_y(const float new_gyro_y)
Set gyro_y value.
Definition: NaoSensorInterface.cpp:268
fawkes::NaoSensorInterface::set_l_foot_bumper_r
void set_l_foot_bumper_r(const uint8_t new_l_foot_bumper_r)
Set l_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1006
fawkes::NaoSensorInterface::l_fsr_rr
float l_fsr_rr() const
Get l_fsr_rr value.
Definition: NaoSensorInterface.cpp:458
fawkes::NaoSensorInterface::USD_NONE
@ USD_NONE
No transmission received, yet.
Definition: NaoSensorInterface.h:45
fawkes::IFT_UINT8
@ IFT_UINT8
8 bit unsigned integer field
Definition: types.h:39
fawkes::NaoSensorInterface::set_r_cop_y
void set_r_cop_y(const float new_r_cop_y)
Set r_cop_y value.
Definition: NaoSensorInterface.cpp:778
fawkes::NaoSensorInterface::maxlenof_accel_y
size_t maxlenof_accel_y() const
Get maximum length of accel_y value.
Definition: NaoSensorInterface.cpp:168
fawkes::NaoSensorInterface::set_ultrasonic_distance_right
void set_ultrasonic_distance_right(unsigned int index, const float new_ultrasonic_distance_right)
Set ultrasonic_distance_right value at given index.
Definition: NaoSensorInterface.cpp:913
fawkes::NaoSensorInterface::USD_RIGHT_LEFT
@ USD_RIGHT_LEFT
Right emitter and left receiver.
Definition: NaoSensorInterface.h:49
fawkes::NaoSensorInterface::StartUltrasonicMessage::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1447
fawkes::NaoSensorInterface::set_accel_y
void set_accel_y(const float new_accel_y)
Set accel_y value.
Definition: NaoSensorInterface.cpp:178
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1353
fawkes::NaoSensorInterface::r_fsr_rl
float r_fsr_rl() const
Get r_fsr_rl value.
Definition: NaoSensorInterface.cpp:548
fawkes::NaoSensorInterface::maxlenof_head_touch_front
size_t maxlenof_head_touch_front() const
Get maximum length of head_touch_front value.
Definition: NaoSensorInterface.cpp:1086
fawkes::NaoSensorInterface::l_fsr_fr
float l_fsr_fr() const
Get l_fsr_fr value.
Definition: NaoSensorInterface.cpp:398
fawkes::NaoSensorInterface::StopUltrasonicMessage::StopUltrasonicMessage
StopUltrasonicMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1482
fawkes::NaoSensorInterface::l_cop_y
float l_cop_y() const
Get l_cop_y value.
Definition: NaoSensorInterface.cpp:698
fawkes::Message
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:45
fawkes::NaoSensorInterface::StopUltrasonicMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1522
fawkes::NaoSensorInterface::UltrasonicDirection
UltrasonicDirection
This determines the chosen sender/receiver.
Definition: NaoSensorInterface.h:44
fawkes::NaoSensorInterface::maxlenof_gyro_ref
size_t maxlenof_gyro_ref() const
Get maximum length of gyro_ref value.
Definition: NaoSensorInterface.cpp:288
fawkes::NaoSensorInterface::USD_RIGHT_RIGHT
@ USD_RIGHT_RIGHT
Right emitter and right receiver.
Definition: NaoSensorInterface.h:48
fawkes::NaoSensorInterface::head_touch_front
uint8_t head_touch_front() const
Get head_touch_front value.
Definition: NaoSensorInterface.cpp:1076
fawkes::Message::data_ptr
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:128
fawkes::NaoSensorInterface::maxlenof_l_fsr_rr
size_t maxlenof_l_fsr_rr() const
Get maximum length of l_fsr_rr value.
Definition: NaoSensorInterface.cpp:468
fawkes::NaoSensorInterface
NaoSensorInterface Fawkes BlackBoard Interface.
Definition: NaoSensorInterface.h:34
fawkes::NaoSensorInterface::maxlenof_accel_z
size_t maxlenof_accel_z() const
Get maximum length of accel_z value.
Definition: NaoSensorInterface.cpp:198
fawkes::NaoSensorInterface::set_gyro_x
void set_gyro_x(const float new_gyro_x)
Set gyro_x value.
Definition: NaoSensorInterface.cpp:238
fawkes::IFT_FLOAT
@ IFT_FLOAT
float field
Definition: types.h:46
fawkes::Message::data_ts
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:138
fawkes::IFT_ENUM
@ IFT_ENUM
field with interface specific enum type
Definition: types.h:50
fawkes::NaoSensorInterface::set_r_fsr_rl
void set_r_fsr_rl(const float new_r_fsr_rl)
Set r_fsr_rl value.
Definition: NaoSensorInterface.cpp:568
fawkes::NaoSensorInterface::r_cop_x
float r_cop_x() const
Get r_cop_x value.
Definition: NaoSensorInterface.cpp:728
fawkes::NaoSensorInterface::set_r_foot_bumper_r
void set_r_foot_bumper_r(const uint8_t new_r_foot_bumper_r)
Set r_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1066
fawkes::NaoSensorInterface::set_gyro_ref
void set_gyro_ref(const float new_gyro_ref)
Set gyro_ref value.
Definition: NaoSensorInterface.cpp:298
fawkes::NaoSensorInterface::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:934
fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_l
size_t maxlenof_l_foot_bumper_l() const
Get maximum length of l_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:966
fawkes::NaoSensorInterface::head_touch_rear
uint8_t head_touch_rear() const
Get head_touch_rear value.
Definition: NaoSensorInterface.cpp:1136
fawkes::NaoSensorInterface::l_cop_x
float l_cop_x() const
Get l_cop_x value.
Definition: NaoSensorInterface.cpp:668
fawkes::NaoSensorInterface::battery_charge
float battery_charge() const
Get battery_charge value.
Definition: NaoSensorInterface.cpp:1196
fawkes::Interface::type
const char * type() const
Get type of interface.
Definition: interface.cpp:643
fawkes::Interface::add_fieldinfo
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the field info list.
Definition: interface.cpp:336
fawkes::NaoSensorInterface::set_head_touch_rear
void set_head_touch_rear(const uint8_t new_head_touch_rear)
Set head_touch_rear value.
Definition: NaoSensorInterface.cpp:1156
fawkes::NaoSensorInterface::r_total_weight
float r_total_weight() const
Get r_total_weight value.
Definition: NaoSensorInterface.cpp:638
fawkes::NaoSensorInterface::set_head_touch_middle
void set_head_touch_middle(const uint8_t new_head_touch_middle)
Set head_touch_middle value.
Definition: NaoSensorInterface.cpp:1126
fawkes::NaoSensorInterface::set_accel_x
void set_accel_x(const float new_accel_x)
Set accel_x value.
Definition: NaoSensorInterface.cpp:148
fawkes::NaoSensorInterface::maxlenof_l_fsr_fr
size_t maxlenof_l_fsr_fr() const
Get maximum length of l_fsr_fr value.
Definition: NaoSensorInterface.cpp:408
fawkes::NaoSensorInterface::StartUltrasonicMessage::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1459
fawkes::Interface::data_ts
interface_data_ts_t * data_ts
Pointer to data casted to timestamp struct.
Definition: interface.h:228
fawkes::NaoSensorInterface::l_foot_bumper_l
uint8_t l_foot_bumper_l() const
Get l_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:956
fawkes::NaoSensorInterface::set_l_fsr_fr
void set_l_fsr_fr(const float new_l_fsr_fr)
Set l_fsr_fr value.
Definition: NaoSensorInterface.cpp:418
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1341
fawkes::NaoSensorInterface::set_r_cop_x
void set_r_cop_x(const float new_r_cop_x)
Set r_cop_x value.
Definition: NaoSensorInterface.cpp:748
fawkes::NaoSensorInterface::r_foot_bumper_l
uint8_t r_foot_bumper_l() const
Get r_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:1016
fawkes::NaoSensorInterface::maxlenof_l_total_weight
size_t maxlenof_l_total_weight() const
Get maximum length of l_total_weight value.
Definition: NaoSensorInterface.cpp:618
fawkes::Message::message_data_ts_t
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:134
fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_r
size_t maxlenof_r_foot_bumper_r() const
Get maximum length of r_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1056
fawkes::NaoSensorInterface::maxlenof_l_cop_y
size_t maxlenof_l_cop_y() const
Get maximum length of l_cop_y value.
Definition: NaoSensorInterface.cpp:708
fawkes::NaoSensorInterface::StopUltrasonicMessage::~StopUltrasonicMessage
~StopUltrasonicMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1498
fawkes::NaoSensorInterface::maxlenof_accel_x
size_t maxlenof_accel_x() const
Get maximum length of accel_x value.
Definition: NaoSensorInterface.cpp:138
fawkes::NaoSensorInterface::set_r_fsr_rr
void set_r_fsr_rr(const float new_r_fsr_rr)
Set r_fsr_rr value.
Definition: NaoSensorInterface.cpp:598
fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_right
size_t maxlenof_ultrasonic_distance_right() const
Get maximum length of ultrasonic_distance_right value.
Definition: NaoSensorInterface.cpp:886
fawkes::TypeMismatchException
Type mismatch.
Definition: software.h:44
fawkes::Interface::data_changed
bool data_changed
Indicator if data has changed.
Definition: interface.h:226
fawkes::NaoSensorInterface::maxlenof_battery_charge
size_t maxlenof_battery_charge() const
Get maximum length of battery_charge value.
Definition: NaoSensorInterface.cpp:1206
fawkes::NaoSensorInterface::enum_tostring
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
Definition: NaoSensorInterface.cpp:1253
fawkes::NaoSensorInterface::maxlenof_r_cop_x
size_t maxlenof_r_cop_x() const
Get maximum length of r_cop_x value.
Definition: NaoSensorInterface.cpp:738
fawkes::UnknownTypeException
Unknown type.
Definition: software.h:50
fawkes::NaoSensorInterface::set_l_fsr_fl
void set_l_fsr_fl(const float new_l_fsr_fl)
Set l_fsr_fl value.
Definition: NaoSensorInterface.cpp:388
fawkes::NaoSensorInterface::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:946
fawkes::NaoSensorInterface::maxlenof_angle_x
size_t maxlenof_angle_x() const
Get maximum length of angle_x value.
Definition: NaoSensorInterface.cpp:318
fawkes::NaoSensorInterface::maxlenof_r_fsr_rl
size_t maxlenof_r_fsr_rl() const
Get maximum length of r_fsr_rl value.
Definition: NaoSensorInterface.cpp:558
fawkes
Fawkes library namespace.
fawkes::Interface::set_hash
void set_hash(unsigned char *ihash)
Set hash.
Definition: interface.cpp:316
fawkes::NaoSensorInterface::maxlenof_r_fsr_fr
size_t maxlenof_r_fsr_fr() const
Get maximum length of r_fsr_fr value.
Definition: NaoSensorInterface.cpp:528
fawkes::Message::data_size
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:129
fawkes::NaoSensorInterface::set_ultrasonic_distance_left
void set_ultrasonic_distance_left(unsigned int index, const float new_ultrasonic_distance_left)
Set ultrasonic_distance_left value at given index.
Definition: NaoSensorInterface.cpp:846
fawkes::NaoSensorInterface::set_chest_button
void set_chest_button(const uint8_t new_chest_button)
Set chest_button value.
Definition: NaoSensorInterface.cpp:1186
fawkes::NaoSensorInterface::r_fsr_rr
float r_fsr_rr() const
Get r_fsr_rr value.
Definition: NaoSensorInterface.cpp:578
fawkes::NaoSensorInterface::l_fsr_fl
float l_fsr_fl() const
Get l_fsr_fl value.
Definition: NaoSensorInterface.cpp:368
fawkes::NaoSensorInterface::r_fsr_fr
float r_fsr_fr() const
Get r_fsr_fr value.
Definition: NaoSensorInterface.cpp:518
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::~EmitUltrasonicWaveMessage
~EmitUltrasonicWaveMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1306
fawkes::NaoSensorInterface::tostring_UltrasonicDirection
const char * tostring_UltrasonicDirection(UltrasonicDirection value) const
Convert UltrasonicDirection constant to string.
Definition: NaoSensorInterface.cpp:110
fawkes::NaoSensorInterface::set_angle_x
void set_angle_x(const float new_angle_x)
Set angle_x value.
Definition: NaoSensorInterface.cpp:328
fawkes::NaoSensorInterface::USD_BOTH_BOTH
@ USD_BOTH_BOTH
Both emitters and both receivers.
Definition: NaoSensorInterface.h:50
fawkes::Interface
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
fawkes::NaoSensorInterface::maxlenof_l_fsr_fl
size_t maxlenof_l_fsr_fl() const
Get maximum length of l_fsr_fl value.
Definition: NaoSensorInterface.cpp:378
fawkes::NaoSensorInterface::r_foot_bumper_r
uint8_t r_foot_bumper_r() const
Get r_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1046
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::EmitUltrasonicWaveMessage
EmitUltrasonicWaveMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1289
fawkes::NaoSensorInterface::maxlenof_gyro_y
size_t maxlenof_gyro_y() const
Get maximum length of gyro_y value.
Definition: NaoSensorInterface.cpp:258
fawkes::NaoSensorInterface::message_valid
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Definition: NaoSensorInterface.cpp:1531
fawkes::NaoSensorInterface::set_l_total_weight
void set_l_total_weight(const float new_l_total_weight)
Set l_total_weight value.
Definition: NaoSensorInterface.cpp:628
fawkes::NaoSensorInterface::set_l_cop_y
void set_l_cop_y(const float new_l_cop_y)
Set l_cop_y value.
Definition: NaoSensorInterface.cpp:718
fawkes::NaoSensorInterface::maxlenof_r_cop_y
size_t maxlenof_r_cop_y() const
Get maximum length of r_cop_y value.
Definition: NaoSensorInterface.cpp:768
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1364
fawkes::NaoSensorInterface::set_accel_z
void set_accel_z(const float new_accel_z)
Set accel_z value.
Definition: NaoSensorInterface.cpp:208
fawkes::NaoSensorInterface::USD_LEFT_LEFT
@ USD_LEFT_LEFT
Left emitter and left receiver.
Definition: NaoSensorInterface.h:46
fawkes::NaoSensorInterface::gyro_ref
float gyro_ref() const
Get gyro_ref value.
Definition: NaoSensorInterface.cpp:278
fawkes::NaoSensorInterface::head_touch_middle
uint8_t head_touch_middle() const
Get head_touch_middle value.
Definition: NaoSensorInterface.cpp:1106
fawkes::NaoSensorInterface::accel_x
float accel_x() const
Get accel_x value.
Definition: NaoSensorInterface.cpp:128
fawkes::NaoSensorInterface::set_l_fsr_rr
void set_l_fsr_rr(const float new_l_fsr_rr)
Set l_fsr_rr value.
Definition: NaoSensorInterface.cpp:478
fawkes::NaoSensorInterface::maxlenof_r_total_weight
size_t maxlenof_r_total_weight() const
Get maximum length of r_total_weight value.
Definition: NaoSensorInterface.cpp:648
fawkes::NaoSensorInterface::create_message
virtual Message * create_message(const char *type) const
Create message based on type name.
Definition: NaoSensorInterface.cpp:1223
fawkes::NaoSensorInterface::maxlenof_angle_y
size_t maxlenof_angle_y() const
Get maximum length of angle_y value.
Definition: NaoSensorInterface.cpp:348
fawkes::NaoSensorInterface::r_fsr_fl
float r_fsr_fl() const
Get r_fsr_fl value.
Definition: NaoSensorInterface.cpp:488
fawkes::Message::add_fieldinfo
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
Definition: message.cpp:400
fawkes::NaoSensorInterface::maxlenof_r_fsr_fl
size_t maxlenof_r_fsr_fl() const
Get maximum length of r_fsr_fl value.
Definition: NaoSensorInterface.cpp:498
fawkes::NaoSensorInterface::l_foot_bumper_r
uint8_t l_foot_bumper_r() const
Get l_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:986
fawkes::Interface::data_size
unsigned int data_size
Minimal data size to hold data storage.
Definition: interface.h:225
fawkes::NaoSensorInterface::set_r_fsr_fr
void set_r_fsr_fr(const float new_r_fsr_fr)
Set r_fsr_fr value.
Definition: NaoSensorInterface.cpp:538
fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_left
size_t maxlenof_ultrasonic_distance_left() const
Get maximum length of ultrasonic_distance_left value.
Definition: NaoSensorInterface.cpp:819
fawkes::NaoSensorInterface::StartUltrasonicMessage::~StartUltrasonicMessage
~StartUltrasonicMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1412
fawkes::NaoSensorInterface::set_head_touch_front
void set_head_touch_front(const uint8_t new_head_touch_front)
Set head_touch_front value.
Definition: NaoSensorInterface.cpp:1096
fawkes::NaoSensorInterface::set_l_fsr_rl
void set_l_fsr_rl(const float new_l_fsr_rl)
Set l_fsr_rl value.
Definition: NaoSensorInterface.cpp:448
fawkes::NaoSensorInterface::set_battery_charge
void set_battery_charge(const float new_battery_charge)
Set battery_charge value.
Definition: NaoSensorInterface.cpp:1216
fawkes::NaoSensorInterface::ultrasonic_distance_right
float * ultrasonic_distance_right() const
Get ultrasonic_distance_right value.
Definition: NaoSensorInterface.cpp:858
fawkes::NaoSensorInterface::maxlenof_gyro_x
size_t maxlenof_gyro_x() const
Get maximum length of gyro_x value.
Definition: NaoSensorInterface.cpp:228
fawkes::NaoSensorInterface::maxlenof_head_touch_middle
size_t maxlenof_head_touch_middle() const
Get maximum length of head_touch_middle value.
Definition: NaoSensorInterface.cpp:1116
fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_r
size_t maxlenof_l_foot_bumper_r() const
Get maximum length of l_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:996
fawkes::NaoSensorInterface::maxlenof_l_cop_x
size_t maxlenof_l_cop_x() const
Get maximum length of l_cop_x value.
Definition: NaoSensorInterface.cpp:678
fawkes::NaoSensorInterface::set_l_cop_x
void set_l_cop_x(const float new_l_cop_x)
Set l_cop_x value.
Definition: NaoSensorInterface.cpp:688
fawkes::NaoSensorInterface::StartUltrasonicMessage::StartUltrasonicMessage
StartUltrasonicMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1395
fawkes::NaoSensorInterface::maxlenof_l_fsr_rl
size_t maxlenof_l_fsr_rl() const
Get maximum length of l_fsr_rl value.
Definition: NaoSensorInterface.cpp:438
fawkes::NaoSensorInterface::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:924
fawkes::NaoSensorInterface::StartUltrasonicMessage
StartUltrasonicMessage Fawkes BlackBoard Interface Message.
Definition: NaoSensorInterface.h:137
fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_l
size_t maxlenof_r_foot_bumper_l() const
Get maximum length of r_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:1026
fawkes::NaoSensorInterface::l_fsr_rl
float l_fsr_rl() const
Get l_fsr_rl value.
Definition: NaoSensorInterface.cpp:428
fawkes::Interface::add_messageinfo
void add_messageinfo(const char *name)
Add an entry to the message info list.
Definition: interface.cpp:375
fawkes::NaoSensorInterface::set_r_total_weight
void set_r_total_weight(const float new_r_total_weight)
Set r_total_weight value.
Definition: NaoSensorInterface.cpp:658
fawkes::NaoSensorInterface::maxlenof_r_fsr_rr
size_t maxlenof_r_fsr_rr() const
Get maximum length of r_fsr_rr value.
Definition: NaoSensorInterface.cpp:588
fawkes::NaoSensorInterface::chest_button
uint8_t chest_button() const
Get chest_button value.
Definition: NaoSensorInterface.cpp:1166
fawkes::NaoSensorInterface::copy_values
virtual void copy_values(const Interface *other)
Copy values from other interface.
Definition: NaoSensorInterface.cpp:1242
fawkes::NaoSensorInterface::accel_z
float accel_z() const
Get accel_z value.
Definition: NaoSensorInterface.cpp:188
fawkes::NaoSensorInterface::USD_LEFT_RIGHT
@ USD_LEFT_RIGHT
Left emitter and right receiver.
Definition: NaoSensorInterface.h:47
fawkes::NaoSensorInterface::gyro_y
float gyro_y() const
Get gyro_y value.
Definition: NaoSensorInterface.cpp:248
fawkes::change_field
bool change_field(FieldT &field, const DataT &value)
Set a field and return whether it changed.
Definition: message.h:167
fawkes::NaoSensorInterface::StartUltrasonicMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1470
fawkes::NaoSensorInterface::set_r_foot_bumper_l
void set_r_foot_bumper_l(const uint8_t new_r_foot_bumper_l)
Set r_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:1036
fawkes::NaoSensorInterface::StartUltrasonicMessage::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1437
fawkes::NaoSensorInterface::angle_x
float angle_x() const
Get angle_x value.
Definition: NaoSensorInterface.cpp:308
fawkes::NaoSensorInterface::angle_y
float angle_y() const
Get angle_y value.
Definition: NaoSensorInterface.cpp:338
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage
EmitUltrasonicWaveMessage Fawkes BlackBoard Interface Message.
Definition: NaoSensorInterface.h:109
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1331
fawkes::NaoSensorInterface::set_r_fsr_fl
void set_r_fsr_fl(const float new_r_fsr_fl)
Set r_fsr_fl value.
Definition: NaoSensorInterface.cpp:508
fawkes::NaoSensorInterface::r_cop_y
float r_cop_y() const
Get r_cop_y value.
Definition: NaoSensorInterface.cpp:758
fawkes::NaoSensorInterface::maxlenof_chest_button
size_t maxlenof_chest_button() const
Get maximum length of chest_button value.
Definition: NaoSensorInterface.cpp:1176
fawkes::NaoSensorInterface::ultrasonic_distance_left
float * ultrasonic_distance_left() const
Get ultrasonic_distance_left value.
Definition: NaoSensorInterface.cpp:791
fawkes::NaoSensorInterface::maxlenof_head_touch_rear
size_t maxlenof_head_touch_rear() const
Get maximum length of head_touch_rear value.
Definition: NaoSensorInterface.cpp:1146
fawkes::Exception
Base class for exceptions in Fawkes.
Definition: exception.h:36