[Firebug-cvs] fireboard/beta/tools/src/xlisten Makefile,1.12,1.13 genc.pm,1.4,1.5 genpgsql.pm,1.2,1.
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2005-08-02 01:44:26
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348/beta/tools/src/xlisten Modified Files: Makefile genc.pm genpgsql.pm Log Message: Wrapped xbow dependencies. Index: genpgsql.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/genpgsql.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** genpgsql.pm 1 Aug 2005 19:17:22 -0000 1.2 --- genpgsql.pm 2 Aug 2005 01:44:17 -0000 1.3 *************** *** 17,21 **** ! ## TODO for autogenerating C code. ## ---------------------------------------------------------- ## Several things need to be done to make this viable for the --- 17,21 ---- ! ## TODO for autogenerating postgres sql code. ## ---------------------------------------------------------- ## Several things need to be done to make this viable for the *************** *** 28,31 **** --- 28,34 ---- ## Parts of this code were written for the NSF_ITR funded ## firebug project. + ## + ## Code based on genjava.pm written by David Gay (?) + ## authors David Gay (? + others?), Dave Doolin *************** *** 69,72 **** --- 72,78 ---- print "CREATE TABLE $java_classname (\n"; + + print " result_time timestamp without time zone,\n"; + # Get the size of the array. $numfields = $#fields; Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 1 Aug 2005 19:17:21 -0000 1.12 --- Makefile 2 Aug 2005 01:44:17 -0000 1.13 *************** *** 55,57 **** clean: ! rm -f *.o boards/*.o xlisten xlisten-arm xlisten.exe fbpacket.exe --- 55,57 ---- clean: ! rm -f *.o boards/*.o xlisten xlisten-arm xlisten.exe fbpacket.exe xlisten-telos Index: genc.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/genc.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** genc.pm 1 Aug 2005 19:17:22 -0000 1.4 --- genc.pm 2 Aug 2005 01:44:17 -0000 1.5 *************** *** 28,31 **** --- 28,34 ---- ## Parts of this code were written for the NSF_ITR funded ## firebug project. + ## + ## Code based on genjava.pm written by David Gay (?) + ## authors David Gay (? + others?), Dave Doolin *************** *** 79,84 **** --- 82,89 ---- print "/** Not the best way to handle xbow dependencies. */\n"; + print "#ifdef TELOS_MOTE\n"; print "#include \"../xdb.h\"\n"; print "#include \"../xsensors.h\"\n"; + print "#endif\n"; print $medskip; *************** *** 86,90 **** print "/** These need to be moved to a header file. */\n"; print "typedef struct _$structname $structname;\n"; ! print "//typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; print $medskip --- 91,97 ---- print "/** These need to be moved to a header file. */\n"; print "typedef struct _$structname $structname;\n"; ! print "#ifndef TELOS_MOTE\n"; ! print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; ! print "#endif\n"; print $medskip *************** *** 243,246 **** --- 250,254 ---- print "static char insert_stmt[] = \"INSERT into $structname (\"\n"; + print "\"result_time,\"\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; *************** *** 267,271 **** printf "\"$field,\"\n"; } else { ! printf "\"$field) values ("; } --- 275,279 ---- printf "\"$field,\"\n"; } else { ! printf "\"$field) values (now(), "; } *************** *** 318,322 **** --- 326,332 ---- } + print "#ifdef TELOS_MOTE\n"; print "xdb_execute(pg_command);\n"; + print "#endif\n"; print "}\n"; *************** *** 347,350 **** --- 357,362 ---- sub gen_handler_table() { + print "#ifdef TELOS_MOTE\n"; + print "XPacketHandler $structname\_packet\_handler = {\n"; print "// This should be replaced with the AM_TYPE\n"; *************** *** 364,367 **** --- 376,381 ---- print "}\n"; + print "#endif\n"; + } |