]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/layers/TimeSyncMessageLayer.h
Use a dedicated (0x3D) AM type for all time sync messages
[tinyos-2.x.git] / tos / chips / rf2xx / layers / TimeSyncMessageLayer.h
index 51e3842cbd61d07da4cea67c01d9d9c6dabf4136..dbb1c10d90c8f3786e93bcc2b05900bd4ea7b468 100644 (file)
 #ifndef __TIMESYNCMESSAGELAYER_H__
 #define __TIMESYNCMESSAGELAYER_H__
 
-// this value is sent in the air
+#include <AM.h>
+
+#ifndef TIMESYNC_AMTYPE
+#define TIMESYNC_AMTYPE 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__