TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

bb_dump.c

00001 
00002 #include <stdio.h>
00003 #include <malloc.h>
00004 #include <unistd.h>
00005 #include <stdlib.h>
00006 #include <assert.h>
00007 
00008 #include <bb_core.h>
00009 
00010 int 
00011 main (int argc, char ** argv) {
00012 
00013   /* Définitions des variables */
00014   S_BB_T* mybb;
00015   int retcode=0;
00016   
00017   /* Attach to  BB */
00018   /*****************/
00019   if (argc<2) {
00020     fprintf(stderr,"%s : argument missing\n",argv[0]);
00021     fprintf(stderr,"Usage : %s <bbname>\n",argv[0]);
00022     exit(-1);
00023   }
00024 
00025   if (E_OK != bb_attach(&mybb,argv[1])) {
00026     fprintf(stderr,"Cannot attach to Blackboard <%s>!!\n",argv[1]);
00027     exit(-1);
00028   }
00029   /* Dump du blackboard NTB */
00030   bb_dump(mybb,stdout);
00031     
00032   /* Detach from BB */
00033   /******************/
00034   retcode = bb_detach(&mybb);
00035 
00036   return (retcode);
00037 }
Framework Home Page.

Beware !! TSP wave is coming...