Package org.km3net.clb.remote
Class FWUpdate
- java.lang.Object
-
- org.km3net.clb.remote.FWUpdate
-
public class FWUpdate extends java.lang.Object
Facilitates remote update of nodes. Currently this is only for single nodes, but will in the future be used to support broadcasted network wide updates. The FW update tool actually writes images in reverse order. It does this as a safety feature. First it clears the first block of the image. This will prevent the FPGA from recognizing the image. Then it will write the blocks in reversed order, e.g. it will start writing the last block first and continue downward until it writes the first page. This scheme will ensure that the image will not be recognized by the FPGA until it has been completely written. If power fails during writing, the FPGA will simply not load this image, and proceed to an image which is runnable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FWUpdate.FWUpdateListener
-
Constructor Summary
Constructors Constructor Description FWUpdate(Control ctrl, byte[] data, int imgIdx, FWUpdate.FWUpdateListener lst)
FWUpdate(Control ctrl, java.io.File binFile, int imgIdx, FWUpdate.FWUpdateListener lst)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
start(boolean verify)
static void
updateImage(Control ctrl, java.io.File bitFile, int imgIdx, FWUpdate.FWUpdateListener lst)
static void
verifyImage(Control ctrl, java.io.File bitFile, int imgIdx, FWUpdate.FWUpdateListener lst)
-
-
-
Constructor Detail
-
FWUpdate
public FWUpdate(Control ctrl, java.io.File binFile, int imgIdx, FWUpdate.FWUpdateListener lst) throws java.io.IOException
- Throws:
java.io.IOException
-
FWUpdate
public FWUpdate(Control ctrl, byte[] data, int imgIdx, FWUpdate.FWUpdateListener lst)
-
-
Method Detail
-
start
public void start(boolean verify) throws java.io.IOException, CommandException
- Throws:
java.io.IOException
CommandException
-
updateImage
public static void updateImage(Control ctrl, java.io.File bitFile, int imgIdx, FWUpdate.FWUpdateListener lst) throws java.io.IOException, CommandException
- Throws:
java.io.IOException
CommandException
-
verifyImage
public static void verifyImage(Control ctrl, java.io.File bitFile, int imgIdx, FWUpdate.FWUpdateListener lst) throws java.io.IOException, CommandException
- Throws:
java.io.IOException
CommandException
-
-