ACQ2XX_API
tbstat_ev_test.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <unistd.h>
00003 
00004 #define TBSTAT_EV       "/dev/acq200/data.dma/tbstat_ev"
00005 
00006 int main(int argc, char* argv[])
00007 {
00008         FILE *fp = fopen(TBSTAT_EV, "r+");
00009         char buf[80];
00010 
00011         while(fgets(buf, 80, fp)){
00012                 printf("INCOMING: \"%s\"\n", buf);
00013                 sleep(2);
00014                 printf("REPLACE\n");
00015                 fputs(buf, fp);
00016                 fflush(fp);
00017         }
00018         return 0;       
00019 }