[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Deluge/Deluge DelugeM.nc, 1.21,
1.22 NetProgM.nc, 1.7, 1.8 NetProgMsgs.h, 1.2, 1.3
Jonathan Hui
jwhui at users.sourceforge.net
Mon Jun 27 11:01:16 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16732
Modified Files:
DelugeM.nc NetProgM.nc NetProgMsgs.h
Log Message:
Support for TOSSIM added.
Index: DelugeM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeM.nc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** DelugeM.nc 22 Jun 2005 22:38:08 -0000 1.21
--- DelugeM.nc 27 Jun 2005 18:01:11 -0000 1.22
***************
*** 4,8 ****
*
*
! * "Copyright (c) 2000-2004 The Regents of the University of California.
* All rights reserved.
*
--- 4,8 ----
*
*
! * "Copyright (c) 2000-2005 The Regents of the University of California.
* All rights reserved.
*
***************
*** 140,144 ****
--- 140,146 ----
result_t result;
state = S_DISABLED;
+ #ifndef PLATFORM_PC
call IFlash.read((uint16_t*)IFLASH_NODE_DESC_ADDR, &nodeDesc, sizeof(nodeDesc));
+ #endif
result = call Leds.init();
result = rcombine(call PageTransferControl.init(), result);
***************
*** 210,213 ****
--- 212,216 ----
pMsg->numImages = DELUGE_NUM_IMAGES;
if (call SendAdvMsg.send(addr, sizeof(DelugeAdvMsg), pMsgBuf) == SUCCESS) {
+ dbg(DBG_USR1, "DELUGE: Sent ADV_MSG(imgNum=%d)\n", imgDesc->imgNum);
call Leds.greenToggle();
call SharedMsgBuf.lock();
***************
*** 233,237 ****
--- 236,242 ----
if (rebootDelay > 0) {
if (!(--rebootDelay)) {
+ #ifndef PLATFORM_PC
call IFlash.write((uint16_t*)IFLASH_NODE_DESC_ADDR, &nodeDesc, sizeof(nodeDesc));
+ #endif
// will not return on SUCCESS
call NetProg.programImgAndReboot(nodeDesc.imgNum);
***************
*** 342,346 ****
event result_t SendAdvMsg.sendDone(TOS_MsgPtr pMsg, result_t result) {
- dbg(DBG_USR1, "send adv message\n");
call SharedMsgBuf.unlock();
return SUCCESS;
--- 347,350 ----
Index: NetProgM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/NetProgM.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** NetProgM.nc 17 May 2005 20:55:48 -0000 1.7
--- NetProgM.nc 27 Jun 2005 18:01:12 -0000 1.8
***************
*** 1,8 ****
// $Id$
! /* tab:4
*
*
! * "Copyright (c) 2000-2004 The Regents of the University of California.
* All rights reserved.
*
--- 1,8 ----
// $Id$
! /* tab:2
*
*
! * "Copyright (c) 2000-2005 The Regents of the University of California.
* All rights reserved.
*
***************
*** 68,73 ****
command result_t StdControl.init() {
- NetProg_TOSInfo tosInfo;
result_t result = call MetadataControl.init();
call IFlash.read((uint8_t*)IFLASH_TOS_INFO_ADDR, &tosInfo, sizeof(tosInfo));
--- 68,74 ----
command result_t StdControl.init() {
result_t result = call MetadataControl.init();
+ #ifndef PLATFORM_PC
+ NetProg_TOSInfo tosInfo;
call IFlash.read((uint8_t*)IFLASH_TOS_INFO_ADDR, &tosInfo, sizeof(tosInfo));
***************
*** 80,83 ****
--- 81,85 ----
writeTOSinfo();
}
+ #endif
return result;
***************
*** 144,148 ****
NetProgMsg* txMsg = (NetProgMsg*)pMsgBuf->data;
txMsg->sourceAddr = TOS_LOCAL_ADDRESS;
! txMsg->ident = G_Ident;
if (call SendMsg.send(rxMsg->sourceAddr, sizeof(NetProgMsg), pMsgBuf) == SUCCESS)
call SharedMsgBuf.lock();
--- 146,150 ----
NetProgMsg* txMsg = (NetProgMsg*)pMsgBuf->data;
txMsg->sourceAddr = TOS_LOCAL_ADDRESS;
! memcpy(&(txMsg->ident), &G_Ident, sizeof(G_Ident));
if (call SendMsg.send(rxMsg->sourceAddr, sizeof(NetProgMsg), pMsgBuf) == SUCCESS)
call SharedMsgBuf.lock();
Index: NetProgMsgs.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/NetProgMsgs.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NetProgMsgs.h 14 Jun 2005 14:40:40 -0000 1.2
--- NetProgMsgs.h 27 Jun 2005 18:01:13 -0000 1.3
***************
*** 4,8 ****
*
*
! * "Copyright (c) 2000-2004 The Regents of the University of California.
* All rights reserved.
*
--- 4,8 ----
*
*
! * "Copyright (c) 2000-2005 The Regents of the University of California.
* All rights reserved.
*
***************
*** 37,42 ****
typedef struct NetProgMsg {
- uint16_t sourceAddr;
Ident_t ident;
} NetProgMsg;
--- 37,42 ----
typedef struct NetProgMsg {
Ident_t ident;
+ uint16_t sourceAddr;
} NetProgMsg;
More information about the Tinyos-beta-commits
mailing list