Fawkes API  Fawkes Development Version
JoystickBlackBoardActListener Class Reference

Wake actuator thread on incomin messages. More...

Inheritance diagram for JoystickBlackBoardActListener:

List of all members.

Public Member Functions

 JoystickBlackBoardActListener (JoystickAcquisitionThread *aqt, BlackBoard *blackboard, JoystickInterface *joystick_if, Logger *logger)
 Constructor.
 ~JoystickBlackBoardActListener ()
 Destructor.
virtual bool bb_interface_message_received (Interface *interface, Message *message) throw ()
 BlackBoard message received notification.

Detailed Description

Wake actuator thread on incomin messages.

Author:
Tim Niemueller

Constructor & Destructor Documentation

JoystickBlackBoardActListener::JoystickBlackBoardActListener ( JoystickAcquisitionThread aqt,
BlackBoard blackboard,
JoystickInterface joystick_if,
Logger logger 
) [inline]

Constructor.

Parameters:
aqtacquisition thread to pass to message processor
blackboardblackboard to register for message event handling
joystick_ifjoystick interface to listen on for messages
loggerlogger

Definition at line 205 of file ffjoystick.cpp.

JoystickBlackBoardActListener::~JoystickBlackBoardActListener ( ) [inline]

Destructor.

Definition at line 220 of file ffjoystick.cpp.


Member Function Documentation

virtual bool JoystickBlackBoardActListener::bb_interface_message_received ( Interface interface,
Message message 
) throw () [inline, virtual]

BlackBoard message received notification.

This is called whenever a message is received for this interface. This method is only called for writing instances of an interface, never on reading instances. If you have processed the message already, you can order that the message is not enqueued by returning false. Returning true will enqueue the message as usual. You should only do very (very!) quick tasks directly in this method, as it is out of the regular thread context and can harm performance of other plugins and the system as a whole. Note that if you decide to return false the message is not referenced. If you want to keep it longer you have to ref() it by yourself. An example where this would really make sense is a "STOP" message for the motor, which needs to be processed ASAP and maybe even waiting a couple of miliseconds for the next cycle is not acceptable.

Parameters:
interfaceinterface instance that you supplied to bbil_add_message_interface()
messagethe message that was sent
Returns:
true to get the message enqueued afterwards as usual, false to prevent queuing of the message.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 227 of file ffjoystick.cpp.

References fawkes::Exception::print_trace().


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