24 #ifndef _BLACKBOARD_INTERFACE_LISTENER_H_
25 #define _BLACKBOARD_INTERFACE_LISTENER_H_
27 #include <blackboard/blackboard.h>
28 #include <core/utils/lock_queue.h>
29 #include <utils/misc/string_compare.h>
39 class BlackBoardNotifier;
85 unsigned int instance_serial)
throw();
87 unsigned int instance_serial)
throw();
89 unsigned int instance_serial)
throw();
91 unsigned int instance_serial)
throw();
118 void bbil_release_queue(
BlackBoard::ListenerRegisterFlag flag) throw();
121 void bbil_release_maps() throw();
124 Mutex *bbil_queue_mutex_;
125 Mutex *bbil_maps_mutex_;
BlackBoard interface listener.
Interface * bbil_writer_interface(const char *iuid)
Get interface instance for given UID.
QueueEntryType
Queue entry type.
@ WRITER
Writer event entry.
@ READER
Reader event entry.
@ MESSAGES
Message received event entry.
@ DATA
Data changed event entry.
Interface * bbil_reader_interface(const char *iuid)
Get interface instance for given UID.
void bbil_add_reader_interface(Interface *interface)
Add an interface to the reader addition/removal watch list.
void bbil_remove_reader_interface(Interface *interface)
Remove an interface to the reader addition/removal watch list.
void bbil_add_message_interface(Interface *interface)
Add an interface to the message received watch list.
void bbil_remove_writer_interface(Interface *interface)
Remove an interface to the writer addition/removal watch list.
std::map< std::string, Interface * > InterfaceMap
Map of currently active event subscriptions.
virtual void bb_interface_writer_removed(Interface *interface, unsigned int instance_serial)
A writing instance has been closed for a watched interface.
virtual void bb_interface_reader_removed(Interface *interface, unsigned int instance_serial)
A reading instance has been closed for a watched interface.
void bbil_remove_message_interface(Interface *interface)
Remove an interface to the message received watch list.
Interface * bbil_data_interface(const char *iuid)
Get interface instance for given UID.
void bbil_add_writer_interface(Interface *interface)
Add an interface to the writer addition/removal watch list.
virtual void bb_interface_reader_added(Interface *interface, unsigned int instance_serial)
A reading instance has been opened for a watched interface.
virtual bool bb_interface_message_received(Interface *interface, Message *message)
BlackBoard message received notification.
const char * bbil_name() const
Get BBIL name.
std::list< QueueEntry > InterfaceQueue
Queue of additions/removal of interfaces.
void bbil_remove_data_interface(Interface *interface)
Remove an interface to the data modification watch list.
void bbil_add_data_interface(Interface *interface)
Add an interface to the data modification watch list.
virtual void bb_interface_writer_added(Interface *interface, unsigned int instance_serial)
A writing instance has been opened for a watched interface.
Interface * bbil_message_interface(const char *iuid)
Get interface instance for given UID.
BlackBoardInterfaceListener(const char *name_format,...)
Constructor.
virtual ~BlackBoardInterfaceListener()
Destructor.
virtual void bb_interface_data_changed(Interface *interface)
BlackBoard data changed notification.
The BlackBoard abstract class.
Base class for all Fawkes BlackBoard interfaces.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Mutex mutual exclusion lock.
Fawkes library namespace.
Structure to hold maps for active subscriptions.
InterfaceMap writer
Writer event subscriptions.
InterfaceMap messages
Message received event subscriptions.
InterfaceMap data
Data event subscriptions.
InterfaceMap reader
Reader event subscriptions.
QueueEntryType type
What type this entry concerns.
Interface * interface
interface this entry concerns
bool op
true to add, false to remove