Got lots of questions but initially how do I use chunkUpdate? I don't understand where to get the data from to pass to it. Is something happening when I call gecko.Dump for me to tap into and read?
chunkUpdate is used like a button event or so.. you click the button and the click event gets fired. During dumping the chunkUpdate event is fired to keep you up to date how far the dump has processed.
You create a function called:
void update(UInt32 currentchunk, UInt32 allchunks, UInt32 transferred, UInt32 length, bool fail);
then you connect that function to your USBGecko object.
gecko.chunkUpdate = update;
Now whenever the USBGecko receives new data it will fire the update function.
The parameters are as follows:
currentChunk = a dump or upload is seperated into packets (chunks). This is the number of the package it just transferred!
allchunks = how many packets are to be expected
transferred = how many bytes have already been transferred
length = How many bytes are gonna be transferred totally
fail = False if the last attempted package it tried to transfer failed - after 3 fails it will give up (WiiRd for example shows a / on the console when a package transfer fails..)
= True if the last attempted package transferred correctly (WiiRd shows a . )