24 #ifndef __INTERFACES_ROOMBA500INTERFACE_H_ 25 #define __INTERFACES_ROOMBA500INTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 133 typedef struct __attribute__((packed)) {
134 int64_t timestamp_sec;
135 int64_t timestamp_usec;
137 bool wheel_drop_left;
138 bool wheel_drop_right;
143 bool cliff_front_left;
144 bool cliff_front_right;
147 bool overcurrent_side_brush;
148 bool overcurrent_main_brush;
149 bool overcurrent_left_wheel;
150 bool overcurrent_right_wheel;
159 bool button_schedule;
176 bool home_base_charger_available;
178 bool internal_charger_available;
189 bool bumper_front_left;
190 bool bumper_center_left;
191 bool bumper_center_right;
192 bool bumper_front_right;
213 } Roomba500Interface_data_t;
215 Roomba500Interface_data_t *data;
227 typedef struct __attribute__((packed)) {
228 int64_t timestamp_sec;
229 int64_t timestamp_usec;
230 } StopMessage_data_t;
232 StopMessage_data_t *data;
244 virtual Message * clone()
const;
251 typedef struct __attribute__((packed)) {
252 int64_t timestamp_sec;
253 int64_t timestamp_usec;
254 } DockMessage_data_t;
256 DockMessage_data_t *data;
268 virtual Message * clone()
const;
275 typedef struct __attribute__((packed)) {
276 int64_t timestamp_sec;
277 int64_t timestamp_usec;
279 } SetModeMessage_data_t;
281 SetModeMessage_data_t *data;
297 virtual Message * clone()
const;
304 typedef struct __attribute__((packed)) {
305 int64_t timestamp_sec;
306 int64_t timestamp_usec;
308 } DriveStraightMessage_data_t;
310 DriveStraightMessage_data_t *data;
326 virtual Message * clone()
const;
333 typedef struct __attribute__((packed)) {
334 int64_t timestamp_sec;
335 int64_t timestamp_usec;
338 } DriveMessage_data_t;
340 DriveMessage_data_t *data;
347 DriveMessage(
const int16_t ini_velocity,
const int16_t ini_radius);
359 virtual Message * clone()
const;
366 typedef struct __attribute__((packed)) {
367 int64_t timestamp_sec;
368 int64_t timestamp_usec;
372 } SetMotorsMessage_data_t;
374 SetMotorsMessage_data_t *data;
381 SetMotorsMessage(
const bool ini_vacuuming,
const BrushState ini_main,
const BrushState ini_side);
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;
484 int16_t
angle()
const;
610 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
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.
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.
Brush is turning backward.
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.
Roomba 500 dock: reserved.
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.
Roomba 500 dock: green buoy.
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.
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.
Brush is turning forward.
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.
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.
Roomba Discovery dock: green buoy.
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.
Roomba Discovery dock: red buoy.
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.
Roomba 500 dock: red buoy.
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.
Roomba Discovery dock: reserved.
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.
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.