]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/rf212/RF212Radio.h
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / rf2xx / rf212 / RF212Radio.h
diff --git a/tos/chips/rf2xx/rf212/RF212Radio.h b/tos/chips/rf2xx/rf212/RF212Radio.h
new file mode 100644 (file)
index 0000000..ba36696
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2007, Vanderbilt University
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose, without fee, and without written agreement is
+ * hereby granted, provided that the above copyright notice, the following
+ * two paragraphs and the author appear in all copies of this software.
+ * 
+ * IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
+ * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
+ * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Author: Miklos Maroti
+ */
+
+#ifndef __RF212RADIO_H__
+#define __RF212RADIO_H__
+
+#include <RadioConfig.h>
+#include <TinyosNetworkLayer.h>
+#include <Ieee154PacketLayer.h>
+#include <ActiveMessageLayer.h>
+#include <MetadataFlagsLayer.h>
+#include <RF212DriverLayer.h>
+#include <TimeStampingLayer.h>
+#include <LowPowerListeningLayer.h>
+#include <PacketLinkLayer.h>
+
+typedef nx_struct rf212packet_header_t
+{
+       rf212_header_t rf212;
+       ieee154_header_t ieee154;
+#ifndef TFRAMES_ENABLED
+       network_header_t network;
+#endif
+#ifndef IEEE154FRAMES_ENABLED
+       activemessage_header_t am;
+#endif
+} rf212packet_header_t;
+
+typedef nx_struct rf212packet_footer_t
+{
+       // the time stamp is not recorded here, time stamped messaged cannot have max length
+} rf212packet_footer_t;
+
+typedef struct rf212packet_metadata_t
+{
+#ifdef LOW_POWER_LISTENING
+       lpl_metadata_t lpl;
+#endif
+#ifdef PACKET_LINK
+       link_metadata_t link;
+#endif
+       timestamp_metadata_t timestamp;
+       flags_metadata_t flags;
+       rf212_metadata_t rf212;
+} rf212packet_metadata_t;
+
+#endif//__RF212RADIO_H__