TSP: The Transport Sample Protocol



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

bb_destroy.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=NULL;
00015   int retcode=0;
00016   
00017   if (argc<2) {
00018     fprintf(stderr,"%s : argument missing\n",argv[0]);
00019     fprintf(stderr,"Usage : %s <bbname>\n",argv[0]);
00020     exit(-1);
00021   }
00022 
00023   /* Attach to BB */
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 
00030   /* Destroy  BB */
00031   /***************/
00032   retcode = bb_destroy(&mybb);
00033   return (retcode);
00034 }
Framework Home Page.

Beware !! TSP wave is coming...