[Firebug-cvs] firebug/project/java/src/org/firebug FireLogger.java,1.1,1.2 GGAMsg.java,1.1,1.2 Liste
Brought to you by:
doolin
From: <do...@us...> - 2004-02-19 17:52:30
|
Update of /cvsroot/firebug/firebug/project/java/src/org/firebug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11711/project/java/src/org/firebug Modified Files: FireLogger.java GGAMsg.java ListenFB.java Log Message: gps logging now works. Logs to location table. Index: FireLogger.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/FireLogger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FireLogger.java 18 Feb 2004 01:17:07 -0000 1.1 --- FireLogger.java 19 Feb 2004 17:41:53 -0000 1.2 *************** *** 62,65 **** --- 62,67 ---- int time = (int)System.currentTimeMillis(); + System.out.println(fmsg.toString()); + int mote_id = fmsg.get_addr(); int cnt = fmsg.get_cnt(); *************** *** 92,100 **** //base station ID is 1; if (mote_id == 1) { dbh.return_connection(conn); return; } ! --- 94,103 ---- //base station ID is 1; + /* if (mote_id == 1) { dbh.return_connection(conn); return; } ! */ Index: GGAMsg.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/GGAMsg.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GGAMsg.java 18 Feb 2004 15:31:09 -0000 1.1 --- GGAMsg.java 19 Feb 2004 17:41:53 -0000 1.2 *************** *** 10,19 **** /** The default size of this message type in bytes. */ ! public static final int DEFAULT_MESSAGE_SIZE = 18; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 129; ! /** Create a new GGAMsg of size 18. */ public GGAMsg() { super(DEFAULT_MESSAGE_SIZE); --- 10,19 ---- /** The default size of this message type in bytes. */ ! public static final int DEFAULT_MESSAGE_SIZE = 19; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 129; ! /** Create a new GGAMsg of size 19. */ public GGAMsg() { super(DEFAULT_MESSAGE_SIZE); *************** *** 88,91 **** --- 88,95 ---- String s = "Message <GGAMsg> \n"; try { + + s += " [mote_id=0x"+Long.toHexString(get_mote_id())+"]\n"; + } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } + try { s += " [hours=0x"+Long.toHexString(get_hours())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } *************** *** 120,124 **** ///////////////////////////////////////////////////////// ! // Accessor methods for field: hours // Field type: short, unsigned // Offset (bits): 0 --- 124,128 ---- ///////////////////////////////////////////////////////// ! // Accessor methods for field: mote_id // Field type: short, unsigned // Offset (bits): 0 *************** *** 127,130 **** --- 131,197 ---- /** + * Return whether the field 'mote_id' is signed (false). + */ + public static boolean isSigned_mote_id() { + return false; + } + + /** + * Return whether the field 'mote_id' is an array (false). + */ + public static boolean isArray_mote_id() { + return false; + } + + /** + * Return the offset (in bytes) of the field 'mote_id' + */ + public static int offset_mote_id() { + return (0 / 8); + } + + /** + * Return the offset (in bits) of the field 'mote_id' + */ + public static int offsetBits_mote_id() { + return 0; + } + + /** + * Return the value (as a short) of the field 'mote_id' + */ + public short get_mote_id() { + return (short)getUIntElement(offsetBits_mote_id(), 8); + } + + /** + * Set the value of the field 'mote_id' + */ + public void set_mote_id(short value) { + setUIntElement(offsetBits_mote_id(), 8, value); + } + + /** + * Return the size, in bytes, of the field 'mote_id' + */ + public static int size_mote_id() { + return (8 / 8); + } + + /** + * Return the size, in bits, of the field 'mote_id' + */ + public static int sizeBits_mote_id() { + return 8; + } + + ///////////////////////////////////////////////////////// + // Accessor methods for field: hours + // Field type: short, unsigned + // Offset (bits): 8 + // Size (bits): 8 + ///////////////////////////////////////////////////////// + + /** * Return whether the field 'hours' is signed (false). */ *************** *** 144,148 **** */ public static int offset_hours() { ! return (0 / 8); } --- 211,215 ---- */ public static int offset_hours() { ! return (8 / 8); } *************** *** 151,155 **** */ public static int offsetBits_hours() { ! return 0; } --- 218,222 ---- */ public static int offsetBits_hours() { ! return 8; } *************** *** 185,189 **** // Accessor methods for field: minutes // Field type: short, unsigned ! // Offset (bits): 8 // Size (bits): 8 ///////////////////////////////////////////////////////// --- 252,256 ---- // Accessor methods for field: minutes // Field type: short, unsigned ! // Offset (bits): 16 // Size (bits): 8 ///////////////////////////////////////////////////////// *************** *** 207,211 **** */ public static int offset_minutes() { ! return (8 / 8); } --- 274,278 ---- */ public static int offset_minutes() { ! return (16 / 8); } *************** *** 214,218 **** */ public static int offsetBits_minutes() { ! return 8; } --- 281,285 ---- */ public static int offsetBits_minutes() { ! return 16; } *************** *** 248,252 **** // Accessor methods for field: dec_sec // Field type: float, unsigned ! // Offset (bits): 16 // Size (bits): 32 ///////////////////////////////////////////////////////// --- 315,319 ---- // Accessor methods for field: dec_sec // Field type: float, unsigned ! // Offset (bits): 24 // Size (bits): 32 ///////////////////////////////////////////////////////// *************** *** 270,274 **** */ public static int offset_dec_sec() { ! return (16 / 8); } --- 337,341 ---- */ public static int offset_dec_sec() { ! return (24 / 8); } *************** *** 277,281 **** */ public static int offsetBits_dec_sec() { ! return 16; } --- 344,348 ---- */ public static int offsetBits_dec_sec() { ! return 24; } *************** *** 311,315 **** // Accessor methods for field: Lat_deg // Field type: short, unsigned ! // Offset (bits): 48 // Size (bits): 8 ///////////////////////////////////////////////////////// --- 378,382 ---- // Accessor methods for field: Lat_deg // Field type: short, unsigned ! // Offset (bits): 56 // Size (bits): 8 ///////////////////////////////////////////////////////// *************** *** 333,337 **** */ public static int offset_Lat_deg() { ! return (48 / 8); } --- 400,404 ---- */ public static int offset_Lat_deg() { ! return (56 / 8); } *************** *** 340,344 **** */ public static int offsetBits_Lat_deg() { ! return 48; } --- 407,411 ---- */ public static int offsetBits_Lat_deg() { ! return 56; } *************** *** 374,378 **** // Accessor methods for field: Lat_dec_min // Field type: float, unsigned ! // Offset (bits): 56 // Size (bits): 32 ///////////////////////////////////////////////////////// --- 441,445 ---- // Accessor methods for field: Lat_dec_min // Field type: float, unsigned ! // Offset (bits): 64 // Size (bits): 32 ///////////////////////////////////////////////////////// *************** *** 396,400 **** */ public static int offset_Lat_dec_min() { ! return (56 / 8); } --- 463,467 ---- */ public static int offset_Lat_dec_min() { ! return (64 / 8); } *************** *** 403,407 **** */ public static int offsetBits_Lat_dec_min() { ! return 56; } --- 470,474 ---- */ public static int offsetBits_Lat_dec_min() { ! return 64; } *************** *** 437,441 **** // Accessor methods for field: Long_deg // Field type: short, unsigned ! // Offset (bits): 88 // Size (bits): 8 ///////////////////////////////////////////////////////// --- 504,508 ---- // Accessor methods for field: Long_deg // Field type: short, unsigned ! // Offset (bits): 96 // Size (bits): 8 ///////////////////////////////////////////////////////// *************** *** 459,463 **** */ public static int offset_Long_deg() { ! return (88 / 8); } --- 526,530 ---- */ public static int offset_Long_deg() { ! return (96 / 8); } *************** *** 466,470 **** */ public static int offsetBits_Long_deg() { ! return 88; } --- 533,537 ---- */ public static int offsetBits_Long_deg() { ! return 96; } *************** *** 500,504 **** // Accessor methods for field: Long_dec_min // Field type: float, unsigned ! // Offset (bits): 96 // Size (bits): 32 ///////////////////////////////////////////////////////// --- 567,571 ---- // Accessor methods for field: Long_dec_min // Field type: float, unsigned ! // Offset (bits): 104 // Size (bits): 32 ///////////////////////////////////////////////////////// *************** *** 522,526 **** */ public static int offset_Long_dec_min() { ! return (96 / 8); } --- 589,593 ---- */ public static int offset_Long_dec_min() { ! return (104 / 8); } *************** *** 529,533 **** */ public static int offsetBits_Long_dec_min() { ! return 96; } --- 596,600 ---- */ public static int offsetBits_Long_dec_min() { ! return 104; } *************** *** 563,567 **** // Accessor methods for field: NSEWind // Field type: short, unsigned ! // Offset (bits): 128 // Size (bits): 8 ///////////////////////////////////////////////////////// --- 630,634 ---- // Accessor methods for field: NSEWind // Field type: short, unsigned ! // Offset (bits): 136 // Size (bits): 8 ///////////////////////////////////////////////////////// *************** *** 585,589 **** */ public static int offset_NSEWind() { ! return (128 / 8); } --- 652,656 ---- */ public static int offset_NSEWind() { ! return (136 / 8); } *************** *** 592,596 **** */ public static int offsetBits_NSEWind() { ! return 128; } --- 659,663 ---- */ public static int offsetBits_NSEWind() { ! return 136; } *************** *** 626,630 **** // Accessor methods for field: num_sats // Field type: short, unsigned ! // Offset (bits): 136 // Size (bits): 8 ///////////////////////////////////////////////////////// --- 693,697 ---- // Accessor methods for field: num_sats // Field type: short, unsigned ! // Offset (bits): 144 // Size (bits): 8 ///////////////////////////////////////////////////////// *************** *** 648,652 **** */ public static int offset_num_sats() { ! return (136 / 8); } --- 715,719 ---- */ public static int offset_num_sats() { ! return (144 / 8); } *************** *** 655,659 **** */ public static int offsetBits_num_sats() { ! return 136; } --- 722,726 ---- */ public static int offsetBits_num_sats() { ! return 144; } Index: ListenFB.java =================================================================== RCS file: /cvsroot/firebug/firebug/project/java/src/org/firebug/ListenFB.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ListenFB.java 18 Feb 2004 01:17:07 -0000 1.16 --- ListenFB.java 19 Feb 2004 17:41:53 -0000 1.17 *************** *** 268,276 **** //DBLogger dblogger = new DBLogger(dbname); RawPacket rawpacket = new RawPacket(); ! FireLogger firelogger = new FireLogger(dbname); //printers.add(print); //printers.add(dblogger); ! printers.add(firelogger); try { --- 268,278 ---- //DBLogger dblogger = new DBLogger(dbname); RawPacket rawpacket = new RawPacket(); ! //FireLogger firelogger = new FireLogger(dbname); ! GPSLogger gpslogger = new GPSLogger(dbname); //printers.add(print); //printers.add(dblogger); ! //printers.add(firelogger); ! printers.add(gpslogger); try { |