26 #include <blackboard/bbconfig.h>
27 #include <blackboard/exceptions.h>
28 #include <blackboard/local.h>
29 #include <core/exceptions/system.h>
30 #include <interface/interface_info.h>
31 #include <interfaces/TestInterface.h>
46 signal_handler(
int signum)
54 main(
int argc,
char **argv)
56 signal(SIGINT, signal_handler);
64 cout <<
"Opening interfaces.. " << flush;
71 cout <<
"failed! Aborting" << endl;
76 cout <<
"Listing interfaces.." << endl;
78 for (InterfaceInfoList::iterator i = infl->begin(); i != infl->end(); ++i) {
79 const unsigned char *hash = (*i).hash();
80 char phash[INTERFACE_HASH_SIZE_ * 2 + 1];
81 memset(phash, 0,
sizeof(phash));
82 for (
unsigned int j = 0; j < INTERFACE_HASH_SIZE_; ++j) {
83 sprintf(&phash[j * 2],
"%02x", hash[j]);
85 printf(
"%s::%s (%s), w:%i r:%u s:%u\n",
The BlackBoard abstract class.
virtual Interface * open_for_reading(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for reading.
virtual InterfaceInfoList * list_all()=0
Get list of all currently existing interfaces.
virtual Interface * open_for_writing(const char *interface_type, const char *identifier, const char *owner=NULL)=0
Open interface for writing.
virtual void close(Interface *interface)=0
Close interface.
Base class for exceptions in Fawkes.
void print_trace() noexcept
Prints trace to stderr.
Interface information list.
const char * hash_printable() const
Get printable interface hash.
TestInterface Fawkes BlackBoard Interface.
Fawkes library namespace.