]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/xe1205/XE1205ActiveMessageP.nc
The big interface switchover for Packet, Send, Receive, and AMSend.
[tinyos-2.x.git] / tos / chips / xe1205 / XE1205ActiveMessageP.nc
index 5281280c2e4d05e1f6ca939a5d3430b3ca0ffdee..4e69fc4dbd7cc07ff43ed39447610d82198e603c 100644 (file)
@@ -92,12 +92,26 @@ implementation {
     header->type = type;
   }
 
+  command void AMPacket.setGroup(message_t* msg, am_group_t group) {
+    xe1205_header_t* header = getHeader(msg);
+    header->group = group;
+  }
+
+  command am_group_t AMPacket.group(message_t* msg) {
+    xe1205_header_t* header = getHeader(msg);
+    return header->group;
+  }
+
+  command am_group_t AMPacket.localGroup() {
+    return TOS_AM_GROUP;
+  }
+
   command uint8_t AMSend.maxPayloadLength[am_id_t id]() {
     return call Packet.maxPayloadLength();
   }
 
-  command void* AMSend.getPayload[am_id_t id](message_t* m) {
-    return call Packet.getPayload(m, NULL);
+  command void* AMSend.getPayload[am_id_t id](message_t* m, uint8_t len) {
+    return call Packet.getPayload(m, len);
   }
 
   command error_t AMSend.send[am_id_t id](am_addr_t addr, 
@@ -139,21 +153,6 @@ implementation {
     return msg;
   }
 
-  command void* Receive.getPayload[am_id_t id](message_t* m, uint8_t* len) {
-    return call Packet.getPayload(m, len);
-  }
-
-  command uint8_t Receive.payloadLength[am_id_t id](message_t* m) {
-    return call Packet.payloadLength(m);
-  }
-  
-  command void* Snoop.getPayload[am_id_t id](message_t* m, uint8_t* len) {
-    return call Packet.getPayload(m, len);
-  }
-
-  command uint8_t Snoop.payloadLength[am_id_t id](message_t* m) {
-    return call Packet.payloadLength(m);
-  }
   
 }