[Tinyos-2-commits] CVS: tinyos-2.x/apps/BaseStationCC2420 BaseStationP.nc, 1.4, 1.5

Phil Levis scipio at users.sourceforge.net
Tue Dec 19 09:55:25 PST 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/BaseStationCC2420
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17314

Modified Files:
	BaseStationP.nc 
Log Message:
Maintain source addresses on radio->UART.

Need to discuss with Jonathan how to handle UART->radio. Perhaps the AM
layer should take care of filling in source address, then the BaseStation
can just circumvent this and directly call into CC2420 stack?



Index: BaseStationP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/BaseStationCC2420/BaseStationP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** BaseStationP.nc	12 Dec 2006 18:22:48 -0000	1.4
--- BaseStationP.nc	19 Dec 2006 17:55:22 -0000	1.5
***************
*** 164,168 ****
      uint8_t len;
      am_id_t id;
!     am_addr_t addr;
      message_t* msg;
      atomic
--- 164,169 ----
      uint8_t len;
      am_id_t id;
!     am_addr_t dest;
!     am_addr_t src;
      message_t* msg;
      atomic
***************
*** 176,182 ****
      tmpLen = len = call RadioPacket.payloadLength(msg);
      id = call RadioAMPacket.type(msg);
!     addr = call RadioAMPacket.destination(msg);
! 
!     if (call UartSend.send[id](addr, uartQueue[uartOut], len) == SUCCESS)
        call Leds.led1Toggle();
      else
--- 177,185 ----
      tmpLen = len = call RadioPacket.payloadLength(msg);
      id = call RadioAMPacket.type(msg);
!     dest = call RadioAMPacket.destination(msg);
!     src = call RadioAMPacket.source(msg);
!     call UartAMPacket.setSource(msg, src);
!     
!     if (call UartSend.send[id](dest, uartQueue[uartOut], len) == SUCCESS)
        call Leds.led1Toggle();
      else
***************
*** 238,242 ****
      uint8_t len;
      am_id_t id;
!     am_addr_t addr;
      message_t* msg;
      
--- 241,246 ----
      uint8_t len;
      am_id_t id;
!     am_addr_t dest;
!     am_addr_t src;
      message_t* msg;
      
***************
*** 250,256 ****
      msg = radioQueue[radioOut];
      len = call UartPacket.payloadLength(msg);
!     addr = call UartAMPacket.destination(msg);
      id = call UartAMPacket.type(msg);
!     if (call RadioSend.send[id](addr, msg, len) == SUCCESS)
        call Leds.led0Toggle();
      else
--- 254,262 ----
      msg = radioQueue[radioOut];
      len = call UartPacket.payloadLength(msg);
!     dest = call UartAMPacket.destination(msg);
      id = call UartAMPacket.type(msg);
!     src = call UartAMPacket.source(msg);
!     call RadioAMPacket.setSource(msg, src);
!     if (call RadioSend.send[id](dest, msg, len) == SUCCESS)
        call Leds.led0Toggle();
      else



More information about the Tinyos-2-commits mailing list