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 #pragma pack(push,4)
133  /** Internal data storage, do NOT modify! */
134  typedef struct {
135  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
136  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
137  int32_t mode; /**< Open Interface mode. */
138  bool wheel_drop_left; /**< Left wheel drop sensor. */
139  bool wheel_drop_right; /**< Right wheel drop sensor. */
140  bool bump_left; /**< Bump on left. */
141  bool bump_right; /**< Bump on right. */
142  bool wall; /**< Wall sensor. */
143  bool cliff_left; /**< Cliff detected left. */
144  bool cliff_front_left; /**< Cliff detected front left. */
145  bool cliff_front_right; /**< Cliff detected front right. */
146  bool cliff_right; /**< Cliff detected right. */
147  bool virtual_wall; /**< Virtual wall detected. */
148  bool overcurrent_side_brush; /**< Overcurrent on side brush. */
149  bool overcurrent_main_brush; /**< Overcurrent on main brush. */
150  bool overcurrent_left_wheel; /**< Overcurrent on left wheel. */
151  bool overcurrent_right_wheel; /**< Overcurrent on right wheel. */
152  bool dirt_detect; /**< Dirt detected? */
153  int32_t ir_opcode_omni; /**< Omni IR receiver code. */
154  bool button_clean; /**< Clean button pressed. */
155  bool button_spot; /**< Spot button pressed. */
156  bool button_dock; /**< Dock button pressed. */
157  bool button_minute; /**< Minute button pressed. */
158  bool button_hour; /**< Hour button pressed. */
159  bool button_day; /**< Day button pressed. */
160  bool button_schedule; /**< Schedule button pressed. */
161  bool button_clock; /**< Clock button pressed. */
162  int16_t distance; /**< Travelled distance in m. */
163  int16_t angle; /**< Turned angle in radians. */
164  int32_t charging_state; /**< Charging state. */
165  uint16_t voltage; /**< Voltage in mV. */
166  int16_t current; /**< Current in mA. */
167  int8_t temperature; /**< Temperature in degree Celsius. */
168  uint16_t battery_charge; /**< Battery charge in mAh. */
169  uint16_t battery_capacity; /**< Battery capacity in mAh. */
170  uint16_t wall_signal; /**< Raw wall signal */
171  uint16_t cliff_left_signal; /**< Raw left cliff signal. */
172  uint16_t cliff_front_left_signal; /**< Raw front left
173  cliff signal. */
174  uint16_t cliff_front_right_signal; /**< Raw front right
175  cliff signal. */
176  uint16_t cliff_right_signal; /**< Raw right cliff signal. */
177  bool home_base_charger_available; /**<
178  Home base charger available? */
179  bool internal_charger_available; /**<
180  Internal charger available? */
181  uint8_t song_number; /**< Song number. */
182  bool song_playing; /**< Song playing? */
183  int16_t velocity; /**< Requested velocity in mm/s. */
184  int16_t radius; /**< Requested radius in mm. */
185  int16_t velocity_right; /**< Requested left velocity in mm/s. */
186  int16_t velocity_left; /**< Requested right velocity in mm/s. */
187  uint16_t encoder_counts_left; /**< Encoder count left. */
188  uint16_t encoder_counts_right; /**< Encoder count right. */
189  bool bumper_left; /**< Left bumper active? */
190  bool bumper_front_left; /**< Front left bumper active? */
191  bool bumper_center_left; /**< Center left bumper active? */
192  bool bumper_center_right; /**< Center right bumper active? */
193  bool bumper_front_right; /**< Front right bumper active? */
194  bool bumper_right; /**< Right bumper active? */
195  uint16_t light_bump_left; /**< Raw left bumper signal. */
196  uint16_t light_bump_front_left; /**< Raw front left bumper
197  signal. */
198  uint16_t light_bump_center_left; /**< Raw center left
199  bumper signal. */
200  uint16_t light_bump_center_right; /**< Raw center right
201  bumper signal. */
202  uint16_t light_bump_front_right; /**< Raw front right
203  bumper signal. */
204  uint16_t light_bump_right; /**< Raw right bumper signal. */
205  int32_t ir_opcode_left; /**<
206  Left receiver opcode. */
207  int32_t ir_opcode_right; /**<
208  Right receiver opcode. */
209  int16_t left_motor_current; /**< Left motor current in mA. */
210  int16_t right_motor_current; /**< Right motor current in mA. */
211  int16_t main_brush_current; /**< Main brush current in mA. */
212  int16_t side_brush_current; /**< Side brush current in mA. */
213  bool caster_stasis; /**< Caster wheel stasis. */
214  } Roomba500Interface_data_t;
215 #pragma pack(pop)
216 
217  Roomba500Interface_data_t *data;
218 
219  public:
220  /* messages */
221  class StopMessage : public Message
222  {
223  private:
224 #pragma pack(push,4)
225  /** Internal data storage, do NOT modify! */
226  typedef struct {
227  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
228  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
229  } StopMessage_data_t;
230 #pragma pack(pop)
231 
232  StopMessage_data_t *data;
233 
234  public:
235  StopMessage();
236  ~StopMessage();
237 
238  StopMessage(const StopMessage *m);
239  /* Methods */
240  virtual Message * clone() const;
241  };
242 
243  class DockMessage : public Message
244  {
245  private:
246 #pragma pack(push,4)
247  /** Internal data storage, do NOT modify! */
248  typedef struct {
249  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
250  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
251  } DockMessage_data_t;
252 #pragma pack(pop)
253 
254  DockMessage_data_t *data;
255 
256  public:
257  DockMessage();
258  ~DockMessage();
259 
260  DockMessage(const DockMessage *m);
261  /* Methods */
262  virtual Message * clone() const;
263  };
264 
265  class SetModeMessage : public Message
266  {
267  private:
268 #pragma pack(push,4)
269  /** Internal data storage, do NOT modify! */
270  typedef struct {
271  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
272  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
273  int32_t mode; /**< Open Interface mode. */
274  } SetModeMessage_data_t;
275 #pragma pack(pop)
276 
277  SetModeMessage_data_t *data;
278 
279  public:
280  SetModeMessage(const Mode ini_mode);
281  SetModeMessage();
282  ~SetModeMessage();
283 
284  SetModeMessage(const SetModeMessage *m);
285  /* Methods */
286  Mode mode() const;
287  void set_mode(const Mode new_mode);
288  size_t maxlenof_mode() const;
289  virtual Message * clone() const;
290  };
291 
293  {
294  private:
295 #pragma pack(push,4)
296  /** Internal data storage, do NOT modify! */
297  typedef struct {
298  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
299  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
300  int16_t velocity; /**< Requested velocity in mm/s. */
301  } DriveStraightMessage_data_t;
302 #pragma pack(pop)
303 
304  DriveStraightMessage_data_t *data;
305 
306  public:
307  DriveStraightMessage(const int16_t ini_velocity);
310 
312  /* Methods */
313  int16_t velocity() const;
314  void set_velocity(const int16_t new_velocity);
315  size_t maxlenof_velocity() const;
316  virtual Message * clone() const;
317  };
318 
319  class DriveMessage : public Message
320  {
321  private:
322 #pragma pack(push,4)
323  /** Internal data storage, do NOT modify! */
324  typedef struct {
325  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
326  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
327  int16_t velocity; /**< Requested velocity in mm/s. */
328  int16_t radius; /**< Requested radius in mm. */
329  } DriveMessage_data_t;
330 #pragma pack(pop)
331 
332  DriveMessage_data_t *data;
333 
334  public:
335  DriveMessage(const int16_t ini_velocity, const int16_t ini_radius);
336  DriveMessage();
337  ~DriveMessage();
338 
339  DriveMessage(const DriveMessage *m);
340  /* Methods */
341  int16_t velocity() const;
342  void set_velocity(const int16_t new_velocity);
343  size_t maxlenof_velocity() const;
344  int16_t radius() const;
345  void set_radius(const int16_t new_radius);
346  size_t maxlenof_radius() const;
347  virtual Message * clone() const;
348  };
349 
350  class SetMotorsMessage : public Message
351  {
352  private:
353 #pragma pack(push,4)
354  /** Internal data storage, do NOT modify! */
355  typedef struct {
356  int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
357  int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
358  bool vacuuming; /**< Enable vacuuming? */
359  int32_t main; /**< Main brush state. */
360  int32_t side; /**< Side brush state. */
361  } SetMotorsMessage_data_t;
362 #pragma pack(pop)
363 
364  SetMotorsMessage_data_t *data;
365 
366  public:
367  SetMotorsMessage(const bool ini_vacuuming, const BrushState ini_main, const BrushState ini_side);
369  ~SetMotorsMessage();
370 
372  /* Methods */
373  bool is_vacuuming() const;
374  void set_vacuuming(const bool new_vacuuming);
375  size_t maxlenof_vacuuming() const;
376  BrushState main() const;
377  void set_main(const BrushState new_main);
378  size_t maxlenof_main() const;
379  BrushState side() const;
380  void set_side(const BrushState new_side);
381  size_t maxlenof_side() const;
382  virtual Message * clone() const;
383  };
384 
385  virtual bool message_valid(const Message *message) const;
386  private:
389 
390  public:
391  /* Methods */
392  Mode mode() const;
393  void set_mode(const Mode new_mode);
394  size_t maxlenof_mode() const;
395  bool is_wheel_drop_left() const;
396  void set_wheel_drop_left(const bool new_wheel_drop_left);
397  size_t maxlenof_wheel_drop_left() const;
398  bool is_wheel_drop_right() const;
399  void set_wheel_drop_right(const bool new_wheel_drop_right);
400  size_t maxlenof_wheel_drop_right() const;
401  bool is_bump_left() const;
402  void set_bump_left(const bool new_bump_left);
403  size_t maxlenof_bump_left() const;
404  bool is_bump_right() const;
405  void set_bump_right(const bool new_bump_right);
406  size_t maxlenof_bump_right() const;
407  bool is_wall() const;
408  void set_wall(const bool new_wall);
409  size_t maxlenof_wall() const;
410  bool is_cliff_left() const;
411  void set_cliff_left(const bool new_cliff_left);
412  size_t maxlenof_cliff_left() const;
413  bool is_cliff_front_left() const;
414  void set_cliff_front_left(const bool new_cliff_front_left);
415  size_t maxlenof_cliff_front_left() const;
416  bool is_cliff_front_right() const;
417  void set_cliff_front_right(const bool new_cliff_front_right);
418  size_t maxlenof_cliff_front_right() const;
419  bool is_cliff_right() const;
420  void set_cliff_right(const bool new_cliff_right);
421  size_t maxlenof_cliff_right() const;
422  bool is_virtual_wall() const;
423  void set_virtual_wall(const bool new_virtual_wall);
424  size_t maxlenof_virtual_wall() const;
425  bool is_overcurrent_side_brush() const;
426  void set_overcurrent_side_brush(const bool new_overcurrent_side_brush);
427  size_t maxlenof_overcurrent_side_brush() const;
428  bool is_overcurrent_main_brush() const;
429  void set_overcurrent_main_brush(const bool new_overcurrent_main_brush);
430  size_t maxlenof_overcurrent_main_brush() const;
431  bool is_overcurrent_left_wheel() const;
432  void set_overcurrent_left_wheel(const bool new_overcurrent_left_wheel);
433  size_t maxlenof_overcurrent_left_wheel() const;
434  bool is_overcurrent_right_wheel() const;
435  void set_overcurrent_right_wheel(const bool new_overcurrent_right_wheel);
436  size_t maxlenof_overcurrent_right_wheel() const;
437  bool is_dirt_detect() const;
438  void set_dirt_detect(const bool new_dirt_detect);
439  size_t maxlenof_dirt_detect() const;
441  void set_ir_opcode_omni(const InfraredCharacter new_ir_opcode_omni);
442  size_t maxlenof_ir_opcode_omni() const;
443  bool is_button_clean() const;
444  void set_button_clean(const bool new_button_clean);
445  size_t maxlenof_button_clean() const;
446  bool is_button_spot() const;
447  void set_button_spot(const bool new_button_spot);
448  size_t maxlenof_button_spot() const;
449  bool is_button_dock() const;
450  void set_button_dock(const bool new_button_dock);
451  size_t maxlenof_button_dock() const;
452  bool is_button_minute() const;
453  void set_button_minute(const bool new_button_minute);
454  size_t maxlenof_button_minute() const;
455  bool is_button_hour() const;
456  void set_button_hour(const bool new_button_hour);
457  size_t maxlenof_button_hour() const;
458  bool is_button_day() const;
459  void set_button_day(const bool new_button_day);
460  size_t maxlenof_button_day() const;
461  bool is_button_schedule() const;
462  void set_button_schedule(const bool new_button_schedule);
463  size_t maxlenof_button_schedule() const;
464  bool is_button_clock() const;
465  void set_button_clock(const bool new_button_clock);
466  size_t maxlenof_button_clock() const;
467  int16_t distance() const;
468  void set_distance(const int16_t new_distance);
469  size_t maxlenof_distance() const;
470  int16_t angle() const;
471  void set_angle(const int16_t new_angle);
472  size_t maxlenof_angle() const;
474  void set_charging_state(const ChargingState new_charging_state);
475  size_t maxlenof_charging_state() const;
476  uint16_t voltage() const;
477  void set_voltage(const uint16_t new_voltage);
478  size_t maxlenof_voltage() const;
479  int16_t current() const;
480  void set_current(const int16_t new_current);
481  size_t maxlenof_current() const;
482  int8_t temperature() const;
483  void set_temperature(const int8_t new_temperature);
484  size_t maxlenof_temperature() const;
485  uint16_t battery_charge() const;
486  void set_battery_charge(const uint16_t new_battery_charge);
487  size_t maxlenof_battery_charge() const;
488  uint16_t battery_capacity() const;
489  void set_battery_capacity(const uint16_t new_battery_capacity);
490  size_t maxlenof_battery_capacity() const;
491  uint16_t wall_signal() const;
492  void set_wall_signal(const uint16_t new_wall_signal);
493  size_t maxlenof_wall_signal() const;
494  uint16_t cliff_left_signal() const;
495  void set_cliff_left_signal(const uint16_t new_cliff_left_signal);
496  size_t maxlenof_cliff_left_signal() const;
497  uint16_t cliff_front_left_signal() const;
498  void set_cliff_front_left_signal(const uint16_t new_cliff_front_left_signal);
499  size_t maxlenof_cliff_front_left_signal() const;
500  uint16_t cliff_front_right_signal() const;
501  void set_cliff_front_right_signal(const uint16_t new_cliff_front_right_signal);
502  size_t maxlenof_cliff_front_right_signal() const;
503  uint16_t cliff_right_signal() const;
504  void set_cliff_right_signal(const uint16_t new_cliff_right_signal);
505  size_t maxlenof_cliff_right_signal() const;
506  bool is_home_base_charger_available() const;
507  void set_home_base_charger_available(const bool new_home_base_charger_available);
509  bool is_internal_charger_available() const;
510  void set_internal_charger_available(const bool new_internal_charger_available);
512  uint8_t song_number() const;
513  void set_song_number(const uint8_t new_song_number);
514  size_t maxlenof_song_number() const;
515  bool is_song_playing() const;
516  void set_song_playing(const bool new_song_playing);
517  size_t maxlenof_song_playing() const;
518  int16_t velocity() const;
519  void set_velocity(const int16_t new_velocity);
520  size_t maxlenof_velocity() const;
521  int16_t radius() const;
522  void set_radius(const int16_t new_radius);
523  size_t maxlenof_radius() const;
524  int16_t velocity_right() const;
525  void set_velocity_right(const int16_t new_velocity_right);
526  size_t maxlenof_velocity_right() const;
527  int16_t velocity_left() const;
528  void set_velocity_left(const int16_t new_velocity_left);
529  size_t maxlenof_velocity_left() const;
530  uint16_t encoder_counts_left() const;
531  void set_encoder_counts_left(const uint16_t new_encoder_counts_left);
532  size_t maxlenof_encoder_counts_left() const;
533  uint16_t encoder_counts_right() const;
534  void set_encoder_counts_right(const uint16_t new_encoder_counts_right);
535  size_t maxlenof_encoder_counts_right() const;
536  bool is_bumper_left() const;
537  void set_bumper_left(const bool new_bumper_left);
538  size_t maxlenof_bumper_left() const;
539  bool is_bumper_front_left() const;
540  void set_bumper_front_left(const bool new_bumper_front_left);
541  size_t maxlenof_bumper_front_left() const;
542  bool is_bumper_center_left() const;
543  void set_bumper_center_left(const bool new_bumper_center_left);
544  size_t maxlenof_bumper_center_left() const;
545  bool is_bumper_center_right() const;
546  void set_bumper_center_right(const bool new_bumper_center_right);
547  size_t maxlenof_bumper_center_right() const;
548  bool is_bumper_front_right() const;
549  void set_bumper_front_right(const bool new_bumper_front_right);
550  size_t maxlenof_bumper_front_right() const;
551  bool is_bumper_right() const;
552  void set_bumper_right(const bool new_bumper_right);
553  size_t maxlenof_bumper_right() const;
554  uint16_t light_bump_left() const;
555  void set_light_bump_left(const uint16_t new_light_bump_left);
556  size_t maxlenof_light_bump_left() const;
557  uint16_t light_bump_front_left() const;
558  void set_light_bump_front_left(const uint16_t new_light_bump_front_left);
559  size_t maxlenof_light_bump_front_left() const;
560  uint16_t light_bump_center_left() const;
561  void set_light_bump_center_left(const uint16_t new_light_bump_center_left);
562  size_t maxlenof_light_bump_center_left() const;
563  uint16_t light_bump_center_right() const;
564  void set_light_bump_center_right(const uint16_t new_light_bump_center_right);
565  size_t maxlenof_light_bump_center_right() const;
566  uint16_t light_bump_front_right() const;
567  void set_light_bump_front_right(const uint16_t new_light_bump_front_right);
568  size_t maxlenof_light_bump_front_right() const;
569  uint16_t light_bump_right() const;
570  void set_light_bump_right(const uint16_t new_light_bump_right);
571  size_t maxlenof_light_bump_right() const;
573  void set_ir_opcode_left(const InfraredCharacter new_ir_opcode_left);
574  size_t maxlenof_ir_opcode_left() const;
576  void set_ir_opcode_right(const InfraredCharacter new_ir_opcode_right);
577  size_t maxlenof_ir_opcode_right() const;
578  int16_t left_motor_current() const;
579  void set_left_motor_current(const int16_t new_left_motor_current);
580  size_t maxlenof_left_motor_current() const;
581  int16_t right_motor_current() const;
582  void set_right_motor_current(const int16_t new_right_motor_current);
583  size_t maxlenof_right_motor_current() const;
584  int16_t main_brush_current() const;
585  void set_main_brush_current(const int16_t new_main_brush_current);
586  size_t maxlenof_main_brush_current() const;
587  int16_t side_brush_current() const;
588  void set_side_brush_current(const int16_t new_side_brush_current);
589  size_t maxlenof_side_brush_current() const;
590  bool is_caster_stasis() const;
591  void set_caster_stasis(const bool new_caster_stasis);
592  size_t maxlenof_caster_stasis() const;
593  virtual Message * create_message(const char *type) const;
594 
595  virtual void copy_values(const Interface *other);
596  virtual const char * enum_tostring(const char *enumtype, int val) const;
597 
598 };
599 
600 } // end namespace fawkes
601 
602 #endif
void set_button_schedule(const bool new_button_schedule)
Set button_schedule value.
const char * tostring_BrushState(BrushState value) const
Convert BrushState constant to string.
size_t maxlenof_light_bump_center_left() const
Get maximum length of light_bump_center_left value.
size_t maxlenof_button_clock() const
Get maximum length of button_clock value.
void set_battery_charge(const uint16_t new_battery_charge)
Set battery_charge value.
InfraredCharacter ir_opcode_left() const
Get ir_opcode_left value.
size_t maxlenof_song_number() const
Get maximum length of song_number value.
size_t maxlenof_radius() const
Get maximum length of radius value.
size_t maxlenof_light_bump_front_left() const
Get maximum length of light_bump_front_left value.
size_t maxlenof_light_bump_center_right() const
Get maximum length of light_bump_center_right value.
size_t maxlenof_home_base_charger_available() const
Get maximum length of home_base_charger_available value.
bool is_cliff_right() const
Get cliff_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.
bool is_virtual_wall() const
Get virtual_wall value.
void set_current(const int16_t new_current)
Set current value.
uint16_t cliff_front_left_signal() const
Get cliff_front_left_signal value.
int16_t side_brush_current() const
Get side_brush_current value.
size_t maxlenof_song_playing() const
Get maximum length of song_playing value.
bool is_home_base_charger_available() const
Get home_base_charger_available value.
Roomba 500 dock: red and green buoy.
virtual Message * clone() const
Clone this message.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:43
void set_light_bump_center_right(const uint16_t new_light_bump_center_right)
Set light_bump_center_right value.
int16_t velocity_right() const
Get velocity_right value.
bool is_cliff_front_left() const
Get cliff_front_left value.
uint16_t light_bump_center_right() const
Get light_bump_center_right 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.
uint16_t battery_capacity() const
Get battery_capacity value.
uint16_t battery_charge() const
Get battery_charge value.
void set_radius(const int16_t new_radius)
Set radius value.
size_t maxlenof_wall() const
Get maximum length of wall value.
void set_light_bump_left(const uint16_t new_light_bump_left)
Set light_bump_left value.
bool is_overcurrent_main_brush() const
Get overcurrent_main_brush value.
void set_ir_opcode_omni(const InfraredCharacter new_ir_opcode_omni)
Set ir_opcode_omni value.
size_t maxlenof_cliff_front_right_signal() const
Get maximum length of cliff_front_right_signal value.
size_t maxlenof_light_bump_right() const
Get maximum length of light_bump_right value.
StopMessage Fawkes BlackBoard Interface Message.
Mode
Open Interface mode.
void set_velocity_right(const int16_t new_velocity_right)
Set velocity_right value.
const char * type() const
Get message type.
Definition: message.cpp:378
size_t maxlenof_bumper_left() const
Get maximum length of bumper_left value.
size_t maxlenof_distance() const
Get maximum length of distance value.
IR Remote Control: right arc button.
Roomba Discovery dock: red and green buoy and force field.
bool is_bumper_left() const
Get bumper_left value.
int16_t distance() const
Get distance value.
size_t maxlenof_caster_stasis() const
Get maximum length of caster_stasis value.
void set_caster_stasis(const bool new_caster_stasis)
Set caster_stasis value.
bool is_overcurrent_side_brush() const
Get overcurrent_side_brush value.
size_t maxlenof_cliff_front_left_signal() const
Get maximum length of cliff_front_left_signal 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.
IR Remote Control: max button.
const char * tostring_InfraredCharacter(InfraredCharacter value) const
Convert InfraredCharacter constant to string.
bool is_button_day() const
Get button_day value.
uint16_t light_bump_center_left() const
Get light_bump_center_left value.
uint16_t cliff_front_right_signal() const
Get cliff_front_right_signal value.
size_t maxlenof_virtual_wall() const
Get maximum length of virtual_wall value.
bool is_internal_charger_available() const
Get internal_charger_available value.
size_t maxlenof_button_schedule() const
Get maximum length of button_schedule value.
size_t maxlenof_side_brush_current() const
Get maximum length of side_brush_current value.
void set_song_number(const uint8_t new_song_number)
Set song_number value.
size_t maxlenof_wall_signal() const
Get maximum length of wall_signal value.
size_t maxlenof_battery_capacity() const
Get maximum length of battery_capacity 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.
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.
void set_wheel_drop_left(const bool new_wheel_drop_left)
Set wheel_drop_left value.
size_t maxlenof_bumper_right() const
Get maximum length of bumper_right value.
bool is_caster_stasis() const
Get caster_stasis value.
size_t maxlenof_bumper_front_left() const
Get maximum length of bumper_front_left value.
InfraredCharacter
Infrared character values.
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.
size_t maxlenof_button_spot() const
Get maximum length of button_spot value.
Passive mode, no control, only listening.
IR Remote Control: small button.
void set_overcurrent_right_wheel(const bool new_overcurrent_right_wheel)
Set overcurrent_right_wheel value.
void set_bumper_left(const bool new_bumper_left)
Set bumper_left value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
size_t maxlenof_cliff_left_signal() const
Get maximum length of cliff_left_signal value.
void set_button_day(const bool new_button_day)
Set button_day value.
void set_wall(const bool new_wall)
Set wall value.
size_t maxlenof_right_motor_current() const
Get maximum length of right_motor_current value.
uint16_t encoder_counts_left() const
Get encoder_counts_left value.
bool is_button_minute() const
Get button_minute 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.
IR Remote Control: medium button.
bool is_button_clock() const
Get button_clock value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
DockMessage Fawkes BlackBoard Interface Message.
bool is_bump_left() const
Get bump_left value.
Roomba Discovery dock: green buoy and force field.
bool is_cliff_left() const
Get cliff_left value.
IR scheduling remote: seek dock button.
bool is_bumper_right() const
Get bumper_right value.
size_t maxlenof_left_motor_current() const
Get maximum length of left_motor_current value.
size_t maxlenof_bump_left() const
Get maximum length of bump_left value.
void set_encoder_counts_left(const uint16_t new_encoder_counts_left)
Set encoder_counts_left value.
size_t maxlenof_dirt_detect() const
Get maximum length of dirt_detect value.
int16_t radius() const
Get radius value.
void set_button_spot(const bool new_button_spot)
Set button_spot value.
IR Remote Control: right button.
size_t maxlenof_bumper_center_left() const
Get maximum length of bumper_center_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.
size_t maxlenof_cliff_right() const
Get maximum length of cliff_right value.
uint8_t song_number() const
Get song_number value.
IR Remote Control: forward button.
size_t maxlenof_current() const
Get maximum length of current value.
size_t maxlenof_bump_right() const
Get maximum length of bump_right value.
size_t maxlenof_charging_state() const
Get maximum length of charging_state value.
int16_t main_brush_current() const
Get main_brush_current value.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
size_t maxlenof_mode() const
Get maximum length of mode value.
Roomba Discovery dock: red and green buoy.
void set_overcurrent_left_wheel(const bool new_overcurrent_left_wheel)
Set overcurrent_left_wheel value.
bool is_wheel_drop_right() const
Get wheel_drop_right value.
IR Remote Control: left button.
int16_t velocity() const
Get velocity value.
size_t maxlenof_overcurrent_side_brush() const
Get maximum length of overcurrent_side_brush value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_ir_opcode_left() const
Get maximum length of ir_opcode_left value.
bool is_bumper_center_left() const
Get bumper_center_left value.
size_t maxlenof_light_bump_front_right() const
Get maximum length of light_bump_front_right value.
void set_distance(const int16_t new_distance)
Set distance value.
const char * tostring_Mode(Mode value) const
Convert Mode constant to string.
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_velocity_right() const
Get maximum length of velocity_right value.
size_t maxlenof_main_brush_current() const
Get maximum length of main_brush_current value.
int16_t left_motor_current() const
Get left_motor_current value.
IR scheduling remote: download button.
void set_battery_capacity(const uint16_t new_battery_capacity)
Set battery_capacity value.
size_t maxlenof_button_minute() const
Get maximum length of button_minute value.
SetMotorsMessage Fawkes BlackBoard Interface Message.
bool is_bumper_center_right() const
Get bumper_center_right value.
uint16_t light_bump_front_left() const
Get light_bump_front_left 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.
uint16_t voltage() const
Get voltage value.
size_t maxlenof_button_clean() const
Get maximum length of button_clean value.
int16_t angle() const
Get angle value.
size_t maxlenof_ir_opcode_omni() const
Get maximum length of ir_opcode_omni value.
size_t maxlenof_cliff_front_left() const
Get maximum length of cliff_front_left value.
size_t maxlenof_overcurrent_main_brush() const
Get maximum length of overcurrent_main_brush value.
size_t maxlenof_battery_charge() const
Get maximum length of battery_charge value.
bool is_button_dock() const
Get button_dock value.
bool is_dirt_detect() const
Get dirt_detect value.
size_t maxlenof_cliff_right_signal() const
Get maximum length of cliff_right_signal value.
Roomba 500 dock: red and green buoy and force field.
size_t maxlenof_encoder_counts_left() const
Get maximum length of encoder_counts_left value.
void set_velocity_left(const int16_t new_velocity_left)
Set velocity_left value.
size_t maxlenof_bumper_front_right() const
Get maximum length of bumper_front_right value.
const char * tostring_ChargingState(ChargingState value) const
Convert ChargingState constant to string.
InfraredCharacter ir_opcode_right() const
Get ir_opcode_right value.
void set_bumper_center_right(const bool new_bumper_center_right)
Set bumper_center_right value.
Roomba500Interface Fawkes BlackBoard Interface.
uint16_t cliff_right_signal() const
Get cliff_right_signal value.
bool is_bumper_front_right() const
Get bumper_front_right value.
void set_bumper_front_left(const bool new_bumper_front_left)
Set bumper_front_left 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.
size_t maxlenof_button_dock() const
Get maximum length of button_dock value.
Control acquired, safety measures in place.
SetModeMessage Fawkes BlackBoard Interface Message.
bool is_wheel_drop_left() const
Get wheel_drop_left value.
void set_angle(const int16_t new_angle)
Set angle value.
bool is_button_clean() const
Get button_clean value.
uint16_t light_bump_front_right() const
Get light_bump_front_right value.
bool is_song_playing() const
Get song_playing value.
int8_t temperature() const
Get temperature value.
size_t maxlenof_light_bump_left() const
Get maximum length of light_bump_left value.
IR Remote Control: stop button.
uint16_t light_bump_left() const
Get light_bump_left value.
void set_button_clean(const bool new_button_clean)
Set button_clean value.
size_t maxlenof_wheel_drop_right() const
Get maximum length of wheel_drop_right value.
InfraredCharacter ir_opcode_omni() const
Get ir_opcode_omni value.
size_t maxlenof_overcurrent_left_wheel() const
Get maximum length of overcurrent_left_wheel value.
Control acquired, safety measures disabled.
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.
bool is_overcurrent_right_wheel() const
Get overcurrent_right_wheel value.
size_t maxlenof_angle() const
Get maximum length of angle value.
size_t maxlenof_button_day() const
Get maximum length of button_day value.
Roomba 500 dock: green buoy and force field.
bool is_button_schedule() const
Get button_schedule value.
void set_cliff_front_right(const bool new_cliff_front_right)
Set cliff_front_right value.
size_t maxlenof_button_hour() const
Get maximum length of button_hour value.
uint16_t encoder_counts_right() const
Get encoder_counts_right value.
ChargingState charging_state() const
Get charging_state value.
void set_cliff_left_signal(const uint16_t new_cliff_left_signal)
Set cliff_left_signal value.
size_t maxlenof_encoder_counts_right() const
Get maximum length of encoder_counts_right value.
size_t maxlenof_voltage() const
Get maximum length of voltage value.
bool is_button_spot() const
Get button_spot value.
uint16_t wall_signal() const
Get wall_signal value.
size_t maxlenof_wheel_drop_left() const
Get maximum length of wheel_drop_left value.
void set_bumper_center_left(const bool new_bumper_center_left)
Set bumper_center_left value.
size_t maxlenof_temperature() const
Get maximum length of temperature value.
bool is_bump_right() const
Get bump_right value.
uint16_t cliff_left_signal() const
Get cliff_left_signal value.
size_t maxlenof_overcurrent_right_wheel() const
Get maximum length of overcurrent_right_wheel value.
size_t maxlenof_velocity_left() const
Get maximum length of velocity_left value.
IR Remote Control: large/clean button.
void set_ir_opcode_left(const InfraredCharacter new_ir_opcode_left)
Set ir_opcode_left 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.
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.
bool is_bumper_front_left() const
Get bumper_front_left value.
void set_dirt_detect(const bool new_dirt_detect)
Set dirt_detect value.
int16_t velocity_left() const
Get velocity_left value.
void set_wall_signal(const uint16_t new_wall_signal)
Set wall_signal value.
void set_overcurrent_side_brush(const bool new_overcurrent_side_brush)
Set overcurrent_side_brush value.
void set_side_brush_current(const int16_t new_side_brush_current)
Set side_brush_current value.
void set_virtual_wall(const bool new_virtual_wall)
Set virtual_wall value.
DriveStraightMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_ir_opcode_right() const
Get maximum length of ir_opcode_right value.
void set_velocity(const int16_t new_velocity)
Set velocity value.
bool is_button_hour() const
Get button_hour value.
void set_voltage(const uint16_t new_voltage)
Set voltage value.
void set_bumper_right(const bool new_bumper_right)
Set bumper_right value.
size_t maxlenof_cliff_left() const
Get maximum length of cliff_left value.
void set_bumper_front_right(const bool new_bumper_front_right)
Set bumper_front_right value.
Mode mode() const
Get mode value.
bool is_wall() const
Get wall value.
DriveMessage Fawkes BlackBoard Interface Message.
Roomba 500 dock: green buoy and force field.
BrushState
State of the brushes.
int16_t current() const
Get current value.
uint16_t light_bump_right() const
Get light_bump_right value.
size_t maxlenof_bumper_center_right() const
Get maximum length of bumper_center_right value.
void set_button_clock(const bool new_button_clock)
Set button_clock value.
virtual Message * create_message(const char *type) const
Create message based on type name.
bool is_overcurrent_left_wheel() const
Get overcurrent_left_wheel value.
void set_overcurrent_main_brush(const bool new_overcurrent_main_brush)
Set overcurrent_main_brush value.
size_t maxlenof_internal_charger_available() const
Get maximum length of internal_charger_available value.
void set_encoder_counts_right(const uint16_t new_encoder_counts_right)
Set encoder_counts_right value.
bool is_cliff_front_right() const
Get cliff_front_right value.