Fawkes API
Fawkes Development Version
|
Interface observer for blackboard network handler. More...
#include <>>
Public Member Functions | |
BlackBoardNetHandlerInterfaceObserver (BlackBoard *blackboard, FawkesNetworkHub *hub) | |
Constructor. More... | |
virtual | ~BlackBoardNetHandlerInterfaceObserver () |
Destructor. More... | |
virtual void | bb_interface_created (const char *type, const char *id) throw () |
BlackBoard interface created notification. More... | |
virtual void | bb_interface_destroyed (const char *type, const char *id) throw () |
BlackBoard interface destroyed notification. More... | |
![]() | |
BlackBoardInterfaceObserver () | |
Empty constructor. More... | |
virtual | ~BlackBoardInterfaceObserver () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
typedef LockMap< std::string, std::list< std::string > > | ObservedInterfaceLockMap |
Type for lockable interface type hash sets. More... | |
typedef ObservedInterfaceLockMap::iterator | ObservedInterfaceLockMapIterator |
Type for iterator of lockable interface type hash sets. More... | |
![]() | |
void | bbio_add_observed_create (const char *type_pattern, const char *id_pattern="*") throw () |
Add interface creation type to watch list. More... | |
void | bbio_add_observed_destroy (const char *type_pattern, const char *id_pattern="*") throw () |
Add interface destruction type to watch list. More... | |
ObservedInterfaceLockMap * | bbio_get_observed_create () throw () |
Get interface creation type watch list. More... | |
ObservedInterfaceLockMap * | bbio_get_observed_destroy () throw () |
Get interface destriction type watch list. More... | |
Interface observer for blackboard network handler.
This class is used by the BlackBoardNetworkHandler to track interface events (creation and destruction) and broadcast them to everybody listening.
Definition at line 34 of file interface_observer.h.
fawkes::BlackBoardNetHandlerInterfaceObserver::BlackBoardNetHandlerInterfaceObserver | ( | BlackBoard * | blackboard, |
FawkesNetworkHub * | hub | ||
) |
Constructor.
blackboard | local BlackBoard |
hub | Fawkes network hub to use to send messages |
Definition at line 50 of file interface_observer.cpp.
References fawkes::BlackBoardInterfaceObserver::bbio_add_observed_create(), fawkes::BlackBoardInterfaceObserver::bbio_add_observed_destroy(), and fawkes::BlackBoard::register_observer().
|
virtual |
Destructor.
Definition at line 64 of file interface_observer.cpp.
References fawkes::FawkesNetworkHub::broadcast(), fawkes::bb_ievent_msg_t::id, fawkes::LibLogger::log_warn(), fawkes::bb_ievent_msg_t::type, and fawkes::BlackBoard::unregister_observer().
|
virtual |
BlackBoard interface created notification.
This is called whenever an interface is created for a type that you registered for.
type | type of the interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call |
id | ID of the newly created interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call |
Reimplemented from fawkes::BlackBoardInterfaceObserver.
Definition at line 94 of file interface_observer.cpp.
|
virtual |
BlackBoard interface destroyed notification.
This is called whenever an interface is destroyed for a type that you registered for.
type | type of the interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call |
id | ID of the newly created interface. If you want to store this make a copy as it is not guaranteed that the supplied string exists for longer than the duration of the method call |
Reimplemented from fawkes::BlackBoardInterfaceObserver.
Definition at line 102 of file interface_observer.cpp.