[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drain Drain.h, 1.1,
1.2 DrainC.nc, 1.1, 1.2 DrainLinkEstM.nc, 1.1, 1.2 DrainM.nc,
1.1, 1.2
Gilman Tolle
gtolle at users.sourceforge.net
Mon Feb 14 22:41:34 PST 2005
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/TOSSIM-CC2420 AM.h, NONE,
1.1 HPLCC2420C.nc, NONE, 1.1 HPLCC2420M.nc, NONE,
1.1 README.txt, NONE, 1.1 hardware.c, NONE,
1.1 hardware.nido.h, NONE, 1.1 platforms.properties, NONE, 1.1
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Drip/tools Drip.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/Drain
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9042
Modified Files:
Drain.h DrainC.nc DrainLinkEstM.nc DrainM.nc
Log Message:
Removed link-layer acks from Drain until I can figure out a systematic way to use them even through a TOSBase node. Drain works.
Index: Drain.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/Drain.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Drain.h 14 Feb 2005 23:16:37 -0000 1.1
--- Drain.h 15 Feb 2005 06:41:32 -0000 1.2
***************
*** 45,53 ****
enum {
DRAIN_QUEUE_SIZE = 3,
! DRAIN_MAX_RETRANSMITS = 5,
DRAIN_MAX_MISSED_BEACONS = 5,
DRAIN_UNKNOWN_ACK_EST = 127,
};
typedef struct DrainMsg {
uint16_t sourceaddr;
--- 45,64 ----
enum {
DRAIN_QUEUE_SIZE = 3,
! DRAIN_MAX_RETRANSMITS = 0, // does nothing, for now.
DRAIN_MAX_MISSED_BEACONS = 5,
DRAIN_UNKNOWN_ACK_EST = 127,
};
+ enum {
+ MA_Drain_Parent_ATTR = 30,
+ MA_Drain_Parent_LEN = 2,
+
+ MA_Drain_Cost_ATTR = 31,
+ MA_Drain_Cost_LEN = 2,
+
+ MA_Drain_LinkEst_ATTR = 32,
+ MA_Drain_LinkEst_LEN = 2,
+ };
+
typedef struct DrainMsg {
uint16_t sourceaddr;
Index: DrainC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DrainC.nc 14 Feb 2005 23:16:37 -0000 1.1
--- DrainC.nc 15 Feb 2005 06:41:32 -0000 1.2
***************
*** 22,32 ****
TimerC,
LedsC as Leds;
!
! #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
! components CC1000RadioC as RadioC;
! #elif defined(PLATFORM_TELOS) || defined (PLATFORM_TELOSB)
! components CC2420RadioC as RadioC;
#endif
!
StdControl = DrainM.StdControl;
Receive = DrainM.Receive;
--- 22,30 ----
TimerC,
LedsC as Leds;
!
! #ifdef DRAIN_INSTRUMENTED
! components AttrsC;
#endif
!
StdControl = DrainM.StdControl;
Receive = DrainM.Receive;
***************
*** 45,52 ****
DrainM.ReceiveMsg -> GenericComm.ReceiveMsg[AM_DRAINMSG];
- #ifndef PLATFORM_PC
- DrainM.MacControl -> RadioC.MacControl;
- #endif
-
DrainLinkEstM.Timer -> TimerC.Timer[unique("Timer")];
DrainLinkEstM.AgingTimer -> TimerC.Timer[unique("Timer")];
--- 43,46 ----
***************
*** 56,64 ****
DrainLinkEstM.SendMsg -> GenericComm.SendMsg[AM_DRAINBEACONMSG];
DrainLinkEstM.ReceiveMsg -> GenericComm.ReceiveMsg[AM_DRAINBEACONMSG];
- }
-
-
-
-
-
--- 50,58 ----
DrainLinkEstM.SendMsg -> GenericComm.SendMsg[AM_DRAINBEACONMSG];
DrainLinkEstM.ReceiveMsg -> GenericComm.ReceiveMsg[AM_DRAINBEACONMSG];
+ #ifdef DRAIN_INSTRUMENTED
+ DrainLinkEstM.Parent -> AttrsC.AttrServer[MA_Drain_Parent_ATTR];
+ DrainLinkEstM.Cost -> AttrsC.AttrServer[MA_Drain_Cost_ATTR];
+ DrainLinkEstM.LinkEst -> AttrsC.AttrServer[MA_Drain_LinkEst_ATTR];
+ #endif
+ }
Index: DrainLinkEstM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainLinkEstM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DrainLinkEstM.nc 14 Feb 2005 23:16:37 -0000 1.1
--- DrainLinkEstM.nc 15 Feb 2005 06:41:32 -0000 1.2
***************
*** 50,53 ****
--- 50,59 ----
interface SendMsg;
interface ReceiveMsg;
+
+ #ifdef DRAIN_INSTRUMENTED
+ interface AttrServer as Parent;
+ interface AttrServer as Cost;
+ interface AttrServer as LinkEst;
+ #endif
}
}
***************
*** 339,342 ****
--- 345,368 ----
return SUCCESS;
}
+
+ #ifdef DRAIN_INSTRUMENTED
+ event uint8_t Parent.length() { return sizeof(TOS_LOCAL_ADDRESS); }
+ event result_t Parent.get(void* buf) {
+ memcpy(buf, ¤tParentAddr, sizeof(TOS_LOCAL_ADDRESS));
+ return SUCCESS;
+ }
+
+ event uint8_t Cost.length() { return sizeof(currentParentCost); }
+ event result_t Cost.get(void* buf) {
+ memcpy(buf, ¤tParentCost, sizeof(TOS_LOCAL_ADDRESS));
+ return SUCCESS;
+ }
+
+ event uint8_t LinkEst.length() { return sizeof(currentParentLinkEst); }
+ event result_t LinkEst.get(void* buf) {
+ memcpy(buf, ¤tParentLinkEst, sizeof(TOS_LOCAL_ADDRESS));
+ return SUCCESS;
+ }
+ #endif
}
Index: DrainM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DrainM.nc 14 Feb 2005 23:16:37 -0000 1.1
--- DrainM.nc 15 Feb 2005 06:41:32 -0000 1.2
***************
*** 50,57 ****
interface DrainLinkEst;
-
- #ifndef PLATFORM_PC
- interface MacControl;
- #endif
}
}
--- 50,53 ----
***************
*** 95,107 ****
command result_t StdControl.init() {
initializeBufs();
-
- #ifdef PLATFORM_PC
- maxRetransmits = 0;
- #else
maxRetransmits = DRAIN_MAX_RETRANSMITS;
- #endif
-
currentFailCount = 0;
-
return call SubControl.init();
}
--- 91,96 ----
***************
*** 124,130 ****
command result_t StdControl.start() {
- #ifndef PLATFORM_PC
- atomic call MacControl.enableAck();
- #endif
return call SubControl.start();
}
--- 113,116 ----
***************
*** 323,326 ****
--- 309,316 ----
// It didn't have a destination. Don't try retransmitting.
+ } else if (maxRetransmits == 0) {
+
+ // We don't care if it got there. Don't try retransmitting.
+
} else {
***************
*** 333,337 ****
currentFailCount++;
! if (maxRetransmits > 0 && currentFailCount < maxRetransmits) {
// See if we should retransmit
--- 323,327 ----
currentFailCount++;
! if (currentFailCount < maxRetransmits) {
// See if we should retransmit
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/TOSSIM-CC2420 AM.h, NONE,
1.1 HPLCC2420C.nc, NONE, 1.1 HPLCC2420M.nc, NONE,
1.1 README.txt, NONE, 1.1 hardware.c, NONE,
1.1 hardware.nido.h, NONE, 1.1 platforms.properties, NONE, 1.1
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Drip/tools Drip.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list