Fawkes API  Fawkes Development Version
Roomba500Interface.h
1 
2 /***************************************************************************
3  * Roomba500Interface.h - Fawkes BlackBoard Interface - Roomba500Interface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2011 Tim Niemueller
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __INTERFACES_ROOMBA500INTERFACE_H_
25 #define __INTERFACES_ROOMBA500INTERFACE_H_
26 
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
30 
31 namespace fawkes {
32 
34 {
35  /// @cond INTERNALS
36  INTERFACE_MGMT_FRIENDS(Roomba500Interface)
37  /// @endcond
38  public:
39  /* constants */
40 
41  /** Open Interface mode. */
42  typedef enum {
43  MODE_OFF = 0 /**< No connection. */,
44  MODE_PASSIVE = 1 /**< Passive mode, no control,
45  only listening. */,
46  MODE_SAFE = 2 /**< Control acquired, safety measures
47  in place. */,
48  MODE_FULL = 3 /**< Control acquired, safety measures
49  disabled. */
50  } Mode;
51  const char * tostring_Mode(Mode value) const;
52 
53  /** Infrared character values. */
54  typedef enum {
55  IR_NONE = 0 /**< No valid IR signal */,
56  IR_REMOTE_LEFT = 129 /**< IR Remote Control: left button */,
57  IR_REMOTE_FORWARD = 130 /**< IR Remote Control: forward
58  button */,
59  IR_REMOTE_RIGHT = 131 /**< IR Remote Control: right
60  button */,
61  IR_REMOTE_SPOT = 132 /**< IR Remote Control: spot button */,
62  IR_REMOTE_MAX = 133 /**< IR Remote Control: max button */,
63  IR_REMOTE_SMALL = 134 /**< IR Remote Control: small
64  button */,
65  IR_REMOTE_MEDIUM = 135 /**< IR Remote Control:
66  medium button */,
67  IR_REMOTE_LARGE_CLEAN = 136 /**< IR Remote Control:
68  large/clean button */,
69  IR_REMOTE_STOP = 137 /**< IR Remote Control: stop button */,
70  IR_REMOTE_POWER = 138 /**< IR Remote Control:
71  power button */,
72  IR_REMOTE_ARC_LEFT = 139 /**< IR Remote Control:
73  left arc button */,
74  IR_REMOTE_ARC_RIGHT = 140 /**< IR Remote Control:
75  right arc button */,
76  IR_REMOTE_STOP2 = 141 /**< IR Remote Control:
77  stop button */,
78  IR_SCHED_REMOTE_DOWNLOAD = 142 /**< IR scheduling remote:
79  download button */,
80  IR_SCHED_REMOTE_SEEK_DOCK = 143 /**< IR scheduling remote:
81  seek dock button */,
82  IR_DISC_DOCK_RESERVED = 240 /**< Roomba Discovery dock:
83  reserved */,
84  IR_DISC_DOCK_RED_BUOY = 248 /**< Roomba Discovery dock:
85  red buoy */,
86  IR_DISC_DOCK_GREEN_BUOY = 244 /**< Roomba Discovery dock:
87  green buoy */,
88  IR_DISC_DOCK_FORCE_FIELD = 242 /**< Roomba Discovery dock:
89  red and green buoy */,
90  IR_DISC_DOCK_RED_GREEN_BUOY = 252 /**< Roomba Discovery dock:
91  red buoy and force field */,
92  IR_DISC_DOCK_RED_BUOY_FORCE_FIELD = 250 /**< Roomba Discovery
93  dock: green buoy and force field */,
95  Discovery dock: green buoy and force field. */,
97  Discovery dock: red and green buoy and force field */,
98  IR_DOCK_RESERVED = 160 /**< Roomba 500 dock: reserved */,
99  IR_DOCK_RED_BUOY = 168 /**< Roomba 500 dock: red buoy */,
100  IR_DOCK_GREEN_BUOY = 164 /**< Roomba 500 dock: green buoy */,
101  IR_DOCK_FORCE_FIELD = 161 /**< Roomba 500 dock: red and green buoy */,
102  IR_DOCK_RED_GREEN_BUOY = 172 /**< Roomba 500 dock: red buoy and force field */,
103  IR_DOCK_RED_BUOY_FORCE_FIELD = 169 /**< Roomba 500 dock: green buoy and force field. */,
104  IR_DOCK_GREEN_BUOY_FORCE_FIELD = 165 /**< Roomba 500 dock: green buoy and force field. */,
105  IR_DOCK_RED_GREEN_BUOY_FORCE_FIELD = 173 /**< Roomba 500 dock: red and green buoy and force field. */,
106  IR_VIRTUAL_WALL = 162 /**< IR Virtual Wall */
108  const char * tostring_InfraredCharacter(InfraredCharacter value) const;
109 
110  /**
111  Current charging state.
112  */
113  typedef enum {
114  CHARGING_NO = 0 /**< Not charging. */,
115  CHARGING_RECONDITIONING = 1 /**< Reconditioning battery. */,
116  CHARGING_FULL = 2 /**< Full charging cycle. */,
117  CHARGING_TRICKLE = 3 /**< Trickle charging. */,
118  CHARGING_WAITING = 4 /**< Waiting. */,
119  CHARGING_ERROR = 5 /**< Fault condition. */
120  } ChargingState;
121  const char * tostring_ChargingState(ChargingState value) const;
122 
123  /** State of the brushes. */
124  typedef enum {
125  BRUSHSTATE_OFF /**< Brush is off. */,
126  BRUSHSTATE_FORWARD /**< Brush is turning forward. */,
127  BRUSHSTATE_BACKWARD /**< Brush is turning backward. */
128  } BrushState;
129  const char * tostring_BrushState(BrushState value) const;
130 
131  private:
132  /** Internal data storage, do NOT modify! */
133  typedef struct __attribute__((packed)) {
134  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
135  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
136  int32_t mode; /**< Open Interface mode. */
137  bool wheel_drop_left; /**< Left wheel drop sensor. */
138  bool wheel_drop_right; /**< Right wheel drop sensor. */
139  bool bump_left; /**< Bump on left. */
140  bool bump_right; /**< Bump on right. */
141  bool wall; /**< Wall sensor. */
142  bool cliff_left; /**< Cliff detected left. */
143  bool cliff_front_left; /**< Cliff detected front left. */
144  bool cliff_front_right; /**< Cliff detected front right. */
145  bool cliff_right; /**< Cliff detected right. */
146  bool virtual_wall; /**< Virtual wall detected. */
147  bool overcurrent_side_brush; /**< Overcurrent on side brush. */
148  bool overcurrent_main_brush; /**< Overcurrent on main brush. */
149  bool overcurrent_left_wheel; /**< Overcurrent on left wheel. */
150  bool overcurrent_right_wheel; /**< Overcurrent on right wheel. */
151  bool dirt_detect; /**< Dirt detected? */
152  int32_t ir_opcode_omni; /**< Omni IR receiver code. */
153  bool button_clean; /**< Clean button pressed. */
154  bool button_spot; /**< Spot button pressed. */
155  bool button_dock; /**< Dock button pressed. */
156  bool button_minute; /**< Minute button pressed. */
157  bool button_hour; /**< Hour button pressed. */
158  bool button_day; /**< Day button pressed. */
159  bool button_schedule; /**< Schedule button pressed. */
160  bool button_clock; /**< Clock button pressed. */
161  int16_t distance; /**< Travelled distance in m. */
162  int16_t angle; /**< Turned angle in radians. */
163  int32_t charging_state; /**< Charging state. */
164  uint16_t voltage; /**< Voltage in mV. */
165  int16_t current; /**< Current in mA. */
166  int8_t temperature; /**< Temperature in degree Celsius. */
167  uint16_t battery_charge; /**< Battery charge in mAh. */
168  uint16_t battery_capacity; /**< Battery capacity in mAh. */
169  uint16_t wall_signal; /**< Raw wall signal */
170  uint16_t cliff_left_signal; /**< Raw left cliff signal. */
171  uint16_t cliff_front_left_signal; /**< Raw front left
172  cliff signal. */
173  uint16_t cliff_front_right_signal; /**< Raw front right
174  cliff signal. */
175  uint16_t cliff_right_signal; /**< Raw right cliff signal. */
176  bool home_base_charger_available; /**<
177  Home base charger available? */
178  bool internal_charger_available; /**<
179  Internal charger available? */
180  uint8_t song_number; /**< Song number. */
181  bool song_playing; /**< Song playing? */
182  int16_t velocity; /**< Requested velocity in mm/s. */
183  int16_t radius; /**< Requested radius in mm. */
184  int16_t velocity_right; /**< Requested left velocity in mm/s. */
185  int16_t velocity_left; /**< Requested right velocity in mm/s. */
186  uint16_t encoder_counts_left; /**< Encoder count left. */
187  uint16_t encoder_counts_right; /**< Encoder count right. */
188  bool bumper_left; /**< Left bumper active? */
189  bool bumper_front_left; /**< Front left bumper active? */
190  bool bumper_center_left; /**< Center left bumper active? */
191  bool bumper_center_right; /**< Center right bumper active? */
192  bool bumper_front_right; /**< Front right bumper active? */
193  bool bumper_right; /**< Right bumper active? */
194  uint16_t light_bump_left; /**< Raw left bumper signal. */
195  uint16_t light_bump_front_left; /**< Raw front left bumper
196  signal. */
197  uint16_t light_bump_center_left; /**< Raw center left
198  bumper signal. */
199  uint16_t light_bump_center_right; /**< Raw center right
200  bumper signal. */
201  uint16_t light_bump_front_right; /**< Raw front right
202  bumper signal. */
203  uint16_t light_bump_right; /**< Raw right bumper signal. */
204  int32_t ir_opcode_left; /**<
205  Left receiver opcode. */
206  int32_t ir_opcode_right; /**<
207  Right receiver opcode. */
208  int16_t left_motor_current; /**< Left motor current in mA. */
209  int16_t right_motor_current; /**< Right motor current in mA. */
210  int16_t main_brush_current; /**< Main brush current in mA. */
211  int16_t side_brush_current; /**< Side brush current in mA. */
212  bool caster_stasis; /**< Caster wheel stasis. */
213  } Roomba500Interface_data_t;
214 
215  Roomba500Interface_data_t *data;
216 
217  interface_enum_map_t enum_map_Mode;
218  interface_enum_map_t enum_map_InfraredCharacter;
219  interface_enum_map_t enum_map_ChargingState;
220  interface_enum_map_t enum_map_BrushState;
221  public:
222  /* messages */
223  class StopMessage : public Message
224  {
225  private:
226  /** Internal data storage, do NOT modify! */
227  typedef struct __attribute__((packed)) {
228  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
229  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
230  } StopMessage_data_t;
231 
232  StopMessage_data_t *data;
233 
234  interface_enum_map_t enum_map_Mode;
235  interface_enum_map_t enum_map_InfraredCharacter;
236  interface_enum_map_t enum_map_ChargingState;
237  interface_enum_map_t enum_map_BrushState;
238  public:
239  StopMessage();
240  ~StopMessage();
241 
242  StopMessage(const StopMessage *m);
243  /* Methods */
244  virtual Message * clone() const;
245  };
246 
247  class DockMessage : public Message
248  {
249  private:
250  /** Internal data storage, do NOT modify! */
251  typedef struct __attribute__((packed)) {
252  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
253  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
254  } DockMessage_data_t;
255 
256  DockMessage_data_t *data;
257 
258  interface_enum_map_t enum_map_Mode;
259  interface_enum_map_t enum_map_InfraredCharacter;
260  interface_enum_map_t enum_map_ChargingState;
261  interface_enum_map_t enum_map_BrushState;
262  public:
263  DockMessage();
264  ~DockMessage();
265 
266  DockMessage(const DockMessage *m);
267  /* Methods */
268  virtual Message * clone() const;
269  };
270 
271  class SetModeMessage : public Message
272  {
273  private:
274  /** Internal data storage, do NOT modify! */
275  typedef struct __attribute__((packed)) {
276  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
277  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
278  int32_t mode; /**< Open Interface mode. */
279  } SetModeMessage_data_t;
280 
281  SetModeMessage_data_t *data;
282 
283  interface_enum_map_t enum_map_Mode;
284  interface_enum_map_t enum_map_InfraredCharacter;
285  interface_enum_map_t enum_map_ChargingState;
286  interface_enum_map_t enum_map_BrushState;
287  public:
288  SetModeMessage(const Mode ini_mode);
289  SetModeMessage();
290  ~SetModeMessage();
291 
292  SetModeMessage(const SetModeMessage *m);
293  /* Methods */
294  Mode mode() const;
295  void set_mode(const Mode new_mode);
296  size_t maxlenof_mode() const;
297  virtual Message * clone() const;
298  };
299 
301  {
302  private:
303  /** Internal data storage, do NOT modify! */
304  typedef struct __attribute__((packed)) {
305  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
306  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
307  int16_t velocity; /**< Requested velocity in mm/s. */
308  } DriveStraightMessage_data_t;
309 
310  DriveStraightMessage_data_t *data;
311 
312  interface_enum_map_t enum_map_Mode;
313  interface_enum_map_t enum_map_InfraredCharacter;
314  interface_enum_map_t enum_map_ChargingState;
315  interface_enum_map_t enum_map_BrushState;
316  public:
317  DriveStraightMessage(const int16_t ini_velocity);
320 
322  /* Methods */
323  int16_t velocity() const;
324  void set_velocity(const int16_t new_velocity);
325  size_t maxlenof_velocity() const;
326  virtual Message * clone() const;
327  };
328 
329  class DriveMessage : public Message
330  {
331  private:
332  /** Internal data storage, do NOT modify! */
333  typedef struct __attribute__((packed)) {
334  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
335  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
336  int16_t velocity; /**< Requested velocity in mm/s. */
337  int16_t radius; /**< Requested radius in mm. */
338  } DriveMessage_data_t;
339 
340  DriveMessage_data_t *data;
341 
342  interface_enum_map_t enum_map_Mode;
343  interface_enum_map_t enum_map_InfraredCharacter;
344  interface_enum_map_t enum_map_ChargingState;
345  interface_enum_map_t enum_map_BrushState;
346  public:
347  DriveMessage(const int16_t ini_velocity, const int16_t ini_radius);
348  DriveMessage();
349  ~DriveMessage();
350 
351  DriveMessage(const DriveMessage *m);
352  /* Methods */
353  int16_t velocity() const;
354  void set_velocity(const int16_t new_velocity);
355  size_t maxlenof_velocity() const;
356  int16_t radius() const;
357  void set_radius(const int16_t new_radius);
358  size_t maxlenof_radius() const;
359  virtual Message * clone() const;
360  };
361 
362  class SetMotorsMessage : public Message
363  {
364  private:
365  /** Internal data storage, do NOT modify! */
366  typedef struct __attribute__((packed)) {
367  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
368  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
369  bool vacuuming; /**< Enable vacuuming? */
370  int32_t main; /**< Main brush state. */
371  int32_t side; /**< Side brush state. */
372  } SetMotorsMessage_data_t;
373 
374  SetMotorsMessage_data_t *data;
375 
376  interface_enum_map_t enum_map_Mode;
377  interface_enum_map_t enum_map_InfraredCharacter;
378  interface_enum_map_t enum_map_ChargingState;
379  interface_enum_map_t enum_map_BrushState;
380  public:
381  SetMotorsMessage(const bool ini_vacuuming, const BrushState ini_main, const BrushState ini_side);
383  ~SetMotorsMessage();
384 
386  /* Methods */
387  bool is_vacuuming() const;
388  void set_vacuuming(const bool new_vacuuming);
389  size_t maxlenof_vacuuming() const;
390  BrushState main() const;
391  void set_main(const BrushState new_main);
392  size_t maxlenof_main() const;
393  BrushState side() const;
394  void set_side(const BrushState new_side);
395  size_t maxlenof_side() const;
396  virtual Message * clone() const;
397  };
398 
399  virtual bool message_valid(const Message *message) const;
400  private:
403 
404  public:
405  /* Methods */
406  Mode mode() const;
407  void set_mode(const Mode new_mode);
408  size_t maxlenof_mode() const;
409  bool is_wheel_drop_left() const;
410  void set_wheel_drop_left(const bool new_wheel_drop_left);
411  size_t maxlenof_wheel_drop_left() const;
412  bool is_wheel_drop_right() const;
413  void set_wheel_drop_right(const bool new_wheel_drop_right);
414  size_t maxlenof_wheel_drop_right() const;
415  bool is_bump_left() const;
416  void set_bump_left(const bool new_bump_left);
417  size_t maxlenof_bump_left() const;
418  bool is_bump_right() const;
419  void set_bump_right(const bool new_bump_right);
420  size_t maxlenof_bump_right() const;
421  bool is_wall() const;
422  void set_wall(const bool new_wall);
423  size_t maxlenof_wall() const;
424  bool is_cliff_left() const;
425  void set_cliff_left(const bool new_cliff_left);
426  size_t maxlenof_cliff_left() const;
427  bool is_cliff_front_left() const;
428  void set_cliff_front_left(const bool new_cliff_front_left);
429  size_t maxlenof_cliff_front_left() const;
430  bool is_cliff_front_right() const;
431  void set_cliff_front_right(const bool new_cliff_front_right);
432  size_t maxlenof_cliff_front_right() const;
433  bool is_cliff_right() const;
434  void set_cliff_right(const bool new_cliff_right);
435  size_t maxlenof_cliff_right() const;
436  bool is_virtual_wall() const;
437  void set_virtual_wall(const bool new_virtual_wall);
438  size_t maxlenof_virtual_wall() const;
439  bool is_overcurrent_side_brush() const;
440  void set_overcurrent_side_brush(const bool new_overcurrent_side_brush);
441  size_t maxlenof_overcurrent_side_brush() const;
442  bool is_overcurrent_main_brush() const;
443  void set_overcurrent_main_brush(const bool new_overcurrent_main_brush);
444  size_t maxlenof_overcurrent_main_brush() const;
445  bool is_overcurrent_left_wheel() const;
446  void set_overcurrent_left_wheel(const bool new_overcurrent_left_wheel);
447  size_t maxlenof_overcurrent_left_wheel() const;
448  bool is_overcurrent_right_wheel() const;
449  void set_overcurrent_right_wheel(const bool new_overcurrent_right_wheel);
450  size_t maxlenof_overcurrent_right_wheel() const;
451  bool is_dirt_detect() const;
452  void set_dirt_detect(const bool new_dirt_detect);
453  size_t maxlenof_dirt_detect() const;
455  void set_ir_opcode_omni(const InfraredCharacter new_ir_opcode_omni);
456  size_t maxlenof_ir_opcode_omni() const;
457  bool is_button_clean() const;
458  void set_button_clean(const bool new_button_clean);
459  size_t maxlenof_button_clean() const;
460  bool is_button_spot() const;
461  void set_button_spot(const bool new_button_spot);
462  size_t maxlenof_button_spot() const;
463  bool is_button_dock() const;
464  void set_button_dock(const bool new_button_dock);
465  size_t maxlenof_button_dock() const;
466  bool is_button_minute() const;
467  void set_button_minute(const bool new_button_minute);
468  size_t maxlenof_button_minute() const;
469  bool is_button_hour() const;
470  void set_button_hour(const bool new_button_hour);
471  size_t maxlenof_button_hour() const;
472  bool is_button_day() const;
473  void set_button_day(const bool new_button_day);
474  size_t maxlenof_button_day() const;
475  bool is_button_schedule() const;
476  void set_button_schedule(const bool new_button_schedule);
477  size_t maxlenof_button_schedule() const;
478  bool is_button_clock() const;
479  void set_button_clock(const bool new_button_clock);
480  size_t maxlenof_button_clock() const;
481  int16_t distance() const;
482  void set_distance(const int16_t new_distance);
483  size_t maxlenof_distance() const;
484  int16_t angle() const;
485  void set_angle(const int16_t new_angle);
486  size_t maxlenof_angle() const;
488  void set_charging_state(const ChargingState new_charging_state);
489  size_t maxlenof_charging_state() const;
490  uint16_t voltage() const;
491  void set_voltage(const uint16_t new_voltage);
492  size_t maxlenof_voltage() const;
493  int16_t current() const;
494  void set_current(const int16_t new_current);
495  size_t maxlenof_current() const;
496  int8_t temperature() const;
497  void set_temperature(const int8_t new_temperature);
498  size_t maxlenof_temperature() const;
499  uint16_t battery_charge() const;
500  void set_battery_charge(const uint16_t new_battery_charge);
501  size_t maxlenof_battery_charge() const;
502  uint16_t battery_capacity() const;
503  void set_battery_capacity(const uint16_t new_battery_capacity);
504  size_t maxlenof_battery_capacity() const;
505  uint16_t wall_signal() const;
506  void set_wall_signal(const uint16_t new_wall_signal);
507  size_t maxlenof_wall_signal() const;
508  uint16_t cliff_left_signal() const;
509  void set_cliff_left_signal(const uint16_t new_cliff_left_signal);
510  size_t maxlenof_cliff_left_signal() const;
511  uint16_t cliff_front_left_signal() const;
512  void set_cliff_front_left_signal(const uint16_t new_cliff_front_left_signal);
513  size_t maxlenof_cliff_front_left_signal() const;
514  uint16_t cliff_front_right_signal() const;
515  void set_cliff_front_right_signal(const uint16_t new_cliff_front_right_signal);
516  size_t maxlenof_cliff_front_right_signal() const;
517  uint16_t cliff_right_signal() const;
518  void set_cliff_right_signal(const uint16_t new_cliff_right_signal);
519  size_t maxlenof_cliff_right_signal() const;
520  bool is_home_base_charger_available() const;
521  void set_home_base_charger_available(const bool new_home_base_charger_available);
523  bool is_internal_charger_available() const;
524  void set_internal_charger_available(const bool new_internal_charger_available);
526  uint8_t song_number() const;
527  void set_song_number(const uint8_t new_song_number);
528  size_t maxlenof_song_number() const;
529  bool is_song_playing() const;
530  void set_song_playing(const bool new_song_playing);
531  size_t maxlenof_song_playing() const;
532  int16_t velocity() const;
533  void set_velocity(const int16_t new_velocity);
534  size_t maxlenof_velocity() const;
535  int16_t radius() const;
536  void set_radius(const int16_t new_radius);
537  size_t maxlenof_radius() const;
538  int16_t velocity_right() const;
539  void set_velocity_right(const int16_t new_velocity_right);
540  size_t maxlenof_velocity_right() const;
541  int16_t velocity_left() const;
542  void set_velocity_left(const int16_t new_velocity_left);
543  size_t maxlenof_velocity_left() const;
544  uint16_t encoder_counts_left() const;
545  void set_encoder_counts_left(const uint16_t new_encoder_counts_left);
546  size_t maxlenof_encoder_counts_left() const;
547  uint16_t encoder_counts_right() const;
548  void set_encoder_counts_right(const uint16_t new_encoder_counts_right);
549  size_t maxlenof_encoder_counts_right() const;
550  bool is_bumper_left() const;
551  void set_bumper_left(const bool new_bumper_left);
552  size_t maxlenof_bumper_left() const;
553  bool is_bumper_front_left() const;
554  void set_bumper_front_left(const bool new_bumper_front_left);
555  size_t maxlenof_bumper_front_left() const;
556  bool is_bumper_center_left() const;
557  void set_bumper_center_left(const bool new_bumper_center_left);
558  size_t maxlenof_bumper_center_left() const;
559  bool is_bumper_center_right() const;
560  void set_bumper_center_right(const bool new_bumper_center_right);
561  size_t maxlenof_bumper_center_right() const;
562  bool is_bumper_front_right() const;
563  void set_bumper_front_right(const bool new_bumper_front_right);
564  size_t maxlenof_bumper_front_right() const;
565  bool is_bumper_right() const;
566  void set_bumper_right(const bool new_bumper_right);
567  size_t maxlenof_bumper_right() const;
568  uint16_t light_bump_left() const;
569  void set_light_bump_left(const uint16_t new_light_bump_left);
570  size_t maxlenof_light_bump_left() const;
571  uint16_t light_bump_front_left() const;
572  void set_light_bump_front_left(const uint16_t new_light_bump_front_left);
573  size_t maxlenof_light_bump_front_left() const;
574  uint16_t light_bump_center_left() const;
575  void set_light_bump_center_left(const uint16_t new_light_bump_center_left);
576  size_t maxlenof_light_bump_center_left() const;
577  uint16_t light_bump_center_right() const;
578  void set_light_bump_center_right(const uint16_t new_light_bump_center_right);
579  size_t maxlenof_light_bump_center_right() const;
580  uint16_t light_bump_front_right() const;
581  void set_light_bump_front_right(const uint16_t new_light_bump_front_right);
582  size_t maxlenof_light_bump_front_right() const;
583  uint16_t light_bump_right() const;
584  void set_light_bump_right(const uint16_t new_light_bump_right);
585  size_t maxlenof_light_bump_right() const;
587  void set_ir_opcode_left(const InfraredCharacter new_ir_opcode_left);
588  size_t maxlenof_ir_opcode_left() const;
590  void set_ir_opcode_right(const InfraredCharacter new_ir_opcode_right);
591  size_t maxlenof_ir_opcode_right() const;
592  int16_t left_motor_current() const;
593  void set_left_motor_current(const int16_t new_left_motor_current);
594  size_t maxlenof_left_motor_current() const;
595  int16_t right_motor_current() const;
596  void set_right_motor_current(const int16_t new_right_motor_current);
597  size_t maxlenof_right_motor_current() const;
598  int16_t main_brush_current() const;
599  void set_main_brush_current(const int16_t new_main_brush_current);
600  size_t maxlenof_main_brush_current() const;
601  int16_t side_brush_current() const;
602  void set_side_brush_current(const int16_t new_side_brush_current);
603  size_t maxlenof_side_brush_current() const;
604  bool is_caster_stasis() const;
605  void set_caster_stasis(const bool new_caster_stasis);
606  size_t maxlenof_caster_stasis() const;
607  virtual Message * create_message(const char *type) const;
608 
609  virtual void copy_values(const Interface *other);
610  virtual const char * enum_tostring(const char *enumtype, int val) const;
611 
612 };
613 
614 } // end namespace fawkes
615 
616 #endif
size_t maxlenof_encoder_counts_left() const
Get maximum length of encoder_counts_left value.
void set_button_schedule(const bool new_button_schedule)
Set button_schedule value.
int16_t left_motor_current() const
Get left_motor_current value.
size_t maxlenof_wheel_drop_left() const
Get maximum length of wheel_drop_left value.
uint16_t light_bump_center_right() const
Get light_bump_center_right value.
void set_battery_charge(const uint16_t new_battery_charge)
Set battery_charge value.
size_t maxlenof_button_schedule() const
Get maximum length of button_schedule value.
bool is_wheel_drop_left() const
Get wheel_drop_left value.
size_t maxlenof_right_motor_current() const
Get maximum length of right_motor_current value.
uint16_t cliff_front_right_signal() const
Get cliff_front_right_signal value.
size_t maxlenof_encoder_counts_right() const
Get maximum length of encoder_counts_right value.
void set_home_base_charger_available(const bool new_home_base_charger_available)
Set home_base_charger_available value.
void set_right_motor_current(const int16_t new_right_motor_current)
Set right_motor_current value.
size_t maxlenof_velocity_left() const
Get maximum length of velocity_left value.
size_t maxlenof_cliff_right() const
Get maximum length of cliff_right value.
void set_current(const int16_t new_current)
Set current value.
Roomba 500 dock: red and green buoy.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
void set_light_bump_center_right(const uint16_t new_light_bump_center_right)
Set light_bump_center_right value.
size_t maxlenof_caster_stasis() const
Get maximum length of caster_stasis value.
bool is_button_spot() const
Get button_spot value.
Roomba Discovery dock: red buoy and force field.
void set_temperature(const int8_t new_temperature)
Set temperature value.
ChargingState
Current charging state.
virtual void copy_values(const Interface *other)
Copy values from other interface.
void set_cliff_front_left_signal(const uint16_t new_cliff_front_left_signal)
Set cliff_front_left_signal value.
IR Remote Control: spot button.
void set_internal_charger_available(const bool new_internal_charger_available)
Set internal_charger_available value.
size_t maxlenof_bump_right() const
Get maximum length of bump_right value.
size_t maxlenof_button_day() const
Get maximum length of button_day value.
size_t maxlenof_bumper_front_right() const
Get maximum length of bumper_front_right value.
void set_radius(const int16_t new_radius)
Set radius value.
void set_light_bump_left(const uint16_t new_light_bump_left)
Set light_bump_left value.
size_t maxlenof_battery_charge() const
Get maximum length of battery_charge value.
void set_ir_opcode_omni(const InfraredCharacter new_ir_opcode_omni)
Set ir_opcode_omni value.
bool is_dirt_detect() const
Get dirt_detect value.
const char * tostring_BrushState(BrushState value) const
Convert BrushState constant to string.
StopMessage Fawkes BlackBoard Interface Message.
uint16_t cliff_left_signal() const
Get cliff_left_signal value.
bool is_button_schedule() const
Get button_schedule value.
size_t maxlenof_mode() const
Get maximum length of mode value.
Mode
Open Interface mode.
size_t maxlenof_overcurrent_main_brush() const
Get maximum length of overcurrent_main_brush value.
void set_velocity_right(const int16_t new_velocity_right)
Set velocity_right value.
size_t maxlenof_current() const
Get maximum length of current value.
IR Remote Control: right arc button.
Roomba Discovery dock: red and green buoy and force field.
void set_caster_stasis(const bool new_caster_stasis)
Set caster_stasis value.
void set_left_motor_current(const int16_t new_left_motor_current)
Set left_motor_current value.
Roomba Discovery dock: green buoy and force field.
Fawkes library namespace.
size_t maxlenof_cliff_right_signal() const
Get maximum length of cliff_right_signal value.
IR Remote Control: max button.
size_t maxlenof_overcurrent_side_brush() const
Get maximum length of overcurrent_side_brush value.
size_t maxlenof_light_bump_center_right() const
Get maximum length of light_bump_center_right value.
size_t maxlenof_voltage() const
Get maximum length of voltage value.
bool is_button_hour() const
Get button_hour value.
size_t maxlenof_button_hour() const
Get maximum length of button_hour value.
Mode mode() const
Get mode value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
uint16_t battery_capacity() const
Get battery_capacity value.
size_t maxlenof_cliff_front_left_signal() const
Get maximum length of cliff_front_left_signal value.
size_t maxlenof_wall_signal() const
Get maximum length of wall_signal value.
bool is_button_clean() const
Get button_clean value.
void set_song_number(const uint8_t new_song_number)
Set song_number value.
uint16_t cliff_right_signal() const
Get cliff_right_signal value.
size_t maxlenof_button_dock() const
Get maximum length of button_dock value.
void set_bump_left(const bool new_bump_left)
Set bump_left value.
void set_light_bump_center_left(const uint16_t new_light_bump_center_left)
Set light_bump_center_left value.
ChargingState charging_state() const
Get charging_state value.
void set_song_playing(const bool new_song_playing)
Set song_playing value.
void set_ir_opcode_right(const InfraredCharacter new_ir_opcode_right)
Set ir_opcode_right value.
bool is_song_playing() const
Get song_playing value.
size_t maxlenof_light_bump_front_right() const
Get maximum length of light_bump_front_right value.
void set_wheel_drop_left(const bool new_wheel_drop_left)
Set wheel_drop_left value.
InfraredCharacter
Infrared character values.
bool is_overcurrent_right_wheel() const
Get overcurrent_right_wheel value.
size_t maxlenof_ir_opcode_left() const
Get maximum length of ir_opcode_left value.
void set_cliff_right_signal(const uint16_t new_cliff_right_signal)
Set cliff_right_signal value.
void set_light_bump_right(const uint16_t new_light_bump_right)
Set light_bump_right value.
Passive mode, no control, only listening.
int8_t temperature() const
Get temperature value.
size_t maxlenof_velocity_right() const
Get maximum length of velocity_right value.
IR Remote Control: small button.
void set_overcurrent_right_wheel(const bool new_overcurrent_right_wheel)
Set overcurrent_right_wheel value.
bool is_internal_charger_available() const
Get internal_charger_available value.
void set_bumper_left(const bool new_bumper_left)
Set bumper_left value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
void set_button_day(const bool new_button_day)
Set button_day value.
void set_wall(const bool new_wall)
Set wall value.
uint16_t light_bump_center_left() const
Get light_bump_center_left value.
size_t maxlenof_song_number() const
Get maximum length of song_number value.
bool is_button_clock() const
Get button_clock value.
size_t maxlenof_cliff_left() const
Get maximum length of cliff_left value.
uint16_t wall_signal() const
Get wall_signal value.
IR Remote Control: stop button.
IR Remote Control: left arc button.
void set_cliff_front_left(const bool new_cliff_front_left)
Set cliff_front_left value.
void set_button_minute(const bool new_button_minute)
Set button_minute value.
int16_t velocity_right() const
Get velocity_right value.
const char * tostring_Mode(Mode value) const
Convert Mode constant to string.
IR Remote Control: medium button.
DockMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_cliff_front_left() const
Get maximum length of cliff_front_left value.
Roomba Discovery dock: green buoy and force field.
InfraredCharacter ir_opcode_left() const
Get ir_opcode_left value.
IR scheduling remote: seek dock button.
size_t maxlenof_cliff_left_signal() const
Get maximum length of cliff_left_signal value.
uint16_t battery_charge() const
Get battery_charge value.
void set_encoder_counts_left(const uint16_t new_encoder_counts_left)
Set encoder_counts_left value.
size_t maxlenof_angle() const
Get maximum length of angle value.
size_t maxlenof_dirt_detect() const
Get maximum length of dirt_detect value.
bool is_button_dock() const
Get button_dock value.
size_t maxlenof_home_base_charger_available() const
Get maximum length of home_base_charger_available value.
void set_button_spot(const bool new_button_spot)
Set button_spot value.
IR Remote Control: right button.
virtual Message * create_message(const char *type) const
Create message based on type name.
size_t maxlenof_charging_state() const
Get maximum length of charging_state value.
bool is_button_day() const
Get button_day value.
size_t maxlenof_button_minute() const
Get maximum length of button_minute value.
bool is_bump_right() const
Get bump_right value.
IR Remote Control: forward button.
int16_t angle() const
Get angle value.
size_t maxlenof_battery_capacity() const
Get maximum length of battery_capacity value.
size_t maxlenof_bumper_front_left() const
Get maximum length of bumper_front_left value.
Roomba Discovery dock: red and green buoy.
void set_overcurrent_left_wheel(const bool new_overcurrent_left_wheel)
Set overcurrent_left_wheel value.
IR Remote Control: left button.
bool is_home_base_charger_available() const
Get home_base_charger_available value.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
bool is_wheel_drop_right() const
Get wheel_drop_right value.
size_t maxlenof_bumper_right() const
Get maximum length of bumper_right value.
bool is_bumper_center_left() const
Get bumper_center_left value.
bool is_virtual_wall() const
Get virtual_wall value.
bool is_wall() const
Get wall value.
size_t maxlenof_radius() const
Get maximum length of radius value.
uint16_t light_bump_front_left() const
Get light_bump_front_left value.
bool is_button_minute() const
Get button_minute value.
int16_t distance() const
Get distance value.
size_t maxlenof_bumper_center_left() const
Get maximum length of bumper_center_left value.
bool is_caster_stasis() const
Get caster_stasis value.
void set_distance(const int16_t new_distance)
Set distance value.
int16_t velocity_left() const
Get velocity_left value.
void set_light_bump_front_left(const uint16_t new_light_bump_front_left)
Set light_bump_front_left value.
IR Remote Control: power button.
size_t maxlenof_light_bump_right() const
Get maximum length of light_bump_right value.
const char * tostring_ChargingState(ChargingState value) const
Convert ChargingState constant to string.
bool is_bumper_center_right() const
Get bumper_center_right value.
IR scheduling remote: download button.
bool is_bumper_right() const
Get bumper_right value.
void set_battery_capacity(const uint16_t new_battery_capacity)
Set battery_capacity value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
SetMotorsMessage Fawkes BlackBoard Interface Message.
uint16_t light_bump_left() const
Get light_bump_left value.
size_t maxlenof_cliff_front_right_signal() const
Get maximum length of cliff_front_right_signal value.
void set_charging_state(const ChargingState new_charging_state)
Set charging_state value.
void set_main_brush_current(const int16_t new_main_brush_current)
Set main_brush_current value.
void set_wheel_drop_right(const bool new_wheel_drop_right)
Set wheel_drop_right value.
size_t maxlenof_bumper_left() const
Get maximum length of bumper_left value.
size_t maxlenof_bump_left() const
Get maximum length of bump_left value.
bool is_bumper_front_right() const
Get bumper_front_right value.
const char * tostring_InfraredCharacter(InfraredCharacter value) const
Convert InfraredCharacter constant to string.
size_t maxlenof_wheel_drop_right() const
Get maximum length of wheel_drop_right value.
Roomba 500 dock: red and green buoy and force field.
size_t maxlenof_light_bump_left() const
Get maximum length of light_bump_left value.
void set_velocity_left(const int16_t new_velocity_left)
Set velocity_left value.
uint16_t light_bump_right() const
Get light_bump_right value.
size_t maxlenof_overcurrent_left_wheel() const
Get maximum length of overcurrent_left_wheel value.
void set_bumper_center_right(const bool new_bumper_center_right)
Set bumper_center_right value.
bool is_bumper_front_left() const
Get bumper_front_left value.
Roomba500Interface Fawkes BlackBoard Interface.
size_t maxlenof_wall() const
Get maximum length of wall value.
void set_bumper_front_left(const bool new_bumper_front_left)
Set bumper_front_left value.
InfraredCharacter ir_opcode_right() const
Get ir_opcode_right value.
void set_cliff_left(const bool new_cliff_left)
Set cliff_left value.
void set_button_dock(const bool new_button_dock)
Set button_dock value.
Control acquired, safety measures in place.
bool is_overcurrent_left_wheel() const
Get overcurrent_left_wheel value.
SetModeMessage Fawkes BlackBoard Interface Message.
void set_angle(const int16_t new_angle)
Set angle value.
bool is_overcurrent_main_brush() const
Get overcurrent_main_brush value.
IR Remote Control: stop button.
size_t maxlenof_side_brush_current() const
Get maximum length of side_brush_current value.
size_t maxlenof_temperature() const
Get maximum length of temperature value.
void set_button_clean(const bool new_button_clean)
Set button_clean value.
Control acquired, safety measures disabled.
size_t maxlenof_overcurrent_right_wheel() const
Get maximum length of overcurrent_right_wheel value.
uint16_t light_bump_front_right() const
Get light_bump_front_right value.
uint16_t cliff_front_left_signal() const
Get cliff_front_left_signal value.
void set_button_hour(const bool new_button_hour)
Set button_hour value.
void set_mode(const Mode new_mode)
Set mode value.
void set_bump_right(const bool new_bump_right)
Set bump_right value.
size_t maxlenof_light_bump_front_left() const
Get maximum length of light_bump_front_left value.
bool is_bump_left() const
Get bump_left value.
int16_t right_motor_current() const
Get right_motor_current value.
size_t maxlenof_cliff_front_right() const
Get maximum length of cliff_front_right value.
Roomba 500 dock: green buoy and force field.
void set_cliff_front_right(const bool new_cliff_front_right)
Set cliff_front_right value.
bool is_bumper_left() const
Get bumper_left value.
int16_t side_brush_current() const
Get side_brush_current value.
size_t maxlenof_distance() const
Get maximum length of distance value.
bool is_cliff_left() const
Get cliff_left value.
void set_cliff_left_signal(const uint16_t new_cliff_left_signal)
Set cliff_left_signal value.
size_t maxlenof_ir_opcode_right() const
Get maximum length of ir_opcode_right value.
void set_bumper_center_left(const bool new_bumper_center_left)
Set bumper_center_left value.
int16_t velocity() const
Get velocity value.
IR Remote Control: large/clean button.
void set_ir_opcode_left(const InfraredCharacter new_ir_opcode_left)
Set ir_opcode_left value.
size_t maxlenof_internal_charger_available() const
Get maximum length of internal_charger_available value.
Roomba 500 dock: red buoy and force field.
void set_cliff_front_right_signal(const uint16_t new_cliff_front_right_signal)
Set cliff_front_right_signal value.
size_t maxlenof_light_bump_center_left() const
Get maximum length of light_bump_center_left value.
void set_light_bump_front_right(const uint16_t new_light_bump_front_right)
Set light_bump_front_right value.
void set_cliff_right(const bool new_cliff_right)
Set cliff_right value.
void set_dirt_detect(const bool new_dirt_detect)
Set dirt_detect value.
void set_wall_signal(const uint16_t new_wall_signal)
Set wall_signal value.
bool is_cliff_front_right() const
Get cliff_front_right value.
InfraredCharacter ir_opcode_omni() const
Get ir_opcode_omni value.
int16_t main_brush_current() const
Get main_brush_current value.
void set_overcurrent_side_brush(const bool new_overcurrent_side_brush)
Set overcurrent_side_brush value.
size_t maxlenof_main_brush_current() const
Get maximum length of main_brush_current value.
void set_side_brush_current(const int16_t new_side_brush_current)
Set side_brush_current value.
bool is_overcurrent_side_brush() const
Get overcurrent_side_brush value.
void set_virtual_wall(const bool new_virtual_wall)
Set virtual_wall value.
size_t maxlenof_ir_opcode_omni() const
Get maximum length of ir_opcode_omni value.
DriveStraightMessage Fawkes BlackBoard Interface Message.
void set_velocity(const int16_t new_velocity)
Set velocity value.
void set_voltage(const uint16_t new_voltage)
Set voltage value.
size_t maxlenof_button_clean() const
Get maximum length of button_clean value.
void set_bumper_right(const bool new_bumper_right)
Set bumper_right value.
int16_t radius() const
Get radius value.
void set_bumper_front_right(const bool new_bumper_front_right)
Set bumper_front_right value.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
Definition: types.h:53
DriveMessage Fawkes BlackBoard Interface Message.
Roomba 500 dock: green buoy and force field.
uint16_t encoder_counts_right() const
Get encoder_counts_right value.
BrushState
State of the brushes.
bool is_cliff_right() const
Get cliff_right value.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
size_t maxlenof_bumper_center_right() const
Get maximum length of bumper_center_right value.
uint16_t encoder_counts_left() const
Get encoder_counts_left value.
void set_button_clock(const bool new_button_clock)
Set button_clock value.
size_t maxlenof_button_clock() const
Get maximum length of button_clock value.
size_t maxlenof_button_spot() const
Get maximum length of button_spot value.
size_t maxlenof_virtual_wall() const
Get maximum length of virtual_wall value.
void set_overcurrent_main_brush(const bool new_overcurrent_main_brush)
Set overcurrent_main_brush value.
uint16_t voltage() const
Get voltage value.
bool is_cliff_front_left() const
Get cliff_front_left value.
void set_encoder_counts_right(const uint16_t new_encoder_counts_right)
Set encoder_counts_right value.
uint8_t song_number() const
Get song_number value.
size_t maxlenof_song_playing() const
Get maximum length of song_playing value.
size_t maxlenof_left_motor_current() const
Get maximum length of left_motor_current value.
int16_t current() const
Get current value.