firebug-cvs Mailing List for FireBug: wireless wildfire monitoring (Page 6)
Brought to you by:
doolin
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(45) |
Jul
(108) |
Aug
(31) |
Sep
(2) |
Oct
(4) |
Nov
(113) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(63) |
Feb
(37) |
Mar
(24) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(71) |
Aug
(42) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(64) |
Jun
(71) |
Jul
(51) |
Aug
(89) |
Sep
(24) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: David M. D. <do...@us...> - 2005-08-02 03:03:06
|
Update of /cvsroot/firebug/fireboard/beta/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv650 Added Files: linkmsg.pgsql Log Message: link testing message for pg. --- NEW FILE: linkmsg.pgsql --- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This code provides postgres table to the 'LinkMsgP' * message type. */ CREATE TABLE LinkMsgP ( result_time timestamp without time zone, header_am_type integer, header_seqno integer, tstamp integer, moteid integer, RSSI integer, LQI integer); |
From: David M. D. <do...@us...> - 2005-08-02 01:44:28
|
Update of /cvsroot/firebug/fireboard/beta/tools/gps/SiRF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348/beta/tools/gps/SiRF Modified Files: sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c sirf_id2_1.c sirf_id2_2.c Log Message: Wrapped xbow dependencies. Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id2_2.c 1 Aug 2005 20:05:07 -0000 1.5 --- sirf_id2_2.c 2 Aug 2005 01:44:17 -0000 1.6 *************** *** 267,270 **** --- 267,271 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_2P (" + "result_time," "header_seqno," "header_am_type," *************** *** 284,288 **** "ch10," "ch11," ! "ch12) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 285,289 ---- "ch10," "ch11," ! "ch12) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_3.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_3.c 1 Aug 2005 20:05:07 -0000 1.5 --- sirf_id28_3.c 2 Aug 2005 01:44:17 -0000 1.6 *************** *** 289,292 **** --- 289,293 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_3P (" + "result_time," "header_seqno," "header_am_type," *************** *** 308,312 **** "extrapolation_time," "phase_error_count," ! "low_power_count) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 309,313 ---- "extrapolation_time," "phase_error_count," ! "low_power_count) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_1.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_1.c 1 Aug 2005 20:05:07 -0000 1.5 --- sirf_id28_1.c 2 Aug 2005 01:44:16 -0000 1.6 *************** *** 157,160 **** --- 157,161 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_1P (" + "result_time," "header_seqno," "header_am_type," *************** *** 164,168 **** "time_tag," "sat_id," ! "gps_sw_time) values (%i, %i, %i, %i, %i, %i, %i, %i)"; --- 165,169 ---- "time_tag," "sat_id," ! "gps_sw_time) values (now(), %i, %i, %i, %i, %i, %i, %i, %i)"; Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_2.c 1 Aug 2005 20:05:07 -0000 1.5 --- sirf_id28_2.c 2 Aug 2005 01:44:17 -0000 1.6 *************** *** 157,160 **** --- 157,161 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_2P (" + "result_time," "header_seqno," "header_am_type," *************** *** 164,168 **** "carrier_freq," "carrier_phase," ! "time_in_track) values (%i, %i, %i, %i, %i, %i, %i, %i)"; --- 165,169 ---- "carrier_freq," "carrier_phase," ! "time_in_track) values (now(), %i, %i, %i, %i, %i, %i, %i, %i)"; Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_1.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id2_1.c 1 Aug 2005 20:05:07 -0000 1.5 --- sirf_id2_1.c 2 Aug 2005 01:44:17 -0000 1.6 *************** *** 223,226 **** --- 223,227 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_1P (" + "result_time," "header_seqno," "header_am_type," *************** *** 236,240 **** "dop," "mode2," ! "gps_week) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 237,241 ---- "dop," "mode2," ! "gps_week) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; |
From: David M. D. <do...@us...> - 2005-08-02 01:44:27
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348/beta/tools/src/xlisten/boards Modified Files: linkmsg.c sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c sirf_id2_1.c sirf_id2_2.c Log Message: Wrapped xbow dependencies. Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_3.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id28_3.c 1 Aug 2005 19:17:22 -0000 1.3 --- sirf_id28_3.c 2 Aug 2005 01:44:17 -0000 1.4 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_3P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_3P SiRF_ID28_3P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 154; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_3P SiRF_ID28_3P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 154; *************** *** 285,288 **** --- 289,293 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_3P (" + "result_time," "header_seqno," "header_am_type," *************** *** 304,308 **** "extrapolation_time," "phase_error_count," ! "low_power_count) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 309,313 ---- "extrapolation_time," "phase_error_count," ! "low_power_count) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; *************** *** 332,336 **** --- 337,343 ---- data->phase_error_count, data->low_power_count); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 573,576 **** --- 580,584 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_3P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 590,593 **** --- 598,602 ---- xpacket_add_type(&SiRF_ID28_3P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 23; Index: linkmsg.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/linkmsg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** linkmsg.c 1 Aug 2005 19:17:22 -0000 1.4 --- linkmsg.c 2 Aug 2005 01:44:17 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "LinkMsgP_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _LinkMsgP LinkMsgP; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 200; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _LinkMsgP LinkMsgP; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 200; *************** *** 131,134 **** --- 135,139 ---- static char insert_stmt[] = "INSERT into LinkMsgP (" + "result_time," "header_am_type," "header_seqno," *************** *** 136,140 **** "moteid," "RSSI," ! "LQI) values (%i, %i, %i, %i, %i, %i)"; --- 141,145 ---- "moteid," "RSSI," ! "LQI) values (now(), %i, %i, %i, %i, %i, %i)"; *************** *** 150,154 **** --- 155,161 ---- data->RSSI, data->LQI); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 251,254 **** --- 258,262 ---- } + #ifdef TELOS_MOTE XPacketHandler LinkMsgP_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 268,271 **** --- 276,280 ---- xpacket_add_type(&LinkMsgP_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 14; Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_2.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id2_2.c 1 Aug 2005 19:17:22 -0000 1.3 --- sirf_id2_2.c 2 Aug 2005 01:44:17 -0000 1.4 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID2_2P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_2P SiRF_ID2_2P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 151; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_2P SiRF_ID2_2P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 151; *************** *** 263,266 **** --- 267,271 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_2P (" + "result_time," "header_seqno," "header_am_type," *************** *** 280,284 **** "ch10," "ch11," ! "ch12) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 285,289 ---- "ch10," "ch11," ! "ch12) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; *************** *** 306,310 **** --- 311,317 ---- data->ch11, data->ch12); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 527,530 **** --- 534,538 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID2_2P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 544,547 **** --- 552,556 ---- xpacket_add_type(&SiRF_ID2_2P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 21; Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id28_1.c 1 Aug 2005 19:17:22 -0000 1.3 --- sirf_id28_1.c 2 Aug 2005 01:44:17 -0000 1.4 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_1P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_1P SiRF_ID28_1P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 152; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_1P SiRF_ID28_1P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 152; *************** *** 153,156 **** --- 157,161 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_1P (" + "result_time," "header_seqno," "header_am_type," *************** *** 160,164 **** "time_tag," "sat_id," ! "gps_sw_time) values (%i, %i, %i, %i, %i, %i, %i, %i)"; --- 165,169 ---- "time_tag," "sat_id," ! "gps_sw_time) values (now(), %i, %i, %i, %i, %i, %i, %i, %i)"; *************** *** 176,180 **** --- 181,187 ---- data->sat_id, data->gps_sw_time); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 297,300 **** --- 304,308 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_1P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 314,317 **** --- 322,326 ---- xpacket_add_type(&SiRF_ID28_1P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 18; Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id2_1.c 1 Aug 2005 19:17:22 -0000 1.3 --- sirf_id2_1.c 2 Aug 2005 01:44:17 -0000 1.4 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID2_1P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_1P SiRF_ID2_1P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 150; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_1P SiRF_ID2_1P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 150; *************** *** 219,222 **** --- 223,227 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_1P (" + "result_time," "header_seqno," "header_am_type," *************** *** 232,236 **** "dop," "mode2," ! "gps_week) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; --- 237,241 ---- "dop," "mode2," ! "gps_week) values (now(), %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; *************** *** 254,258 **** --- 259,265 ---- data->mode2, data->gps_week); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 435,438 **** --- 442,446 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID2_1P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 452,455 **** --- 460,464 ---- xpacket_add_type(&SiRF_ID2_1P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 27; Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_2.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id28_2.c 1 Aug 2005 19:17:22 -0000 1.3 --- sirf_id28_2.c 2 Aug 2005 01:44:17 -0000 1.4 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_2P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_2P SiRF_ID28_2P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 153; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_2P SiRF_ID28_2P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 153; *************** *** 153,156 **** --- 157,161 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_2P (" + "result_time," "header_seqno," "header_am_type," *************** *** 160,164 **** "carrier_freq," "carrier_phase," ! "time_in_track) values (%i, %i, %i, %i, %i, %i, %i, %i)"; --- 165,169 ---- "carrier_freq," "carrier_phase," ! "time_in_track) values (now(), %i, %i, %i, %i, %i, %i, %i, %i)"; *************** *** 176,180 **** --- 181,187 ---- data->carrier_phase, data->time_in_track); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 297,300 **** --- 304,308 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_2P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 314,317 **** --- 322,326 ---- xpacket_add_type(&SiRF_ID28_2P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 26; |
From: David M. D. <do...@us...> - 2005-08-02 01:44:26
|
Update of /cvsroot/firebug/fireboard/beta/tos/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348/beta/tos/interfaces Modified Files: SiRF.nc Log Message: Wrapped xbow dependencies. Index: SiRF.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tos/interfaces/SiRF.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SiRF.nc 1 Aug 2005 19:51:34 -0000 1.1 --- SiRF.nc 2 Aug 2005 01:44:17 -0000 1.2 *************** *** 19,22 **** --- 19,23 ---- command uint8_t get_type (const char * sirfstring); + command result_t id2_parse (sirf_id2, const char * sirf_string); } |
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"; + } |
From: David M. D. <do...@us...> - 2005-08-02 01:44:26
|
Update of /cvsroot/firebug/fireboard/beta/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21348/beta/bin Modified Files: sirf_id28_1.pgsql sirf_id28_2.pgsql sirf_id28_3.pgsql sirf_id2_1.pgsql sirf_id2_2.pgsql Log Message: Wrapped xbow dependencies. Index: sirf_id28_1.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_1.pgsql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_1.pgsql 1 Aug 2005 19:17:20 -0000 1.2 --- sirf_id28_1.pgsql 2 Aug 2005 01:44:16 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- CREATE TABLE SiRF_ID28_1P ( + result_time timestamp without time zone, header_seqno integer, header_am_type integer, Index: sirf_id28_3.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_3.pgsql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_3.pgsql 1 Aug 2005 19:17:20 -0000 1.2 --- sirf_id28_3.pgsql 2 Aug 2005 01:44:16 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- CREATE TABLE SiRF_ID28_3P ( + result_time timestamp without time zone, header_seqno integer, header_am_type integer, Index: sirf_id28_2.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_2.pgsql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_2.pgsql 1 Aug 2005 19:17:20 -0000 1.2 --- sirf_id28_2.pgsql 2 Aug 2005 01:44:16 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- CREATE TABLE SiRF_ID28_2P ( + result_time timestamp without time zone, header_seqno integer, header_am_type integer, Index: sirf_id2_1.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id2_1.pgsql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sirf_id2_1.pgsql 1 Aug 2005 19:17:20 -0000 1.3 --- sirf_id2_1.pgsql 2 Aug 2005 01:44:16 -0000 1.4 *************** *** 6,9 **** --- 6,10 ---- CREATE TABLE SiRF_ID2_1P ( + result_time timestamp without time zone, header_seqno integer, header_am_type integer, Index: sirf_id2_2.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id2_2.pgsql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id2_2.pgsql 1 Aug 2005 19:17:20 -0000 1.2 --- sirf_id2_2.pgsql 2 Aug 2005 01:44:16 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- CREATE TABLE SiRF_ID2_2P ( + result_time timestamp without time zone, header_seqno integer, header_am_type integer, |
From: David M. D. <do...@us...> - 2005-08-01 21:04:06
|
Update of /cvsroot/firebug/fireboard/beta/apps/TestSirf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30185/TestSirf Log Message: Directory /cvsroot/firebug/fireboard/beta/apps/TestSirf added to the repository |
From: David M. D. <do...@us...> - 2005-08-01 20:05:16
|
Update of /cvsroot/firebug/fireboard/beta/tools/gps/SiRF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15532 Modified Files: Makefile sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c sirf_id2_1.c sirf_id2_2.c Removed Files: sirf.h Log Message: MOved sirf header to lib sirf Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_3.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sirf_id28_3.c 1 Aug 2005 19:17:21 -0000 1.4 --- sirf_id28_3.c 1 Aug 2005 20:05:07 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_3P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_3P SiRF_ID28_3P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 154; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_3P SiRF_ID28_3P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 154; *************** *** 332,336 **** --- 336,342 ---- data->phase_error_count, data->low_power_count); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 573,576 **** --- 579,583 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_3P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 590,593 **** --- 597,601 ---- xpacket_add_type(&SiRF_ID28_3P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 23; --- sirf.h DELETED --- Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_1.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sirf_id2_1.c 1 Aug 2005 19:17:21 -0000 1.4 --- sirf_id2_1.c 1 Aug 2005 20:05:07 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID2_1P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_1P SiRF_ID2_1P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 150; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_1P SiRF_ID2_1P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 150; *************** *** 254,258 **** --- 258,264 ---- data->mode2, data->gps_week); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 435,438 **** --- 441,445 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID2_1P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 452,455 **** --- 459,463 ---- xpacket_add_type(&SiRF_ID2_1P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 27; Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_2.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sirf_id2_2.c 1 Aug 2005 19:17:21 -0000 1.4 --- sirf_id2_2.c 1 Aug 2005 20:05:07 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID2_2P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_2P SiRF_ID2_2P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 151; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID2_2P SiRF_ID2_2P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 151; *************** *** 306,310 **** --- 310,316 ---- data->ch11, data->ch12); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 527,530 **** --- 533,537 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID2_2P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 544,547 **** --- 551,555 ---- xpacket_add_type(&SiRF_ID2_2P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 21; Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_1.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sirf_id28_1.c 1 Aug 2005 19:17:21 -0000 1.4 --- sirf_id28_1.c 1 Aug 2005 20:05:07 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_1P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_1P SiRF_ID28_1P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 152; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_1P SiRF_ID28_1P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 152; *************** *** 176,180 **** --- 180,186 ---- data->sat_id, data->gps_sw_time); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 297,300 **** --- 303,307 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_1P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 314,317 **** --- 321,325 ---- xpacket_add_type(&SiRF_ID28_1P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 18; Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 29 Jul 2005 19:12:26 -0000 1.3 --- Makefile 1 Aug 2005 20:05:07 -0000 1.4 *************** *** 2,10 **** SRC = sirf_id2_1.c sirf_id2_2.c sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c # uint32_t -> int format produces annoying warning messages, # disable it for now. test: ! gcc -Wall -Wno-format -o sirftest sirftest.c $(SRC) --- 2,11 ---- SRC = sirf_id2_1.c sirf_id2_2.c sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c + INCLUDES = ../../../tos/lib/SiRF # uint32_t -> int format produces annoying warning messages, # disable it for now. test: ! gcc -Wall -Wno-format -o sirftest -I$(INCLUDES) sirftest.c $(SRC) Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_2.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sirf_id28_2.c 1 Aug 2005 19:17:21 -0000 1.4 --- sirf_id28_2.c 1 Aug 2005 20:05:07 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- //#include "SiRF_ID28_2P_private.h" /** Not the best way to handle xbow dependencies. */ + #ifdef TELOS_MOTE #include "../xdb.h" #include "../xsensors.h" + #endif *************** *** 25,29 **** /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_2P SiRF_ID28_2P; ! //typedef struct _XbowSensorboardPacket XbowSensorboardPacket; /** The Active Message type associated with this message. */ //static const int AM_TYPE = 153; --- 27,33 ---- /** These need to be moved to a header file. */ typedef struct _SiRF_ID28_2P SiRF_ID28_2P; ! #ifndef TELOS_MOTE ! typedef struct _XbowSensorboardPacket XbowSensorboardPacket; ! #endif /** The Active Message type associated with this message. */ //static const int AM_TYPE = 153; *************** *** 176,180 **** --- 180,186 ---- data->carrier_phase, data->time_in_track); + #ifdef TELOS_MOTE xdb_execute(pg_command); + #endif } *************** *** 297,300 **** --- 303,307 ---- } + #ifdef TELOS_MOTE XPacketHandler SiRF_ID28_2P_packet_handler = { // This should be replaced with the AM_TYPE *************** *** 314,317 **** --- 321,325 ---- xpacket_add_type(&SiRF_ID28_2P_packet_handler); } + #endif /** The default size of this message type in bytes. */ //static int DEFAULT_MESSAGE_SIZE = 26; |
From: David M. D. <do...@us...> - 2005-08-01 19:53:11
|
Update of /cvsroot/firebug/fireboard/beta/tos/lib/SiRF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12668 Added Files: SiRFC.nc SiRFM.nc sirf.h Log Message: Start of sirf parsing implementation. --- NEW FILE: SiRFM.nc --- /** * Module for parsing SiRF - 0183 sentences. * * This code is part of the NSF-ITR funded * FireBug project: * @url http://firebug.sourceforge.net * * @author David M. Doolin * * $Id: SiRFM.nc,v 1.1 2005/08/01 19:52:58 doolin Exp $ */ #define extract_num_sats_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_hours_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_minutes_m(data) (10*(data[2]-'0') + (data[3]-'0')) #define extract_dec_sec_m(data) (10*(data[4]-'0') + (data[5]-'0') + 0.1*(data[7]-'0') \ + 0.01*(data[8]-'0') \ + 0.001*(data[9]-'0')) #define extract_Lat_deg_m(data) (10*(data[0]-'0') + (data[1]-'0')) #define extract_Lat_dec_min_m(data) (10*(data[2]-'0') + (data[3]-'0') + 0.1*(data[5]-'0') \ + 0.01*(data[6]-'0') + 0.001*(data[7]-'0') + 0.0001*(data[8]-'0')) #define extract_Long_deg_m(data) (100*(data[0]-'0') + 10*(data[1]-'0') + (data[2]-'0')) #define extract_Long_dec_min_m(data) (10*(data[3]-'0') + (data[4]-'0') + 0.1*(data[6]-'0') \ + 0.01*(data[7]-'0') + 0.001*(data[8]-'0') + 0.0001*(data[9]-'0')) #define GGA_NS_m(foo) ((foo[28]=='N') ? 1 : 0) #define GGA_EW_m(foo) ((foo[41]=='W') ? 1 : 0) #define extract_GGA_NSEWind_m(foo) ((GGA_EW_m(foo)) | ((GGA_NS_m(foo))<<4)) includes sirf; module SiRFM { provides interface SiRF; } implementation { command uint8_t SiRF.get_type (const char * sirfstring) { return 0; } } --- NEW FILE: SiRFC.nc --- /** * Configuration for NMEA - 0183 parser. * * This code is part of the NSF-ITR funded * FireBug project: * @url http://firebug.sourceforge.net * * @author David M. Doolin * * $Id: SiRFC.nc,v 1.1 2005/08/01 19:52:58 doolin Exp $ */ configuration SiRFC { provides interface SiRF; } implementation { components SiRFM; SiRF = SiRFM; } --- NEW FILE: sirf.h --- /** SiRF message processing. * * @author David M. Doolin */ #ifndef FB_SIRF_H #define FB_SIRF_H //#include <sys/types.h> #ifndef FB_HEADER #define FB_HEADER typedef struct _fb_header { uint8_t seqno; uint8_t am_type; uint8_t rsrvd1; uint8_t rsrvd2; } fb_header; #endif typedef struct SiRF_ID2_1 { fb_header header; int32_t xpos; int32_t ypos; int32_t zpos; uint16_t xvel; uint16_t yvel; uint16_t zvel; uint8_t mode1; uint8_t dop; uint8_t mode2; uint16_t gps_week; } SiRF_ID2_1; enum { AM_SIRF_ID2_1 = 150 }; typedef struct SiRF_ID2_2 { fb_header header; uint32_t gps_tow; uint8_t sv_in_fix; uint8_t ch1; uint8_t ch2; uint8_t ch3; uint8_t ch4; uint8_t ch5; uint8_t ch6; uint8_t ch7; uint8_t ch8; uint8_t ch9; uint8_t ch10; uint8_t ch11; uint8_t ch12; } SiRF_ID2_2; enum { AM_SIRF_ID2_2 = 151 }; typedef struct SiRF_ID28_1 { fb_header header; uint8_t channel; uint32_t time_tag; uint8_t sat_id; uint32_t gps_sw_time[2]; } SiRF_ID28_1; enum { AM_SIRF_ID28_1 = 152 }; typedef struct SiRF_ID28_2 { fb_header header; uint32_t pseudo_range[2]; uint32_t carrier_freq; uint32_t carrier_phase[2]; uint16_t time_in_track; } SiRF_ID28_2; enum { AM_SIRF_ID28_2 = 153 }; typedef struct SiRF_ID28_3 { fb_header header; uint8_t sync_flags; uint8_t cno1; uint8_t cno2; uint8_t cno3; uint8_t cno4; uint8_t cno5; uint8_t cno6; uint8_t cno7; uint8_t cno8; uint8_t cno9; uint8_t cno10; uint16_t delta_range_interval; uint16_t mean_delta_range_time; uint16_t extrapolation_time; uint8_t phase_error_count; uint8_t low_power_count; } SiRF_ID28_3; enum { AM_SIRF_ID28_3 = 154 }; #endif /* FB_SIRF_H */ |
From: David M. D. <do...@us...> - 2005-08-01 19:51:42
|
Update of /cvsroot/firebug/fireboard/beta/tos/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12295 Added Files: SiRF.nc Log Message: Start of sirf parsing interface. --- NEW FILE: SiRF.nc --- /** * Interface for defining behavior of SiRF - 0183 parser. * * This code is part of the NSF-ITR funded * FireBug project: * @url http://firebug.sourceforge.net * * @author David M. Doolin * * $Id: SiRF.nc,v 1.1 2005/08/01 19:51:34 doolin Exp $ * */ includes sirf; interface SiRF { command uint8_t get_type (const char * sirfstring); } |
From: David M. D. <do...@us...> - 2005-08-01 19:50:08
|
Update of /cvsroot/firebug/fireboard/beta/tos/interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11922/interfaces Log Message: Directory /cvsroot/firebug/fireboard/beta/tos/interfaces added to the repository |
From: David M. D. <do...@us...> - 2005-08-01 19:17:33
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3608/tools/src/xlisten Modified Files: Makefile genc.pm genpgsql.pm xpacket.c xsensors.h Log Message: Autogeneration tool chain works from mote-to-database now. Index: xpacket.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/xpacket.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** xpacket.c 1 Aug 2005 15:23:46 -0000 1.6 --- xpacket.c 1 Aug 2005 19:17:22 -0000 1.7 *************** *** 56,60 **** xtutorial_initialize(); /* From boards/xtutorial.c */ ! testlink_initialize(); } --- 56,60 ---- xtutorial_initialize(); /* From boards/xtutorial.c */ ! LinkMsgP_initialize(); } Index: xsensors.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/xsensors.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** xsensors.h 1 Aug 2005 15:26:07 -0000 1.7 --- xsensors.h 1 Aug 2005 19:17:22 -0000 1.8 *************** *** 230,234 **** void xtutorial_initialize(); /* From baords/xtutorial.c */ ! void testlink_initialize(); #endif /* __SENSORS_H__ */ --- 230,234 ---- void xtutorial_initialize(); /* From baords/xtutorial.c */ ! void LinkMsgP_initialize(); #endif /* __SENSORS_H__ */ Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 1 Aug 2005 15:27:33 -0000 1.11 --- Makefile 1 Aug 2005 19:17:21 -0000 1.12 *************** *** 17,21 **** SRCS += boards/mica2.c boards/mica2dot.c boards/micaz.c boards/fireboard.c SRCS += boards/pg_test.c ! SRCS += boards/linkmsg.c boards/testlink.c SRCS += boards/sirf_id2_1.c boards/sirf_id2_2.c SRCS += boards/sirf_id28_1.c boards/sirf_id28_2.c boards/sirf_id28_3.c --- 17,21 ---- SRCS += boards/mica2.c boards/mica2dot.c boards/micaz.c boards/fireboard.c SRCS += boards/pg_test.c ! SRCS += boards/linkmsg.c #boards/testlink.c SRCS += boards/sirf_id2_1.c boards/sirf_id2_2.c SRCS += boards/sirf_id28_1.c boards/sirf_id28_2.c boards/sirf_id28_3.c Index: genpgsql.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/genpgsql.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** genpgsql.pm 14 Jul 2005 16:50:57 -0000 1.1 --- genpgsql.pm 1 Aug 2005 19:17:22 -0000 1.2 *************** *** 44,48 **** if ($java_classname =~ /(.*)\.([^.]*)$/) { $package = $1; ! $java_classname = $2; } --- 44,48 ---- if ($java_classname =~ /(.*)\.([^.]*)$/) { $package = $1; ! $java_classname = $2."P"; } *************** *** 148,153 **** $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "smallint"; } ! elsif ($bitlength < 16) { $jtype = "smallint"; } ! elsif ($bitlength < 32) { $jtype = "smallint"; } else { $jtype = "integer"; } } --- 148,153 ---- $acc = "UIntElement"; if ($bitlength < 8) { $jtype = "smallint"; } ! elsif ($bitlength < 16) { $jtype = "integer"; } ! elsif ($bitlength < 32) { $jtype = "integer"; } else { $jtype = "integer"; } } Index: genc.pm =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/genc.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** genc.pm 30 Jul 2005 03:14:58 -0000 1.3 --- genc.pm 1 Aug 2005 19:17:22 -0000 1.4 *************** *** 34,131 **** - sub gen_insert_stmt () { - - my($fmtstr1) = $_[0]; - my($fmtstr); - - my ($tmp,$fmtstr); - - $i = 0; - $numfields = $#fields; - - print "static char insert_stmt[] = \"INSERT into $java_classname (\"\n"; - - for (@fields) { - ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; - ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); - - # This is clunky but will work. A better way to do it would be to store - # the nested struct internally in the field array somehow. - # Maybe a perl guru can figure that out. - # What needs to be done is to find one of these, then - # store it until all the members written out, - # then print it. - if ($field =~ /(.*)\.([^.]*)$/) { - $struct = $1; - $member = $2; - #print STDERR $struct;#.", "$member."\n"; - } - - ## Gets an array of format specifiers useful in *print* functions - ## in libc. the @format array can be passed - #push(@format, &formatstring($type, $bitlength, 0)); - $field =~ s/\./_/g; - - if ($i < $numfields) { - printf "\"$field,\"\n"; - } else { - printf "\"$field) values ("; - } - - $i++; - } - - $tmp = @format[$#format-1]; - $tmp =~ s/,//g; - $fmtstr = "@format[0..($#format-1)] $tmp"; - print "$fmtstr)\";\n\n\n"; - - - &gen_struct_array(); - - - - print "void\n$java_classname\_pg\_log(XbowSensorboardPacket * userdata) {\n"; - print "char pg_command[255];\n"; - print "$java_classname * data = ($java_classname*)userdata;\n"; - print "sprintf(pg_command,insert_stmt,\n"; - # traverse struct here. - $i = 0; - for (@fields) { - ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; - ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); - - # This is clunky but will work. A better way to do it would be to store - # the nested struct internally in the field array somehow. - # Maybe a perl guru can figure that out. - # What needs to be done is to find one of these, then - # store it until all the members written out, - # then print it. - if ($field =~ /(.*)\.([^.]*)$/) { - $struct = $1; - $member = $2; - #print STDERR $struct;#.", "$member."\n"; - } - - ## Gets an array of format specifiers useful in *print* functions - ## in libc. the @format array can be passed - push(@format, &formatstring($type, $bitlength, 0)); - $field =~ s/\./_/g; - - if ($i < $numfields) { - print "data->$field,\n" - } else { - print "data->$field);\n"; - } - $i++; - } - - print "xdb_execute(pg_command);\n"; - - print "}\n"; - - } - - sub gen() { --- 34,37 ---- *************** *** 147,150 **** --- 53,57 ---- $package = $1; $java_classname = $2; + $structname = $java_classname."P"; } *************** *** 154,160 **** $bigskip = "\n\n\n\n\n\n"; print "/**\n"; print " * This class is automatically generated by mig. DO NOT EDIT THIS FILE.\n"; ! print " * This code implements C interface to the '$java_classname'\n"; print " * message type.\n"; print " */\n\n"; --- 61,68 ---- $bigskip = "\n\n\n\n\n\n"; + print "/**\n"; print " * This class is automatically generated by mig. DO NOT EDIT THIS FILE.\n"; ! print " * This code implements C interface to the '$structname'\n"; print " * message type.\n"; print " */\n\n"; *************** *** 168,181 **** print "/** Private header is programmer specified for handling\n"; print " * conversion functions, etc.\n */\n"; ! print "//#include \"$java_classname\_private.h\"\n"; ! print "/** Not the best way to handle xbow dependencies. */\n"; print "#include \"../xdb.h\"\n"; print $medskip; print "/** These need to be moved to a header file. */\n"; ! print "typedef struct _$java_classname $java_classname;\n"; ! print "typedef struct _XbowSensorboardPacket XbowSensorboardPacket;\n"; print $smallskip; --- 76,96 ---- print "/** Private header is programmer specified for handling\n"; print " * conversion functions, etc.\n */\n"; ! print "//#include \"$structname\_private.h\"\n"; ! print "/** Not the best way to handle xbow dependencies. */\n"; print "#include \"../xdb.h\"\n"; + print "#include \"../xsensors.h\"\n"; print $medskip; 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 ! ! print "/** The Active Message type associated with this message. */\n"; ! print "//static const int AM_TYPE = $amtype;\n\n"; ! print "//#define AM_TYPE $amtype\n\n"; print $smallskip; *************** *** 191,195 **** print $medskip; ! # print "struct _$java_classname {\n"; # for (@fields) { # ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; --- 106,110 ---- print $medskip; ! # print "struct _$structname {\n"; # for (@fields) { # ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; *************** *** 247,251 **** ## each member. print "void\n"; ! print "$java_classname\_cook\_packet($java_classname * userdata) {\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; --- 162,166 ---- ## each member. print "void\n"; ! print "$structname\_cook\_packet($structname * userdata) {\n"; for (@fields) { ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; *************** *** 269,275 **** print " * necessary for processing.\n"; print " */\n"; ! print "$java_classname *\n $java_classname\_convert(char * data) {\n"; print " // Just to keep gcc happy.\n"; ! print " return ($java_classname*)data;\n"; print "}\n"; --- 184,190 ---- print " * necessary for processing.\n"; print " */\n"; ! print "$structname *\n $structname\_convert(char * data) {\n"; print " // Just to keep gcc happy.\n"; ! print " return ($structname*)data;\n"; print "}\n"; *************** *** 282,304 **** #&gen_cooked_with_tabs(); # print "package $package;\n\n" if $package; ! # print "public class $java_classname extends $java_extends {\n\n"; print "/** The default size of this message type in bytes. */\n"; print "//static int DEFAULT_MESSAGE_SIZE = $size;\n\n"; - print "/** The Active Message type associated with this message. */\n"; - print "//static int AM_TYPE = $amtype;\n\n"; print "/** If incomplete types are used, we need to provide a way\n"; print " * to manage memory.\n"; print " */\n"; ! print "$java_classname *\n"; ! print "$java_classname\_new() {\n"; ! print " $java_classname * userdata = ($java_classname*)malloc(sizeof($java_classname));\n"; ! print " memset((void*)userdata,0xda,sizeof($java_classname));\n"; print " return userdata;\n"; print "}\n"; --- 197,218 ---- #&gen_cooked_with_tabs(); + &gen_handler_table(); # print "package $package;\n\n" if $package; ! # print "public class $structname extends $java_extends {\n\n"; print "/** The default size of this message type in bytes. */\n"; print "//static int DEFAULT_MESSAGE_SIZE = $size;\n\n"; print "/** If incomplete types are used, we need to provide a way\n"; print " * to manage memory.\n"; print " */\n"; ! print "$structname *\n"; ! print "$structname\_new() {\n"; ! print " $structname * userdata = ($structname*)malloc(sizeof($structname));\n"; ! print " memset((void*)userdata,0xda,sizeof($structname));\n"; print " return userdata;\n"; print "}\n"; *************** *** 308,313 **** print "void\n"; ! print "$java_classname\_delete($java_classname * userdata) {\n"; ! print " memset((void*)userdata,0xdd,sizeof($java_classname));\n"; print " free(userdata);\n"; print "}\n"; --- 222,227 ---- print "void\n"; ! print "$structname\_delete($structname * userdata) {\n"; ! print " memset((void*)userdata,0xdd,sizeof($structname));\n"; print " free(userdata);\n"; print "}\n"; *************** *** 315,323 **** } sub gen_cooked_with_tabs() { print "/** Print cooked with tabs. */\n"; ! print "void\n$java_classname\_print\_tabbed (XbowSensorboardPacket *packet) {\n\n"; ! print "$I$java_classname * userdata = ($java_classname*)packet->data;\n"; print "}\n\n"; } --- 229,334 ---- } + + + sub gen_insert_stmt () { + + my($fmtstr1) = $_[0]; + my($fmtstr); + + my ($tmp,$fmtstr); + + $i = 0; + $numfields = $#fields; + + print "static char insert_stmt[] = \"INSERT into $structname (\"\n"; + + for (@fields) { + ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; + ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); + + # This is clunky but will work. A better way to do it would be to store + # the nested struct internally in the field array somehow. + # Maybe a perl guru can figure that out. + # What needs to be done is to find one of these, then + # store it until all the members written out, + # then print it. + if ($field =~ /(.*)\.([^.]*)$/) { + $struct = $1; + $member = $2; + #print STDERR $struct;#.", "$member."\n"; + } + + ## Gets an array of format specifiers useful in *print* functions + ## in libc. the @format array can be passed + #push(@format, &formatstring($type, $bitlength, 0)); + $field =~ s/\./_/g; + + if ($i < $numfields) { + printf "\"$field,\"\n"; + } else { + printf "\"$field) values ("; + } + + $i++; + } + + $tmp = @format[$#format-1]; + $tmp =~ s/,//g; + $fmtstr = "@format[0..($#format-1)] $tmp"; + print "$fmtstr)\";\n\n\n"; + + + &gen_struct_array(); + + + + print "void\n$structname\_pg\_log(XbowSensorboardPacket * userdata) {\n"; + print "char pg_command[255];\n"; + print "$structname * data = ($structname*)userdata;\n"; + print "sprintf(pg_command,insert_stmt,\n"; + # traverse struct here. + $i = 0; + for (@fields) { + ($field, $type, $bitlength, $offset, $amax, $abitsize, $aoffset) = @{$_}; + ($ctype, $java_access, $arrayspec) = &cbasetype($type, $bitlength, 0); + + # This is clunky but will work. A better way to do it would be to store + # the nested struct internally in the field array somehow. + # Maybe a perl guru can figure that out. + # What needs to be done is to find one of these, then + # store it until all the members written out, + # then print it. + if ($field =~ /(.*)\.([^.]*)$/) { + $struct = $1; + $member = $2; + #print STDERR $struct;#.", "$member."\n"; + } + + ## Gets an array of format specifiers useful in *print* functions + ## in libc. the @format array can be passed + push(@format, &formatstring($type, $bitlength, 0)); + $field =~ s/\./_/g; + + if ($i < $numfields) { + print "data->$field,\n" + } else { + print "data->$field);\n"; + } + $i++; + } + + print "xdb_execute(pg_command);\n"; + + print "}\n"; + + } + + + sub gen_cooked_with_tabs() { print "/** Print cooked with tabs. */\n"; ! print "void\n$structname\_print\_tabbed (XbowSensorboardPacket *packet) {\n\n"; ! print "$I$structname * userdata = ($structname*)packet->data;\n"; print "}\n\n"; } *************** *** 327,342 **** print "/** Print the bytes of the packet. */\n"; ! print "void\n$java_classname\_print\_raw (XbowSensorboardPacket *packet) {\n\n"; ! # print "$I$java_classname * userdata = ($java_classname*)packet->data;\n"; print "}\n\n"; } sub gen_cooked_output() { print "/** Print cooked output. */\n"; ! print "void\n$java_classname\_print\_cooked (XbowSensorboardPacket * userdata) {\n\n"; ! print "$I$java_classname * data = ($java_classname*)userdata;\n"; for (@fields) { --- 338,376 ---- print "/** Print the bytes of the packet. */\n"; ! print "void\n$structname\_print\_raw (XbowSensorboardPacket *packet) {\n\n"; ! # print "$I$structname * userdata = ($structname*)packet->data;\n"; ! print " printf(\"$structname print raw.\\n\");\n"; print "}\n\n"; } + sub gen_handler_table() { + + print "XPacketHandler $structname\_packet\_handler = {\n"; + print "// This should be replaced with the AM_TYPE\n"; + print " $amtype,\n"; + print " \"\$Id$\",\n"; + print " $structname\_print\_raw,\n"; + print " $structname\_print\_cooked,\n"; + print " $structname\_print\_raw,\n"; + print " $structname\_print\_cooked,\n"; + print " $structname\_pg\_log,\n"; + print " {0}\n"; + print "};\n\n\n"; + + ### Add handler table to xlisten. + print "void\n$structname\_initialize() {\n"; + print "xpacket_add_type(&$structname\_packet\_handler);\n"; + print "}\n"; + + } + sub gen_cooked_output() { print "/** Print cooked output. */\n"; ! print "void\n$structname\_print\_cooked (XbowSensorboardPacket * userdata) {\n\n"; ! print "$I$structname * data = ($structname*)userdata;\n"; + print " printf(\"$structname print cooked:\\n\");\n"; for (@fields) { *************** *** 352,356 **** #push(@format, &formatstring($type, $bitlength, 0)); $field =~ s/\./_/g; ! print " printf(\"$field: ".&formatstring($type, $bitlength, 0)."\\n\",data->$field);\n"; } --- 386,390 ---- #push(@format, &formatstring($type, $bitlength, 0)); $field =~ s/\./_/g; ! print " printf(\"$I$field: ".&formatstring($type, $bitlength, 0)."\\n\",data->$field);\n"; } *************** *** 366,370 **** sub gen_struct() { ! print "struct _$java_classname {\n"; ## todo move this to sub print_msg_struct(). --- 400,404 ---- sub gen_struct() { ! print "struct _$structname {\n"; ## todo move this to sub print_msg_struct(). *************** *** 437,446 **** $field =~ s/\./_/g; print "void\n"; ! print "$java_classname\_set\_$field($java_classname * userdata, $ctype $field) {\n"; print " userdata->$field = $field;\n"; print "}\n\n"; #### Get methods print "$ctype\n"; ! print "$java_classname\_get\_$field($java_classname * userdata) {\n"; print " return userdata->$field;\n"; print "}\n\n"; --- 471,480 ---- $field =~ s/\./_/g; print "void\n"; ! print "$structname\_set\_$field($structname * userdata, $ctype $field) {\n"; print " userdata->$field = $field;\n"; print "}\n\n"; #### Get methods print "$ctype\n"; ! print "$structname\_get\_$field($structname * userdata) {\n"; print " return userdata->$field;\n"; print "}\n\n"; |
From: David M. D. <do...@us...> - 2005-08-01 19:17:32
|
Update of /cvsroot/firebug/fireboard/beta/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3608/bin Modified Files: sirf_id28_1.pgsql sirf_id28_2.pgsql sirf_id28_3.pgsql sirf_id2_1.pgsql sirf_id2_2.pgsql Log Message: Autogeneration tool chain works from mote-to-database now. Index: sirf_id28_1.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_1.pgsql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_1.pgsql 15 Jul 2005 16:37:01 -0000 1.1 --- sirf_id28_1.pgsql 1 Aug 2005 19:17:20 -0000 1.2 *************** *** 1,16 **** /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_1' * message type. */ ! CREATE TABLE SiRF_ID28_1 ( ! header_seqno smallint, ! header_am_type smallint, ! header_rsrvd1 smallint, ! header_rsrvd2 smallint, ! channel smallint, time_tag integer, ! sat_id smallint, gps_sw_time integer); --- 1,16 ---- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_1P' * message type. */ ! CREATE TABLE SiRF_ID28_1P ( ! header_seqno integer, ! header_am_type integer, ! header_rsrvd1 integer, ! header_rsrvd2 integer, ! channel integer, time_tag integer, ! sat_id integer, gps_sw_time integer); Index: sirf_id28_3.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_3.pgsql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_3.pgsql 15 Jul 2005 16:37:01 -0000 1.1 --- sirf_id28_3.pgsql 1 Aug 2005 19:17:20 -0000 1.2 *************** *** 1,29 **** /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_3' * message type. */ ! CREATE TABLE SiRF_ID28_3 ( ! header_seqno smallint, ! header_am_type smallint, ! header_rsrvd1 smallint, ! header_rsrvd2 smallint, ! sync_flags smallint, ! cno1 smallint, ! cno2 smallint, ! cno3 smallint, ! cno4 smallint, ! cno5 smallint, ! cno6 smallint, ! cno7 smallint, ! cno8 smallint, ! cno9 smallint, ! cno10 smallint, ! delta_range_interval smallint, ! mean_delta_range_time smallint, ! extrapolation_time smallint, ! phase_error_count smallint, ! low_power_count smallint); --- 1,29 ---- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_3P' * message type. */ ! CREATE TABLE SiRF_ID28_3P ( ! header_seqno integer, ! header_am_type integer, ! header_rsrvd1 integer, ! header_rsrvd2 integer, ! sync_flags integer, ! cno1 integer, ! cno2 integer, ! cno3 integer, ! cno4 integer, ! cno5 integer, ! cno6 integer, ! cno7 integer, ! cno8 integer, ! cno9 integer, ! cno10 integer, ! delta_range_interval integer, ! mean_delta_range_time integer, ! extrapolation_time integer, ! phase_error_count integer, ! low_power_count integer); Index: sirf_id28_2.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id28_2.pgsql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_2.pgsql 15 Jul 2005 16:37:01 -0000 1.1 --- sirf_id28_2.pgsql 1 Aug 2005 19:17:20 -0000 1.2 *************** *** 1,17 **** /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_2' * message type. */ ! CREATE TABLE SiRF_ID28_2 ( ! header_seqno smallint, ! header_am_type smallint, ! header_rsrvd1 smallint, ! header_rsrvd2 smallint, pseudo_range integer, carrier_freq integer, carrier_phase integer, ! time_in_track smallint); --- 1,17 ---- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID28_2P' * message type. */ ! CREATE TABLE SiRF_ID28_2P ( ! header_seqno integer, ! header_am_type integer, ! header_rsrvd1 integer, ! header_rsrvd2 integer, pseudo_range integer, carrier_freq integer, carrier_phase integer, ! time_in_track integer); Index: sirf_id2_1.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id2_1.pgsql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id2_1.pgsql 29 Jul 2005 23:26:31 -0000 1.2 --- sirf_id2_1.pgsql 1 Aug 2005 19:17:20 -0000 1.3 *************** *** 1,23 **** /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID2_1' * message type. */ ! CREATE TABLE SiRF_ID2_1 ( ! header_seqno smallint, ! header_am_type smallint, ! header_rsrvd1 smallint, ! header_rsrvd2 smallint, xpos integer, ypos integer, zpos integer, ! xvel smallint, ! yvel smallint, ! zvel smallint, ! mode1 smallint, ! dop smallint, ! mode2 smallint, ! gps_week smallint); --- 1,23 ---- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID2_1P' * message type. */ ! CREATE TABLE SiRF_ID2_1P ( ! header_seqno integer, ! header_am_type integer, ! header_rsrvd1 integer, ! header_rsrvd2 integer, xpos integer, ypos integer, zpos integer, ! xvel integer, ! yvel integer, ! zvel integer, ! mode1 integer, ! dop integer, ! mode2 integer, ! gps_week integer); Index: sirf_id2_2.pgsql =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/sirf_id2_2.pgsql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id2_2.pgsql 15 Jul 2005 16:37:01 -0000 1.1 --- sirf_id2_2.pgsql 1 Aug 2005 19:17:20 -0000 1.2 *************** *** 1,27 **** /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID2_2' * message type. */ ! CREATE TABLE SiRF_ID2_2 ( ! header_seqno smallint, ! header_am_type smallint, ! header_rsrvd1 smallint, ! header_rsrvd2 smallint, gps_tow integer, ! sv_in_fix smallint, ! ch1 smallint, ! ch2 smallint, ! ch3 smallint, ! ch4 smallint, ! ch5 smallint, ! ch6 smallint, ! ch7 smallint, ! ch8 smallint, ! ch9 smallint, ! ch10 smallint, ! ch11 smallint, ! ch12 smallint); --- 1,27 ---- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. ! * This code provides postgres table to the 'SiRF_ID2_2P' * message type. */ ! CREATE TABLE SiRF_ID2_2P ( ! header_seqno integer, ! header_am_type integer, ! header_rsrvd1 integer, ! header_rsrvd2 integer, gps_tow integer, ! sv_in_fix integer, ! ch1 integer, ! ch2 integer, ! ch3 integer, ! ch4 integer, ! ch5 integer, ! ch6 integer, ! ch7 integer, ! ch8 integer, ! ch9 integer, ! ch10 integer, ! ch11 integer, ! ch12 integer); |
From: David M. D. <do...@us...> - 2005-08-01 18:36:39
|
Update of /cvsroot/firebug/fireboard/beta/tos/lib/SiRF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24934/SiRF Log Message: Directory /cvsroot/firebug/fireboard/beta/tos/lib/SiRF added to the repository |
From: David M. D. <do...@us...> - 2005-08-01 18:35:07
|
Update of /cvsroot/firebug/fireboard/beta/tos/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24612/lib Log Message: Directory /cvsroot/firebug/fireboard/beta/tos/lib added to the repository |
From: David M. D. <do...@us...> - 2005-08-01 15:28:09
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3535 Modified Files: Makefile Log Message: Added telos processing to xlisten. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 30 Jul 2005 03:14:58 -0000 1.10 --- Makefile 1 Aug 2005 15:27:33 -0000 1.11 *************** *** 40,44 **** SRCS += timestamp/timestamp.c ! all: xlisten fbpacket xlisten: $(SRCS) --- 40,44 ---- SRCS += timestamp/timestamp.c ! all: xlisten fbpacket xlisten-telos xlisten: $(SRCS) *************** *** 48,51 **** --- 48,54 ---- $(CC) $(CFLAGS) -o $@ fbpacket.c $(SRCS) $(INCLUDES) $(LFLAGS) + xlisten-telos: $(SRCS) + $(CC) $(CFLAGS) -o $@ -DTELOS_MOTE xlisten.c $(SRCS) $(INCLUDES) $(LFLAGS) + xlisten-arm: $(SRCS) $(ARMCC) -I$(INCDIR) $(INCLUDES) $(CFLAGS) -o $@ $(SRCS) -L$(LIBDIR) $(LFLAGS) |
From: David M. D. <do...@us...> - 2005-08-01 15:26:16
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3180 Modified Files: xsensors.h Log Message: Added telos processing to xlisten. Index: xsensors.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/xsensors.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** xsensors.h 1 Aug 2005 15:23:47 -0000 1.6 --- xsensors.h 1 Aug 2005 15:26:07 -0000 1.7 *************** *** 114,120 **** #define XPACKET_MIN_SIZE 4 //!< minimum valid packet size ! //#define XPACKET_TYPE 2 //!< offset to type of TOS packet ! // For telos ! #define XPACKET_TYPE 8 //!< offset to type of TOS packet #define XPACKET_GROUP 3 //!< offset to group id of TOS packet --- 114,123 ---- #define XPACKET_MIN_SIZE 4 //!< minimum valid packet size ! ! #ifdef TELOS_MOTE ! #define XPACKET_TYPE 8 //!< telos offset to type of TOS packet ! #else ! #define XPACKET_TYPE 2 //!< mica2 offset to type of TOS packet ! #endif #define XPACKET_GROUP 3 //!< offset to group id of TOS packet |
From: David M. D. <do...@us...> - 2005-08-01 15:23:56
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2485/boards Modified Files: linkmsg.c sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c sirf_id2_1.c sirf_id2_2.c testlink.c Log Message: Added telos processing to xlisten. Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_3.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_3.c 30 Jul 2005 02:14:52 -0000 1.1 --- sirf_id28_3.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 536,539 **** --- 536,540 ---- SiRF_ID28_3_print_raw (XbowSensorboardPacket *packet) { + printf("SiRF_ID28_3 print raw.\n"); } *************** *** 543,566 **** SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("sync_flags: %i,\n",data->sync_flags); ! printf("cno1: %i,\n",data->cno1); ! printf("cno2: %i,\n",data->cno2); ! printf("cno3: %i,\n",data->cno3); ! printf("cno4: %i,\n",data->cno4); ! printf("cno5: %i,\n",data->cno5); ! printf("cno6: %i,\n",data->cno6); ! printf("cno7: %i,\n",data->cno7); ! printf("cno8: %i,\n",data->cno8); ! printf("cno9: %i,\n",data->cno9); ! printf("cno10: %i,\n",data->cno10); ! printf("delta_range_interval: %i,\n",data->delta_range_interval); ! printf("mean_delta_range_time: %i,\n",data->mean_delta_range_time); ! printf("extrapolation_time: %i,\n",data->extrapolation_time); ! printf("phase_error_count: %i,\n",data->phase_error_count); ! printf("low_power_count: %i,\n",data->low_power_count); } --- 544,568 ---- SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; ! printf("SiRF_ID28_3 print cooked:\n"); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf(" header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf(" sync_flags: %i,\n",data->sync_flags); ! printf(" cno1: %i,\n",data->cno1); ! printf(" cno2: %i,\n",data->cno2); ! printf(" cno3: %i,\n",data->cno3); ! printf(" cno4: %i,\n",data->cno4); ! printf(" cno5: %i,\n",data->cno5); ! printf(" cno6: %i,\n",data->cno6); ! printf(" cno7: %i,\n",data->cno7); ! printf(" cno8: %i,\n",data->cno8); ! printf(" cno9: %i,\n",data->cno9); ! printf(" cno10: %i,\n",data->cno10); ! printf(" delta_range_interval: %i,\n",data->delta_range_interval); ! printf(" mean_delta_range_time: %i,\n",data->mean_delta_range_time); ! printf(" extrapolation_time: %i,\n",data->extrapolation_time); ! printf(" phase_error_count: %i,\n",data->phase_error_count); ! printf(" low_power_count: %i,\n",data->low_power_count); } Index: linkmsg.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/linkmsg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** linkmsg.c 30 Jul 2005 03:14:59 -0000 1.2 --- linkmsg.c 1 Aug 2005 15:23:47 -0000 1.3 *************** *** 228,232 **** LinkMsg_print_raw (XbowSensorboardPacket *packet) { ! printf("LinkMsg\n"); } --- 228,232 ---- LinkMsg_print_raw (XbowSensorboardPacket *packet) { ! //fprintf(stderr,"LinkMsg print raw.\n"); } *************** *** 236,245 **** LinkMsg * data = (LinkMsg*)userdata; ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("tstamp: %i,\n",data->tstamp); ! printf("moteid: %i,\n",data->moteid); ! printf("RSSI: %i,\n",data->RSSI); ! printf("LQI: %i,\n",data->LQI); } --- 236,247 ---- LinkMsg * data = (LinkMsg*)userdata; ! ! printf("LinkMsg print cooked:\n"); ! printf(" header_am_type: %x,\n",data->header_am_type); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" tstamp: %x,\n",data->tstamp); ! printf(" moteid: %x,\n",data->moteid); ! printf(" RSSI: %i,\n",data->RSSI); ! printf(" LQI: %i,\n",data->LQI); } Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_1.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id2_1.c 30 Jul 2005 02:14:33 -0000 1.1 --- sirf_id2_1.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 404,407 **** --- 404,408 ---- SiRF_ID2_1_print_raw (XbowSensorboardPacket *packet) { + printf("SiRF_ID2_1 print raw.\n"); } *************** *** 411,428 **** SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("xpos: %i,\n",data->xpos); ! printf("ypos: %i,\n",data->ypos); ! printf("zpos: %i,\n",data->zpos); ! printf("xvel: %i,\n",data->xvel); ! printf("yvel: %i,\n",data->yvel); ! printf("zvel: %i,\n",data->zvel); ! printf("mode1: %i,\n",data->mode1); ! printf("dop: %i,\n",data->dop); ! printf("mode2: %i,\n",data->mode2); ! printf("gps_week: %i,\n",data->gps_week); } --- 412,430 ---- SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; ! printf("SiRF_ID2_1 print cooked:\n"); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf(" header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf(" xpos: %i,\n",data->xpos); ! printf(" ypos: %i,\n",data->ypos); ! printf(" zpos: %i,\n",data->zpos); ! printf(" xvel: %i,\n",data->xvel); ! printf(" yvel: %i,\n",data->yvel); ! printf(" zvel: %i,\n",data->zvel); ! printf(" mode1: %i,\n",data->mode1); ! printf(" dop: %i,\n",data->dop); ! printf(" mode2: %i,\n",data->mode2); ! printf(" gps_week: %i,\n",data->gps_week); } Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id2_2.c 30 Jul 2005 02:14:33 -0000 1.1 --- sirf_id2_2.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 492,495 **** --- 492,496 ---- SiRF_ID2_2_print_raw (XbowSensorboardPacket *packet) { + printf("SiRF_ID2_2 print raw.\n"); } *************** *** 499,520 **** SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("gps_tow: %i,\n",data->gps_tow); ! printf("sv_in_fix: %i,\n",data->sv_in_fix); ! printf("ch1: %i,\n",data->ch1); ! printf("ch2: %i,\n",data->ch2); ! printf("ch3: %i,\n",data->ch3); ! printf("ch4: %i,\n",data->ch4); ! printf("ch5: %i,\n",data->ch5); ! printf("ch6: %i,\n",data->ch6); ! printf("ch7: %i,\n",data->ch7); ! printf("ch8: %i,\n",data->ch8); ! printf("ch9: %i,\n",data->ch9); ! printf("ch10: %i,\n",data->ch10); ! printf("ch11: %i,\n",data->ch11); ! printf("ch12: %i,\n",data->ch12); } --- 500,522 ---- SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; ! printf("SiRF_ID2_2 print cooked:\n"); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf(" header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf(" gps_tow: %i,\n",data->gps_tow); ! printf(" sv_in_fix: %i,\n",data->sv_in_fix); ! printf(" ch1: %i,\n",data->ch1); ! printf(" ch2: %i,\n",data->ch2); ! printf(" ch3: %i,\n",data->ch3); ! printf(" ch4: %i,\n",data->ch4); ! printf(" ch5: %i,\n",data->ch5); ! printf(" ch6: %i,\n",data->ch6); ! printf(" ch7: %i,\n",data->ch7); ! printf(" ch8: %i,\n",data->ch8); ! printf(" ch9: %i,\n",data->ch9); ! printf(" ch10: %i,\n",data->ch10); ! printf(" ch11: %i,\n",data->ch11); ! printf(" ch12: %i,\n",data->ch12); } Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_1.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_1.c 30 Jul 2005 02:14:52 -0000 1.1 --- sirf_id28_1.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 272,275 **** --- 272,276 ---- SiRF_ID28_1_print_raw (XbowSensorboardPacket *packet) { + printf("SiRF_ID28_1 print raw.\n"); } *************** *** 279,290 **** SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("channel: %i,\n",data->channel); ! printf("time_tag: %i,\n",data->time_tag); ! printf("sat_id: %i,\n",data->sat_id); ! printf("gps_sw_time: %i,\n",data->gps_sw_time); } --- 280,292 ---- SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; ! printf("SiRF_ID28_1 print cooked:\n"); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf(" header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf(" channel: %i,\n",data->channel); ! printf(" time_tag: %i,\n",data->time_tag); ! printf(" sat_id: %i,\n",data->sat_id); ! printf(" gps_sw_time: %i,\n",data->gps_sw_time); } Index: testlink.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/testlink.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testlink.c 30 Jul 2005 02:15:17 -0000 1.1 --- testlink.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 24,28 **** XPacketHandler testlink_packet_handler = { ! XTYPE_TESTLINK, "$Id$", LinkMsg_print_raw, --- 24,28 ---- XPacketHandler testlink_packet_handler = { ! AM_LINKMSG, "$Id$", LinkMsg_print_raw, Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sirf_id28_2.c 30 Jul 2005 02:14:52 -0000 1.1 --- sirf_id28_2.c 1 Aug 2005 15:23:47 -0000 1.2 *************** *** 272,275 **** --- 272,276 ---- SiRF_ID28_2_print_raw (XbowSensorboardPacket *packet) { + printf("SiRF_ID28_2 print raw.\n"); } *************** *** 279,290 **** SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; ! printf("header_seqno: %i,\n",data->header_seqno); ! printf("header_am_type: %i,\n",data->header_am_type); ! printf("header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("pseudo_range: %i,\n",data->pseudo_range); ! printf("carrier_freq: %i,\n",data->carrier_freq); ! printf("carrier_phase: %i,\n",data->carrier_phase); ! printf("time_in_track: %i,\n",data->time_in_track); } --- 280,292 ---- SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; ! printf("SiRF_ID28_2 print cooked:\n"); ! printf(" header_seqno: %i,\n",data->header_seqno); ! printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_rsrvd1: %i,\n",data->header_rsrvd1); ! printf(" header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf(" pseudo_range: %i,\n",data->pseudo_range); ! printf(" carrier_freq: %i,\n",data->carrier_freq); ! printf(" carrier_phase: %i,\n",data->carrier_phase); ! printf(" time_in_track: %i,\n",data->time_in_track); } |
From: David M. D. <do...@us...> - 2005-08-01 15:23:55
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2485 Modified Files: xpacket.c xsensors.h Log Message: Added telos processing to xlisten. Index: xpacket.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/xpacket.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xpacket.c 30 Jul 2005 03:14:58 -0000 1.5 --- xpacket.c 1 Aug 2005 15:23:46 -0000 1.6 *************** *** 108,111 **** --- 108,112 ---- if (len < 2) return; + //printf("Mode is %d\n", mode); switch (mode) { case 0: *************** *** 160,163 **** --- 161,181 ---- break; + /* + case AMTYPE_FIREWORKS: + datastart = XPACKET_DATASTART_FIREWORKS; + //fprintf(stderr,"fireworks datastart: %d\n", datastart); + break; + + case XTYPE_TESTLINK: + datastart = XPACKET_DATASTART_FIREWORKS; + //fprintf(stderr,"fireworks datastart: %d\n", datastart); + break; + */ + + case AM_LINKMSG: + datastart = XPACKET_DATASTART_FIREWORKS; + //fprintf(stderr,"fireworks datastart: %d\n", datastart); + break; + default: return NULL; *************** *** 270,273 **** --- 288,292 ---- { int i = 256, entry; + while (--i >= 0) { entry = table + i; *************** *** 276,291 **** return g_packetTable[entry]; } return NULL; } ! XPacketHandler *xpacket_get_handler(char *tos_packet) ! { unsigned char am_type = tos_packet[XPACKET_TYPE]; switch (am_type) { case AMTYPE_XMULTIHOP: case AMTYPE_XUART: case AMTYPE_XDEBUG: - case AMTYPE_FIREWORKS: case AMTYPE_XSENSOR: { XbowSensorboardPacket *packet; --- 295,312 ---- return g_packetTable[entry]; } + return NULL; } ! XPacketHandler * ! xpacket_get_handler(char *tos_packet) { ! unsigned char am_type = tos_packet[XPACKET_TYPE]; + //fprintf("xpacket_get_handler am_type: %d\n", am_type); switch (am_type) { case AMTYPE_XMULTIHOP: case AMTYPE_XUART: case AMTYPE_XDEBUG: case AMTYPE_XSENSOR: { XbowSensorboardPacket *packet; *************** *** 293,297 **** if (xpacket_print_common(packet)) { fprintf(stderr, ! "error: no packet handler for board id 0x%02x\n", packet->board_id); return NULL; --- 314,318 ---- if (xpacket_print_common(packet)) { fprintf(stderr, ! "xpacket_get_handler error1: no packet handler for board id 0x%02x\n", packet->board_id); return NULL; *************** *** 299,303 **** return xsensor_get_handler(packet->board_id, XPACKET_BOARD_TABLE); } ! case AMTYPE_HEALTH: case AMTYPE_SURGE_MSG: --- 320,365 ---- return xsensor_get_handler(packet->board_id, XPACKET_BOARD_TABLE); } ! ! /* ! case AMTYPE_FIREWORKS: { ! XbowSensorboardPacket *packet; ! packet = xpacket_get_sensor_data(tos_packet); ! //fprintf(stderr, "xpacket_get_handler fireworks\n"); ! if (xpacket_print_common(packet)) { ! fprintf(stderr, ! "xpacket_get_handler error1: no packet handler for board id 0x%02x\n", ! packet->board_id); ! return NULL; ! } ! return xsensor_get_handler(am_type, XPACKET_BOARD_TABLE); ! } ! ! ! case XTYPE_TESTLINK: { ! XbowSensorboardPacket *packet; ! packet = xpacket_get_sensor_data(tos_packet); ! //fprintf(stderr, "xpacket_get_handler fireworks\n"); ! if (xpacket_print_common(packet)) { ! fprintf(stderr, ! "xpacket_get_handler error1: no packet handler for board id 0x%02x\n", ! packet->board_id); ! return NULL; ! } ! return xsensor_get_handler(am_type, XPACKET_BOARD_TABLE); ! } ! */ ! case AM_LINKMSG: { ! XbowSensorboardPacket *packet; ! packet = xpacket_get_sensor_data(tos_packet); ! //fprintf(stderr, "xpacket_get_handler fireworks\n"); ! if (xpacket_print_common(packet)) { ! fprintf(stderr, ! "xpacket_get_handler error1: no packet handler for board id 0x%02x\n", ! packet->board_id); ! return NULL; ! } ! return xsensor_get_handler(am_type, XPACKET_BOARD_TABLE); ! } ! case AMTYPE_HEALTH: case AMTYPE_SURGE_MSG: *************** *** 307,315 **** break; } ! fprintf(stderr, "error: no packet handler for tos type 0x%02x\n", am_type); return NULL; } /** * Display a parsed packet as raw ADC values for each sensor on the board. --- 369,379 ---- break; } ! fprintf(stderr, "xpacket_get_handler error2: no packet handler for tos type 0x%02x\n", ! am_type); return NULL; } + /** * Display a parsed packet as raw ADC values for each sensor on the board. *************** *** 329,333 **** return handler->print_parsed(packet); } else { ! fprintf(stderr, "error: no packet handler for board id 0x%02x\n", packet->board_id); return; --- 393,397 ---- return handler->print_parsed(packet); } else { ! fprintf(stderr, "xpacket_print_parsed error: no packet handler for board id 0x%02x\n", packet->board_id); return; *************** *** 352,356 **** return handler->print_cooked(packet); } else { ! fprintf(stderr, "error: no packet handler for board id 0x%02x\n", packet->board_id); return; --- 416,420 ---- return handler->print_cooked(packet); } else { ! fprintf(stderr, "xpacket_print_cooked error: no packet handler for board id 0x%02x\n", packet->board_id); return; *************** *** 375,379 **** return handler->export_cooked(packet); } else { ! fprintf(stderr, "error: no packet handler for board id 0x%02x\n", packet->board_id); return; --- 439,443 ---- return handler->export_cooked(packet); } else { ! fprintf(stderr, "xpacket_export_cooked error: no packet handler for board id 0x%02x\n", packet->board_id); return; *************** *** 398,402 **** return handler->log_cooked(packet); } else { ! fprintf(stderr, "error: no packet handler for board id 0x%02x\n", packet->board_id); return; --- 462,466 ---- return handler->log_cooked(packet); } else { ! fprintf(stderr, "xpacket_log_cooked error: no packet handler for board id 0x%02x\n", packet->board_id); return; Index: xsensors.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/xsensors.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** xsensors.h 30 Jul 2005 03:14:58 -0000 1.5 --- xsensors.h 1 Aug 2005 15:23:47 -0000 1.6 *************** *** 28,31 **** --- 28,33 ---- #include "xconvert.h" + #include "../../../fireworks/apps/TestLink/LinkMsg.h" + /** * A unique identifier for each Crossbow sensorboard. *************** *** 65,69 **** XTYPE_GGBACLTST, ! XTYPE_TESTLINK = 199, // mica2 integrated boards XTYPE_MSP410 = 0xA0, --- 67,71 ---- XTYPE_GGBACLTST, ! //XTYPE_TESTLINK = 0xfb, // mica2 integrated boards XTYPE_MSP410 = 0xA0, *************** *** 79,83 **** AMTYPE_XMULTIHOP = 0x33, AMTYPE_MHOP_MSG = 0xFA, ! AMTYPE_FIREWORKS = 0xFB } XbowAMType; --- 81,85 ---- AMTYPE_XMULTIHOP = 0x33, AMTYPE_MHOP_MSG = 0xFA, ! //AMTYPE_FIREWORKS = 0xC7 } XbowAMType; *************** *** 112,116 **** #define XPACKET_MIN_SIZE 4 //!< minimum valid packet size ! #define XPACKET_TYPE 2 //!< offset to type of TOS packet #define XPACKET_GROUP 3 //!< offset to group id of TOS packet #define XPACKET_LENGTH 4 //!< offset to length of TOS packet --- 114,121 ---- #define XPACKET_MIN_SIZE 4 //!< minimum valid packet size ! //#define XPACKET_TYPE 2 //!< offset to type of TOS packet ! // For telos ! #define XPACKET_TYPE 8 //!< offset to type of TOS packet ! #define XPACKET_GROUP 3 //!< offset to group id of TOS packet #define XPACKET_LENGTH 4 //!< offset to length of TOS packet *************** *** 119,122 **** --- 124,128 ---- #define XPACKET_DATASTART_MULTIHOP 12 //!< Multihop offset to data payload #define XPACKET_DATASTART 12 //!< Default offset to data payload + #define XPACKET_DATASTART_FIREWORKS 10 //!< Offset to Fireworks data #define XPACKET_BOARD_TABLE 0 //!< offset to XSensor board table |
From: Karthik D. <da...@us...> - 2005-07-30 03:36:41
|
Update of /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32654 Modified Files: LinkMsg.h Makefile TestLinkC.nc TestLinkM.nc Log Message: Working TestLink Index: LinkMsg.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/LinkMsg.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LinkMsg.h 30 Jul 2005 00:14:13 -0000 1.6 --- LinkMsg.h 30 Jul 2005 03:36:32 -0000 1.7 *************** *** 11,15 **** enum { ! AM_LINKMSG = 200 }; --- 11,16 ---- enum { ! AM_LINKMSG = 200, ! AM_LINKREQUESTMSG = 199 }; Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 30 Jul 2005 00:24:07 -0000 1.1 --- Makefile 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 1,6 **** SENSORBOARD=micasb COMPONENT=TestLinkC ! PFLAGS +=-DDELUGE_LEDS ! PFLAGS += -I%T/lib/Deluge -I%T/interfaces -I%T/tos/lib/Commands -I%T/platform/mica2 include $(TOSROOT)/apps/Makerules PLATFORMS = mica2 mica2dot telos telosb telosa --- 1,7 ---- SENSORBOARD=micasb COMPONENT=TestLinkC ! PFLAGS +=-DDELUGE_LEDS -I$(TOSROOT)/tos/interfaces ! #PFLAGS += -I%T/lib/Deluge -I%T/interfaces -I%T/tos/lib/Commands -I%T/platform/mica2 ! CFLAGS += -DCC1K_DEFAULT_FREQ=CC1K_434_845_MHZ include $(TOSROOT)/apps/Makerules PLATFORMS = mica2 mica2dot telos telosb telosa Index: TestLinkC.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/TestLinkC.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestLinkC.nc 29 Jul 2005 23:56:56 -0000 1.1 --- TestLinkC.nc 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 7,26 **** Main, GenericComm, - DelugeC, - CC2420RadioC, TestLinkM, ! LedsC; Main.StdControl -> TestLinkM.StdControl; ! Main.StdControl -> GenericComm.StdControl; ! Main.StdControl -> DelugeC; ! Main.StdControl -> TimerC; TestLinkM.CommControl -> GenericComm; TestLinkM.CommControl -> GenericComm; ! TestLinkM.SendLinkMsg -> GenericComm.SendMsg[AM_LINKMSG]; ! TestLinkM.ReceiveLinkMsg -> GenericComm.ReceiveMsg[AM_LINKMSG]; ! TestLinkM.CC1000Control -> CC1000RadioC; TestLinkM.Leds -> LedsC; ! TestLinkM.Timer -> TimerC.Timer[unique("Timer")]; } --- 7,22 ---- Main, GenericComm, TestLinkM, ! LedsC, ! CC2420RadioC; Main.StdControl -> TestLinkM.StdControl; ! Main.StdControl -> GenericComm; TestLinkM.CommControl -> GenericComm; TestLinkM.CommControl -> GenericComm; ! TestLinkM.SendLinkMsg -> GenericComm.SendMsg[0xfb]; ! TestLinkM.ReceiveLinkMsg -> GenericComm.ReceiveMsg[AM_LINKREQUESTMSG]; TestLinkM.Leds -> LedsC; ! TestLinkM.RadioControl -> CC2420RadioC; } Index: TestLinkM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/TestLinkM.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestLinkM.nc 30 Jul 2005 00:08:00 -0000 1.1 --- TestLinkM.nc 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 9,15 **** interface SendMsg as SendLinkMsg; interface ReceiveMsg as ReceiveLinkMsg; - interface Timer; interface Leds; ! interface CC1000Control; } } --- 9,14 ---- interface SendMsg as SendLinkMsg; interface ReceiveMsg as ReceiveLinkMsg; interface Leds; ! interface CC2420Control as RadioControl; } } *************** *** 20,23 **** --- 19,23 ---- uint16_t lastLQI; uint16_t lastAddress; + bool sendBusy; TOS_Msg msg; *************** *** 53,64 **** } ! task sendLinkQualityData() { blink(0x5); clearPacket(); ! lMsg = (LinkMsg) &(msg.data); ! lMsg->seqno = seqno++; ! lMsg->addr = lastAddress; ! lMsg->tstamp = 0; lMsg->RSSI = lastRSSI; lMsg->LQI = lastLQI; --- 53,65 ---- } ! void sendLinkQualityData() { blink(0x5); clearPacket(); ! lMsg = (LinkMsg *) &(msg.data); ! lMsg->header.am_type = AM_LINKMSG; ! lMsg->header.seqno = seqno++; ! lMsg->moteid = 0xAFFA; ! lMsg->tstamp = 0xBBBB; lMsg->RSSI = lastRSSI; lMsg->LQI = lastLQI; *************** *** 78,89 **** command result_t StdControl.init() { call Leds.init(); call CommControl.init(); - return SUCCESS; } command result_t StdControl.start() { ! blink(CLEAR); seqno = 1; --- 79,93 ---- command result_t StdControl.init() { + + sendBusy = FALSE; + seqno = 1; + call Leds.init(); call CommControl.init(); return SUCCESS; } command result_t StdControl.start() { ! blink(0x0); seqno = 1; *************** *** 96,112 **** command result_t StdControl.stop() { call CommControl.stop(); - call Timer.stop(); return SUCCESS; } ! command TOS_MsgPtr ReceiveLinkMsg.receive(TOS_MsgPtr m) { blink(0x3); ! lastRSSI = m->RSSI; ! lastLQI = m->LQI; /* Copy timestamp here */ ! post sendLinkQualityData(); return m; } ! --- 100,120 ---- command result_t StdControl.stop() { call CommControl.stop(); return SUCCESS; } ! event TOS_MsgPtr ReceiveLinkMsg.receive(TOS_MsgPtr m) { blink(0x3); ! lastRSSI = m->strength; ! lastLQI = m->lqi; /* Copy timestamp here */ ! sendLinkQualityData(); return m; } ! ! event result_t SendLinkMsg.sendDone(TOS_MsgPtr m, result_t s) { ! sendBusy = FALSE; ! return SUCCESS; ! } ! } |
From: David M. D. <do...@us...> - 2005-07-30 03:15:48
|
Update of /cvsroot/firebug/fireboard/beta/tools/gps/SiRF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29532/beta/tools/gps/SiRF Modified Files: sirf_id28_1.c sirf_id28_2.c sirf_id28_3.c sirf_id2_1.c sirf_id2_2.c Log Message: Added link message handling. Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_2.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id2_2.c 29 Jul 2005 19:12:26 -0000 1.2 --- sirf_id2_2.c 30 Jul 2005 03:15:38 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- */ //#include "SiRF_ID2_2_private.h" + /** Not the best way to handle xbow dependencies. */ + #include "../xdb.h" *************** *** 63,70 **** - //Format string generated automatically, - //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; - - void SiRF_ID2_2_set_header_seqno(SiRF_ID2_2 * userdata, uint8_t header_seqno) { --- 65,68 ---- *************** *** 251,256 **** ! // Not yet used. ! #if 0 static char insert_stmt[] = "INSERT into SiRF_ID2_2 (" "header_seqno," --- 249,259 ---- ! //Format string generated automatically, ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! static char insert_stmt[] = "INSERT into SiRF_ID2_2 (" "header_seqno," *************** *** 271,303 **** "ch10," "ch11," ! "ch12) values (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; - #endif - #if 0 void ! SiRF_ID2_2_pg_log(void * userdata) { char pg_command[255]; SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; ! sprintf(pg_command,formatstring, ! data->ch2, ! data->ch1, ! data->gps_tow, data->header_rsrvd1, ! data->ch6, ! data->ch10, ! data->ch8, ! data->ch3, data->sv_in_fix, data->ch4, - data->ch12, data->ch5, ! data->header_rsrvd2, ! data->header_am_type, ! data->ch11, ! data->ch9, ! data->header_seqno, data->ch7, } - #endif --- 274,305 ---- "ch10," "ch11," ! "ch12) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; ! void ! SiRF_ID2_2_pg_log(XbowSensorboardPacket * userdata) { char pg_command[255]; SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; ! sprintf(pg_command,insert_stmt, ! data->header_seqno, ! data->header_am_type, data->header_rsrvd1, ! data->header_rsrvd2, ! data->gps_tow, data->sv_in_fix, + data->ch1, + data->ch2, + data->ch3, data->ch4, data->ch5, ! data->ch6, data->ch7, + data->ch8, + data->ch9, + data->ch10, + data->ch11, + data->ch12); + xdb_execute(pg_command); } *************** *** 488,492 **** /** Print the bytes of the packet. */ void ! SiRF_ID2_2_print_raw (XbowSensorboardPacket *packet) { } --- 490,494 ---- /** Print the bytes of the packet. */ void ! SiRF_ID2_2_print_raw (XbowSensorboardPacket *packet) { } *************** *** 494,498 **** /** Print cooked output. */ void ! SiRF_ID2_2_print_cooked (void * userdata) { SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; --- 496,500 ---- /** Print cooked output. */ void ! SiRF_ID2_2_print_cooked (XbowSensorboardPacket * userdata) { SiRF_ID2_2 * data = (SiRF_ID2_2*)userdata; *************** *** 501,505 **** printf("header_rsrvd1: %i,\n",data->header_rsrvd1); printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("gps_tow: %d,\n",data->gps_tow); printf("sv_in_fix: %i,\n",data->sv_in_fix); printf("ch1: %i,\n",data->ch1); --- 503,507 ---- printf("header_rsrvd1: %i,\n",data->header_rsrvd1); printf("header_rsrvd2: %i,\n",data->header_rsrvd2); ! printf("gps_tow: %i,\n",data->gps_tow); printf("sv_in_fix: %i,\n",data->sv_in_fix); printf("ch1: %i,\n",data->ch1); Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_3.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_3.c 29 Jul 2005 19:12:26 -0000 1.2 --- sirf_id28_3.c 30 Jul 2005 03:15:38 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- */ //#include "SiRF_ID28_3_private.h" + /** Not the best way to handle xbow dependencies. */ + #include "../xdb.h" *************** *** 65,72 **** - //Format string generated automatically, - //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; - - void SiRF_ID28_3_set_header_seqno(SiRF_ID28_3 * userdata, uint8_t header_seqno) { --- 67,70 ---- *************** *** 273,278 **** ! // Not yet used. ! #if 0 static char insert_stmt[] = "INSERT into SiRF_ID28_3 (" "header_seqno," --- 271,281 ---- ! //Format string generated automatically, ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! static char insert_stmt[] = "INSERT into SiRF_ID28_3 (" "header_seqno," *************** *** 295,329 **** "extrapolation_time," "phase_error_count," ! "low_power_count) values (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; - #endif - #if 0 void ! SiRF_ID28_3_pg_log(void * userdata) { char pg_command[255]; SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; ! sprintf(pg_command,formatstring, ! data->cno10, ! data->cno5, data->sync_flags, ! data->phase_error_count, data->cno4, ! data->header_rsrvd1, data->cno7, data->cno8, data->delta_range_interval, - data->cno2, - data->cno1, - data->low_power_count, - data->extrapolation_time, data->mean_delta_range_time, ! data->header_rsrvd2, ! data->header_am_type, ! data->cno6, ! data->cno3, ! data->header_seqno, ! data->cno9, } - #endif --- 298,331 ---- "extrapolation_time," "phase_error_count," ! "low_power_count) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; ! void ! SiRF_ID28_3_pg_log(XbowSensorboardPacket * userdata) { char pg_command[255]; SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; ! sprintf(pg_command,insert_stmt, ! data->header_seqno, ! data->header_am_type, ! data->header_rsrvd1, ! data->header_rsrvd2, data->sync_flags, ! data->cno1, ! data->cno2, ! data->cno3, data->cno4, ! data->cno5, ! data->cno6, data->cno7, data->cno8, + data->cno9, + data->cno10, data->delta_range_interval, data->mean_delta_range_time, ! data->extrapolation_time, ! data->phase_error_count, ! data->low_power_count); ! xdb_execute(pg_command); } *************** *** 532,536 **** /** Print the bytes of the packet. */ void ! SiRF_ID28_3_print_raw (XbowSensorboardPacket *packet) { } --- 534,538 ---- /** Print the bytes of the packet. */ void ! SiRF_ID28_3_print_raw (XbowSensorboardPacket *packet) { } *************** *** 538,542 **** /** Print cooked output. */ void ! SiRF_ID28_3_print_cooked (void * userdata) { SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; --- 540,544 ---- /** Print cooked output. */ void ! SiRF_ID28_3_print_cooked (XbowSensorboardPacket * userdata) { SiRF_ID28_3 * data = (SiRF_ID28_3*)userdata; Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_1.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_1.c 29 Jul 2005 19:12:26 -0000 1.2 --- sirf_id28_1.c 30 Jul 2005 03:15:38 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- */ //#include "SiRF_ID28_1_private.h" + /** Not the best way to handle xbow dependencies. */ + #include "../xdb.h" *************** *** 53,60 **** - //Format string generated automatically, - //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; - - void SiRF_ID28_1_set_header_seqno(SiRF_ID28_1 * userdata, uint8_t header_seqno) { --- 55,58 ---- *************** *** 141,146 **** ! // Not yet used. ! #if 0 static char insert_stmt[] = "INSERT into SiRF_ID28_1 (" "header_seqno," --- 139,149 ---- ! //Format string generated automatically, ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; ! ! ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; ! ! static char insert_stmt[] = "INSERT into SiRF_ID28_1 (" "header_seqno," *************** *** 151,173 **** "time_tag," "sat_id," ! "gps_sw_time) values (0, 0, 0, 0, 0, 0, 0, 0)"; - #endif - #if 0 void ! SiRF_ID28_1_pg_log(void * userdata) { char pg_command[255]; SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; ! sprintf(pg_command,formatstring, ! data->channel, ! data->header_rsrvd2, ! data->header_rsrvd1, data->header_am_type, data->time_tag, - data->gps_sw_time, - data->header_seqno, data->sat_id, } - #endif --- 154,175 ---- "time_tag," "sat_id," ! "gps_sw_time) values (%i, %i, %i, %i, %i, %i, %i, %i)"; ! void ! SiRF_ID28_1_pg_log(XbowSensorboardPacket * userdata) { char pg_command[255]; SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; ! sprintf(pg_command,insert_stmt, ! data->header_seqno, data->header_am_type, + data->header_rsrvd1, + data->header_rsrvd2, + data->channel, data->time_tag, data->sat_id, + data->gps_sw_time); + xdb_execute(pg_command); } *************** *** 268,272 **** /** Print the bytes of the packet. */ void ! SiRF_ID28_1_print_raw (XbowSensorboardPacket *packet) { } --- 270,274 ---- /** Print the bytes of the packet. */ void ! SiRF_ID28_1_print_raw (XbowSensorboardPacket *packet) { } *************** *** 274,278 **** /** Print cooked output. */ void ! SiRF_ID28_1_print_cooked (void * userdata) { SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; --- 276,280 ---- /** Print cooked output. */ void ! SiRF_ID28_1_print_cooked (XbowSensorboardPacket * userdata) { SiRF_ID28_1 * data = (SiRF_ID28_1*)userdata; Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id28_2.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id28_2.c 29 Jul 2005 19:12:26 -0000 1.2 --- sirf_id28_2.c 30 Jul 2005 03:15:38 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- */ //#include "SiRF_ID28_2_private.h" + /** Not the best way to handle xbow dependencies. */ + #include "../xdb.h" *************** *** 53,60 **** - //Format string generated automatically, - //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; - - void SiRF_ID28_2_set_header_seqno(SiRF_ID28_2 * userdata, uint8_t header_seqno) { --- 55,58 ---- *************** *** 141,146 **** ! // Not yet used. ! #if 0 static char insert_stmt[] = "INSERT into SiRF_ID28_2 (" "header_seqno," --- 139,149 ---- ! //Format string generated automatically, ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; ! ! ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i"; ! ! static char insert_stmt[] = "INSERT into SiRF_ID28_2 (" "header_seqno," *************** *** 151,173 **** "carrier_freq," "carrier_phase," ! "time_in_track) values (0, 0, 0, 0, 0, 0, 0, 0)"; - #endif - #if 0 void ! SiRF_ID28_2_pg_log(void * userdata) { char pg_command[255]; SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; ! sprintf(pg_command,formatstring, ! data->carrier_freq, ! data->header_rsrvd2, ! data->header_rsrvd1, data->header_am_type, data->pseudo_range, data->carrier_phase, ! data->time_in_track, ! data->header_seqno, } - #endif --- 154,175 ---- "carrier_freq," "carrier_phase," ! "time_in_track) values (%i, %i, %i, %i, %i, %i, %i, %i)"; ! void ! SiRF_ID28_2_pg_log(XbowSensorboardPacket * userdata) { char pg_command[255]; SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; ! sprintf(pg_command,insert_stmt, ! data->header_seqno, data->header_am_type, + data->header_rsrvd1, + data->header_rsrvd2, data->pseudo_range, + data->carrier_freq, data->carrier_phase, ! data->time_in_track); ! xdb_execute(pg_command); } *************** *** 268,272 **** /** Print the bytes of the packet. */ void ! SiRF_ID28_2_print_raw (XbowSensorboardPacket *packet) { } --- 270,274 ---- /** Print the bytes of the packet. */ void ! SiRF_ID28_2_print_raw (XbowSensorboardPacket *packet) { } *************** *** 274,278 **** /** Print cooked output. */ void ! SiRF_ID28_2_print_cooked (void * userdata) { SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; --- 276,280 ---- /** Print cooked output. */ void ! SiRF_ID28_2_print_cooked (XbowSensorboardPacket * userdata) { SiRF_ID28_2 * data = (SiRF_ID28_2*)userdata; Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/SiRF/sirf_id2_1.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sirf_id2_1.c 29 Jul 2005 19:12:26 -0000 1.2 --- sirf_id2_1.c 30 Jul 2005 03:15:38 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- */ //#include "SiRF_ID2_1_private.h" + /** Not the best way to handle xbow dependencies. */ + #include "../xdb.h" *************** *** 59,66 **** - //Format string generated automatically, - //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; - - void SiRF_ID2_1_set_header_seqno(SiRF_ID2_1 * userdata, uint8_t header_seqno) { --- 61,64 ---- *************** *** 207,212 **** ! // Not yet used. ! #if 0 static char insert_stmt[] = "INSERT into SiRF_ID2_1 (" "header_seqno," --- 205,215 ---- ! //Format string generated automatically, ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! ! //static char formatstring[] = "%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i"; ! ! static char insert_stmt[] = "INSERT into SiRF_ID2_1 (" "header_seqno," *************** *** 223,251 **** "dop," "mode2," ! "gps_week) values (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; - #endif - #if 0 void ! SiRF_ID2_1_pg_log(void * userdata) { char pg_command[255]; SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; ! sprintf(pg_command,formatstring, ! data->mode1, ! data->dop, ! data->header_rsrvd2, ! data->yvel, ! data->zpos, ! data->header_rsrvd1, data->header_am_type, data->xpos, - data->xvel, - data->mode2, - data->header_seqno, data->ypos, data->zvel, ! data->gps_week, } - #endif --- 226,253 ---- "dop," "mode2," ! "gps_week) values (%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"; ! void ! SiRF_ID2_1_pg_log(XbowSensorboardPacket * userdata) { char pg_command[255]; SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; ! sprintf(pg_command,insert_stmt, ! data->header_seqno, data->header_am_type, + data->header_rsrvd1, + data->header_rsrvd2, data->xpos, data->ypos, + data->zpos, + data->xvel, + data->yvel, data->zvel, ! data->mode1, ! data->dop, ! data->mode2, ! data->gps_week); ! xdb_execute(pg_command); } *************** *** 400,404 **** /** Print the bytes of the packet. */ void ! SiRF_ID2_1_print_raw (XbowSensorboardPacket *packet) { } --- 402,406 ---- /** Print the bytes of the packet. */ void ! SiRF_ID2_1_print_raw (XbowSensorboardPacket *packet) { } *************** *** 406,410 **** /** Print cooked output. */ void ! SiRF_ID2_1_print_cooked (void * userdata) { SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; --- 408,412 ---- /** Print cooked output. */ void ! SiRF_ID2_1_print_cooked (XbowSensorboardPacket * userdata) { SiRF_ID2_1 * data = (SiRF_ID2_1*)userdata; |
From: David M. D. <do...@us...> - 2005-07-30 03:15:47
|
Update of /cvsroot/firebug/fireboard/beta/tos/sensorboards/mts400 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29532/beta/tos/sensorboards/mts400 Modified Files: GpsPacket.nc Log Message: Added link message handling. Index: GpsPacket.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tos/sensorboards/mts400/GpsPacket.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GpsPacket.nc 28 May 2005 00:09:40 -0000 1.3 --- GpsPacket.nc 30 Jul 2005 03:15:38 -0000 1.4 *************** *** 152,156 **** bufferIndex = 0; (GPS_Msg*) bufferPtr = &buffer; ! atomic{ state_gps = GPS_SWITCH_IDLE; state_gps_pkt = NO_GPS_START_BYTE; --- 152,156 ---- bufferIndex = 0; (GPS_Msg*) bufferPtr = &buffer; ! atomic { state_gps = GPS_SWITCH_IDLE; state_gps_pkt = NO_GPS_START_BYTE; *************** *** 176,190 **** command result_t txBytes(uint8_t *bytes, uint8_t numBytes) { ! if (txCount == 0) ! { ! txCount = 1; ! txLength = numBytes; ! sendPtr = bytes; ! /* send the first byte */ ! if (call ByteComm.txByte(sendPtr[0])) ! return SUCCESS; ! else ! txCount = 0; ! } return FAIL; } --- 176,190 ---- command result_t txBytes(uint8_t *bytes, uint8_t numBytes) { ! ! if (txCount == 0) { ! txCount = 1; ! txLength = numBytes; ! sendPtr = bytes; ! /* send the first byte */ ! if (call ByteComm.txByte(sendPtr[0])) ! return SUCCESS; ! else ! txCount = 0; ! } return FAIL; } *************** *** 238,242 **** void sendComplete(result_t success) { ! atomic{ if (state == PACKET){ TOS_MsgPtr msg = (TOS_MsgPtr)sendPtr; --- 238,242 ---- void sendComplete(result_t success) { ! atomic { if (state == PACKET){ TOS_MsgPtr msg = (TOS_MsgPtr)sendPtr; *************** *** 277,293 **** Send the next byte if there are data pending to be sent */ async event result_t ByteComm.txByteReady(bool success) { ! atomic{ ! if (txCount > 0){ if (!success){ dbg(DBG_ERROR, "TX_packet failed, TX_byte_failed"); sendComplete(FAIL); ! } ! else if (txCount < txLength){ dbg(DBG_PACKET, "PACKET: byte sent: %x, COUNT: %d\n", sendPtr[txCount], txCount); ! if (!call ByteComm.txByte(sendPtr[txCount++])) sendComplete(FAIL); } } ! } //atomic return SUCCESS; } --- 277,295 ---- Send the next byte if there are data pending to be sent */ async event result_t ByteComm.txByteReady(bool success) { ! ! atomic { ! if (txCount > 0) { if (!success){ dbg(DBG_ERROR, "TX_packet failed, TX_byte_failed"); sendComplete(FAIL); ! } else if (txCount < txLength) { dbg(DBG_PACKET, "PACKET: byte sent: %x, COUNT: %d\n", sendPtr[txCount], txCount); ! if (!call ByteComm.txByte(sendPtr[txCount++])) { ! sendComplete(FAIL); ! } } } ! } return SUCCESS; } *************** *** 309,312 **** --- 311,315 ---- atomic state_gps_pkt = NO_GPS_START_BYTE; } + /****************************************************************************** * Byte received from GPS |
From: David M. D. <do...@us...> - 2005-07-30 03:15:47
|
Update of /cvsroot/firebug/fireboard/beta/tools/gps/NMEA In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29532/beta/tools/gps/NMEA Modified Files: Makefile leadtek_9546.c nmea_parse_test.c rmcparse.c Log Message: Added link message handling. Index: nmea_parse_test.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/NMEA/nmea_parse_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nmea_parse_test.c 23 May 2005 23:17:43 -0000 1.1 --- nmea_parse_test.c 30 Jul 2005 03:15:37 -0000 1.2 *************** *** 268,274 **** int passed = 0; ! const char rmc_string[] = {"$GPRMC"}; ! RMC_Data * rmc_data = nmea_rmc_new(); ! RMC_Data * rmc_parsed; int result; --- 268,274 ---- int passed = 0; ! // const char rmc_string[] = {"$GPRMC"}; ! //RMC_Data * rmc_data = nmea_rmc_new(); ! //RMC_Data * rmc_parsed; int result; Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/NMEA/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 23 May 2005 23:17:43 -0000 1.1 --- Makefile 30 Jul 2005 03:15:37 -0000 1.2 *************** *** 1,5 **** cfiles: ! # gcc -Wall -o ggaparse -DSTANDALONE ggaparse.c nmea_parse.c gcc -Wall -o gllparse -DSTANDALONE gllparse.c nmea_parse.c gcc -Wall -o leadtek leadtek_9546.c --- 1,5 ---- cfiles: ! gcc -Wall -o ggaparse -DSTANDALONE ggaparse.c nmea_parse.c gcc -Wall -o gllparse -DSTANDALONE gllparse.c nmea_parse.c gcc -Wall -o leadtek leadtek_9546.c Index: leadtek_9546.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/NMEA/leadtek_9546.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** leadtek_9546.c 23 May 2005 23:17:43 -0000 1.1 --- leadtek_9546.c 30 Jul 2005 03:15:37 -0000 1.2 *************** *** 37,41 **** } ! static char data2[] = {"$GPGGA,023129.762,3754.1755,N,12218.2682,W,1,08,1.1,-19.4,M,,,,0000"}; int --- 37,41 ---- } ! //static char data2[] = {"$GPGGA,023129.762,3754.1755,N,12218.2682,W,1,08,1.1,-19.4,M,,,,0000"}; int Index: rmcparse.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/gps/NMEA/rmcparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rmcparse.c 23 May 2005 23:17:43 -0000 1.1 --- rmcparse.c 30 Jul 2005 03:15:37 -0000 1.2 *************** *** 37,41 **** RMC_Data * rmc_data = nmea_rmc_new(); ! const char * p = rmc_string; return rmc_data; --- 37,41 ---- RMC_Data * rmc_data = nmea_rmc_new(); ! //const char * p = rmc_string; return rmc_data; |
From: David M. D. <do...@us...> - 2005-07-30 03:15:46
|
Update of /cvsroot/firebug/fireboard/beta/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29532/beta/bin Modified Files: firebug-db-setup.sh Log Message: Added link message handling. Index: firebug-db-setup.sh =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/bin/firebug-db-setup.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** firebug-db-setup.sh 29 Jul 2005 23:26:31 -0000 1.4 --- firebug-db-setup.sh 30 Jul 2005 03:15:37 -0000 1.5 *************** *** 55,58 **** --- 55,60 ---- psql --echo-queries --dbname firebug firebug < sirf_functions.pgsql; + psql --echo-queries --dbname firebug firebug < linkmsg.pgsql; + #### The following are just examples of how to set up |
From: David M. D. <do...@us...> - 2005-07-30 03:15:07
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29366/boards Modified Files: fireboard.c linkmsg.c Log Message: Added link msg handling. Index: fireboard.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/fireboard.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** fireboard.c 28 Jun 2005 20:03:49 -0000 1.14 --- fireboard.c 30 Jul 2005 03:14:59 -0000 1.15 *************** *** 1040,1044 **** }; ! void fireboard_initialize() { xpacket_add_type(&fireboard_packet_handler); --- 1040,1045 ---- }; ! void ! fireboard_initialize() { xpacket_add_type(&fireboard_packet_handler); Index: linkmsg.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/linkmsg.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** linkmsg.c 30 Jul 2005 02:15:17 -0000 1.1 --- linkmsg.c 30 Jul 2005 03:14:59 -0000 1.2 *************** *** 228,231 **** --- 228,232 ---- LinkMsg_print_raw (XbowSensorboardPacket *packet) { + printf("LinkMsg\n"); } |