[Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/TOSBase TOSBase.nc, 1.2, 1.3 TOSBaseM.nc, 1.5, 1.6

Gilman Tolle gtolle at users.sourceforge.net
Mon Sep 20 14:59:32 PDT 2004


Update of /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/TOSBase
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15890

Modified Files:
	TOSBase.nc TOSBaseM.nc 
Log Message:
enabled link-layer ACKs on Telos


Index: TOSBase.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/TOSBase/TOSBase.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TOSBase.nc	26 Aug 2004 22:59:24 -0000	1.2
--- TOSBase.nc	20 Sep 2004 21:59:29 -0000	1.3
***************
*** 45,49 ****
  
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
!   components CC1000RadioC, CC1000RadioIntM;
  #endif
  
--- 45,51 ----
  
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
!   components CC1000RadioC as Radio, CC1000RadioIntM;
! #elif defined(PLATFORM_TELOS)
!   components CC2420RadioC as Radio;
  #endif
  
***************
*** 63,72 ****
    FramerM.ByteComm -> UART;
  
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
!   TOSBaseM.MacControl -> CC1000RadioC.MacControl;
!   TOSBaseM.CC1000Control -> CC1000RadioC.CC1000Control;
    TOSBaseM.SetListeningMode -> CC1000RadioIntM.SetListeningMode;
    TOSBaseM.GetListeningMode -> CC1000RadioIntM.GetListeningMode;
  #endif
- 
  }
--- 65,75 ----
    FramerM.ByteComm -> UART;
  
+   TOSBaseM.MacControl -> Radio.MacControl;
+ 
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
!   TOSBaseM.CC1000Control -> Radio.CC1000Control;
    TOSBaseM.SetListeningMode -> CC1000RadioIntM.SetListeningMode;
    TOSBaseM.GetListeningMode -> CC1000RadioIntM.GetListeningMode;
  #endif
  }
+ 

Index: TOSBaseM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/TOSBase/TOSBaseM.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TOSBaseM.nc	26 Aug 2004 22:59:24 -0000	1.5
--- TOSBaseM.nc	20 Sep 2004 21:59:29 -0000	1.6
***************
*** 57,63 ****
      interface BareSendMsg as RadioSend;
      interface ReceiveMsg as RadioReceive;
  
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
-     interface MacControl;
      command result_t SetListeningMode(uint8_t power);
      command uint8_t GetListeningMode();
--- 57,63 ----
      interface BareSendMsg as RadioSend;
      interface ReceiveMsg as RadioReceive;
+     interface MacControl;
  
  #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
      command result_t SetListeningMode(uint8_t power);
      command uint8_t GetListeningMode();
***************
*** 102,105 ****
--- 102,106 ----
      Result = call UARTSend.send(pMsg);
      if (Result != SUCCESS) {
+       call Leds.yellowToggle();
        pMsg->length = 0;
      }
***************
*** 126,130 ****
    task void SendAckTask() {
       call UARTTokenReceive.ReflectToken(gTxPendingToken);
!      call Leds.yellowToggle();
       atomic {
         gpTxMsg->length = 0;
--- 127,131 ----
    task void SendAckTask() {
       call UARTTokenReceive.ReflectToken(gTxPendingToken);
! //     call Leds.greenToggle();
       atomic {
         gpTxMsg->length = 0;
***************
*** 152,161 ****
      ok3 = call Leds.init();
  
- #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
-     atomic call MacControl.enableAck();
- #endif
- 
      dbg(DBG_BOOT, "TOSBase initialized\n");
  
      return rcombine3(ok1, ok2, ok3);
    }
--- 153,160 ----
      ok3 = call Leds.init();
  
      dbg(DBG_BOOT, "TOSBase initialized\n");
  
+     atomic call MacControl.enableAck();
+ 
      return rcombine3(ok1, ok2, ok3);
    }
***************
*** 186,195 ****
      if (Msg->crc) {
  
-       /* Filter out messages by group id */
-       /*
- 	if (Msg->group != TOS_AM_GROUP)
-         return Msg;
-       */
- 
        atomic {
  	pBuf = gRxBufPoolTbl[gRxHeadIndex];
--- 185,188 ----
***************
*** 217,224 ****
    }
  
- #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
    void processCommandMsg(TOS_MsgPtr Msg) {
      TOSBaseCmdMsg *cmdMsg = (TOSBaseCmdMsg*) &Msg->data;
!     
      if (cmdMsg->addrChanged) {
        atomic TOS_LOCAL_ADDRESS = cmdMsg->addr;
--- 210,216 ----
    }
  
    void processCommandMsg(TOS_MsgPtr Msg) {
      TOSBaseCmdMsg *cmdMsg = (TOSBaseCmdMsg*) &Msg->data;
! 
      if (cmdMsg->addrChanged) {
        atomic TOS_LOCAL_ADDRESS = cmdMsg->addr;
***************
*** 227,230 ****
--- 219,224 ----
        atomic TOS_AM_GROUP = cmdMsg->group;
      }
+ 
+ #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)    
      if (cmdMsg->rfPowerChanged) {
        call CC1000Control.SetRFPower(cmdMsg->rfPower);
***************
*** 233,236 ****
--- 227,231 ----
        atomic call SetListeningMode(cmdMsg->lplMode);
      }
+ 
      if (cmdMsg->llAckChanged) {
        if (cmdMsg->llAck == 1) {
***************
*** 240,245 ****
        }
      }
-   }
  #endif
    
    event TOS_MsgPtr UARTReceive.receive(TOS_MsgPtr Msg) {
--- 235,240 ----
        }
      }
  #endif
+   }
    
    event TOS_MsgPtr UARTReceive.receive(TOS_MsgPtr Msg) {
***************
*** 275,281 ****
      dbg(DBG_USR1, "TOSBase received UART token packet.\n");
  
- #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
      if (Msg->type == AM_TOSBASECMDMSG) {
- //      call Leds.yellowToggle();
        processCommandMsg(Msg);
        gTxPendingToken = Token;
--- 270,274 ----
***************
*** 283,287 ****
        return Msg;
      }
- #endif
  
      atomic {
--- 276,279 ----



More information about the Tinyos-beta-commits mailing list