Fawkes API  Fawkes Development Version
NaoSensorInterface.h
1 
2 /***************************************************************************
3  * NaoSensorInterface.h - 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 #ifndef _INTERFACES_NAOSENSORINTERFACE_H_
25 #define _INTERFACES_NAOSENSORINTERFACE_H_
26 
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
30 
31 namespace fawkes {
32 
33 class NaoSensorInterface : public Interface
34 {
35  /// @cond INTERNALS
36  INTERFACE_MGMT_FRIENDS(NaoSensorInterface)
37  /// @endcond
38  public:
39  /* constants */
40 
41  /**
42  This determines the chosen sender/receiver.
43  */
44  typedef enum {
45  USD_NONE /**< No transmission received, yet. */,
46  USD_LEFT_LEFT /**< Left emitter and left receiver. */,
47  USD_LEFT_RIGHT /**< Left emitter and right receiver. */,
48  USD_RIGHT_RIGHT /**< Right emitter and right receiver. */,
49  USD_RIGHT_LEFT /**< Right emitter and left receiver. */,
50  USD_BOTH_BOTH /**< Both emitters and both receivers. */
52  const char * tostring_UltrasonicDirection(UltrasonicDirection value) const;
53 
54  private:
55  /** Internal data storage, do NOT modify! */
56  typedef struct {
57  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
58  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
59  float accel_x; /**< Accelerometer x */
60  float accel_y; /**< Accelerometer y */
61  float accel_z; /**< Accelerometer z */
62  float gyro_x; /**< Gyrometer x */
63  float gyro_y; /**< Gyrometer y */
64  float gyro_ref; /**< Gyrometer reference */
65  float angle_x; /**< Angle x */
66  float angle_y; /**< Angle y */
67  float l_fsr_fl; /**< Left FSR front left */
68  float l_fsr_fr; /**< Left FSR front right */
69  float l_fsr_rl; /**< Left FSR rear left */
70  float l_fsr_rr; /**< Left FSR rear right */
71  float r_fsr_fl; /**< Right FSR front left */
72  float r_fsr_fr; /**< Right FSR front right */
73  float r_fsr_rl; /**< Right FSR rear left */
74  float r_fsr_rr; /**< Right FSR rear right */
75  float l_total_weight; /**< Total weight on left foot */
76  float r_total_weight; /**< Total weight on right foot */
77  float l_cop_x; /**< Center of pressure X for left foot. */
78  float l_cop_y; /**< Center of pressure Y for left foot. */
79  float r_cop_x; /**< Center of pressure X for right foot. */
80  float r_cop_y; /**< Center of pressure Y for right foot. */
81  float ultrasonic_distance_left[4]; /**<
82  First four ultrasonic sensor readings from left receiver. Distance
83  to detected object is in meters.
84  */
85  float ultrasonic_distance_right[4]; /**<
86  First four ultrasonic sensor readings from right receiver. Distance
87  to detected object is in meters.
88  */
89  int32_t ultrasonic_direction; /**<
90  Direction that was used to gather the ultrasonic readings.
91  */
92  uint8_t l_foot_bumper_l; /**< Left foot bumper left side */
93  uint8_t l_foot_bumper_r; /**< Left foot bumper right side */
94  uint8_t r_foot_bumper_l; /**< Right foot bumper left side */
95  uint8_t r_foot_bumper_r; /**< Right foot bumper right side */
96  uint8_t head_touch_front; /**< Front part of head touch sensor (only Academics robot) */
97  uint8_t head_touch_middle; /**< Middle part of head touch sensor (only Academics robot) */
98  uint8_t head_touch_rear; /**< Rear part of head touch sensor (only Academics robot) */
99  uint8_t chest_button; /**< Chest button state */
100  float battery_charge; /**< Battery charge */
101  } NaoSensorInterface_data_t;
102 
103  NaoSensorInterface_data_t *data;
104 
105  interface_enum_map_t enum_map_UltrasonicDirection;
106  public:
107  /* messages */
108  class EmitUltrasonicWaveMessage : public Message
109  {
110  private:
111  /** Internal data storage, do NOT modify! */
112  typedef struct {
113  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
114  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
115  int32_t ultrasonic_direction; /**<
116  Direction that was used to gather the ultrasonic readings.
117  */
118  } EmitUltrasonicWaveMessage_data_t;
119 
120  EmitUltrasonicWaveMessage_data_t *data;
121 
122  interface_enum_map_t enum_map_UltrasonicDirection;
123  public:
124  EmitUltrasonicWaveMessage(const UltrasonicDirection ini_ultrasonic_direction);
127 
129  /* Methods */
131  void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction);
132  size_t maxlenof_ultrasonic_direction() const;
133  virtual Message * clone() const;
134  };
135 
136  class StartUltrasonicMessage : public Message
137  {
138  private:
139  /** Internal data storage, do NOT modify! */
140  typedef struct {
141  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
142  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
143  int32_t ultrasonic_direction; /**<
144  Direction that was used to gather the ultrasonic readings.
145  */
146  } StartUltrasonicMessage_data_t;
147 
148  StartUltrasonicMessage_data_t *data;
149 
150  interface_enum_map_t enum_map_UltrasonicDirection;
151  public:
152  StartUltrasonicMessage(const UltrasonicDirection ini_ultrasonic_direction);
155 
157  /* Methods */
159  void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction);
160  size_t maxlenof_ultrasonic_direction() const;
161  virtual Message * clone() const;
162  };
163 
164  class StopUltrasonicMessage : public Message
165  {
166  private:
167  /** Internal data storage, do NOT modify! */
168  typedef struct {
169  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
170  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
171  } StopUltrasonicMessage_data_t;
172 
173  StopUltrasonicMessage_data_t *data;
174 
175  interface_enum_map_t enum_map_UltrasonicDirection;
176  public:
179 
180  explicit StopUltrasonicMessage(const StopUltrasonicMessage *m);
181  /* Methods */
182  virtual Message * clone() const;
183  };
184 
185  virtual bool message_valid(const Message *message) const;
186  private:
189 
190  public:
191  /* Methods */
192  float accel_x() const;
193  void set_accel_x(const float new_accel_x);
194  size_t maxlenof_accel_x() const;
195  float accel_y() const;
196  void set_accel_y(const float new_accel_y);
197  size_t maxlenof_accel_y() const;
198  float accel_z() const;
199  void set_accel_z(const float new_accel_z);
200  size_t maxlenof_accel_z() const;
201  float gyro_x() const;
202  void set_gyro_x(const float new_gyro_x);
203  size_t maxlenof_gyro_x() const;
204  float gyro_y() const;
205  void set_gyro_y(const float new_gyro_y);
206  size_t maxlenof_gyro_y() const;
207  float gyro_ref() const;
208  void set_gyro_ref(const float new_gyro_ref);
209  size_t maxlenof_gyro_ref() const;
210  float angle_x() const;
211  void set_angle_x(const float new_angle_x);
212  size_t maxlenof_angle_x() const;
213  float angle_y() const;
214  void set_angle_y(const float new_angle_y);
215  size_t maxlenof_angle_y() const;
216  float l_fsr_fl() const;
217  void set_l_fsr_fl(const float new_l_fsr_fl);
218  size_t maxlenof_l_fsr_fl() const;
219  float l_fsr_fr() const;
220  void set_l_fsr_fr(const float new_l_fsr_fr);
221  size_t maxlenof_l_fsr_fr() const;
222  float l_fsr_rl() const;
223  void set_l_fsr_rl(const float new_l_fsr_rl);
224  size_t maxlenof_l_fsr_rl() const;
225  float l_fsr_rr() const;
226  void set_l_fsr_rr(const float new_l_fsr_rr);
227  size_t maxlenof_l_fsr_rr() const;
228  float r_fsr_fl() const;
229  void set_r_fsr_fl(const float new_r_fsr_fl);
230  size_t maxlenof_r_fsr_fl() const;
231  float r_fsr_fr() const;
232  void set_r_fsr_fr(const float new_r_fsr_fr);
233  size_t maxlenof_r_fsr_fr() const;
234  float r_fsr_rl() const;
235  void set_r_fsr_rl(const float new_r_fsr_rl);
236  size_t maxlenof_r_fsr_rl() const;
237  float r_fsr_rr() const;
238  void set_r_fsr_rr(const float new_r_fsr_rr);
239  size_t maxlenof_r_fsr_rr() const;
240  float l_total_weight() const;
241  void set_l_total_weight(const float new_l_total_weight);
242  size_t maxlenof_l_total_weight() const;
243  float r_total_weight() const;
244  void set_r_total_weight(const float new_r_total_weight);
245  size_t maxlenof_r_total_weight() const;
246  float l_cop_x() const;
247  void set_l_cop_x(const float new_l_cop_x);
248  size_t maxlenof_l_cop_x() const;
249  float l_cop_y() const;
250  void set_l_cop_y(const float new_l_cop_y);
251  size_t maxlenof_l_cop_y() const;
252  float r_cop_x() const;
253  void set_r_cop_x(const float new_r_cop_x);
254  size_t maxlenof_r_cop_x() const;
255  float r_cop_y() const;
256  void set_r_cop_y(const float new_r_cop_y);
257  size_t maxlenof_r_cop_y() const;
258  float * ultrasonic_distance_left() const;
259  float ultrasonic_distance_left(unsigned int index) const;
260  void set_ultrasonic_distance_left(unsigned int index, const float new_ultrasonic_distance_left);
261  void set_ultrasonic_distance_left(const float * new_ultrasonic_distance_left);
262  size_t maxlenof_ultrasonic_distance_left() const;
263  float * ultrasonic_distance_right() const;
264  float ultrasonic_distance_right(unsigned int index) const;
265  void set_ultrasonic_distance_right(unsigned int index, const float new_ultrasonic_distance_right);
266  void set_ultrasonic_distance_right(const float * new_ultrasonic_distance_right);
267  size_t maxlenof_ultrasonic_distance_right() const;
269  void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction);
270  size_t maxlenof_ultrasonic_direction() const;
271  uint8_t l_foot_bumper_l() const;
272  void set_l_foot_bumper_l(const uint8_t new_l_foot_bumper_l);
273  size_t maxlenof_l_foot_bumper_l() const;
274  uint8_t l_foot_bumper_r() const;
275  void set_l_foot_bumper_r(const uint8_t new_l_foot_bumper_r);
276  size_t maxlenof_l_foot_bumper_r() const;
277  uint8_t r_foot_bumper_l() const;
278  void set_r_foot_bumper_l(const uint8_t new_r_foot_bumper_l);
279  size_t maxlenof_r_foot_bumper_l() const;
280  uint8_t r_foot_bumper_r() const;
281  void set_r_foot_bumper_r(const uint8_t new_r_foot_bumper_r);
282  size_t maxlenof_r_foot_bumper_r() const;
283  uint8_t head_touch_front() const;
284  void set_head_touch_front(const uint8_t new_head_touch_front);
285  size_t maxlenof_head_touch_front() const;
286  uint8_t head_touch_middle() const;
287  void set_head_touch_middle(const uint8_t new_head_touch_middle);
288  size_t maxlenof_head_touch_middle() const;
289  uint8_t head_touch_rear() const;
290  void set_head_touch_rear(const uint8_t new_head_touch_rear);
291  size_t maxlenof_head_touch_rear() const;
292  uint8_t chest_button() const;
293  void set_chest_button(const uint8_t new_chest_button);
294  size_t maxlenof_chest_button() const;
295  float battery_charge() const;
296  void set_battery_charge(const float new_battery_charge);
297  size_t maxlenof_battery_charge() const;
298  virtual Message * create_message(const char *type) const;
299 
300  virtual void copy_values(const Interface *other);
301  virtual const char * enum_tostring(const char *enumtype, int val) const;
302 
303 };
304 
305 } // end namespace fawkes
306 
307 #endif
fawkes::NaoSensorInterface::gyro_x
float gyro_x() const
Get gyro_x value.
Definition: NaoSensorInterface.cpp:227
fawkes::NaoSensorInterface::accel_y
float accel_y() const
Get accel_y value.
Definition: NaoSensorInterface.cpp:165
fawkes::NaoSensorInterface::StopUltrasonicMessage
Definition: NaoSensorInterface.h:176
fawkes::NaoSensorInterface::set_angle_y
void set_angle_y(const float new_angle_y)
Set angle_y value.
Definition: NaoSensorInterface.cpp:371
fawkes::NaoSensorInterface::l_total_weight
float l_total_weight() const
Get l_total_weight value.
Definition: NaoSensorInterface.cpp:630
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:1015
fawkes::NaoSensorInterface::set_gyro_y
void set_gyro_y(const float new_gyro_y)
Set gyro_y value.
Definition: NaoSensorInterface.cpp:278
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:1046
fawkes::NaoSensorInterface::l_fsr_rr
float l_fsr_rr() const
Get l_fsr_rr value.
Definition: NaoSensorInterface.cpp:475
fawkes::NaoSensorInterface::USD_NONE
@ USD_NONE
No transmission received, yet.
Definition: NaoSensorInterface.h:63
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:805
fawkes::NaoSensorInterface::maxlenof_accel_y
size_t maxlenof_accel_y() const
Get maximum length of accel_y value.
Definition: NaoSensorInterface.cpp:175
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:947
fawkes::NaoSensorInterface::USD_RIGHT_LEFT
@ USD_RIGHT_LEFT
Right emitter and left receiver.
Definition: NaoSensorInterface.h:67
fawkes::NaoSensorInterface::StartUltrasonicMessage::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1495
fawkes::NaoSensorInterface::set_accel_y
void set_accel_y(const float new_accel_y)
Set accel_y value.
Definition: NaoSensorInterface.cpp:185
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1401
fawkes::NaoSensorInterface::r_fsr_rl
float r_fsr_rl() const
Get r_fsr_rl value.
Definition: NaoSensorInterface.cpp:568
fawkes::NaoSensorInterface::maxlenof_head_touch_front
size_t maxlenof_head_touch_front() const
Get maximum length of head_touch_front value.
Definition: NaoSensorInterface.cpp:1129
fawkes::NaoSensorInterface::l_fsr_fr
float l_fsr_fr() const
Get l_fsr_fr value.
Definition: NaoSensorInterface.cpp:413
fawkes::NaoSensorInterface::StopUltrasonicMessage::StopUltrasonicMessage
StopUltrasonicMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1530
fawkes::NaoSensorInterface::l_cop_y
float l_cop_y() const
Get l_cop_y value.
Definition: NaoSensorInterface.cpp:723
fawkes::Message
Definition: message.h:41
fawkes::NaoSensorInterface::StopUltrasonicMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1570
fawkes::NaoSensorInterface::UltrasonicDirection
UltrasonicDirection
This determines the chosen sender/receiver.
Definition: NaoSensorInterface.h:56
fawkes::NaoSensorInterface::maxlenof_gyro_ref
size_t maxlenof_gyro_ref() const
Get maximum length of gyro_ref value.
Definition: NaoSensorInterface.cpp:299
fawkes::NaoSensorInterface::USD_RIGHT_RIGHT
@ USD_RIGHT_RIGHT
Right emitter and right receiver.
Definition: NaoSensorInterface.h:66
fawkes::NaoSensorInterface::head_touch_front
uint8_t head_touch_front() const
Get head_touch_front value.
Definition: NaoSensorInterface.cpp:1119
fawkes::NaoSensorInterface::maxlenof_l_fsr_rr
size_t maxlenof_l_fsr_rr() const
Get maximum length of l_fsr_rr value.
Definition: NaoSensorInterface.cpp:485
fawkes::NaoSensorInterface
Definition: NaoSensorInterface.h:39
fawkes::NaoSensorInterface::maxlenof_accel_z
size_t maxlenof_accel_z() const
Get maximum length of accel_z value.
Definition: NaoSensorInterface.cpp:206
fawkes::NaoSensorInterface::set_gyro_x
void set_gyro_x(const float new_gyro_x)
Set gyro_x value.
Definition: NaoSensorInterface.cpp:247
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:588
fawkes::NaoSensorInterface::r_cop_x
float r_cop_x() const
Get r_cop_x value.
Definition: NaoSensorInterface.cpp:754
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:1108
fawkes::NaoSensorInterface::set_gyro_ref
void set_gyro_ref(const float new_gyro_ref)
Set gyro_ref value.
Definition: NaoSensorInterface.cpp:309
fawkes::NaoSensorInterface::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:972
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:1005
fawkes::NaoSensorInterface::head_touch_rear
uint8_t head_touch_rear() const
Get head_touch_rear value.
Definition: NaoSensorInterface.cpp:1181
fawkes::NaoSensorInterface::l_cop_x
float l_cop_x() const
Get l_cop_x value.
Definition: NaoSensorInterface.cpp:692
fawkes::NaoSensorInterface::battery_charge
float battery_charge() const
Get battery_charge value.
Definition: NaoSensorInterface.cpp:1243
fawkes::Interface::type
const char * type() const
Get type of interface.
Definition: interface.cpp:645
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:1201
fawkes::NaoSensorInterface::r_total_weight
float r_total_weight() const
Get r_total_weight value.
Definition: NaoSensorInterface.cpp:661
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:1170
fawkes::NaoSensorInterface::set_accel_x
void set_accel_x(const float new_accel_x)
Set accel_x value.
Definition: NaoSensorInterface.cpp:154
fawkes::NaoSensorInterface::maxlenof_l_fsr_fr
size_t maxlenof_l_fsr_fr() const
Get maximum length of l_fsr_fr value.
Definition: NaoSensorInterface.cpp:423
fawkes::NaoSensorInterface::StartUltrasonicMessage::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1507
fawkes::NaoSensorInterface::l_foot_bumper_l
uint8_t l_foot_bumper_l() const
Get l_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:995
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:433
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::maxlenof_ultrasonic_direction
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1389
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:774
fawkes::NaoSensorInterface::r_foot_bumper_l
uint8_t r_foot_bumper_l() const
Get r_foot_bumper_l value.
Definition: NaoSensorInterface.cpp:1057
fawkes::NaoSensorInterface::maxlenof_l_total_weight
size_t maxlenof_l_total_weight() const
Get maximum length of l_total_weight value.
Definition: NaoSensorInterface.cpp:640
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:1098
fawkes::NaoSensorInterface::maxlenof_l_cop_y
size_t maxlenof_l_cop_y() const
Get maximum length of l_cop_y value.
Definition: NaoSensorInterface.cpp:733
fawkes::NaoSensorInterface::StopUltrasonicMessage::~StopUltrasonicMessage
~StopUltrasonicMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1546
fawkes::NaoSensorInterface::maxlenof_accel_x
size_t maxlenof_accel_x() const
Get maximum length of accel_x value.
Definition: NaoSensorInterface.cpp:144
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:619
fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_right
size_t maxlenof_ultrasonic_distance_right() const
Get maximum length of ultrasonic_distance_right value.
Definition: NaoSensorInterface.cpp:919
fawkes::NaoSensorInterface::maxlenof_battery_charge
size_t maxlenof_battery_charge() const
Get maximum length of battery_charge value.
Definition: NaoSensorInterface.cpp:1253
fawkes::NaoSensorInterface::enum_tostring
virtual const char * enum_tostring(const char *enumtype, int val) const
Definition: NaoSensorInterface.cpp:1301
fawkes::NaoSensorInterface::maxlenof_r_cop_x
size_t maxlenof_r_cop_x() const
Get maximum length of r_cop_x value.
Definition: NaoSensorInterface.cpp:764
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:402
fawkes::NaoSensorInterface::set_ultrasonic_direction
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:984
fawkes::NaoSensorInterface::maxlenof_angle_x
size_t maxlenof_angle_x() const
Get maximum length of angle_x value.
Definition: NaoSensorInterface.cpp:330
fawkes::NaoSensorInterface::maxlenof_r_fsr_rl
size_t maxlenof_r_fsr_rl() const
Get maximum length of r_fsr_rl value.
Definition: NaoSensorInterface.cpp:578
fawkes
fawkes::NaoSensorInterface::maxlenof_r_fsr_fr
size_t maxlenof_r_fsr_fr() const
Get maximum length of r_fsr_fr value.
Definition: NaoSensorInterface.cpp:547
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:875
fawkes::NaoSensorInterface::set_chest_button
void set_chest_button(const uint8_t new_chest_button)
Set chest_button value.
Definition: NaoSensorInterface.cpp:1232
fawkes::NaoSensorInterface::r_fsr_rr
float r_fsr_rr() const
Get r_fsr_rr value.
Definition: NaoSensorInterface.cpp:599
fawkes::NaoSensorInterface::l_fsr_fl
float l_fsr_fl() const
Get l_fsr_fl value.
Definition: NaoSensorInterface.cpp:382
fawkes::NaoSensorInterface::r_fsr_fr
float r_fsr_fr() const
Get r_fsr_fr value.
Definition: NaoSensorInterface.cpp:537
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::~EmitUltrasonicWaveMessage
~EmitUltrasonicWaveMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1354
fawkes::NaoSensorInterface::tostring_UltrasonicDirection
const char * tostring_UltrasonicDirection(UltrasonicDirection value) const
Convert UltrasonicDirection constant to string.
Definition: NaoSensorInterface.cpp:116
fawkes::NaoSensorInterface::set_angle_x
void set_angle_x(const float new_angle_x)
Set angle_x value.
Definition: NaoSensorInterface.cpp:340
fawkes::NaoSensorInterface::USD_BOTH_BOTH
@ USD_BOTH_BOTH
Both emitters and both receivers.
Definition: NaoSensorInterface.h:68
fawkes::Interface
Definition: interface.h:78
fawkes::NaoSensorInterface::maxlenof_l_fsr_fl
size_t maxlenof_l_fsr_fl() const
Get maximum length of l_fsr_fl value.
Definition: NaoSensorInterface.cpp:392
fawkes::NaoSensorInterface::r_foot_bumper_r
uint8_t r_foot_bumper_r() const
Get r_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1088
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::EmitUltrasonicWaveMessage
EmitUltrasonicWaveMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1337
fawkes::NaoSensorInterface::maxlenof_gyro_y
size_t maxlenof_gyro_y() const
Get maximum length of gyro_y value.
Definition: NaoSensorInterface.cpp:268
fawkes::NaoSensorInterface::message_valid
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Definition: NaoSensorInterface.cpp:1579
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:650
fawkes::interface_enum_map_t
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
Definition: types.h:61
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:743
fawkes::NaoSensorInterface::maxlenof_r_cop_y
size_t maxlenof_r_cop_y() const
Get maximum length of r_cop_y value.
Definition: NaoSensorInterface.cpp:795
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1412
fawkes::NaoSensorInterface::set_accel_z
void set_accel_z(const float new_accel_z)
Set accel_z value.
Definition: NaoSensorInterface.cpp:216
fawkes::NaoSensorInterface::USD_LEFT_LEFT
@ USD_LEFT_LEFT
Left emitter and left receiver.
Definition: NaoSensorInterface.h:64
fawkes::NaoSensorInterface::gyro_ref
float gyro_ref() const
Get gyro_ref value.
Definition: NaoSensorInterface.cpp:289
fawkes::NaoSensorInterface::head_touch_middle
uint8_t head_touch_middle() const
Get head_touch_middle value.
Definition: NaoSensorInterface.cpp:1150
fawkes::NaoSensorInterface::accel_x
float accel_x() const
Get accel_x value.
Definition: NaoSensorInterface.cpp:134
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:495
fawkes::NaoSensorInterface::maxlenof_r_total_weight
size_t maxlenof_r_total_weight() const
Get maximum length of r_total_weight value.
Definition: NaoSensorInterface.cpp:671
fawkes::NaoSensorInterface::create_message
virtual Message * create_message(const char *type) const
Definition: NaoSensorInterface.cpp:1271
fawkes::NaoSensorInterface::maxlenof_angle_y
size_t maxlenof_angle_y() const
Get maximum length of angle_y value.
Definition: NaoSensorInterface.cpp:361
fawkes::NaoSensorInterface::r_fsr_fl
float r_fsr_fl() const
Get r_fsr_fl value.
Definition: NaoSensorInterface.cpp:506
fawkes::NaoSensorInterface::maxlenof_r_fsr_fl
size_t maxlenof_r_fsr_fl() const
Get maximum length of r_fsr_fl value.
Definition: NaoSensorInterface.cpp:516
fawkes::NaoSensorInterface::l_foot_bumper_r
uint8_t l_foot_bumper_r() const
Get l_foot_bumper_r value.
Definition: NaoSensorInterface.cpp:1026
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:557
fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_left
size_t maxlenof_ultrasonic_distance_left() const
Get maximum length of ultrasonic_distance_left value.
Definition: NaoSensorInterface.cpp:847
fawkes::NaoSensorInterface::StartUltrasonicMessage::~StartUltrasonicMessage
~StartUltrasonicMessage()
Destructor.
Definition: NaoSensorInterface.cpp:1460
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:1139
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:464
fawkes::NaoSensorInterface::set_battery_charge
void set_battery_charge(const float new_battery_charge)
Set battery_charge value.
Definition: NaoSensorInterface.cpp:1263
fawkes::NaoSensorInterface::ultrasonic_distance_right
float * ultrasonic_distance_right() const
Get ultrasonic_distance_right value.
Definition: NaoSensorInterface.cpp:891
fawkes::NaoSensorInterface::maxlenof_gyro_x
size_t maxlenof_gyro_x() const
Get maximum length of gyro_x value.
Definition: NaoSensorInterface.cpp:237
fawkes::NaoSensorInterface::maxlenof_head_touch_middle
size_t maxlenof_head_touch_middle() const
Get maximum length of head_touch_middle value.
Definition: NaoSensorInterface.cpp:1160
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:1036
fawkes::NaoSensorInterface::maxlenof_l_cop_x
size_t maxlenof_l_cop_x() const
Get maximum length of l_cop_x value.
Definition: NaoSensorInterface.cpp:702
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:712
fawkes::NaoSensorInterface::StartUltrasonicMessage::StartUltrasonicMessage
StartUltrasonicMessage()
Constructor.
Definition: NaoSensorInterface.cpp:1443
fawkes::NaoSensorInterface::maxlenof_l_fsr_rl
size_t maxlenof_l_fsr_rl() const
Get maximum length of l_fsr_rl value.
Definition: NaoSensorInterface.cpp:454
fawkes::NaoSensorInterface::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:962
fawkes::NaoSensorInterface::StartUltrasonicMessage
Definition: NaoSensorInterface.h:148
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:1067
fawkes::NaoSensorInterface::l_fsr_rl
float l_fsr_rl() const
Get l_fsr_rl value.
Definition: NaoSensorInterface.cpp:444
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:681
fawkes::NaoSensorInterface::maxlenof_r_fsr_rr
size_t maxlenof_r_fsr_rr() const
Get maximum length of r_fsr_rr value.
Definition: NaoSensorInterface.cpp:609
fawkes::NaoSensorInterface::chest_button
uint8_t chest_button() const
Get chest_button value.
Definition: NaoSensorInterface.cpp:1212
fawkes::NaoSensorInterface::copy_values
virtual void copy_values(const Interface *other)
Copy values from other interface.
Definition: NaoSensorInterface.cpp:1290
fawkes::NaoSensorInterface::accel_z
float accel_z() const
Get accel_z value.
Definition: NaoSensorInterface.cpp:196
fawkes::NaoSensorInterface::USD_LEFT_RIGHT
@ USD_LEFT_RIGHT
Left emitter and right receiver.
Definition: NaoSensorInterface.h:65
fawkes::NaoSensorInterface::gyro_y
float gyro_y() const
Get gyro_y value.
Definition: NaoSensorInterface.cpp:258
fawkes::NaoSensorInterface::StartUltrasonicMessage::clone
virtual Message * clone() const
Clone this message.
Definition: NaoSensorInterface.cpp:1518
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:1077
fawkes::NaoSensorInterface::StartUltrasonicMessage::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1485
fawkes::NaoSensorInterface::angle_x
float angle_x() const
Get angle_x value.
Definition: NaoSensorInterface.cpp:320
fawkes::NaoSensorInterface::angle_y
float angle_y() const
Get angle_y value.
Definition: NaoSensorInterface.cpp:351
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage
Definition: NaoSensorInterface.h:120
fawkes::NaoSensorInterface::EmitUltrasonicWaveMessage::ultrasonic_direction
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
Definition: NaoSensorInterface.cpp:1379
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:526
fawkes::NaoSensorInterface::r_cop_y
float r_cop_y() const
Get r_cop_y value.
Definition: NaoSensorInterface.cpp:785
fawkes::NaoSensorInterface::maxlenof_chest_button
size_t maxlenof_chest_button() const
Get maximum length of chest_button value.
Definition: NaoSensorInterface.cpp:1222
fawkes::NaoSensorInterface::ultrasonic_distance_left
float * ultrasonic_distance_left() const
Get ultrasonic_distance_left value.
Definition: NaoSensorInterface.cpp:819
fawkes::NaoSensorInterface::maxlenof_head_touch_rear
size_t maxlenof_head_touch_rear() const
Get maximum length of head_touch_rear value.
Definition: NaoSensorInterface.cpp:1191