[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Deluge/Deluge DelugeM.nc, 1.24,
1.25 DelugeMsgs.h, 1.7, 1.8
Jonathan Hui
jwhui at users.sourceforge.net
Tue Jul 12 11:03:19 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11715
Modified Files:
DelugeM.nc DelugeMsgs.h
Log Message:
- Allow resetting of an image's version number.
Index: DelugeM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeM.nc,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** DelugeM.nc 11 Jul 2005 21:28:11 -0000 1.24
--- DelugeM.nc 12 Jul 2005 18:03:15 -0000 1.25
***************
*** 272,284 ****
curImgDesc = call Metadata.getImgDesc(imgNum);
! if (rxAdvMsg->type == DELUGE_ADV_PC) {
// adv message from PC
! if ((rxAdvMsg->nodeDesc.vNum == DELUGE_INVALID_VNUM
! && rxAdvMsg->nodeDesc.imgNum == DELUGE_INVALID_IMGNUM)
! || (cmpImgDesc->vNum == curImgDesc->vNum
! && cmpImgDesc->numPgsComplete == curImgDesc->numPgsComplete)) {
sendAdvMsg(imgNum, rxAdvMsg->sourceAddr);
return pMsg;
}
}
--- 272,287 ----
curImgDesc = call Metadata.getImgDesc(imgNum);
! if (rxAdvMsg->type != DELUGE_ADV_NORMAL) {
// adv message from PC
! if ( rxAdvMsg->type == DELUGE_ADV_PING
! || (cmpImgDesc->vNum == curImgDesc->vNum
! && cmpImgDesc->numPgsComplete == curImgDesc->numPgsComplete)) {
sendAdvMsg(imgNum, rxAdvMsg->sourceAddr);
return pMsg;
}
+ else if ( rxAdvMsg->type == DELUGE_ADV_RESET ) {
+ call Metadata.setupNewImage(&(rxAdvMsg->imgDesc));
+ return pMsg;
+ }
}
Index: DelugeMsgs.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMsgs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DelugeMsgs.h 29 Jun 2005 01:07:14 -0000 1.7
--- DelugeMsgs.h 12 Jul 2005 18:03:16 -0000 1.8
***************
*** 47,52 ****
enum {
DELUGE_ADV_NORMAL = 0,
! DELUGE_ADV_PC = 1,
! DELUGE_ADV_ERROR = 2,
};
--- 47,54 ----
enum {
DELUGE_ADV_NORMAL = 0,
! DELUGE_ADV_ERROR = 1,
! DELUGE_ADV_PC = 2,
! DELUGE_ADV_PING = 3,
! DELUGE_ADV_RESET = 4,
};
More information about the Tinyos-beta-commits
mailing list