]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/layers/TimeSyncMessageLayer.h
Use the AM_TIMESYNCMSG name for the active message ID used by all time sync messages
[tinyos-2.x.git] / tos / chips / rf2xx / layers / TimeSyncMessageLayer.h
index 51e3842cbd61d07da4cea67c01d9d9c6dabf4136..7c930a657467ee89893c96887246c36a222e0bb1 100644 (file)
 #ifndef __TIMESYNCMESSAGELAYER_H__
 #define __TIMESYNCMESSAGELAYER_H__
 
-// this value is sent in the air
+#include <AM.h>
+
+#ifndef AM_TIMESYNCMSG
+#define AM_TIMESYNCMSG 0x3D
+#endif
+
+// this is sent over the air
 typedef nx_int32_t timesync_relative_t;
 
-// this value is stored in memory
+// this is stored in memory
 typedef uint32_t timesync_absolute_t;
 
+typedef struct timesync_footer_t
+{
+       nx_am_id_t type;
+       union
+       {
+               timesync_relative_t relative;
+               timesync_absolute_t absolute;
+       };
+} timesync_footer_t;
+
 #endif//__TIMESYNCMESSAGELAYER_H__