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;
115 void bbil_release_queue(
BlackBoard::ListenerRegisterFlag flag) noexcept;
118 void bbil_release_maps() noexcept;
121 Mutex *bbil_queue_mutex_;
122 Mutex *bbil_maps_mutex_;
BlackBoard interface listener.
Interface * bbil_reader_interface(const char *iuid) noexcept
Get interface instance for given UID.
virtual void bb_interface_writer_added(Interface *interface, Uuid instance_serial) noexcept
A writing instance has been opened for a watched interface.
QueueEntryType
Queue entry type.
@ WRITER
Writer event entry.
@ READER
Reader event entry.
@ MESSAGES
Message received event entry.
@ DATA
Data changed event entry.
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 bool bb_interface_message_received(Interface *interface, Message *message) noexcept
BlackBoard message received notification.
virtual void bb_interface_data_refreshed(Interface *interface) noexcept
BlackBoard data refreshed notification.
Interface * bbil_message_interface(const char *iuid) noexcept
Get interface instance for given UID.
void bbil_remove_message_interface(Interface *interface)
Remove an interface to the message received watch list.
virtual void bb_interface_data_changed(Interface *interface) noexcept
BlackBoard data changed notification.
void bbil_add_writer_interface(Interface *interface)
Add an interface to the writer addition/removal watch list.
virtual void bb_interface_writer_removed(Interface *interface, Uuid instance_serial) noexcept
A writing instance has been closed for a watched interface.
virtual void bb_interface_reader_added(Interface *interface, Uuid instance_serial) noexcept
A reading instance has been opened for a watched interface.
const char * bbil_name() const
Get BBIL name.
Interface * bbil_writer_interface(const char *iuid) noexcept
Get interface instance for given UID.
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.
virtual void bb_interface_reader_removed(Interface *interface, Uuid instance_serial) noexcept
A reading instance has been closed for a watched interface.
Interface * bbil_data_interface(const char *iuid) noexcept
Get interface instance for given UID.
void bbil_add_data_interface(Interface *interface)
Add an interface to the data modification watch list.
BlackBoardInterfaceListener(const char *name_format,...)
Constructor.
virtual ~BlackBoardInterfaceListener()
Destructor.
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.
A convenience class for universally unique identifiers (UUIDs).
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