[Tinyos-beta-commits]
CVS: tinyos-1.x/beta/Deluge/TestDeluge/GoldenImage
GoldenImageWriterM.nc, 1.1, 1.2
Jonathan Hui
jwhui at users.sourceforge.net
Fri Nov 26 10:59:13 PST 2004
Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/TestDeluge/GoldenImage
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19824/TestDeluge/GoldenImage
Modified Files:
GoldenImageWriterM.nc
Log Message:
- All features currently planned for Deluge 2.0 are now implemented.
- On startup, Deluge searches the flash for complete and partially
complete images. Any partially complete images will be recovered,
allowing the user to resume an injection.
- All CRC checks now implemented and enabled. CRC checks on: (i)
deluge metadata (e.g. version number, etc.), (ii) entire pages, and
(iii) the reboot command itself. All CRCs are generated by the PC
only, thus minimizing the chance that a misbehaving node will
propagate corrupt data.
- Auto-detection of TOSBase node. Eliminates the need of the '-t'
option at the command line (which is very easy to forget).
- Auto-detection of identical images. When a user tries to inject an
identical image, Deluge will resume the injection if the image is
incomplete, or notify the user that the image is already in the
network if it is already complete.
- Works well on 2 nodes: (i) both with Deluge, (ii) one TOSBase, one
Deluge.
Index: GoldenImageWriterM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/TestDeluge/GoldenImage/GoldenImageWriterM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GoldenImageWriterM.nc 22 Nov 2004 05:30:58 -0000 1.1
--- GoldenImageWriterM.nc 26 Nov 2004 18:59:11 -0000 1.2
***************
*** 154,157 ****
--- 154,161 ----
event result_t FlashWP.clrWPDone(result_t result) {
+
+ uint8_t* tmp = (uint8_t*)&imgDesc;
+ uint8_t i;
+
allDone = FALSE;
curBuf = 0;
***************
*** 161,164 ****
--- 165,172 ----
imgDesc.numPgs = 1;
imgDesc.crc = 0;
+
+ for ( i = 0; i < 4; i++ )
+ imgDesc.crc = crcByte(imgDesc.crc, tmp[i]);
+
imgDesc.numPgsComplete = 1;
if (call Metadata.setupNewImage(&imgDesc) == FAIL)
***************
*** 226,228 ****
--- 234,238 ----
}
+ event result_t Metadata.receivedPageDone(result_t result) { return SUCCESS; }
+
}
More information about the Tinyos-beta-commits
mailing list