From: mmaroti Date: Mon, 22 Mar 2010 00:37:42 +0000 (+0000) Subject: copy the group id from the radio to the serial (it was always 0x00) X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=9d9eac70414a26d8f60327c0470cc53963e36c38;p=tinyos-2.x.git copy the group id from the radio to the serial (it was always 0x00) 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/ --- diff --git a/apps/BaseStation/BaseStationP.nc b/apps/BaseStation/BaseStationP.nc index 2e647c7f..908e395d 100644 --- a/apps/BaseStation/BaseStationP.nc +++ b/apps/BaseStation/BaseStationP.nc @@ -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();