Fawkes API
Fawkes Development Version
|
Listener for writer events in bbsync plugin. More...
#include "writer_listener.h"
Public Member Functions | |
SyncWriterInterfaceListener (BlackBoardSynchronizationThread *sync_thread, fawkes::Logger *logger, const char *desc) | |
Constructor. | |
void | add_interface (fawkes::Interface *interface) |
Add an interface to listen to. | |
void | remove_interface (fawkes::Interface *interface) |
Remove an interface to listen to. | |
virtual void | bb_interface_writer_added (fawkes::Interface *interface, unsigned int instance_serial) throw () |
A writing instance has been opened for a watched interface. | |
virtual void | bb_interface_writer_removed (fawkes::Interface *interface, unsigned int instance_serial) throw () |
A writing instance has been closed for a watched interface. |
Listener for writer events in bbsync plugin.
This class provides an adapter which reacts to writer events for a given number of (reading) interfaces. Note that the listener is not automatically registered, this has to be done from the outside.
SyncWriterInterfaceListener::SyncWriterInterfaceListener | ( | BlackBoardSynchronizationThread * | sync_thread, |
fawkes::Logger * | logger, | ||
const char * | desc | ||
) |
Constructor.
sync_thread | parent sync thread to sent events to |
logger | logger for informational output |
desc | description for this interface combination |
Definition at line 44 of file writer_listener.cpp.
void SyncWriterInterfaceListener::add_interface | ( | fawkes::Interface * | interface | ) |
Add an interface to listen to.
interface | interface to listen to for writer events |
Definition at line 58 of file writer_listener.cpp.
References fawkes::BlackBoardInterfaceListener::bbil_add_writer_interface().
void SyncWriterInterfaceListener::bb_interface_writer_added | ( | fawkes::Interface * | interface, |
unsigned int | instance_serial | ||
) | throw () [virtual] |
A writing instance has been opened for a watched interface.
This is called whenever a writing instance of the interface you are watching is opened.
interface | interface instance that you supplied to bbil_add_writer_interface() |
instance_serial | the instance serial of the writing instance that has just been added. |
Reimplemented from fawkes::BlackBoardInterfaceListener.
Definition at line 74 of file writer_listener.cpp.
void SyncWriterInterfaceListener::bb_interface_writer_removed | ( | fawkes::Interface * | interface, |
unsigned int | instance_serial | ||
) | throw () [virtual] |
A writing instance has been closed for a watched interface.
This is called whenever a writing instance of an interface you are watching is closed.
interface | interface instance that you supplied to bbil_add_writer_interface() |
instance_serial | the instance serial of the writing instance that has just been removed. |
Reimplemented from fawkes::BlackBoardInterfaceListener.
Definition at line 82 of file writer_listener.cpp.
void SyncWriterInterfaceListener::remove_interface | ( | fawkes::Interface * | interface | ) |
Remove an interface to listen to.
interface | interface not to listen any longer for writer events |
Definition at line 68 of file writer_listener.cpp.
References fawkes::BlackBoardInterfaceListener::bbil_remove_writer_interface().