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

Modified Files:
        mica2.cc mica2.h 
Log Message:
Added support for M1/M1-mini RFID readers (for Mica2 driver).


Index: mica2.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wsn/mica2.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** mica2.h     11 Apr 2006 12:57:14 -0000      1.2
--- mica2.h     6 Jun 2006 12:25:13 -0000       1.3
***************
*** 21,27 ****
  /*
   * TinyOS data structures.
!  * Borrowed from the TinyOS project (http://www.tinyos.net).
!  * Portions copyright (c) 2004 Crossbow Technology, Inc.
!  * Distributed according to the Intel Open Source License.
   */
  
--- 21,26 ----
  /*
   * TinyOS data structures.
!  * Portions borrowed from the TinyOS project (http://www.tinyos.net), 
!  * distributed according to the Intel Open Source License.
   */
  
***************
*** 64,67 ****
--- 63,79 ----
  } MTS510Data;
  
+ // ---[ M1-mini RFID reader command packet structure ]---
+ // (Attn: ASCII mode ! make time to change to BINARY!)
+ typedef struct
+ {
+     unsigned char flags  [2];
+     unsigned char request[2];
+     unsigned char type   [2];
+     unsigned char TID    [16];
+     unsigned char start  [2];
+     unsigned char length [2];
+     unsigned char data   [8];
+ } M1miniCommand;
+ 
  // ---[ Generic sensor data packet structure ]---
  typedef struct
***************
*** 97,102 ****
        struct
        {
!           unsigned short device; // device: LEDs, speaker, etc
!           unsigned short state;  // state : on/off, etc
        } actuate;
      } param;
--- 109,114 ----
        struct
        {
!               unsigned short device; // device: LEDs, speaker, etc
!               unsigned short state;  // state : on/off, etc
        } actuate;
      } param;
***************
*** 111,114 ****
--- 123,137 ----
  } __attribute__ ((packed)) XCommandMsg;
  
+ // ---[ RFID data packet structure] ---
+ typedef struct{
+     TOSMsgHeader   tos;
+     unsigned char  ptotal;                    // num of packets
+     unsigned char  pi;                                // index of current 
packet
+     unsigned short RID;                               // receive id
+     unsigned short SG;                                // signal strength
+     unsigned char  data[23];
+     unsigned short crc;
+ } __attribute__ ((packed)) RFIDMsg;
+ 
  // ---[ Health data packet structure ]---
  /*typedef struct
***************
*** 129,131 ****
  } HealthData;
  */
- 
--- 152,153 ----

Index: mica2.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wsn/mica2.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mica2.cc    18 May 2006 09:32:44 -0000      1.4
--- mica2.cc    6 Jun 2006 12:25:13 -0000       1.5
***************
*** 22,25 ****
--- 22,27 ----
   Author: Radu Bogdan Rusu
   Date: 09 Mar 2006
+  Portions borrowed from the TinyOS project (http://www.tinyos.net), 
distributed
+  according to the Intel Open Source License.
  */
  
***************
*** 30,34 ****
  
[...1451 lines suppressed...]
! 
!     if ((provideRFID) && (rfidPacket))
!       // Write the RFID data
!       Publish (rfid_addr, NULL, PLAYER_MSGTYPE_DATA, PLAYER_RFID_DATA,
!               &rfid_data, sizeof (player_rfid_data_t), NULL);
! 
!     if ((provideWSN) && (wsnPacket))
!       // Write the WSN data
!       Publish (wsn_addr, NULL, PLAYER_MSGTYPE_DATA, PLAYER_WSN_DATA,
!               &wsn_data, sizeof (player_wsn_data_t), NULL);
! 
!     return 0;
  }
  
***************
*** 847,849 ****
  }
  
//------------------------------------------------------------------------------
- 
--- 1158,1159 ----



_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to