[Firebug-cvs] fireboard/beta/tools/src/xlisten/boards linkmsg.c,1.4,1.5 sirf_id28_1.c,1.3,1.4 sirf_i
Brought to you by:
doolin
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; |