Fawkes API  Fawkes Development Version
SyncWriterInterfaceListener Class Reference

Listener for writer events in bbsync plugin. More...

#include "writer_listener.h"

Inheritance diagram for SyncWriterInterfaceListener:

Public Member Functions

 SyncWriterInterfaceListener (BlackBoardSynchronizationThread *sync_thread, fawkes::Logger *logger, const char *desc)
 Constructor. More...
 
void add_interface (fawkes::Interface *interface)
 Add an interface to listen to. More...
 
void remove_interface (fawkes::Interface *interface)
 Remove an interface to listen to. More...
 
virtual void bb_interface_writer_added (fawkes::Interface *interface, unsigned int instance_serial) throw ()
 A writing instance has been opened for a watched interface. More...
 
virtual void bb_interface_writer_removed (fawkes::Interface *interface, unsigned int instance_serial) throw ()
 A writing instance has been closed for a watched interface. 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 void bb_interface_data_changed (Interface *interface) throw ()
 BlackBoard data changed notification. More...
 
virtual bool bb_interface_message_received (Interface *interface, Message *message) throw ()
 BlackBoard message received notification. 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...
 

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

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.

Author
Tim Niemueller

Definition at line 35 of file writer_listener.h.

Constructor & Destructor Documentation

◆ SyncWriterInterfaceListener()

SyncWriterInterfaceListener::SyncWriterInterfaceListener ( BlackBoardSynchronizationThread sync_thread,
fawkes::Logger logger,
const char *  desc 
)

Constructor.

Parameters
sync_threadparent sync thread to sent events to
loggerlogger for informational output
descdescription for this interface combination

Definition at line 44 of file writer_listener.cpp.

Member Function Documentation

◆ add_interface()

void SyncWriterInterfaceListener::add_interface ( fawkes::Interface interface)

Add an interface to listen to.

Parameters
interfaceinterface to listen to for writer events

Definition at line 58 of file writer_listener.cpp.

References fawkes::BlackBoardInterfaceListener::bbil_add_writer_interface().

Referenced by BlackBoardSynchronizationThread::loop().

◆ bb_interface_writer_added()

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.

Parameters
interfaceinterface instance that you supplied to bbil_add_writer_interface()
instance_serialthe instance serial of the writing instance that has just been added.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 74 of file writer_listener.cpp.

References BlackBoardSynchronizationThread::writer_added().

◆ bb_interface_writer_removed()

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.

Parameters
interfaceinterface instance that you supplied to bbil_add_writer_interface()
instance_serialthe instance serial of the writing instance that has just been removed.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 82 of file writer_listener.cpp.

References BlackBoardSynchronizationThread::writer_removed().

◆ remove_interface()

void SyncWriterInterfaceListener::remove_interface ( fawkes::Interface interface)

Remove an interface to listen to.

Parameters
interfaceinterface not to listen any longer for writer events

Definition at line 68 of file writer_listener.cpp.

References fawkes::BlackBoardInterfaceListener::bbil_remove_writer_interface().

Referenced by BlackBoardSynchronizationThread::loop().


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