Fawkes API Fawkes Development Version
|
Log joystick data gathered via RemoteBlackBoard to console. More...
Public Member Functions | |
JoystickBlackBoardLogger (ArgumentParser &argp, Logger *logger) | |
Constructor. More... | |
~JoystickBlackBoardLogger () | |
Destructor. More... | |
virtual void | bb_interface_data_refreshed (Interface *interface) noexcept |
BlackBoard data refreshed notification. More... | |
void | handle_signal (int signum) |
Signal hanlding method. More... | |
void | run () |
Wait for quit signal from signal handler. More... | |
![]() | |
BlackBoardInterfaceListener (const char *name_format,...) | |
Constructor. More... | |
virtual | ~BlackBoardInterfaceListener () |
Destructor. More... | |
const char * | bbil_name () const |
Get BBIL name. More... | |
virtual void | bb_interface_data_refreshed (Interface *interface) noexcept |
BlackBoard data refreshed notification. More... | |
virtual void | bb_interface_data_changed (Interface *interface) noexcept |
BlackBoard data changed notification. More... | |
virtual bool | bb_interface_message_received (Interface *interface, Message *message) noexcept |
BlackBoard message received notification. More... | |
virtual void | bb_interface_writer_added (Interface *interface, Uuid instance_serial) noexcept |
A writing instance has been opened for a watched interface. More... | |
virtual void | bb_interface_writer_removed (Interface *interface, Uuid instance_serial) noexcept |
A writing instance has been closed for a watched interface. More... | |
virtual void | bb_interface_reader_added (Interface *interface, Uuid instance_serial) noexcept |
A reading instance has been opened for a watched interface. More... | |
virtual void | bb_interface_reader_removed (Interface *interface, Uuid instance_serial) noexcept |
A reading instance has been closed for a watched interface. More... | |
![]() | |
virtual | ~SignalHandler () |
Virtual destructor. More... | |
virtual void | handle_signal (int signal)=0 |
Signal hanlding method. More... | |
Additional Inherited Members | |
![]() | |
enum | QueueEntryType { DATA = 0 , MESSAGES = 1 , READER = 2 , WRITER = 3 } |
Queue entry type. More... | |
typedef std::list< QueueEntry > | InterfaceQueue |
Queue of additions/removal of interfaces. More... | |
typedef std::map< std::string, Interface * > | InterfaceMap |
Map of currently active event subscriptions. More... | |
![]() | |
void | bbil_add_data_interface (Interface *interface) |
Add an interface to the data modification watch list. More... | |
void | bbil_add_message_interface (Interface *interface) |
Add an interface to the message received watch list. More... | |
void | bbil_add_reader_interface (Interface *interface) |
Add an interface to the reader addition/removal watch list. More... | |
void | bbil_add_writer_interface (Interface *interface) |
Add an interface to the writer addition/removal watch list. More... | |
void | bbil_remove_data_interface (Interface *interface) |
Remove an interface to the data modification watch list. More... | |
void | bbil_remove_message_interface (Interface *interface) |
Remove an interface to the message received watch list. More... | |
void | bbil_remove_reader_interface (Interface *interface) |
Remove an interface to the reader addition/removal watch list. More... | |
void | bbil_remove_writer_interface (Interface *interface) |
Remove an interface to the writer addition/removal watch list. More... | |
Interface * | bbil_data_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_message_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_reader_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_writer_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Log joystick data gathered via RemoteBlackBoard to console.
Definition at line 88 of file ffjoystick.cpp.
|
inline |
Constructor.
argp | argument parser |
logger | logger |
Just a quick hack for rumble testing joystick_if_->msgq_enqueue( new JoystickInterface::StartRumbleMessage(1000, 0, JoystickInterface::DIRECTION_UP, 0xFFFF, 0x8000));
Definition at line 95 of file ffjoystick.cpp.
References fawkes::BlackBoardInterfaceListener::bbil_add_data_interface(), fawkes::MultiLogger::log_debug(), fawkes::JoystickInterface::num_axes(), fawkes::JoystickInterface::num_buttons(), fawkes::BlackBoard::open_for_reading(), fawkes::ArgumentParser::parse_hostport(), fawkes::Interface::read(), and fawkes::BlackBoard::register_listener().
|
inline |
|
inlinevirtualnoexcept |
BlackBoard data refreshed notification.
This is called whenever the data in an interface that you registered for is refreshed. This happens when a writer calls the Interface::write(), regardless of whether any data have changed.
interface | interface instance that you supplied to bbil_add_data_interface() |
Reimplemented from fawkes::BlackBoardInterfaceListener.
Definition at line 132 of file ffjoystick.cpp.
References fawkes::JoystickInterface::axis(), fawkes::BlackBoard::is_alive(), fawkes::Logger::log_info(), fawkes::Logger::log_warn(), fawkes::JoystickInterface::pressed_buttons(), fawkes::Exception::print_trace(), fawkes::Interface::read(), and fawkes::BlackBoard::try_aliveness_restore().
|
inlinevirtual |
Signal hanlding method.
Implement this method with the action you want to perform on the registered signals.
signum | signal number of triggered signal |
Implements fawkes::SignalHandler.
Definition at line 174 of file ffjoystick.cpp.
References fawkes::WaitCondition::wake_all().
|
inline |
Wait for quit signal from signal handler.
Definition at line 181 of file ffjoystick.cpp.
References fawkes::WaitCondition::wait().