23 #include <blackboard/local.h> 24 #include <blackboard/bbconfig.h> 25 #include <blackboard/internal/message_manager.h> 26 #include <blackboard/internal/memory_manager.h> 27 #include <blackboard/internal/interface_manager.h> 28 #include <blackboard/internal/notifier.h> 29 #include <blackboard/net/handler.h> 32 #include <utils/ipc/shm.h> 33 #include <blackboard/shmem/header.h> 34 #include <blackboard/shmem/lister.h> 57 const char *magic_token,
bool master)
64 __msgmgr->set_interface_manager(__im);
80 __msgmgr->set_interface_manager(__im);
122 std::list<Interface *>
124 const char *id_pattern,
138 __im->
close(interface);
152 return __im->
list(type_pattern, id_pattern);
211 if ( __nethandler ) {
212 throw Exception(
"BlackBoardNetworkHandler already started");
215 __nethandler->
start();
static void erase_orphaned(const char *magic_token, SharedMemoryHeader *header, SharedMemoryLister *lister=0, const char *registry_name=0)
Erase orphaned (attach count = 0) shared memory segments of a given type.
LocalBlackBoard(size_t memsize)
Heap Memory Constructor.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)
Open interface for writing.
void close(Interface *interface)
Close interface.
virtual std::list< Interface * > open_multiple_for_reading(const char *type_pattern, const char *id_pattern="*", const char *owner=NULL)
Open multiple interfaces for reading.
static void cleanup(const char *magic_token, bool use_lister=false)
Cleanup orphaned BlackBoard segments.
virtual InterfaceInfoList * list_all()
Get list of all currently existing interfaces.
Fawkes library namespace.
BlackBoard memory manager.
Base class for all Fawkes BlackBoard interfaces.
virtual Interface * open_for_reading(const char *interface_type, const char *identifier, const char *owner=NULL)
Open interface for reading.
BlackBoard shared memory lister.
InterfaceInfoList * list(const char *type_pattern, const char *id_pattern) const
Get a constrained list of interfaces.
Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)
Open interface for writing.
virtual void start_nethandler(FawkesNetworkHub *hub)
Start network handler.
Interface information list.
virtual InterfaceInfoList * list(const char *type_pattern, const char *id_pattern)
Get list of interfaces matching type and ID patterns.
Base class for exceptions in Fawkes.
std::list< Interface * > open_multiple_for_reading(const char *type_pattern, const char *id_pattern="*", const char *owner=NULL)
Open all interfaces of the given type for reading.
virtual void close(Interface *interface)
Close interface.
virtual bool is_alive() const
Check if the BlackBoard is still alive.
BlackBoardNotifier * __notifier
Notifier for BB events.
void cancel()
Cancel a thread.
BlackBoard message manager.
const BlackBoardMemoryManager * memory_manager() const
Get memory manager.
Interface * open_for_reading(const char *interface_type, const char *identifier, const char *owner=NULL)
Open interface for reading.
void join()
Join the thread.
InterfaceInfoList * list_all() const
Get a list of interfaces.
BlackBoard Network Handler.
virtual ~LocalBlackBoard()
Destructor.
BlackBoard interface manager.
virtual bool try_aliveness_restore()
Try to restore the aliveness of the BlackBoard instance.
void start(bool wait=true)
Call this method to start the thread.