Fawkes API
Fawkes Development Version
|
The BlackBoard abstract class. More...
#include <>>
Public Types | |
enum | ListenerRegisterFlag { BBIL_FLAG_DATA = 1, BBIL_FLAG_MESSAGES = 2, BBIL_FLAG_READER = 4, BBIL_FLAG_WRITER = 8, BBIL_FLAG_ALL = 15 } |
Flags to constrain listener registration/updates. More... | |
Public Member Functions | |
virtual | ~BlackBoard () |
Destructor. More... | |
virtual Interface * | open_for_reading (const char *interface_type, const char *identifier, const char *owner=NULL)=0 |
Open interface for reading. More... | |
virtual Interface * | open_for_writing (const char *interface_type, const char *identifier, const char *owner=NULL)=0 |
Open interface for writing. More... | |
virtual void | close (Interface *interface)=0 |
Close interface. More... | |
virtual Interface * | open_for_reading_f (const char *interface_type, const char *identifier,...) |
Open interface for reading with identifier format string. More... | |
virtual Interface * | open_for_writing_f (const char *interface_type, const char *identifier,...) |
Open interface for writing with identifier format string. More... | |
virtual InterfaceInfoList * | list_all ()=0 |
Get list of all currently existing interfaces. More... | |
virtual InterfaceInfoList * | list (const char *type_pattern, const char *id_pattern)=0 |
Get list of interfaces matching type and ID patterns. More... | |
virtual bool | is_alive () const =0 throw () |
Check if the BlackBoard is still alive. More... | |
virtual bool | try_aliveness_restore ()=0 throw () |
Try to restore the aliveness of the BlackBoard instance. More... | |
virtual std::list< Interface * > | open_multiple_for_reading (const char *type_pattern, const char *id_pattern="*", const char *owner=NULL)=0 |
Open multiple interfaces for reading. More... | |
template<class InterfaceType > | |
std::list< InterfaceType * > | open_multiple_for_reading (const char *id_pattern="*", const char *owner=NULL) |
Open all interfaces of given type for reading. More... | |
template<class InterfaceType > | |
InterfaceType * | open_for_reading (const char *identifier, const char *owner=NULL) |
Get interface of given type. More... | |
template<class InterfaceType > | |
InterfaceType * | open_for_writing (const char *identifier, const char *owner=NULL) |
Get writer interface of given type. More... | |
template<class InterfaceType > | |
InterfaceType * | open_for_reading_f (const char *identifier,...) |
Get interface of given type with identifier format string. More... | |
template<class InterfaceType > | |
InterfaceType * | open_for_writing_f (const char *identifier,...) |
Get writer interface of given type with identifier format string. More... | |
virtual void | register_listener (BlackBoardInterfaceListener *listener, ListenerRegisterFlag flag=BBIL_FLAG_ALL) |
Register BB event listener. More... | |
virtual void | update_listener (BlackBoardInterfaceListener *listener, ListenerRegisterFlag flag=BBIL_FLAG_ALL) |
Update BB event listener. More... | |
virtual void | unregister_listener (BlackBoardInterfaceListener *listener) |
Unregister BB interface listener. More... | |
virtual void | register_observer (BlackBoardInterfaceObserver *observer) |
Register BB interface observer. More... | |
virtual void | unregister_observer (BlackBoardInterfaceObserver *observer) |
Unregister BB interface observer. More... | |
std::string | demangle_fawkes_interface_name (const char *type) |
Produce interface name from C++ signature. More... | |
std::string | format_identifier (const char *identifier_format, va_list arg) |
Get formatted identifier string. More... | |
Protected Member Functions | |
BlackBoard (bool create_notifier=true) | |
Constructor. More... | |
Protected Attributes | |
BlackBoardNotifier * | __notifier |
Notifier for BB events. More... | |
The BlackBoard abstract class.
This class is the single one entry point for programs that use the BlackBoard. It is used to open and close interfaces, register and unregister listeners and observers and to maintain the BlackBoard shared memory segment. Not other classes shall be used directly.
The BlackBoard holds a number of so-called interfaces. The interfaces store data and provide means to pass messages. The BlackBoard also allows for registering listeners and observers. The listeners can be used to get events for specific interfaces while the observer gets global interface creation and destruction events for a specified set of types of interfaces.
An interface consists of a few parts. First there is the storage block. This is a chunk of memory in the shared memory segment where the actual data is stored. Then there is the accessor object, an instance of a derivate of the Interface class which is used to access the data in the shared memory segment. Last but not least there is an internal message queue that can be used to pass messages from readers to the writer (not the other way around!).
The interface manager keeps track of all the allocated interfaces. Events can be triggered if a specific interface changes (like logging the data to a file, sending it over the network or notifying another interface of such a change).
Interfaces can only be instantiated through the BlackBoard. The BlackBoard instantiates an interface on request and guarantees that the instance is fully initialized and usable. This cannot be guaranteed if instantiating an interface through any other means!
Interfaces can be opened for reading or writing, not both! There can be only one writer at a time for any given interface. Interfaces are identified via a type (which denotes the data and its semantics) and an identifier. There may be several interfaces for a given type, but the identifier has to be unique. The identifier is in most cases a well-known string that is used to share data among plugins.
Interfaces provide a way to propagate data to the writer via messages. Available messages types depend on the interface type. Only matching messages are accepted and can be queued.
The BlackBoard can operate in two modes, master and slave. Only the master creates and destroys the shared memory segment. Currently, the slave mode is not fully implemented and thus may not be used.
Definition at line 48 of file blackboard.h.
Flags to constrain listener registration/updates.
Definition at line 98 of file blackboard.h.
|
virtual |
|
protected |
Constructor.
create_notifier | true to create the notifier used for event notification, false not to create. Set to false only if you either forward notifier related calls or implement custom handling. |
Definition at line 169 of file blackboard.cpp.
References __notifier.
|
pure virtual |
Close interface.
interface | interface to close |
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by RosJointThread::bb_interface_created(), RosPosition3DThread::bb_interface_created(), MongoLogBlackboardThread::bb_interface_created(), LaserPointCloudThread::bb_interface_created(), RosLaserScanThread::bb_interface_created(), RosTfThread::bb_interface_created(), fawkes::tf::TransformListener::bb_interface_created(), RobotStatePublisherThread::bb_interface_created(), RosJointThread::bb_interface_reader_removed(), RosPosition3DThread::bb_interface_reader_removed(), LaserPointCloudThread::bb_interface_reader_removed(), RosLaserScanThread::bb_interface_reader_removed(), RosTfThread::bb_interface_reader_removed(), fawkes::tf::TransformListener::bb_interface_reader_removed(), RobotStatePublisherThread::bb_interface_reader_removed(), fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), fawkes::BlackBoardNetworkHandler::client_disconnected(), BlackboardCLIPSFeature::clips_context_destroyed(), fawkes::BlackBoardWithOwnership::close(), fawkes::LuaInterfaceImporter::close_reading_interfaces(), fawkes::LuaInterfaceImporter::close_writing_interfaces(), fawkes::EclExternalBlackBoard::disconnect(), ExampleBlackBoardThread::finalize(), JacoActThread::finalize(), JacoBimanualActThread::finalize(), JoystickSensorThread::finalize(), BallPosLogThread::finalize(), AgentControlThread::finalize(), RoombaJoystickThread::finalize(), OpenRaveMessageHandlerThread::finalize(), ROSOdometryThread::finalize(), IMUSensorThread::finalize(), FestivalSynthThread::finalize(), RobotinoRosJointsThread::finalize(), ROSCmdVelThread::finalize(), PanTiltDirectedPerceptionThread::finalize(), JoystickTeleOpThread::finalize(), RosNavgraphBreakoutThread::finalize(), WebviewPtzCamThread::finalize(), LaserSensorThread::finalize(), FliteSynthThread::finalize(), PanTiltSonyEviD100PThread::finalize(), RosJointThread::finalize(), RobotinoIrPclThread::finalize(), RosPosition3DThread::finalize(), RosNavigatorThread::finalize(), MapLaserGenThread::finalize(), OpenNiHandTrackerThread::finalize(), LaserSimThread::finalize(), IMUAcquisitionThread::finalize(), PointCloudDBStoreThread::finalize(), RefBoxCommThread::finalize(), NaoQiSpeechSynthThread::finalize(), NavGraphGeneratorThread::finalize(), RobotinoSensorThread::finalize(), LocalizationSimThread::finalize(), VisLocalizationThread::finalize(), LaserPointCloudThread::finalize(), NaoQiLedThread::finalize(), NaoQiMotionThread::finalize(), LaserFilterThread::finalize(), PointCloudDBRetrieveThread::finalize(), ClipsAgentThread::finalize(), RosLaserScanThread::finalize(), RosMoveBaseThread::finalize(), ColliActThread::finalize(), BBLogReplayThread::finalize(), RosSkillerThread::finalize(), XabslEngineThread::finalize(), RobotinoActThread::finalize(), NaoQiButtonThread::finalize(), DynamixelDriverThread::finalize(), AmclROSThread::finalize(), OpenNiUserTrackerThread::finalize(), PanTiltRX28Thread::finalize(), PointCloudDBMergeThread::finalize(), NavGraphClustersThread::finalize(), PointCloudDBROSCommThread::finalize(), BBLoggerThread::finalize(), NaoQiDCMThread::finalize(), LaserClusterThread::finalize(), RosTfThread::finalize(), LuaAgentPeriodicExecutionThread::finalize(), RobotinoSimThread::finalize(), LuaAgentContinuousExecutionThread::finalize(), NavGraphThread::finalize(), PlayerClientThread::finalize(), ColliThread::finalize(), FvAcquisitionThread::finalize(), Bumblebee2Thread::finalize(), SkillerExecutionThread::finalize(), KatanaActThread::finalize(), NavGraphInteractiveThread::finalize(), LaserLinesThread::finalize(), AmclThread::finalize(), RobotStatePublisherThread::finalize(), TabletopObjectsThread::finalize(), OpenNiHandTrackerThread::hand_destroy(), BallPosLogThread::init(), RoombaJoystickThread::init(), WebviewPtzCamThread::init(), MongoLogBlackboardThread::init(), Roomba500Thread::init(), NaoQiLedThread::init(), ClipsAgentThread::init(), LaserFilterThread::init(), DynamixelDriverThread::init(), LaserClusterThread::init(), BBLoggerThread::init(), ColliThread::init(), SkillerExecutionThread::init(), LaserLinesThread::init(), RobotStatePublisherThread::init(), TabletopObjectsThread::init(), fawkes::EclExternalBlackBoard::interfaces(), BlackBoardSynchronizationThread::loop(), fawkes::BlackBoardNetworkHandler::loop(), NavGraphClustersThread::loop(), OpenNiUserTrackerThread::new_user(), LaserDeadSpotCalibrator::num_detected_spots(), fawkes::openni::SkelIfObserver::process_queue(), BatteryMonitorTreeView::rem_host(), LaserFilterThread::wait_done(), BlackboardCLIPSFeature::~BlackboardCLIPSFeature(), fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer(), fawkes::BlackBoardNetworkHandler::~BlackBoardNetworkHandler(), Bumblebee2CalibGtkWindow::~Bumblebee2CalibGtkWindow(), fawkes::EclExternalBlackBoard::~EclExternalBlackBoard(), JoystickRemoteBlackBoardPoster::~JoystickRemoteBlackBoardPoster(), LuaAgentContinuousExecutionThread::~LuaAgentContinuousExecutionThread(), LuaAgentPeriodicExecutionThread::~LuaAgentPeriodicExecutionThread(), NaoGuiGtkWindow::~NaoGuiGtkWindow(), RemoteBlackBoardRefBoxProcessor::~RemoteBlackBoardRefBoxProcessor(), SkillGuiGtkWindow::~SkillGuiGtkWindow(), fawkes::tf::TransformListener::~TransformListener(), and fawkes::tf::TransformPublisher::~TransformPublisher().
std::string fawkes::BlackBoard::demangle_fawkes_interface_name | ( | const char * | type | ) |
Produce interface name from C++ signature.
This extracts the interface name for a mangled signature. It has has been coded with GCC (4) in mind and assumes interfaces to be in the fawkes namespace. It cannot deal with anythin else.
type | type name to strip |
Definition at line 260 of file blackboard.cpp.
Referenced by open_for_reading(), open_for_reading_f(), open_for_writing(), open_for_writing_f(), and open_multiple_for_reading().
std::string fawkes::BlackBoard::format_identifier | ( | const char * | identifier_format, |
va_list | arg | ||
) |
Get formatted identifier string.
identifier_format | identifier format string (sprintf syntax) |
arg | arguments for format string |
Definition at line 276 of file blackboard.cpp.
Referenced by open_for_reading_f(), and open_for_writing_f().
|
pure virtual |
Check if the BlackBoard is still alive.
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by RemoteBlackBoardRefBoxProcessor::check_connection(), fawkes::BlackBoardWithOwnership::is_alive(), JoystickRemoteBlackBoardPoster::joystick_changed(), BlackBoardSynchronizationThread::loop(), RemoteBlackBoardRefBoxProcessor::refbox_process(), and fawkes::InterfaceChooserDialog::run_and_open_for_reading().
|
pure virtual |
Get list of interfaces matching type and ID patterns.
See the fnmatch() documentation for possible patterns.
type_pattern | pattern with shell like globs (* for any number of characters, ? for exactly one character) to match the interface type. |
id_pattern | pattern with shell like globs (* for any number of characters, ? for exactly one character) to match the interface ID. |
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by fawkes::InterfaceChooserDialog::init(), fawkes::BlackBoardWithOwnership::list(), and fawkes::BlackBoardNetworkHandler::loop().
|
pure virtual |
Get list of all currently existing interfaces.
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by BlackboardCLIPSFeature::clips_context_destroyed(), fawkes::BlackBoardWithOwnership::list_all(), and fawkes::BlackBoardNetworkHandler::loop().
|
pure virtual |
Open interface for reading.
This will create a new interface instance of the given type. The result can be casted to the appropriate type.
type | type of the interface |
identifier | identifier of the interface |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by BatteryMonitorTreeView::add_host(), fawkes::LuaInterfaceImporter::add_interface(), LaserPointCloudThread::bb_interface_created(), RosLaserScanThread::bb_interface_created(), RosTfThread::bb_interface_created(), fawkes::tf::TransformListener::bb_interface_created(), BlackboardCLIPSFeature::clips_context_destroyed(), ExampleBlackBoardThread::init(), BallPosLogThread::init(), AgentControlThread::init(), RoombaJoystickThread::init(), ROSCmdVelThread::init(), ROSOdometryThread::init(), RobotinoRosJointsThread::init(), JoystickTeleOpThread::init(), WebviewPtzCamThread::init(), RobotinoIrPclThread::init(), MapLaserGenThread::init(), RefBoxCommThread::init(), VisLocalizationThread::init(), NaoQiLedThread::init(), NaoQiMotionThread::init(), ClipsAgentThread::init(), RosMoveBaseThread::init(), RobotinoActThread::init(), NaoQiButtonThread::init(), RosSkillerThread::init(), AmclROSThread::init(), PointCloudDBROSCommThread::init(), XabslEngineThread::init(), BBLoggerThread::init(), LuaAgentPeriodicExecutionThread::init(), NavGraphThread::init(), LuaAgentContinuousExecutionThread::init(), SkillerExecutionThread::init(), NavGraphInteractiveThread::init(), AmclThread::init(), fawkes::EclExternalBlackBoard::interfaces(), BlackBoardSynchronizationThread::loop(), fawkes::BlackBoardNetworkHandler::loop(), NavGraphClustersThread::loop(), ColliThread::loop(), LaserDeadSpotCalibrator::num_detected_spots(), fawkes::BlackBoardWithOwnership::open_for_reading(), open_for_reading(), open_for_reading_f(), fawkes::openni::HandIfObserver::process_queue(), fawkes::openni::SkelIfObserver::process_queue(), fawkes::InterfaceChooserDialog::run_and_open_for_reading(), fawkes::openni::SkelIfObserver::SkelIfObserver(), LaserFilterThread::wait_done(), WebviewPtzCamRequestProcessor::WebviewPtzCamRequestProcessor(), fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer(), Bumblebee2CalibGtkWindow::~Bumblebee2CalibGtkWindow(), fawkes::LuaInterfaceImporter::~LuaInterfaceImporter(), NaoGuiGtkWindow::~NaoGuiGtkWindow(), RemoteBlackBoardRefBoxProcessor::~RemoteBlackBoardRefBoxProcessor(), and SkillGuiGtkWindow::~SkillGuiGtkWindow().
InterfaceType * fawkes::BlackBoard::open_for_reading | ( | const char * | identifier, |
const char * | owner = NULL |
||
) |
Get interface of given type.
This will open a new interface for reading just like the non-template version of open_for_reading(). But with the template method you will get a correctly typed object that you can use. An TypeMismatchException is thrown if the string representation of the type and the actual class type of the interface do not match.
identifier | identifier of the interface |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
TypeMismatchException | thrown if type in interface_type and the actual class type do not fit. |
Definition at line 143 of file blackboard.h.
References demangle_fawkes_interface_name(), and open_for_reading().
|
virtual |
Open interface for reading with identifier format string.
This will create a new interface instance of the given type. The result can be casted to the appropriate type.
interface_type | type of the interface |
identifier | identifier format string of the interface |
... | arguments for identifier format |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
Definition at line 299 of file blackboard.cpp.
References format_identifier(), and open_for_reading().
InterfaceType * fawkes::BlackBoard::open_for_reading_f | ( | const char * | identifier, |
... | |||
) |
Get interface of given type with identifier format string.
This will open a new interface for reading just like the non-template version of open_for_reading(). But with the template method you will get a correctly typed object that you can use. An TypeMismatchException is thrown if the string representation of the type and the actual class type of the interface do not match.
identifier | identifier of the interface |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
TypeMismatchException | thrown if type in interface_type and the actual class type do not fit. |
Definition at line 167 of file blackboard.h.
References demangle_fawkes_interface_name(), format_identifier(), and open_for_reading().
|
pure virtual |
Open interface for writing.
This will create a new interface instance of the given type. The result can be casted to the appropriate type. This will only succeed if there is not already a writer for the given interface type/id!
type | type of the interface |
identifier | identifier of the interface |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
BlackBoardWriterActiveException | thrown if there is already a writing instance with the same type/id |
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by BlackboardCLIPSFeature::clips_context_destroyed(), OpenNiHandTrackerThread::hand_create(), ExampleBlackBoardThread::init(), JacoBimanualActThread::init(), JacoActThread::init(), JoystickSensorThread::init(), AgentControlThread::init(), OpenRaveMessageHandlerThread::init(), IMUSensorThread::init(), FestivalSynthThread::init(), PanTiltDirectedPerceptionThread::init(), RosNavgraphBreakoutThread::init(), LaserSensorThread::init(), PanTiltSonyEviD100PThread::init(), FliteSynthThread::init(), RosNavigatorThread::init(), MapLaserGenThread::init(), PointCloudDBStoreThread::init(), LaserSimThread::init(), IMUAcquisitionThread::init(), NaoQiSpeechSynthThread::init(), NavGraphGeneratorThread::init(), RefBoxCommThread::init(), Roomba500Thread::init(), RobotinoSensorThread::init(), LocalizationSimThread::init(), NaoQiMotionThread::init(), NaoQiLedThread::init(), PointCloudDBRetrieveThread::init(), ColliActThread::init(), RobotinoActThread::init(), BBLogReplayThread::init(), NaoQiButtonThread::init(), PointCloudDBMergeThread::init(), PanTiltRX28Thread::init(), NaoQiDCMThread::init(), BBLoggerThread::init(), LuaAgentPeriodicExecutionThread::init(), RobotinoSimThread::init(), NavGraphThread::init(), PlayerClientThread::init(), FvAcquisitionThread::init(), Bumblebee2Thread::init(), KatanaActThread::init(), LaserLinesThread::init(), AmclThread::init(), TabletopObjectsThread::init(), fawkes::EclExternalBlackBoard::interfaces(), JoystickRemoteBlackBoardPoster::JoystickRemoteBlackBoardPoster(), BlackBoardSynchronizationThread::loop(), fawkes::BlackBoardNetworkHandler::loop(), RosLaserScanThread::loop(), ColliThread::loop(), OpenNiUserTrackerThread::new_user(), LaserDeadSpotCalibrator::num_detected_spots(), fawkes::BlackBoardWithOwnership::open_for_writing(), open_for_writing(), open_for_writing_f(), fawkes::tf::TransformPublisher::TransformPublisher(), LaserFilterThread::wait_done(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
InterfaceType * fawkes::BlackBoard::open_for_writing | ( | const char * | identifier, |
const char * | owner = NULL |
||
) |
Get writer interface of given type.
This will open a new interface for writing just like the non-template version of open_for_writing(). But with the template method you will get a correctly typed object that you can use. An TypeMismatchException is thrown if the string representation of the type and the actual class type of the interface do not match.
identifier | identifier of the interface |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
BlackBoardWriterActiveException | thrown if there is already a writing instance with the same type/id |
TypeMismatchException | thrown if type in interface_type and the actual class type do not fit. |
Definition at line 227 of file blackboard.h.
References demangle_fawkes_interface_name(), and open_for_writing().
|
virtual |
Open interface for writing with identifier format string.
This will create a new interface instance of the given type. The result can be casted to the appropriate type. This will only succeed if there is not already a writer for the given interface type/id!
interface_type | type of the interface |
identifier | identifier format string of the interface |
... | arguments for identifier format |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
BlackBoardWriterActiveException | thrown if there is already a writing instance with the same type/id |
Definition at line 326 of file blackboard.cpp.
References format_identifier(), and open_for_writing().
Referenced by DynamixelDriverThread::init(), and LaserClusterThread::init().
InterfaceType * fawkes::BlackBoard::open_for_writing_f | ( | const char * | identifier, |
... | |||
) |
Get writer interface of given type with identifier format string.
This will open a new interface for writing just like the non-template version of open_for_writing(). But with the template method you will get a correctly typed object that you can use. An TypeMismatchException is thrown if the string representation of the type and the actual class type of the interface do not match.
identifier | identifier of the interface |
OutOfMemoryException | thrown if there is not enough free space for the requested interface. |
BlackBoardWriterActiveException | thrown if there is already a writing instance with the same type/id |
TypeMismatchException | thrown if type in interface_type and the actual class type do not fit. |
Definition at line 253 of file blackboard.h.
References demangle_fawkes_interface_name(), format_identifier(), and open_for_writing().
|
pure virtual |
Open multiple interfaces for reading.
This will create interface instances for currently registered interfaces of the given type that match the given ID pattern. The result can be casted to the appropriate type.
type_pattern | pattern of interface types to open, supports wildcards similar to filenames (*, ?, []), see "man fnmatch" for all supported. |
id_pattern | pattern of interface IDs to open, supports wildcards similar to filenames (*, ?, []), see "man fnmatch" for all supported. |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), fawkes::openni::HandIfObserver::HandIfObserver(), RosJointThread::init(), MongoLogBlackboardThread::init(), RosPosition3DThread::init(), LaserPointCloudThread::init(), RosLaserScanThread::init(), NavGraphClustersThread::init(), RosTfThread::init(), RobotStatePublisherThread::init(), fawkes::BlackBoardWithOwnership::open_multiple_for_reading(), open_multiple_for_reading(), fawkes::openni::SkelIfObserver::SkelIfObserver(), fawkes::tf::TransformListener::TransformListener(), fawkes::LuaInterfaceImporter::~LuaInterfaceImporter(), and NaoGuiGtkWindow::~NaoGuiGtkWindow().
std::list< InterfaceType * > fawkes::BlackBoard::open_multiple_for_reading | ( | const char * | id_pattern = "*" , |
const char * | owner = NULL |
||
) |
Open all interfaces of given type for reading.
This will create interface instances for all currently registered interfaces of the given type. The result can be casted to the appropriate type.
id_pattern | pattern of interface IDs to open, supports wildcards similar to filenames (*, ?, []), see "man fnmatch" for all supported. |
owner | name of entity which opened this interface. If using the BlackBoardAspect to access the blackboard leave this untouched unless you have a good reason. |
Definition at line 193 of file blackboard.h.
References demangle_fawkes_interface_name(), and open_multiple_for_reading().
|
virtual |
Register BB event listener.
listener | BlackBoard event listener to register |
flag | flags what to register for |
Reimplemented in fawkes::BlackBoardWithOwnership.
Definition at line 190 of file blackboard.cpp.
References __notifier, and fawkes::BlackBoardNotifier::register_listener().
Referenced by BatteryMonitorTreeView::add_host(), fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), fawkes::BlackBoardNetHandlerInterfaceListener::BlackBoardNetHandlerInterfaceListener(), fawkes::BlackBoardOnMessageWaker::BlackBoardOnMessageWaker(), fawkes::BlackBoardOnUpdateWaker::BlackBoardOnUpdateWaker(), FestivalSynthThread::init(), PanTiltDirectedPerceptionThread::init(), PanTiltSonyEviD100PThread::init(), RosJointThread::init(), FliteSynthThread::init(), RosPosition3DThread::init(), NavGraphGeneratorThread::init(), LaserPointCloudThread::init(), NaoQiLedThread::init(), RosLaserScanThread::init(), PanTiltRX28Thread::init(), NavGraphClustersThread::init(), DynamixelDriverThread::init(), BBLoggerThread::init(), RosTfThread::init(), FvAcquisitionThread::init(), SkillerExecutionThread::init(), KatanaActThread::init(), AmclThread::init(), RobotStatePublisherThread::init(), BlackBoardSynchronizationThread::loop(), fawkes::BlackBoardWithOwnership::register_listener(), SyncInterfaceListener::SyncInterfaceListener(), fawkes::tf::TransformListener::TransformListener(), Bumblebee2CalibGtkWindow::~Bumblebee2CalibGtkWindow(), NaoGuiGtkWindow::~NaoGuiGtkWindow(), and SkillGuiGtkWindow::~SkillGuiGtkWindow().
|
virtual |
Register BB interface observer.
observer | BlackBoard interface observer to register |
Reimplemented in fawkes::BlackBoardWithOwnership.
Definition at line 230 of file blackboard.cpp.
References __notifier, and fawkes::BlackBoardNotifier::register_observer().
Referenced by fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), fawkes::BlackBoardNetHandlerInterfaceObserver::BlackBoardNetHandlerInterfaceObserver(), fawkes::openni::HandIfObserver::HandIfObserver(), RosJointThread::init(), MongoLogBlackboardThread::init(), RosPosition3DThread::init(), LaserPointCloudThread::init(), RosLaserScanThread::init(), NavGraphClustersThread::init(), RosTfThread::init(), RobotStatePublisherThread::init(), fawkes::BlackBoardWithOwnership::register_observer(), fawkes::openni::SkelIfObserver::SkelIfObserver(), fawkes::tf::TransformListener::TransformListener(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
|
pure virtual |
Try to restore the aliveness of the BlackBoard instance.
Note that even though the aliveness of the BlackBoard is restored single interfaces may still be invalid. That can for instance happen if a remote connection is re-established and a writer has been created during the downtime and an own writer instance of that very interface cannot be restored.
Implemented in fawkes::RemoteBlackBoard, fawkes::LocalBlackBoard, and fawkes::BlackBoardWithOwnership.
Referenced by JoystickRemoteBlackBoardPoster::joystick_changed(), and fawkes::BlackBoardWithOwnership::try_aliveness_restore().
|
virtual |
Unregister BB interface listener.
This will remove the given BlackBoard interface listener from any event that it was previously registered for.
listener | BlackBoard event listener to remove |
Reimplemented in fawkes::BlackBoardWithOwnership.
Definition at line 218 of file blackboard.cpp.
References __notifier, and fawkes::BlackBoardNotifier::unregister_listener().
Referenced by FestivalSynthThread::finalize(), PanTiltDirectedPerceptionThread::finalize(), PanTiltSonyEviD100PThread::finalize(), FliteSynthThread::finalize(), RosJointThread::finalize(), RosPosition3DThread::finalize(), NavGraphGeneratorThread::finalize(), NaoQiLedThread::finalize(), LaserPointCloudThread::finalize(), RosLaserScanThread::finalize(), PanTiltRX28Thread::finalize(), DynamixelDriverThread::finalize(), NavGraphClustersThread::finalize(), BBLoggerThread::finalize(), RosTfThread::finalize(), FvAcquisitionThread::finalize(), SkillerExecutionThread::finalize(), KatanaActThread::finalize(), AmclThread::finalize(), RobotStatePublisherThread::finalize(), BlackBoardSynchronizationThread::loop(), BatteryMonitorTreeView::rem_host(), fawkes::BlackBoardWithOwnership::unregister_listener(), fawkes::BlackBoardNetHandlerInterfaceListener::~BlackBoardNetHandlerInterfaceListener(), fawkes::BlackBoardOnMessageWaker::~BlackBoardOnMessageWaker(), fawkes::BlackBoardOnUpdateWaker::~BlackBoardOnUpdateWaker(), Bumblebee2CalibGtkWindow::~Bumblebee2CalibGtkWindow(), NaoGuiGtkWindow::~NaoGuiGtkWindow(), SkillGuiGtkWindow::~SkillGuiGtkWindow(), SyncInterfaceListener::~SyncInterfaceListener(), and fawkes::tf::TransformListener::~TransformListener().
|
virtual |
Unregister BB interface observer.
This will remove the given BlackBoard event listener from any event that it was previously registered for.
observer | BlackBoard event listener to remove |
Reimplemented in fawkes::BlackBoardWithOwnership.
Definition at line 244 of file blackboard.cpp.
References __notifier, and fawkes::BlackBoardNotifier::unregister_observer().
Referenced by fawkes::LuaInterfaceImporter::close_reading_interfaces(), RosJointThread::finalize(), MongoLogBlackboardThread::finalize(), RosPosition3DThread::finalize(), LaserPointCloudThread::finalize(), RosLaserScanThread::finalize(), NavGraphClustersThread::finalize(), RosTfThread::finalize(), RobotStatePublisherThread::finalize(), fawkes::BlackBoardWithOwnership::unregister_observer(), fawkes::BlackBoardNetHandlerInterfaceObserver::~BlackBoardNetHandlerInterfaceObserver(), fawkes::openni::HandIfObserver::~HandIfObserver(), fawkes::openni::SkelIfObserver::~SkelIfObserver(), and fawkes::tf::TransformListener::~TransformListener().
|
virtual |
Update BB event listener.
listener | BlackBoard event listener to update |
flag | flags what to update for |
Reimplemented in fawkes::BlackBoardWithOwnership.
Definition at line 203 of file blackboard.cpp.
References __notifier, and fawkes::BlackBoardNotifier::update_listener().
Referenced by RosJointThread::bb_interface_created(), RosPosition3DThread::bb_interface_created(), LaserPointCloudThread::bb_interface_created(), RosLaserScanThread::bb_interface_created(), RosTfThread::bb_interface_created(), fawkes::tf::TransformListener::bb_interface_created(), RobotStatePublisherThread::bb_interface_created(), RosJointThread::bb_interface_reader_removed(), RosPosition3DThread::bb_interface_reader_removed(), LaserPointCloudThread::bb_interface_reader_removed(), RosLaserScanThread::bb_interface_reader_removed(), RosTfThread::bb_interface_reader_removed(), fawkes::tf::TransformListener::bb_interface_reader_removed(), RobotStatePublisherThread::bb_interface_reader_removed(), NavGraphClustersThread::loop(), fawkes::BlackBoardWithOwnership::update_listener(), and fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer().
|
protected |
Notifier for BB events.
Definition at line 122 of file blackboard.h.
Referenced by BlackBoard(), fawkes::RemoteBlackBoard::inbound_received(), fawkes::LocalBlackBoard::LocalBlackBoard(), register_listener(), register_observer(), fawkes::RemoteBlackBoard::try_aliveness_restore(), unregister_listener(), unregister_observer(), update_listener(), and ~BlackBoard().