Fawkes API  Fawkes Development Version
JoystickBlackBoardLogger Class Reference

Log joystick data gathered via RemoteBlackBoard to console. More...

Inheritance diagram for JoystickBlackBoardLogger:

Public Member Functions

 JoystickBlackBoardLogger (ArgumentParser &argp, Logger *logger)
 Constructor. More...
 
 ~JoystickBlackBoardLogger ()
 Destructor. More...
 
virtual void bb_interface_data_changed (Interface *interface) throw ()
 BlackBoard data changed notification. More...
 
void handle_signal (int signum)
 Signal hanlding method. More...
 
void run ()
 Wait for quit signal from signal handler. More...
 
- Public Member Functions inherited from fawkes::BlackBoardInterfaceListener
 BlackBoardInterfaceListener (const char *name_format,...)
 Constructor. More...
 
virtual ~BlackBoardInterfaceListener ()
 Destructor. More...
 
const char * bbil_name () const
 Get BBIL name. More...
 
virtual bool bb_interface_message_received (Interface *interface, Message *message) throw ()
 BlackBoard message received notification. More...
 
virtual void bb_interface_writer_added (Interface *interface, unsigned int instance_serial) throw ()
 A writing instance has been opened for a watched interface. More...
 
virtual void bb_interface_writer_removed (Interface *interface, unsigned int instance_serial) throw ()
 A writing instance has been closed for a watched interface. More...
 
virtual void bb_interface_reader_added (Interface *interface, unsigned int instance_serial) throw ()
 A reading instance has been opened for a watched interface. More...
 
virtual void bb_interface_reader_removed (Interface *interface, unsigned int instance_serial) throw ()
 A reading instance has been closed for a watched interface. More...
 
- Public Member Functions inherited from fawkes::SignalHandler
virtual ~SignalHandler ()
 Virtual destructor. More...
 

Additional Inherited Members

- Public Types inherited from fawkes::BlackBoardInterfaceListener
enum  QueueEntryType { DATA = 0, MESSAGES = 1, READER = 2, WRITER = 3 }
 Queue entry type. More...
 
typedef std::list< QueueEntryInterfaceQueue
 Queue of additions/removal of interfaces. More...
 
typedef std::map< std::string, Interface * > InterfaceMap
 Map of currently active event subscriptions. More...
 
- Protected Member Functions inherited from fawkes::BlackBoardInterfaceListener
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...
 
Interfacebbil_data_interface (const char *iuid) throw ()
 Get interface instance for given UID. More...
 
Interfacebbil_message_interface (const char *iuid) throw ()
 Get interface instance for given UID. More...
 
Interfacebbil_reader_interface (const char *iuid) throw ()
 Get interface instance for given UID. More...
 
Interfacebbil_writer_interface (const char *iuid) throw ()
 Get interface instance for given UID. More...
 

Detailed Description

Log joystick data gathered via RemoteBlackBoard to console.

Author
Tim Niemueller

Definition at line 89 of file ffjoystick.cpp.

Constructor & Destructor Documentation

◆ JoystickBlackBoardLogger()

JoystickBlackBoardLogger::JoystickBlackBoardLogger ( ArgumentParser argp,
Logger logger 
)
inline

Constructor.

Parameters
argpargument parser
loggerlogger

Just a quick hack for rumble testing __joystick_if->msgq_enqueue( new JoystickInterface::StartRumbleMessage(1000, 0, JoystickInterface::DIRECTION_UP, 0xFFFF, 0x8000));

Definition at line 98 of file ffjoystick.cpp.

References fawkes::Logger::log_debug(), fawkes::ArgumentParser::parse_hostport(), and fawkes::Interface::read().

◆ ~JoystickBlackBoardLogger()

JoystickBlackBoardLogger::~JoystickBlackBoardLogger ( )
inline

Destructor.

Definition at line 130 of file ffjoystick.cpp.

Member Function Documentation

◆ bb_interface_data_changed()

virtual void JoystickBlackBoardLogger::bb_interface_data_changed ( Interface interface)
throw (
)
inlinevirtual

BlackBoard data changed notification.

This is called whenever the data in an interface that you registered for is modified. This happens if a writer calls the Interface::write() method.

Parameters
interfaceinterface instance that you supplied to bbil_add_data_interface()

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 136 of file ffjoystick.cpp.

References fawkes::Exception::print_trace().

◆ handle_signal()

void JoystickBlackBoardLogger::handle_signal ( int  signum)
inlinevirtual

Signal hanlding method.

Implement this method with the action you want to perform on the registered signals.

Parameters
signumsignal number of triggered signal
Author
Tim Niemueller

Implements fawkes::SignalHandler.

Definition at line 171 of file ffjoystick.cpp.

◆ run()

void JoystickBlackBoardLogger::run ( )
inline

Wait for quit signal from signal handler.

Definition at line 177 of file ffjoystick.cpp.

Referenced by JoystickBlackBoardActListener::bb_interface_message_received().


The documentation for this class was generated from the following file: