27 #include <blackboard/local.h>
28 #include <blackboard/exceptions.h>
29 #include <blackboard/bbconfig.h>
31 #include <interfaces/TestInterface.h>
32 #include <interface/interface_info.h>
34 #include <core/exceptions/system.h>
45 using namespace fawkes;
51 signal_handler(
int signum)
60 main(
int argc,
char **argv)
63 signal(SIGINT, signal_handler);
71 cout <<
"Opening interfaces.. " << flush;
74 cout <<
"success, " <<
78 cout <<
"failed! Aborting" << endl;
83 cout <<
"Listing interfaces.." << endl;
85 for (InterfaceInfoList::iterator i = infl->begin(); i != infl->end(); ++i) {
86 const unsigned char *hash = (*i).hash();
87 char phash[__INTERFACE_HASH_SIZE * 2 + 1];
88 memset(phash, 0,
sizeof(phash));
89 for (
unsigned int j = 0; j < __INTERFACE_HASH_SIZE; ++j) {
90 sprintf(&phash[j * 2],
"%02x", hash[j]);
92 printf(
"%s::%s (%s), w:%i r:%u s:%u\n",
93 (*i).type(), (*i).id(), phash, (*i).has_writer(),
94 (*i).num_readers(), (*i).serial());