]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc1000/CC1000ActiveMessageP.nc
Added AM group.
[tinyos-2.x.git] / tos / chips / cc1000 / CC1000ActiveMessageP.nc
index ce09e7b4bc74c8c4e4334483446933c1af190134..a7a02da337a678d3ee34b02391bc041bb7176898 100644 (file)
@@ -148,9 +148,19 @@ implementation {
     header->type = type;
   }
   
-  //command am_group_t AMPacket.group(message_t* amsg) {
-  //  return amsg->header.group;
-  //}
+  command void AMPacket.setGroup(message_t* msg, am_group_t group) {
+    cc1000_header_t* header = getHeader(msg);
+    header->group = group;
+  }
+
+  command am_group_t AMPacket.group(message_t* msg) {
+    cc1000_header_t* header = getHeader(msg);
+    return header->group;
+  }
+
+  command am_group_t AMPacket.localGroup() {
+    return TOS_AM_GROUP;
+  }
   
  default event message_t* Receive.receive[am_id_t id](message_t* msg, void* payload, uint8_t len) {
     return msg;