[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Deluge/Deluge
DelugeMetadata.h, 1.2, 1.3 DelugeMetadataM.nc, 1.5, 1.6
Jonathan Hui
jwhui at users.sourceforge.net
Tue Jan 18 12:49:50 PST 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5461
Modified Files:
DelugeMetadata.h DelugeMetadataM.nc
Log Message:
- Grabs the number of Deluge images the node supports directly from
the node rather than grabbing the constant from ncg.
Index: DelugeMetadata.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMetadata.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DelugeMetadata.h 26 Nov 2004 18:59:10 -0000 1.2
--- DelugeMetadata.h 18 Jan 2005 20:49:16 -0000 1.3
***************
*** 51,55 ****
uint16_t crc; // crc for vNum and numPgs
uint8_t numPgsComplete; // numPgsComplete in image
! uint8_t dummy; // make data structure word aligned
} DelugeImgDesc;
--- 51,55 ----
uint16_t crc; // crc for vNum and numPgs
uint8_t numPgsComplete; // numPgsComplete in image
! uint8_t numImages; // number of images supported
} DelugeImgDesc;
Index: DelugeMetadataM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/DelugeMetadataM.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DelugeMetadataM.nc 3 Jan 2005 17:34:54 -0000 1.5
--- DelugeMetadataM.nc 18 Jan 2005 20:49:28 -0000 1.6
***************
*** 104,107 ****
--- 104,108 ----
imgDesc[0].numPgs = 5;
imgDesc[0].numPgsComplete = 5;
+ imgDesc[0].numImages = DELUGE_NUM_IMAGES;
}
#endif
***************
*** 217,220 ****
--- 218,226 ----
imgDesc[curImage].numPgsComplete++;
+ if (imgDesc[curImage].numPgsComplete == imgDesc[curImage].numPgs) {
+ state = S_READ_IMG_DESC;
+ return readNextMetadata();
+ }
+
if (call DataRead.verify(curImage, imgDesc[curImage].numPgsComplete) == FAIL)
post retry();
***************
*** 254,258 ****
if (state != S_IDLE
|| newImgDesc->imgNum >= DELUGE_NUM_IMAGES)
! return FALSE;
client = id;
--- 260,264 ----
if (state != S_IDLE
|| newImgDesc->imgNum >= DELUGE_NUM_IMAGES)
! return FAIL;
client = id;
***************
*** 261,264 ****
--- 267,271 ----
if (imgNum != DELUGE_FACTORY_IMAGE_NUM)
imgDesc[imgNum].numPgsComplete = 0;
+ imgDesc[imgNum].numImages = DELUGE_NUM_IMAGES;
state = S_SETUP_NEW_IMAGE;
***************
*** 317,320 ****
--- 324,328 ----
imgDesc[curImage].crc = 0;
imgDesc[curImage].numPgsComplete = 0;
+ imgDesc[curImage].numImages = DELUGE_NUM_IMAGES;
return readNextMetadata();
}
More information about the Tinyos-beta-commits
mailing list