[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drain DrainM.nc,1.8,1.9
Gilman Tolle
gtolle at users.sourceforge.net
Wed May 4 13:46:00 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Drain
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13176
Modified Files:
DrainM.nc
Log Message:
Added a small ifdef to disable ack checking if we're not on a CC2420 or CC1000 platform
Index: DrainM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainM.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DrainM.nc 3 May 2005 23:23:35 -0000 1.8
--- DrainM.nc 4 May 2005 20:45:58 -0000 1.9
***************
*** 136,139 ****
--- 136,140 ----
command result_t StdControl.start() {
#if defined(_CC2420CONST_H) || defined(_CC1KCONST_H)
+ #define DRAIN_ACKS_AVAILABLE
call MacControl.enableAck();
#endif
***************
*** 353,356 ****
--- 354,358 ----
}
+ #ifdef DRAIN_ACKS_AVAILABLE
if (pMsg->ack == 1) {
ackedPackets++;
***************
*** 358,361 ****
--- 360,364 ----
unackedPackets++;
}
+ #endif
if (pMsg->addr == TOS_BCAST_ADDR || pMsg->addr == TOS_UART_ADDR) {
***************
*** 376,379 ****
--- 379,383 ----
// It did have a destination. Consider retransmitting.
+ #ifdef DRAIN_ACKS_AVAILABLE
if (pMsg->ack == 0) {
***************
*** 385,392 ****
call Timer.start(TIMER_ONE_SHOT, 1 << backoff);
return SUCCESS;
! }
!
! } else {
!
// It was acked.
call DrainLinkEst.messageSent(pMsg, pMsg->type, SUCCESS);
--- 389,397 ----
call Timer.start(TIMER_ONE_SHOT, 1 << backoff);
return SUCCESS;
! }
! }
! else
! #endif
! {
// It was acked.
call DrainLinkEst.messageSent(pMsg, pMsg->type, SUCCESS);
More information about the Tinyos-beta-commits
mailing list