[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/Hello Hello.h, 1.8,
1.9 HelloC.nc, 1.21, 1.22 HelloM.nc, 1.26, 1.27
Gilman Tolle
gtolle at users.sourceforge.net
Tue Sep 14 15:05:44 PDT 2004
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/java/net/tinyos/hello
HelloMHPing.java, NONE, 1.1 Makefile, 1.3, 1.4
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/MementoMori
AggressiveSendControl.nc, NONE, 1.1 AggressiveSendM.nc, NONE,
1.1 HeartBeatHandler.nc, NONE, 1.1 RollCallC.nc, 1.1,
1.2 RollCallM.nc, 1.1, 1.2 DFDTypes.h, 1.1,
NONE LocalConsensusHandler.nc, 1.1, NONE WatcherCoreC.nc, 1.1,
NONE WatcherCoreM.nc, 1.1, NONE WatcherState.nc, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/Hello
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6961
Modified Files:
Hello.h HelloC.nc HelloM.nc
Log Message:
Fixed some bugs in the multihop identification code
Index: Hello.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/Hello/Hello.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Hello.h 6 Sep 2004 21:51:25 -0000 1.8
--- Hello.h 14 Sep 2004 22:05:41 -0000 1.9
***************
*** 19,23 ****
uint8_t hardwareId[HARDWARE_ID_LEN];
char programName[IDENT_MAX_PROGRAM_NAME_LENGTH];
- uint8_t reqId;
} HelloMsg;
--- 19,22 ----
Index: HelloC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/Hello/HelloC.nc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** HelloC.nc 7 Sep 2004 22:15:38 -0000 1.21
--- HelloC.nc 14 Sep 2004 22:05:41 -0000 1.22
***************
*** 15,25 ****
DripC,
AMNamingM,
- RebootC,
- InternalFlashC,
RandomLFSR,
GenericComm as Comm;
#ifndef PLATFORM_PC
! components PowerMgmtC;
#endif
--- 15,23 ----
DripC,
AMNamingM,
RandomLFSR,
GenericComm as Comm;
#ifndef PLATFORM_PC
! components PowerMgmtC, RebootC, InternalFlashC;
#endif
***************
*** 64,67 ****
--- 62,66 ----
#ifndef PLATFORM_PC
HelloM.setPowerMode -> PowerMgmtC;
+ HelloM.IFlash -> InternalFlashC;
#endif
***************
*** 73,77 ****
#endif
- HelloM.IFlash -> InternalFlashC;
HelloM.MA_Group -> MgmtAttrsC.MgmtAttr[unique("MgmtAttr")];
--- 72,75 ----
Index: HelloM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/Hello/HelloM.nc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** HelloM.nc 7 Sep 2004 22:15:39 -0000 1.26
--- HelloM.nc 14 Sep 2004 22:05:41 -0000 1.27
***************
*** 31,34 ****
--- 31,35 ----
#ifndef PLATFORM_PC
command result_t setPowerMode(uint8_t mode);
+ interface InternalFlash as IFlash;
#endif
***************
*** 42,47 ****
interface StdControl as SNMSControl;
-
- interface InternalFlash as IFlash;
}
}
--- 43,46 ----
***************
*** 53,58 ****
--- 52,59 ----
void sleepMode();
void hibernateMode();
+ void pingDone();
enum {
+ PING_NONE,
PING_LOCAL,
PING_TREE,
***************
*** 72,77 ****
uint8_t blinkCount = 0;
- uint8_t reqId = 0;
-
uint8_t *hardwareIdBuf;
uint8_t mode;
--- 73,76 ----
***************
*** 80,83 ****
--- 79,83 ----
bool queryBusy = FALSE;
bool sticky = FALSE;
+ bool sound = FALSE;
NamingMsg namingMsgCache;
***************
*** 116,119 ****
--- 116,120 ----
bootCount++;
}
+
call IFlash.write((uint8_t*)IFLASH_HELLO_BOOTCOUNT_ADDR,
&bootCount, sizeof(bootCount));
***************
*** 136,141 ****
#endif
if ((resetHist & BL_RESET_LOG_ENTRY_MASK) != BL_NETPROG_RESET) {
!
// Begin startup sequence
blinkMode = BLINK_BOOTUP;
--- 137,143 ----
#endif
+ #ifdef PLATFORM_XSM
if ((resetHist & BL_RESET_LOG_ENTRY_MASK) != BL_NETPROG_RESET) {
! #endif
// Begin startup sequence
blinkMode = BLINK_BOOTUP;
***************
*** 148,152 ****
call Sounder.setInterval(7372800UL/(2*4000));
#endif
!
} else {
blinkMode = BLINK_BOOTUP;
--- 150,155 ----
call Sounder.setInterval(7372800UL/(2*4000));
#endif
!
! #ifdef PLATFORM_XSM
} else {
blinkMode = BLINK_BOOTUP;
***************
*** 154,157 ****
--- 157,161 ----
call BlinkTimer.start(TIMER_ONE_SHOT, 256);
}
+ #endif
return SUCCESS;
***************
*** 211,215 ****
case BLINK_BOOTED:
! startHelloMsg();
break;
}
--- 215,231 ----
case BLINK_BOOTED:
! if (sound) {
! #if defined(BOARD_MICASB)
! call Sounder.start();
! #elif defined(BOARD_XSM)
! call Sounder.setInterval(7372800UL/(2*4000));
! call Sounder.Beep(0xffff);
! #endif
! }
! if (mode == PING_LOCAL) {
! startHelloMsg();
! } else {
! pingDone();
! }
break;
}
***************
*** 240,244 ****
helloMsg->unixTime = IDENT_UNIX_TIME;
helloMsg->sourceAddr = TOS_LOCAL_ADDRESS;
- helloMsg->reqId = reqId;
if (!call SendMsg.send(TOS_BCAST_ADDR, sizeof(HelloMsg), &msgBuf)) {
--- 256,259 ----
***************
*** 270,288 ****
} else if (blinkMode == BLINK_BOOTED) {
!
! if (sticky) {
! call BlinkTimer.start(TIMER_ONE_SHOT, 2048);
! } else {
! call Leds.redOff();
#if defined(BOARD_MICASB)
! call Sounder.stop();
#elif defined(BOARD_XSM)
! call Sounder.Off();
#endif
- }
- }
}
- return SUCCESS;
}
--- 285,306 ----
} else if (blinkMode == BLINK_BOOTED) {
! pingDone();
! }
! }
! return SUCCESS;
! }
! void pingDone() {
! if (sticky) {
! call BlinkTimer.start(TIMER_ONE_SHOT, 2048);
!
! } else {
! call Leds.redOff();
#if defined(BOARD_MICASB)
! call Sounder.stop();
#elif defined(BOARD_XSM)
! call Sounder.Off();
#endif
}
}
***************
*** 295,301 ****
if (blinkCount == 0) {
- reqId = helloReqMsg->reqId;
-
call Leds.redOn();
call BlinkTimer.start(TIMER_ONE_SHOT,
call Random.rand() % 4096);
--- 313,318 ----
if (blinkCount == 0) {
call Leds.redOn();
+ mode = PING_LOCAL;
call BlinkTimer.start(TIMER_ONE_SHOT,
call Random.rand() % 4096);
***************
*** 317,342 ****
if (!call Naming.isEndpoint(namingMsg))
return msg;
!
! if (cmdMsg->light)
call Leds.redOn();
if (cmdMsg->sound) {
! #if defined(BOARD_MICASB)
! call Sounder.start();
! #elif defined(BOARD_XSM)
! call Sounder.setInterval(7372800UL/(2*4000));
! call Sounder.Beep(0xffff);
! #endif
}
! if (cmdMsg->local)
! mode = PING_LOCAL;
! if (cmdMsg->sticky)
sticky = TRUE;
if (blinkCount == 0) {
! call BlinkTimer.start(TIMER_ONE_SHOT,
! call Random.rand() % 2048 + 2048);
}
--- 334,360 ----
if (!call Naming.isEndpoint(namingMsg))
return msg;
!
! sound = FALSE;
! mode = PING_NONE;
! sticky = FALSE;
!
! if (cmdMsg->light) {
call Leds.redOn();
+ }
if (cmdMsg->sound) {
! sound = TRUE;
}
! if (cmdMsg->local) {
! mode = PING_LOCAL;
! }
! if (cmdMsg->sticky) {
sticky = TRUE;
+ }
if (blinkCount == 0) {
! call BlinkTimer.start(TIMER_ONE_SHOT, call Random.rand() % 4096);
}
- Previous message: [Tinyos-beta-commits]
CVS: tinyos-1.x/beta/SystemCore/java/net/tinyos/hello
HelloMHPing.java, NONE, 1.1 Makefile, 1.3, 1.4
- Next message: [Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/MementoMori
AggressiveSendControl.nc, NONE, 1.1 AggressiveSendM.nc, NONE,
1.1 HeartBeatHandler.nc, NONE, 1.1 RollCallC.nc, 1.1,
1.2 RollCallM.nc, 1.1, 1.2 DFDTypes.h, 1.1,
NONE LocalConsensusHandler.nc, 1.1, NONE WatcherCoreC.nc, 1.1,
NONE WatcherCoreM.nc, 1.1, NONE WatcherState.nc, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-beta-commits
mailing list