27 #include <blackboard/local.h> 28 #include <blackboard/exceptions.h> 29 #include <blackboard/bbconfig.h> 31 #include <interfaces/TestInterface.h> 33 #include <core/exceptions/system.h> 34 #include <logging/liblogger.h> 48 main(
int argc,
char **argv)
61 cout <<
"Opening interfaces.. " << flush;
68 cout <<
"success" << endl;
70 cout <<
"failed! Aborting" << endl;
76 for (std::list<Interface *>::iterator i = readers.begin(); i != readers.end(); ++i) {
77 printf(
"Opened reader for interface %s of type %s\n", (*i)->id(), (*i)->type());
81 const char* pattern =
"AnotherID *";
83 printf(
"Found %zu interfaces with pattern \"%s\"\n", readers.size(), pattern);
84 for (std::list<Interface *>::iterator i = readers.begin(); i != readers.end(); ++i) {
85 printf(
"Opened reader for interface %s of type %s\n", (*i)->id(), (*i)->type());
89 bb->
close(ti_writer_1);
90 bb->
close(ti_writer_2);
91 bb->
close(ti_writer_3);
92 bb->
close(ti_writer_4);
93 bb->
close(ti_writer_5);
94 bb->
close(ti_writer_6);
97 LibLogger::finalize();
Fawkes library namespace.
Base class for exceptions in Fawkes.
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.
void print_trace()
Prints trace to stderr.
The BlackBoard abstract class.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for writing.
TestInterface Fawkes BlackBoard Interface.
virtual void close(Interface *interface)=0
Close interface.