[Firebug-cvs] firebug/project/java/src/org/firebug FireLogger.java,1.3,1.4 GPSLogger.java,1.1,1.2 Li
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2004-04-02 18:05:21
|
Update of /cvsroot/firebug/firebug/project/java/src/org/firebug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6467/project/java/src/org/firebug Modified Files: FireLogger.java GPSLogger.java ListenFB.java Log Message: Cleaning up message logging classes. Index: GPSLogger.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/GPSLogger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GPSLogger.java 27 Mar 2004 00:04:47 -0000 1.1 --- GPSLogger.java 2 Apr 2004 17:53:04 -0000 1.2 *************** *** 53,57 **** public void print(byte [] packet) { ! GGAMsg msg = new GGAMsg(packet,5); Connection conn = dbh.getConnection(); --- 53,57 ---- public void print(byte [] packet) { ! GGAMsg msg = new GGAMsg(packet,5,GGAMsg.DEFAULT_MESSAGE_SIZE); Connection conn = dbh.getConnection(); Index: FireLogger.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/FireLogger.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FireLogger.java 27 Mar 2004 00:04:47 -0000 1.3 --- FireLogger.java 2 Apr 2004 17:53:04 -0000 1.4 *************** *** 69,72 **** --- 69,73 ---- float rel_hum = fmsg.get_rel_hum(); float baro_pres = fmsg.get_baro_pres(); + float lux = fmsg.get_lux(); System.out.println("mote_id: " + mote_id); *************** *** 116,120 **** + "rel_hum=" + rel_hum + ", " + "baro_pres=" + baro_pres + ", " ! + "temp=" + temp + " WHERE mote_id=" + mote_id; --- 117,122 ---- + "rel_hum=" + rel_hum + ", " + "baro_pres=" + baro_pres + ", " ! + "temp=" + temp + "," ! + "lux=" + lux + " WHERE mote_id=" + mote_id; *************** *** 122,129 **** + mote_id + ", " + "NULL," // NULL lets timestamp do its thing. //time + ", " + temp + ", " + rel_hum + ", " + baro_pres + ", " ! + cnt + ")"; --- 124,132 ---- + mote_id + ", " + "NULL," // NULL lets timestamp do its thing. //time + ", " + + cnt + ", " + temp + ", " + rel_hum + ", " + baro_pres + ", " ! + lux + ")"; Index: ListenFB.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/ListenFB.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ListenFB.java 27 Mar 2004 00:04:47 -0000 1.19 --- ListenFB.java 2 Apr 2004 17:53:04 -0000 1.20 *************** *** 58,67 **** private static int AM_FIREDATA_MSG = 128; private static int AM_RANGEDATA_MSG = 129; ! private static int AM_GGAMSG = 130; ! private static FireLogger firelogger; ! private static RangeLogger rangelogger; ! private static GPSLogger gpslogger; /** Use this interface when changing the output --- 58,67 ---- private static int AM_FIREDATA_MSG = 128; private static int AM_RANGEDATA_MSG = 129; ! private static int AM_GGA_MSG = 130; ! private FireLogger firelogger; ! private RangeLogger rangelogger; ! private GPSLogger gpslogger; /** Use this interface when changing the output *************** *** 111,114 **** --- 111,116 ---- } else if (am_type == AM_RANGEDATA_MSG) { return rangelogger; + } else if (am_type == AM_GGA_MSG) { + return gpslogger; } else { return null; *************** *** 201,205 **** System.out.println("AM type number: " + am_type); PacketPrinter printer = GetPrinter(am_type); ! printer.print(packet); } } --- 203,209 ---- System.out.println("AM type number: " + am_type); PacketPrinter printer = GetPrinter(am_type); ! if (printer != null) { ! printer.print(packet); ! } } } *************** *** 249,260 **** String port = args[args.length - 1]; ! ListenFB reader = new ListenFB(port); ! firelogger = new FireLogger(dbname); ! rangelogger = new RangeLogger(dbname); ! gpslogger = new GPSLogger(dbname); try { ! reader.read(); } catch (Exception e) { e.printStackTrace(); --- 253,266 ---- String port = args[args.length - 1]; ! ListenFB listener = new ListenFB(port); ! // Instantiating will allow processing statistics ! // at the base station level. ! listener.firelogger = new FireLogger(dbname); ! listener.rangelogger = new RangeLogger(dbname); ! listener.gpslogger = new GPSLogger(dbname); try { ! listener.read(); } catch (Exception e) { e.printStackTrace(); |