Small glue class that posts new data to a RemoteBlackBoard. More...

Public Member Functions | |
| JoystickBlackBoardPoster (ArgumentParser &argp, Logger *logger) | |
| Constructor. | |
| ~JoystickBlackBoardPoster () | |
| Destructor. | |
| virtual void | joystick_changed (unsigned int pressed_buttons, float *axis_x_values, float *axis_y_values) |
| Joystick data changed. | |
| void | joystick_plugged (char num_axes, char num_buttons) |
| A (new) joystick has been plugged in. | |
| void | joystick_unplugged () |
| The joystick has been unplugged and is no longer available. | |
Small glue class that posts new data to a RemoteBlackBoard.
Definition at line 87 of file ffjoystick.cpp.
| JoystickBlackBoardPoster::JoystickBlackBoardPoster | ( | ArgumentParser & | argp, | |
| Logger * | logger | |||
| ) | [inline] |
Constructor.
| argp | argument parser, makes use of -r flag for host:port. | |
| logger | logger |
Definition at line 94 of file ffjoystick.cpp.
References fawkes::BlackBoard::open_for_writing(), and fawkes::ArgumentParser::parse_hostport().
| JoystickBlackBoardPoster::~JoystickBlackBoardPoster | ( | ) | [inline] |
| virtual void JoystickBlackBoardPoster::joystick_changed | ( | unsigned int | pressed_buttons, | |
| float * | axis_x_values, | |||
| float * | axis_y_values | |||
| ) | [inline, virtual] |
Joystick data changed.
| pressed_buttons | the new pressed_buttons array | |
| axis_x_values | array of X axis values, the length is at least num_axes() | |
| axis_y_values | array of Y axis values, the length is at least num_axes() |
Implements JoystickBlackBoardHandler.
Definition at line 115 of file ffjoystick.cpp.
References fawkes::BlackBoard::is_alive(), fawkes::Logger::log_info(), fawkes::Logger::log_warn(), fawkes::Exception::print_trace(), fawkes::JoystickInterface::set_axis_x(), fawkes::JoystickInterface::set_axis_y(), fawkes::JoystickInterface::set_pressed_buttons(), fawkes::BlackBoard::try_aliveness_restore(), and fawkes::Interface::write().
| void JoystickBlackBoardPoster::joystick_plugged | ( | char | num_axes, | |
| char | num_buttons | |||
| ) | [inline, virtual] |
A (new) joystick has been plugged in.
| num_axes | number of axes | |
| num_buttons | number of buttons |
Implements JoystickBlackBoardHandler.
Definition at line 139 of file ffjoystick.cpp.
References fawkes::JoystickInterface::set_num_axes(), fawkes::JoystickInterface::set_num_buttons(), and fawkes::Interface::write().
| void JoystickBlackBoardPoster::joystick_unplugged | ( | ) | [inline, virtual] |
The joystick has been unplugged and is no longer available.
Implements JoystickBlackBoardHandler.
Definition at line 146 of file ffjoystick.cpp.
References fawkes::JoystickInterface::set_num_axes(), fawkes::JoystickInterface::set_num_buttons(), and fawkes::Interface::write().
1.6.1