Fawkes API
Fawkes Development Version
|
Glue to post new data to a RemoteBlackBoard. More...
#include "remote_bb_poster.h"
Public Member Functions | |
JoystickRemoteBlackBoardPoster (const char *host, unsigned short int port, fawkes::Logger *logger) | |
Constructor. More... | |
~JoystickRemoteBlackBoardPoster () | |
Destructor. More... | |
fawkes::BlackBoard * | blackboard () |
Get blackboard. More... | |
fawkes::JoystickInterface * | joystick_if () |
Get joystick interface. More... | |
virtual void | joystick_changed (unsigned int pressed_buttons, float *axis_values) |
Joystick data changed. More... | |
virtual void | joystick_plugged (char num_axes, char num_buttons) |
A (new) joystick has been plugged in. More... | |
virtual void | joystick_unplugged () |
The joystick has been unplugged and is no longer available. More... | |
![]() | |
virtual | ~JoystickBlackBoardHandler () |
Virtual empty destructor. More... | |
Glue to post new data to a RemoteBlackBoard.
Definition at line 35 of file remote_bb_poster.h.
JoystickRemoteBlackBoardPoster::JoystickRemoteBlackBoardPoster | ( | const char * | host, |
unsigned short int | port, | ||
fawkes::Logger * | logger | ||
) |
Constructor.
host | remote bb host to connect to |
port | remote bb port to connect to |
logger | logger |
Definition at line 41 of file remote_bb_poster.cpp.
References fawkes::BlackBoard::open_for_writing().
JoystickRemoteBlackBoardPoster::~JoystickRemoteBlackBoardPoster | ( | ) |
Destructor.
Definition at line 53 of file remote_bb_poster.cpp.
References fawkes::BlackBoard::close().
|
inline |
Get blackboard.
Definition at line 45 of file remote_bb_poster.h.
Referenced by JoystickBlackBoardActListener::bb_interface_message_received().
|
virtual |
Joystick data changed.
pressed_buttons | the new pressed_buttons array |
axis_values | array of axis values, the length is at least num_axes() |
Implements JoystickBlackBoardHandler.
Definition at line 60 of file remote_bb_poster.cpp.
References fawkes::BlackBoard::is_alive(), fawkes::Logger::log_info(), fawkes::Logger::log_warn(), fawkes::Exception::print_trace(), fawkes::JoystickInterface::set_axis(), fawkes::JoystickInterface::set_pressed_buttons(), fawkes::BlackBoard::try_aliveness_restore(), and fawkes::Interface::write().
|
inline |
Get joystick interface.
Definition at line 50 of file remote_bb_poster.h.
Referenced by JoystickBlackBoardActListener::bb_interface_message_received().
|
virtual |
A (new) joystick has been plugged in.
num_axes | number of axes |
num_buttons | number of buttons |
Implements JoystickBlackBoardHandler.
Definition at line 85 of file remote_bb_poster.cpp.
References fawkes::JoystickInterface::set_num_axes(), fawkes::JoystickInterface::set_num_buttons(), and fawkes::Interface::write().
|
virtual |
The joystick has been unplugged and is no longer available.
Implements JoystickBlackBoardHandler.
Definition at line 93 of file remote_bb_poster.cpp.
References fawkes::JoystickInterface::set_num_axes(), fawkes::JoystickInterface::set_num_buttons(), and fawkes::Interface::write().