[Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/MementoMori
AggressiveSendM.nc, 1.4, 1.5 CompressedSet.h, 1.5,
1.6 ExptM.nc, 1.3, 1.4 ResultPacket.h, 1.1, 1.2 RollCallC.nc,
1.5, 1.6 RollCallM.nc, 1.6, 1.7
Stan Rost
stanrost at users.sourceforge.net
Thu Oct 21 13:35:54 PDT 2004
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/MementoMori/TestMMDetector
TestMMDetectorM.nc, 1.3, 1.4
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/MementoMori/java
PrintFailed.class, 1.1, 1.2 PrintFailed.java, 1.1,
1.2 RosterMsg.class, 1.1, 1.2 RosterMsg.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26313
Modified Files:
AggressiveSendM.nc CompressedSet.h ExptM.nc ResultPacket.h
RollCallC.nc RollCallM.nc
Log Message:
Major:
- CompressedSet
- added optional superSkip header
- debugged the bejeebus out of compression/decompression
- AggressiveSend now turns on Acking in the radio, signals transmitted bytes correctly
Minor:
- Removed PowerArbiter from ExptM
- Added numLAte to ResultPkt
Index: AggressiveSendM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/AggressiveSendM.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AggressiveSendM.nc 14 Oct 2004 14:42:51 -0000 1.4
--- AggressiveSendM.nc 21 Oct 2004 20:35:51 -0000 1.5
***************
*** 1,9 ****
--- 1,16 ----
module AggressiveSendM {
provides {
+ interface StdControl;
+
interface SendMsg[uint8_t id];
interface AggressiveSendControl;
+
}
uses {
+ #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
+ interface MacControl;
+ #endif
+
interface Leds;
***************
*** 42,46 ****
! #define AGGRESSIVE_INIT_RETRIES 0
uint8_t maxRetries = AGGRESSIVE_INIT_RETRIES;
--- 49,53 ----
! #define AGGRESSIVE_INIT_RETRIES 2
uint8_t maxRetries = AGGRESSIVE_INIT_RETRIES;
***************
*** 51,54 ****
--- 58,62 ----
void printPacket(TOS_MsgPtr msg) {
+ #ifdef PLATFORM_PC
MsgStub *stub = getStub(msg);
***************
*** 56,62 ****
--- 64,72 ----
dbg_clear(DBG_USR2, "[%p:%d:%u:%p]",
msg, msg->type, stub->retriesLeft, stub->next);
+ #endif
}
void printQueue() {
+ #ifdef PLATFORM_PC
TOS_MsgPtr head = headFifoQ;
***************
*** 78,122 ****
}
dbg_clear(DBG_USR2, "\n");
}
bool sendInvoked = FALSE;
! void doSend() {
! dbg(DBG_USR1, "doSend()\n");
! printQueue();
!
! // If we are currently not sending any message,
! // popo another one from the queue
! if (_msg == NULL) {
! if (headFifoQ == NULL)
! return;
! else {
! MsgStub *stub = getStub(headFifoQ);
!
! _msg = headFifoQ;
! retriesLeft = stub->retriesLeft;
!
! headFifoQ = stub->next;
}
- }
-
- // Msg is all set
- if (call SendExt.send[_msg->type](_msg->addr,
- _msg->length,
- _msg) == SUCCESS) {
- call Leds.greenToggle();
- } else {
- call Leds.redToggle();
- }
-
- }
-
- task void invokeSend() {
- sendInvoked = FALSE;
- doSend();
}
! void postponeSend() {
if (!sendInvoked) {
sendInvoked = TRUE;
--- 88,133 ----
}
dbg_clear(DBG_USR2, "\n");
+ #endif
}
bool sendInvoked = FALSE;
! void doSend() {
! dbg(DBG_USR1, "doSend()\n");
! printQueue();
!
! // If we are currently not sending any message,
! // popo another one from the queue
! if (_msg == NULL) {
! if (headFifoQ == NULL)
! return;
! else {
! MsgStub *stub = getStub(headFifoQ);
!
! _msg = headFifoQ;
! retriesLeft = stub->retriesLeft;
!
! headFifoQ = stub->next;
}
}
! // Msg is all set
! if (call SendExt.send[_msg->type](_msg->addr,
! _msg->length,
! _msg) == SUCCESS) {
! call Leds.greenToggle();
! } else {
! call Leds.redToggle();
! }
!
! }
!
! task void invokeSend() {
! sendInvoked = FALSE;
! doSend();
! }
!
! void postponeSend() {
if (!sendInvoked) {
sendInvoked = TRUE;
***************
*** 127,130 ****
--- 138,163 ----
}
+ command result_t StdControl.init() {
+
+ return SUCCESS;
+ }
+
+ command result_t StdControl.start() {
+
+ #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
+ atomic {
+ call MacControl.enableAck();
+ }
+ #endif
+
+ return SUCCESS;
+ }
+
+ command result_t StdControl.stop() {
+ return SUCCESS;
+ }
+
+
+
command void AggressiveSendControl.setRetries(uint8_t numRetries) {
maxRetries = numRetries;
***************
*** 255,258 ****
--- 288,293 ----
dbg(DBG_USR1, "*** SUCCESS AT %d RETRIES\n", maxRetries - retriesLeft);
+ signal AggressiveSendControl.transmitted(msg);
+
return finish(id, msg, success);
}
Index: CompressedSet.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/CompressedSet.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CompressedSet.h 14 Oct 2004 14:42:51 -0000 1.5
--- CompressedSet.h 21 Oct 2004 20:35:52 -0000 1.6
***************
*** 50,54 ****
uint8_t aRun:4;
uint8_t bRun:4;
!
} __attribute__ ((packed)) LitRun;
--- 50,54 ----
uint8_t aRun:4;
uint8_t bRun:4;
!
} __attribute__ ((packed)) LitRun;
[...1563 lines suppressed...]
+
+
+ void printBits(uint8_t n) {
+ }
+
+ void printSetBits(Set *s) {
+ }
+
+
+ void printSet(Set *s) {
+ }
+
+ void testSets() {
+
+ }
+
+ #endif
+
#endif
Index: ExptM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/ExptM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExptM.nc 14 Oct 2004 14:42:51 -0000 1.3
--- ExptM.nc 21 Oct 2004 20:35:52 -0000 1.4
***************
*** 34,39 ****
uses {
- interface PowerArbiter;
-
interface Timer;
--- 34,37 ----
***************
*** 107,113 ****
#warning "Setting RADIO POWER..."
call CC1KControl.SetRFPower(RADIO_POWER);
- #endif
! call PowerArbiter.useResource(PWR_RADIO);
if (timeOut != 0xFFFF)
--- 105,110 ----
#warning "Setting RADIO POWER..."
call CC1KControl.SetRFPower(RADIO_POWER);
! #endif
if (timeOut != 0xFFFF)
Index: ResultPacket.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/ResultPacket.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResultPacket.h 8 Oct 2004 20:50:19 -0000 1.1
--- ResultPacket.h 21 Oct 2004 20:35:52 -0000 1.2
***************
*** 8,37 ****
// This one really only counts
// at the root
! //2
uint16_t numFailedNodes;
// Amount number of bytes sent
! //6
uint32_t bytesSent;
// Number of rounds played so far
! // 8
uint16_t numRounds;
// Parent at the current iteration
! // 10
uint16_t parentAddr;
! // Number of full updates sent
! // 12
! uint16_t numFullUpd;
! // -"- discovery updates sent
! // 14
! uint16_t numDiscUpd;
! // -"- failure updates sent
! // 16
! uint16_t numFailUpd;
} ResultPkt;
--- 8,37 ----
// This one really only counts
// at the root
! //0
uint16_t numFailedNodes;
// Amount number of bytes sent
! //2
uint32_t bytesSent;
// Number of rounds played so far
! // 6
uint16_t numRounds;
// Parent at the current iteration
! // 8
uint16_t parentAddr;
! // Depth within the tree
! // 10
! uint8_t treeLevel;
! // Number of late arrivals (i.e. desynchronized)
! // 12
! uint8_t numLate;
! // Number of full updates sent
! // 13
! uint16_t numFullUpd;
} ResultPkt;
Index: RollCallC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/RollCallC.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RollCallC.nc 14 Oct 2004 14:42:51 -0000 1.5
--- RollCallC.nc 21 Oct 2004 20:35:52 -0000 1.6
***************
*** 13,17 ****
implementation {
components
! PowerArbiterC,
EpochSchedulerC,
TimerC, GenericCommPromiscuous as Comm,
--- 13,17 ----
implementation {
components
! PowerArbiterC,
EpochSchedulerC,
TimerC, GenericCommPromiscuous as Comm,
***************
*** 24,28 ****
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
! CC1000ControlM,
#endif
--- 24,28 ----
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
! CC1000RadioC,
#endif
***************
*** 36,42 ****
// StdControl = QueuedSend;
StdControl = ExptM;
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
! // StdControl = CC1000ControlM;
#endif
--- 36,45 ----
// StdControl = QueuedSend;
+ StdControl = AggressiveSendM;
+
StdControl = ExptM;
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
!
! AggressiveSendM.MacControl -> CC1000RadioC.MacControl;
#endif
***************
*** 82,91 ****
ExptM.Leds -> LedsC;
- ExptM.PowerArbiter ->
- PowerArbiterC.PowerArbiter[unique("PowerArbiter")];
ExptM.Timer -> TimerC.Timer[unique("Timer")];
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
! ExptM.CC1KControl -> CC1000ControlM;
#endif
}
--- 85,92 ----
ExptM.Leds -> LedsC;
ExptM.Timer -> TimerC.Timer[unique("Timer")];
#if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT)
! ExptM.CC1KControl -> CC1000RadioC;
#endif
}
Index: RollCallM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/RollCallM.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RollCallM.nc 14 Oct 2004 14:42:51 -0000 1.6
--- RollCallM.nc 21 Oct 2004 20:35:52 -0000 1.7
***************
*** 134,138 ****
}
command result_t StdControl.start() {
!
// Init the round timing
call EpochScheduler.addSchedule(ROLLCALL_PERIOD,
--- 134,138 ----
}
command result_t StdControl.start() {
!
// Init the round timing
call EpochScheduler.addSchedule(ROLLCALL_PERIOD,
***************
*** 175,181 ****
// Add -1 here to allow aggregates of two rounds
if (aMsg->round != rollCallRound) {
! // Stale
- return msg;
}
--- 175,189 ----
// Add -1 here to allow aggregates of two rounds
if (aMsg->round != rollCallRound) {
! if (msg->addr == TOS_LOCAL_ADDRESS) {
!
! if (aMsg->round < rollCallRound - 1) {
! statsPkt->numLate++;
!
! return msg;
! }
! // else we allow it to continue
! } else
! return msg;
}
***************
*** 256,260 ****
// Variables for the compression of the bitmap
! uint8_t projLen, idxLen;
dbg(DBG_USR3, "^^ Round %u over, reporting these as alive to %u\n",
--- 264,268 ----
// Variables for the compression of the bitmap
! uint16_t projLen, idxLen;
dbg(DBG_USR3, "^^ Round %u over, reporting these as alive to %u\n",
***************
*** 287,291 ****
copySet(&aliveMsg->alive, call Roster.getRoster());
! subtractSet(&aliveMsg->alive, aliveSet);
dbg(DBG_USR3, "~~ Gateway node reports these have died\n");
--- 295,299 ----
copySet(&aliveMsg->alive, call Roster.getRoster());
! subtractSets(&aliveMsg->alive, aliveSet);
dbg(DBG_USR3, "~~ Gateway node reports these have died\n");
***************
*** 296,300 ****
dbg(DBG_USR3, "neighbor message SIZE OF ALIVE SET = %u\n",
! sizeOfSet(aliveSet));
{
--- 304,308 ----
dbg(DBG_USR3, "neighbor message SIZE OF ALIVE SET = %u\n",
! projLen);
{
***************
*** 314,318 ****
tgtAddr = call RouteControl.getParent();
pktSize = sizeof(RosterMsg) - sizeof(Set) +
! sizeOfSet(&aliveMsg->alive);
}
--- 322,326 ----
tgtAddr = call RouteControl.getParent();
pktSize = sizeof(RosterMsg) - sizeof(Set) +
! projLen;
}
***************
*** 326,331 ****
call RouteControl.getParent(),
(call RouteControl.getDepth() == 0 ? "-------\n" : "\n"));
! printSet(&aliveMsg->alive);
!
dbg(DBG_USR3, "^^ SHIPPING!!!\n");
--- 334,339 ----
call RouteControl.getParent(),
(call RouteControl.getDepth() == 0 ? "-------\n" : "\n"));
! printSetBits(&aliveMsg->alive);
!
dbg(DBG_USR3, "^^ SHIPPING!!!\n");
***************
*** 424,427 ****
--- 432,436 ----
statsPkt->parentAddr = call RouteControl.getParent();
+ statsPkt->treeLevel = call RouteControl.getDepth();
dbg(DBG_USR1,
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/MementoMori/TestMMDetector
TestMMDetectorM.nc, 1.3, 1.4
- Next message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/MementoMori/java
PrintFailed.class, 1.1, 1.2 PrintFailed.java, 1.1,
1.2 RosterMsg.class, 1.1, 1.2 RosterMsg.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list