Update of /cvsroot/playerstage/code/player/server/drivers/wsn
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5568

Modified Files:
        rcore_xbridge.cc 
Log Message:
Minor patches.


Index: rcore_xbridge.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wsn/rcore_xbridge.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** rcore_xbridge.cc    18 May 2006 12:11:10 -0000      1.1
--- rcore_xbridge.cc    4 Sep 2006 13:37:56 -0000       1.2
***************
*** 106,110 ****
  #endif
  
- #include <libparticle/_packet.h>
  #include <libparticle.h>
  
--- 106,109 ----
***************
*** 389,402 ****
      NodeCalibrationValues node_values;
      player_wsn_data_t temp_data;
-     struct p_acl_tuple *tuple;
      short accelX[MAXREADPPACKET], accelY[MAXREADPPACKET], 
accelZ[MAXREADPPACKET];
      int i;
      
      char gid[12];
      char nid[12];
!     sprintf (gid, "%d%d%d%d", pkt->p_src_id[0], pkt->p_src_id[1],
!              pkt->p_src_id[2], pkt->p_src_id[3]);
!     sprintf (nid, "%d%d%d%d", pkt->p_src_id[4], pkt->p_src_id[5],
!              pkt->p_src_id[6], pkt->p_src_id[7]);
  
      temp_data.node_type      = 1;
--- 388,403 ----
      NodeCalibrationValues node_values;
      player_wsn_data_t temp_data;
      short accelX[MAXREADPPACKET], accelY[MAXREADPPACKET], 
accelZ[MAXREADPPACKET];
      int i;
+     const uint8_t *srcid = p_pkt_get_srcid(pkt);
+     struct p_acl_tuple *tuple;
+     uint8_t *acl_data;
+     const uint8_t *acl_type;
+     uint16_t acl_len;
      
      char gid[12];
      char nid[12];
!     sprintf (gid, "%d%d%d%d", srcid[0], srcid[1], srcid[2], srcid[3] );
!     sprintf (nid, "%d%d%d%d", srcid[4], srcid[5], srcid[6], srcid[7] );
  
      temp_data.node_type      = 1;
***************
*** 407,420 ****
  
      // Parse all the tuples
!     while (tuple != NULL) {
!         if ((tuple->acl_type[0] == 234) && (tuple->acl_type[1] == 128)) // SGX
!           for (i = 0; i < readppacket; i++)
!           {
!                 accelX[i] = ParseTuple (tuple->acl_data[0+(i*6)], 
tuple->acl_data[1+(i*6)]);
!               accelY[i] = ParseTuple (tuple->acl_data[2+(i*6)], 
tuple->acl_data[3+(i*6)]);
!               accelZ[i] = ParseTuple (tuple->acl_data[4+(i*6)], 
tuple->acl_data[5+(i*6)]);
!           }
! 
!         tuple = p_acl_next(pkt, tuple);
      }
  
--- 408,422 ----
  
      // Parse all the tuples
!     for (tuple = p_acl_first (pkt); tuple != NULL; tuple = p_acl_next (pkt, 
tuple))
!     {
!       acl_type = p_acl_get_type (tuple);
!       acl_len  = p_acl_get_data (tuple, &acl_data);
!       if ((acl_type[0] == 234) && (acl_type[1] == 128)) // SGX
!         for (i = 0; i < readppacket; i++)
!         {
!             accelX[i] = ParseTuple (acl_data[0+(i*6)], acl_data[1+(i*6)]);
!             accelY[i] = ParseTuple (acl_data[2+(i*6)], acl_data[3+(i*6)]);
!             accelZ[i] = ParseTuple (acl_data[4+(i*6)], acl_data[5+(i*6)]);
!         }
      }
  


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to