]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
copy the group id from the radio to the serial (it was always 0x00)
authormmaroti <mmaroti>
Mon, 22 Mar 2010 00:37:42 +0000 (00:37 +0000)
committermmaroti <mmaroti>
Mon, 22 Mar 2010 00:37:42 +0000 (00:37 +0000)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

apps/BaseStation/BaseStationP.nc

index 2e647c7f83c6429b89f9c2ab7de285cc82cd507f..908e395d08c072d534887b8ccfa8d8220ce901d5 100644 (file)
@@ -39,7 +39,7 @@
 /* 
  * BaseStationP bridges packets between a serial channel and the radio.
  * Messages moving from serial to radio will be tagged with the group
- * ID compiled into the TOSBase, and messages moving from radio to
+ * ID compiled into the BaseStation, and messages moving from radio to
  * serial will be filtered by that same group id.
  */
 
@@ -179,6 +179,7 @@ implementation
     am_id_t id;
     am_addr_t addr, src;
     message_t* msg;
+    am_group_t grp;
     atomic
       if (uartIn == uartOut && !uartFull)
        {
@@ -191,8 +192,10 @@ implementation
     id = call RadioAMPacket.type(msg);
     addr = call RadioAMPacket.destination(msg);
     src = call RadioAMPacket.source(msg);
+    grp = call RadioAMPacket.group(msg);
     call UartPacket.clear(msg);
     call UartAMPacket.setSource(msg, src);
+    call UartAMPacket.setGroup(msg, grp);
 
     if (call UartSend.send[id](addr, uartQueue[uartOut], len) == SUCCESS)
       call Leds.led1Toggle();