]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/tossim/SerialActiveMessageC.nc
Fix off by one error
[tinyos-2.x.git] / tos / lib / tossim / SerialActiveMessageC.nc
index 56f36c1e879887c2ce66bf7e61b40bae69d5ca49..d436e355216b8dfb1ca4482d41dd573efd47aa57 100644 (file)
@@ -72,10 +72,12 @@ implementation {
   command error_t AMSend.send[am_id_t id](am_addr_t addr,
                                          message_t* amsg,
                                          uint8_t len) {
+    dbg("Serial", "Serial: sending a packet of size %d\n", len);
     return FAIL;
   }
 
   command error_t AMSend.cancel[am_id_t id](message_t* msg) {
+    dbg("Serial", "Serial: cancelled a packet\n");
     return FAIL;
   }
   
@@ -141,7 +143,20 @@ implementation {
     serial_header_t* header = getHeader(amsg);
     header->type = t;
   }
+
+  command am_group_t AMPacket.group(message_t* amsg) {
+    serial_header_t* header = getHeader(amsg);
+    return header->group;
+  }
+  
+  command void AMPacket.setGroup(message_t* msg, am_group_t group) {
+    serial_header_t* header = getHeader(msg);
+    header->group = group;
+  }
+
+  command am_group_t AMPacket.localGroup() {
+    return TOS_AM_GROUP;
+  }
   command void Packet.clear(message_t* msg) {}
   
   command uint8_t Packet.payloadLength(message_t* msg) {