]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/tda5250/tda5250_message.h
keep sfd time
[tinyos-2.x.git] / tos / chips / tda5250 / tda5250_message.h
index 1f377841096bcfc190709115a0159c1bb8ecf8e3..b6053fde2ae954621a90b641d73a337c861a5b8b 100644 (file)
@@ -4,12 +4,19 @@
 #include "AM.h"
 #include "PacketAck.h"
 
+/*
+ * highest bit of token set: this message is ACK and not intended for the
+ * upper layers. Token is used for alternating bit like duplicate detection,
+ * and set by the sender in [0,127] intervall. The receiver reflects the
+ * token in the Ack, with the highest bit set. 
+ */
+
 typedef nx_struct tda5250_header_t {
-  nx_uint8_t   length;
-  nx_am_addr_t src;
-  nx_am_addr_t dest;
-  nx_am_id_t   type;
-  nx_uint8_t   token;
+  nx_uint8_t    length;
+  nx_am_addr_t  src;
+  nx_am_addr_t  dest;
+  nx_am_id_t    type;
+  nx_uint8_t    token;
 } tda5250_header_t;
 
 typedef nx_struct tda5250_footer_t {
@@ -21,6 +28,8 @@ typedef nx_struct tda5250_metadata_t {
   nx_uint8_t ack;
   /* local time when message was generated */
   nx_uint32_t time;
+  /* time of sfd generation */
+  nx_uint32_t sfdtime;
   nx_uint8_t sendSecurityMode;
   nx_uint8_t receiveSecurityMode;
   /* some meta information that allows to compute a density */