Thread: [Firebug-cvs] fireboard/beta/tools/src/xlisten/boards linkmsg.c,1.6,1.7 sirf_id28_1.c,1.5,1.6 sirf_i
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2005-08-17 01:56:57
|
Update of /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28568/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: Added code for parsing blocked sirf messages. Index: sirf_id2_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id2_2.c 9 Aug 2005 00:39:08 -0000 1.5 --- sirf_id2_2.c 17 Aug 2005 01:56:47 -0000 1.6 *************** *** 53,60 **** struct _SiRF_ID2_2P { uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_rsrvd1; ! uint8_t header_rsrvd2; uint32_t gps_tow; uint8_t sv_in_fix; --- 53,60 ---- struct _SiRF_ID2_2P { + uint8_t header_mote_id; uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_blockcount; uint32_t gps_tow; uint8_t sv_in_fix; *************** *** 76,79 **** --- 76,89 ---- void + SiRF_ID2_2P_set_header_mote_id(SiRF_ID2_2P * userdata, uint8_t header_mote_id) { + userdata->header_mote_id = header_mote_id; + } + + uint8_t + SiRF_ID2_2P_get_header_mote_id(SiRF_ID2_2P * userdata) { + return userdata->header_mote_id; + } + + void SiRF_ID2_2P_set_header_seqno(SiRF_ID2_2P * userdata, uint8_t header_seqno) { userdata->header_seqno = header_seqno; *************** *** 96,116 **** void ! SiRF_ID2_2P_set_header_rsrvd1(SiRF_ID2_2P * userdata, uint8_t header_rsrvd1) { ! userdata->header_rsrvd1 = header_rsrvd1; ! } ! ! uint8_t ! SiRF_ID2_2P_get_header_rsrvd1(SiRF_ID2_2P * userdata) { ! return userdata->header_rsrvd1; ! } ! ! void ! SiRF_ID2_2P_set_header_rsrvd2(SiRF_ID2_2P * userdata, uint8_t header_rsrvd2) { ! userdata->header_rsrvd2 = header_rsrvd2; } uint8_t ! SiRF_ID2_2P_get_header_rsrvd2(SiRF_ID2_2P * userdata) { ! return userdata->header_rsrvd2; } --- 106,116 ---- void ! SiRF_ID2_2P_set_header_blockcount(SiRF_ID2_2P * userdata, uint8_t header_blockcount) { ! userdata->header_blockcount = header_blockcount; } uint8_t ! SiRF_ID2_2P_get_header_blockcount(SiRF_ID2_2P * userdata) { ! return userdata->header_blockcount; } *************** *** 268,275 **** static char insert_stmt[] = "INSERT into SiRF_ID2_2P (" "result_time," "header_seqno," "header_am_type," ! "header_rsrvd1," ! "header_rsrvd2," "gps_tow," "sv_in_fix," --- 268,275 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_2P (" "result_time," + "header_mote_id," "header_seqno," "header_am_type," ! "header_blockcount," "gps_tow," "sv_in_fix," *************** *** 293,300 **** SiRF_ID2_2P * data = (SiRF_ID2_2P*)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, --- 293,300 ---- SiRF_ID2_2P * data = (SiRF_ID2_2P*)userdata; sprintf(pg_command,insert_stmt, + data->header_mote_id, data->header_seqno, data->header_am_type, ! data->header_blockcount, data->gps_tow, data->sv_in_fix, *************** *** 323,328 **** */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } --- 323,328 ---- */ static uint8_t ! header_mote_id_convert(uint8_t header_mote_id) { ! return header_mote_id; } *************** *** 331,336 **** */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } --- 331,336 ---- */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } *************** *** 339,344 **** */ static uint8_t ! header_rsrvd1_convert(uint8_t header_rsrvd1) { ! return header_rsrvd1; } --- 339,344 ---- */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } *************** *** 347,352 **** */ static uint8_t ! header_rsrvd2_convert(uint8_t header_rsrvd2) { ! return header_rsrvd2; } --- 347,352 ---- */ static uint8_t ! header_blockcount_convert(uint8_t header_blockcount) { ! return header_blockcount; } *************** *** 465,472 **** void SiRF_ID2_2P_cook_packet(SiRF_ID2_2P * userdata) { userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_rsrvd1 = header_rsrvd1_convert(userdata->header_rsrvd1); ! userdata->header_rsrvd2 = header_rsrvd2_convert(userdata->header_rsrvd2); userdata->gps_tow = gps_tow_convert(userdata->gps_tow); userdata->sv_in_fix = sv_in_fix_convert(userdata->sv_in_fix); --- 465,472 ---- void SiRF_ID2_2P_cook_packet(SiRF_ID2_2P * userdata) { + userdata->header_mote_id = header_mote_id_convert(userdata->header_mote_id); userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_blockcount = header_blockcount_convert(userdata->header_blockcount); userdata->gps_tow = gps_tow_convert(userdata->gps_tow); userdata->sv_in_fix = sv_in_fix_convert(userdata->sv_in_fix); *************** *** 514,521 **** SiRF_ID2_2P * data = (SiRF_ID2_2P*)userdata; printf("SiRF_ID2_2P 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); --- 514,521 ---- SiRF_ID2_2P * data = (SiRF_ID2_2P*)userdata; printf("SiRF_ID2_2P print cooked:\n"); + printf(" header_mote_id: %i,\n",data->header_mote_id); printf(" header_seqno: %i,\n",data->header_seqno); printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_blockcount: %i,\n",data->header_blockcount); printf(" gps_tow: %i,\n",data->gps_tow); printf(" sv_in_fix: %i,\n",data->sv_in_fix); Index: sirf_id28_2.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_2.c 9 Aug 2005 00:39:08 -0000 1.5 --- sirf_id28_2.c 17 Aug 2005 01:56:47 -0000 1.6 *************** *** 53,60 **** struct _SiRF_ID28_2P { uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_rsrvd1; ! uint8_t header_rsrvd2; uint32_t pseudo_range; uint32_t carrier_freq; --- 53,60 ---- struct _SiRF_ID28_2P { + uint8_t header_mote_id; uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_blockcount; uint32_t pseudo_range; uint32_t carrier_freq; *************** *** 66,69 **** --- 66,79 ---- void + SiRF_ID28_2P_set_header_mote_id(SiRF_ID28_2P * userdata, uint8_t header_mote_id) { + userdata->header_mote_id = header_mote_id; + } + + uint8_t + SiRF_ID28_2P_get_header_mote_id(SiRF_ID28_2P * userdata) { + return userdata->header_mote_id; + } + + void SiRF_ID28_2P_set_header_seqno(SiRF_ID28_2P * userdata, uint8_t header_seqno) { userdata->header_seqno = header_seqno; *************** *** 86,106 **** void ! SiRF_ID28_2P_set_header_rsrvd1(SiRF_ID28_2P * userdata, uint8_t header_rsrvd1) { ! userdata->header_rsrvd1 = header_rsrvd1; ! } ! ! uint8_t ! SiRF_ID28_2P_get_header_rsrvd1(SiRF_ID28_2P * userdata) { ! return userdata->header_rsrvd1; ! } ! ! void ! SiRF_ID28_2P_set_header_rsrvd2(SiRF_ID28_2P * userdata, uint8_t header_rsrvd2) { ! userdata->header_rsrvd2 = header_rsrvd2; } uint8_t ! SiRF_ID28_2P_get_header_rsrvd2(SiRF_ID28_2P * userdata) { ! return userdata->header_rsrvd2; } --- 96,106 ---- void ! SiRF_ID28_2P_set_header_blockcount(SiRF_ID28_2P * userdata, uint8_t header_blockcount) { ! userdata->header_blockcount = header_blockcount; } uint8_t ! SiRF_ID28_2P_get_header_blockcount(SiRF_ID28_2P * userdata) { ! return userdata->header_blockcount; } *************** *** 158,165 **** static char insert_stmt[] = "INSERT into SiRF_ID28_2P (" "result_time," "header_seqno," "header_am_type," ! "header_rsrvd1," ! "header_rsrvd2," "pseudo_range," "carrier_freq," --- 158,165 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_2P (" "result_time," + "header_mote_id," "header_seqno," "header_am_type," ! "header_blockcount," "pseudo_range," "carrier_freq," *************** *** 173,180 **** SiRF_ID28_2P * data = (SiRF_ID28_2P*)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, --- 173,180 ---- SiRF_ID28_2P * data = (SiRF_ID28_2P*)userdata; sprintf(pg_command,insert_stmt, + data->header_mote_id, data->header_seqno, data->header_am_type, ! data->header_blockcount, data->pseudo_range, data->carrier_freq, *************** *** 193,198 **** */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } --- 193,198 ---- */ static uint8_t ! header_mote_id_convert(uint8_t header_mote_id) { ! return header_mote_id; } *************** *** 201,206 **** */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } --- 201,206 ---- */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } *************** *** 209,214 **** */ static uint8_t ! header_rsrvd1_convert(uint8_t header_rsrvd1) { ! return header_rsrvd1; } --- 209,214 ---- */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } *************** *** 217,222 **** */ static uint8_t ! header_rsrvd2_convert(uint8_t header_rsrvd2) { ! return header_rsrvd2; } --- 217,222 ---- */ static uint8_t ! header_blockcount_convert(uint8_t header_blockcount) { ! return header_blockcount; } *************** *** 255,262 **** void SiRF_ID28_2P_cook_packet(SiRF_ID28_2P * userdata) { userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_rsrvd1 = header_rsrvd1_convert(userdata->header_rsrvd1); ! userdata->header_rsrvd2 = header_rsrvd2_convert(userdata->header_rsrvd2); userdata->pseudo_range = pseudo_range_convert(userdata->pseudo_range); userdata->carrier_freq = carrier_freq_convert(userdata->carrier_freq); --- 255,262 ---- void SiRF_ID28_2P_cook_packet(SiRF_ID28_2P * userdata) { + userdata->header_mote_id = header_mote_id_convert(userdata->header_mote_id); userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_blockcount = header_blockcount_convert(userdata->header_blockcount); userdata->pseudo_range = pseudo_range_convert(userdata->pseudo_range); userdata->carrier_freq = carrier_freq_convert(userdata->carrier_freq); *************** *** 294,301 **** SiRF_ID28_2P * data = (SiRF_ID28_2P*)userdata; printf("SiRF_ID28_2P 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); --- 294,301 ---- SiRF_ID28_2P * data = (SiRF_ID28_2P*)userdata; printf("SiRF_ID28_2P print cooked:\n"); + printf(" header_mote_id: %i,\n",data->header_mote_id); printf(" header_seqno: %i,\n",data->header_seqno); printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_blockcount: %i,\n",data->header_blockcount); printf(" pseudo_range: %i,\n",data->pseudo_range); printf(" carrier_freq: %i,\n",data->carrier_freq); Index: sirf_id28_3.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_3.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_3.c 9 Aug 2005 00:39:08 -0000 1.5 --- sirf_id28_3.c 17 Aug 2005 01:56:47 -0000 1.6 *************** *** 53,60 **** struct _SiRF_ID28_3P { uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_rsrvd1; ! uint8_t header_rsrvd2; uint8_t sync_flags; uint8_t cno1; --- 53,60 ---- struct _SiRF_ID28_3P { + uint8_t header_mote_id; uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_blockcount; uint8_t sync_flags; uint8_t cno1; *************** *** 78,81 **** --- 78,91 ---- void + SiRF_ID28_3P_set_header_mote_id(SiRF_ID28_3P * userdata, uint8_t header_mote_id) { + userdata->header_mote_id = header_mote_id; + } + + uint8_t + SiRF_ID28_3P_get_header_mote_id(SiRF_ID28_3P * userdata) { + return userdata->header_mote_id; + } + + void SiRF_ID28_3P_set_header_seqno(SiRF_ID28_3P * userdata, uint8_t header_seqno) { userdata->header_seqno = header_seqno; *************** *** 98,118 **** void ! SiRF_ID28_3P_set_header_rsrvd1(SiRF_ID28_3P * userdata, uint8_t header_rsrvd1) { ! userdata->header_rsrvd1 = header_rsrvd1; ! } ! ! uint8_t ! SiRF_ID28_3P_get_header_rsrvd1(SiRF_ID28_3P * userdata) { ! return userdata->header_rsrvd1; ! } ! ! void ! SiRF_ID28_3P_set_header_rsrvd2(SiRF_ID28_3P * userdata, uint8_t header_rsrvd2) { ! userdata->header_rsrvd2 = header_rsrvd2; } uint8_t ! SiRF_ID28_3P_get_header_rsrvd2(SiRF_ID28_3P * userdata) { ! return userdata->header_rsrvd2; } --- 108,118 ---- void ! SiRF_ID28_3P_set_header_blockcount(SiRF_ID28_3P * userdata, uint8_t header_blockcount) { ! userdata->header_blockcount = header_blockcount; } uint8_t ! SiRF_ID28_3P_get_header_blockcount(SiRF_ID28_3P * userdata) { ! return userdata->header_blockcount; } *************** *** 290,297 **** static char insert_stmt[] = "INSERT into SiRF_ID28_3P (" "result_time," "header_seqno," "header_am_type," ! "header_rsrvd1," ! "header_rsrvd2," "sync_flags," "cno1," --- 290,297 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_3P (" "result_time," + "header_mote_id," "header_seqno," "header_am_type," ! "header_blockcount," "sync_flags," "cno1," *************** *** 317,324 **** SiRF_ID28_3P * data = (SiRF_ID28_3P*)userdata; sprintf(pg_command,insert_stmt, data->header_seqno, data->header_am_type, ! data->header_rsrvd1, ! data->header_rsrvd2, data->sync_flags, data->cno1, --- 317,324 ---- SiRF_ID28_3P * data = (SiRF_ID28_3P*)userdata; sprintf(pg_command,insert_stmt, + data->header_mote_id, data->header_seqno, data->header_am_type, ! data->header_blockcount, data->sync_flags, data->cno1, *************** *** 349,354 **** */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } --- 349,354 ---- */ static uint8_t ! header_mote_id_convert(uint8_t header_mote_id) { ! return header_mote_id; } *************** *** 357,362 **** */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } --- 357,362 ---- */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } *************** *** 365,370 **** */ static uint8_t ! header_rsrvd1_convert(uint8_t header_rsrvd1) { ! return header_rsrvd1; } --- 365,370 ---- */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } *************** *** 373,378 **** */ static uint8_t ! header_rsrvd2_convert(uint8_t header_rsrvd2) { ! return header_rsrvd2; } --- 373,378 ---- */ static uint8_t ! header_blockcount_convert(uint8_t header_blockcount) { ! return header_blockcount; } *************** *** 507,514 **** void SiRF_ID28_3P_cook_packet(SiRF_ID28_3P * userdata) { userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_rsrvd1 = header_rsrvd1_convert(userdata->header_rsrvd1); ! userdata->header_rsrvd2 = header_rsrvd2_convert(userdata->header_rsrvd2); userdata->sync_flags = sync_flags_convert(userdata->sync_flags); userdata->cno1 = cno1_convert(userdata->cno1); --- 507,514 ---- void SiRF_ID28_3P_cook_packet(SiRF_ID28_3P * userdata) { + userdata->header_mote_id = header_mote_id_convert(userdata->header_mote_id); userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_blockcount = header_blockcount_convert(userdata->header_blockcount); userdata->sync_flags = sync_flags_convert(userdata->sync_flags); userdata->cno1 = cno1_convert(userdata->cno1); *************** *** 558,565 **** SiRF_ID28_3P * data = (SiRF_ID28_3P*)userdata; printf("SiRF_ID28_3P 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); --- 558,565 ---- SiRF_ID28_3P * data = (SiRF_ID28_3P*)userdata; printf("SiRF_ID28_3P print cooked:\n"); + printf(" header_mote_id: %i,\n",data->header_mote_id); printf(" header_seqno: %i,\n",data->header_seqno); printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_blockcount: %i,\n",data->header_blockcount); printf(" sync_flags: %i,\n",data->sync_flags); printf(" cno1: %i,\n",data->cno1); Index: sirf_id2_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id2_1.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id2_1.c 9 Aug 2005 00:39:08 -0000 1.5 --- sirf_id2_1.c 17 Aug 2005 01:56:47 -0000 1.6 *************** *** 53,60 **** struct _SiRF_ID2_1P { uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_rsrvd1; ! uint8_t header_rsrvd2; int xpos; int ypos; --- 53,60 ---- struct _SiRF_ID2_1P { + uint8_t header_mote_id; uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_blockcount; int xpos; int ypos; *************** *** 72,75 **** --- 72,85 ---- void + SiRF_ID2_1P_set_header_mote_id(SiRF_ID2_1P * userdata, uint8_t header_mote_id) { + userdata->header_mote_id = header_mote_id; + } + + uint8_t + SiRF_ID2_1P_get_header_mote_id(SiRF_ID2_1P * userdata) { + return userdata->header_mote_id; + } + + void SiRF_ID2_1P_set_header_seqno(SiRF_ID2_1P * userdata, uint8_t header_seqno) { userdata->header_seqno = header_seqno; *************** *** 92,112 **** void ! SiRF_ID2_1P_set_header_rsrvd1(SiRF_ID2_1P * userdata, uint8_t header_rsrvd1) { ! userdata->header_rsrvd1 = header_rsrvd1; ! } ! ! uint8_t ! SiRF_ID2_1P_get_header_rsrvd1(SiRF_ID2_1P * userdata) { ! return userdata->header_rsrvd1; ! } ! ! void ! SiRF_ID2_1P_set_header_rsrvd2(SiRF_ID2_1P * userdata, uint8_t header_rsrvd2) { ! userdata->header_rsrvd2 = header_rsrvd2; } uint8_t ! SiRF_ID2_1P_get_header_rsrvd2(SiRF_ID2_1P * userdata) { ! return userdata->header_rsrvd2; } --- 102,112 ---- void ! SiRF_ID2_1P_set_header_blockcount(SiRF_ID2_1P * userdata, uint8_t header_blockcount) { ! userdata->header_blockcount = header_blockcount; } uint8_t ! SiRF_ID2_1P_get_header_blockcount(SiRF_ID2_1P * userdata) { ! return userdata->header_blockcount; } *************** *** 224,231 **** static char insert_stmt[] = "INSERT into SiRF_ID2_1P (" "result_time," "header_seqno," "header_am_type," ! "header_rsrvd1," ! "header_rsrvd2," "xpos," "ypos," --- 224,231 ---- static char insert_stmt[] = "INSERT into SiRF_ID2_1P (" "result_time," + "header_mote_id," "header_seqno," "header_am_type," ! "header_blockcount," "xpos," "ypos," *************** *** 245,252 **** SiRF_ID2_1P * data = (SiRF_ID2_1P*)userdata; sprintf(pg_command,insert_stmt, data->header_seqno, data->header_am_type, ! data->header_rsrvd1, ! data->header_rsrvd2, data->xpos, data->ypos, --- 245,252 ---- SiRF_ID2_1P * data = (SiRF_ID2_1P*)userdata; sprintf(pg_command,insert_stmt, + data->header_mote_id, data->header_seqno, data->header_am_type, ! data->header_blockcount, data->xpos, data->ypos, *************** *** 271,276 **** */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } --- 271,276 ---- */ static uint8_t ! header_mote_id_convert(uint8_t header_mote_id) { ! return header_mote_id; } *************** *** 279,284 **** */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } --- 279,284 ---- */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } *************** *** 287,292 **** */ static uint8_t ! header_rsrvd1_convert(uint8_t header_rsrvd1) { ! return header_rsrvd1; } --- 287,292 ---- */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } *************** *** 295,300 **** */ static uint8_t ! header_rsrvd2_convert(uint8_t header_rsrvd2) { ! return header_rsrvd2; } --- 295,300 ---- */ static uint8_t ! header_blockcount_convert(uint8_t header_blockcount) { ! return header_blockcount; } *************** *** 381,388 **** void SiRF_ID2_1P_cook_packet(SiRF_ID2_1P * userdata) { userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_rsrvd1 = header_rsrvd1_convert(userdata->header_rsrvd1); ! userdata->header_rsrvd2 = header_rsrvd2_convert(userdata->header_rsrvd2); userdata->xpos = xpos_convert(userdata->xpos); userdata->ypos = ypos_convert(userdata->ypos); --- 381,388 ---- void SiRF_ID2_1P_cook_packet(SiRF_ID2_1P * userdata) { + userdata->header_mote_id = header_mote_id_convert(userdata->header_mote_id); userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_blockcount = header_blockcount_convert(userdata->header_blockcount); userdata->xpos = xpos_convert(userdata->xpos); userdata->ypos = ypos_convert(userdata->ypos); *************** *** 426,433 **** SiRF_ID2_1P * data = (SiRF_ID2_1P*)userdata; printf("SiRF_ID2_1P 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); --- 426,433 ---- SiRF_ID2_1P * data = (SiRF_ID2_1P*)userdata; printf("SiRF_ID2_1P print cooked:\n"); + printf(" header_mote_id: %i,\n",data->header_mote_id); printf(" header_seqno: %i,\n",data->header_seqno); printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_blockcount: %i,\n",data->header_blockcount); printf(" xpos: %i,\n",data->xpos); printf(" ypos: %i,\n",data->ypos); Index: sirf_id28_1.c =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tools/src/xlisten/boards/sirf_id28_1.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sirf_id28_1.c 9 Aug 2005 00:39:08 -0000 1.5 --- sirf_id28_1.c 17 Aug 2005 01:56:47 -0000 1.6 *************** *** 53,60 **** struct _SiRF_ID28_1P { uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_rsrvd1; ! uint8_t header_rsrvd2; uint8_t channel; uint32_t time_tag; --- 53,60 ---- struct _SiRF_ID28_1P { + uint8_t header_mote_id; uint8_t header_seqno; uint8_t header_am_type; ! uint8_t header_blockcount; uint8_t channel; uint32_t time_tag; *************** *** 66,69 **** --- 66,79 ---- void + SiRF_ID28_1P_set_header_mote_id(SiRF_ID28_1P * userdata, uint8_t header_mote_id) { + userdata->header_mote_id = header_mote_id; + } + + uint8_t + SiRF_ID28_1P_get_header_mote_id(SiRF_ID28_1P * userdata) { + return userdata->header_mote_id; + } + + void SiRF_ID28_1P_set_header_seqno(SiRF_ID28_1P * userdata, uint8_t header_seqno) { userdata->header_seqno = header_seqno; *************** *** 86,106 **** void ! SiRF_ID28_1P_set_header_rsrvd1(SiRF_ID28_1P * userdata, uint8_t header_rsrvd1) { ! userdata->header_rsrvd1 = header_rsrvd1; ! } ! ! uint8_t ! SiRF_ID28_1P_get_header_rsrvd1(SiRF_ID28_1P * userdata) { ! return userdata->header_rsrvd1; ! } ! ! void ! SiRF_ID28_1P_set_header_rsrvd2(SiRF_ID28_1P * userdata, uint8_t header_rsrvd2) { ! userdata->header_rsrvd2 = header_rsrvd2; } uint8_t ! SiRF_ID28_1P_get_header_rsrvd2(SiRF_ID28_1P * userdata) { ! return userdata->header_rsrvd2; } --- 96,106 ---- void ! SiRF_ID28_1P_set_header_blockcount(SiRF_ID28_1P * userdata, uint8_t header_blockcount) { ! userdata->header_blockcount = header_blockcount; } uint8_t ! SiRF_ID28_1P_get_header_blockcount(SiRF_ID28_1P * userdata) { ! return userdata->header_blockcount; } *************** *** 158,165 **** static char insert_stmt[] = "INSERT into SiRF_ID28_1P (" "result_time," "header_seqno," "header_am_type," ! "header_rsrvd1," ! "header_rsrvd2," "channel," "time_tag," --- 158,165 ---- static char insert_stmt[] = "INSERT into SiRF_ID28_1P (" "result_time," + "header_mote_id," "header_seqno," "header_am_type," ! "header_blockcount," "channel," "time_tag," *************** *** 173,180 **** SiRF_ID28_1P * data = (SiRF_ID28_1P*)userdata; sprintf(pg_command,insert_stmt, data->header_seqno, data->header_am_type, ! data->header_rsrvd1, ! data->header_rsrvd2, data->channel, data->time_tag, --- 173,180 ---- SiRF_ID28_1P * data = (SiRF_ID28_1P*)userdata; sprintf(pg_command,insert_stmt, + data->header_mote_id, data->header_seqno, data->header_am_type, ! data->header_blockcount, data->channel, data->time_tag, *************** *** 193,198 **** */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } --- 193,198 ---- */ static uint8_t ! header_mote_id_convert(uint8_t header_mote_id) { ! return header_mote_id; } *************** *** 201,206 **** */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } --- 201,206 ---- */ static uint8_t ! header_seqno_convert(uint8_t header_seqno) { ! return header_seqno; } *************** *** 209,214 **** */ static uint8_t ! header_rsrvd1_convert(uint8_t header_rsrvd1) { ! return header_rsrvd1; } --- 209,214 ---- */ static uint8_t ! header_am_type_convert(uint8_t header_am_type) { ! return header_am_type; } *************** *** 217,222 **** */ static uint8_t ! header_rsrvd2_convert(uint8_t header_rsrvd2) { ! return header_rsrvd2; } --- 217,222 ---- */ static uint8_t ! header_blockcount_convert(uint8_t header_blockcount) { ! return header_blockcount; } *************** *** 255,262 **** void SiRF_ID28_1P_cook_packet(SiRF_ID28_1P * userdata) { userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_rsrvd1 = header_rsrvd1_convert(userdata->header_rsrvd1); ! userdata->header_rsrvd2 = header_rsrvd2_convert(userdata->header_rsrvd2); userdata->channel = channel_convert(userdata->channel); userdata->time_tag = time_tag_convert(userdata->time_tag); --- 255,262 ---- void SiRF_ID28_1P_cook_packet(SiRF_ID28_1P * userdata) { + userdata->header_mote_id = header_mote_id_convert(userdata->header_mote_id); userdata->header_seqno = header_seqno_convert(userdata->header_seqno); userdata->header_am_type = header_am_type_convert(userdata->header_am_type); ! userdata->header_blockcount = header_blockcount_convert(userdata->header_blockcount); userdata->channel = channel_convert(userdata->channel); userdata->time_tag = time_tag_convert(userdata->time_tag); *************** *** 294,301 **** SiRF_ID28_1P * data = (SiRF_ID28_1P*)userdata; printf("SiRF_ID28_1P 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); --- 294,301 ---- SiRF_ID28_1P * data = (SiRF_ID28_1P*)userdata; printf("SiRF_ID28_1P print cooked:\n"); + printf(" header_mote_id: %i,\n",data->header_mote_id); printf(" header_seqno: %i,\n",data->header_seqno); printf(" header_am_type: %i,\n",data->header_am_type); ! printf(" header_blockcount: %i,\n",data->header_blockcount); printf(" channel: %i,\n",data->channel); printf(" time_tag: %i,\n",data->time_tag); |