}
Frame staticFrame = staticFPGA.getFrame(far);
Frame partialFrame = partialFPGA.getFrame(far);
FrameData fullData = fullFrame.getData();
FrameData staticData = staticFrame.getData();
FrameData partialData = partialFrame.getData();
if (staticFrame.isConfigured() && partialFrame.isConfigured()) {
// Both static and partial frames configured
if (fullData.isEqual(staticData)) {
if (fullData.isEqual(partialData)) {
// TODO: All equal: could probably remove the partial frame (future)
if (verbose)
System.out.println(far.getHexAddress()+" Static, full, and partial all equal");
} else {
// full and static equal, partial not equal
System.out.println("Full and static equal, partial not equal:"+far.getHexAddress());
if (printData) {
System.out.println("Full Data\n"+fullData);
System.out.println("Static Data\n"+staticData);
System.out.println("Partial Data\n"+partialData);
}
}
} else {
// full is not equal to static
if (fullData.isEqual(partialData)) {
// This is OK. Don't need to do anything here.
if (staticData.isEmpty())
System.out.println(far.getHexAddress() + " Full and partial equal, static empty");
else
System.out.println(far.getHexAddress() + " Full and partial equal, static not equal and not empty");
if (printData) {
System.out.println("Full Data\n"+fullData);
System.out.println("Static Data\n"+staticData);
System.out.println("Partial Data\n"+partialData);
}
} else {
// Full data is NOT equal to partial data
if (staticData.isEqual(partialData)) {
System.out.println("*** Full not equal but static and partial equal:"+far.getHexAddress());
} else {
System.out.println("*** All three not equal:"+far.getHexAddress());
}
}
}
} else if (staticFrame.isConfigured()) {
// static frame is configured and partial frame is NOT configured
if (fullData.isEqual(staticData)) {
if (verbose)
System.out.println(far.getHexAddress()+" Static and full Equal (partial not configured)");
} else {
if (!fullData.isEmpty()) {
// full has data
if (!staticData.isEmpty()) {
// Full and static have data
System.out.println(far.getHexAddress()+" * Full and static NOT equal (partial not configured)");
if (printData) {
System.out.println("Full Data\n"+fullData);
System.out.println("Static Data\n"+staticData);
}
} else {
// full has data , static is empty
System.out.println(far.getHexAddress()+" * Full has data, static is empty (partial not configured)");
}
} else {
// full does not have data
System.out.println(far.getHexAddress()+" * Full empty and static NOT equal (partial not configured)");
}
if (!patchPartial) {
staticData.setData(fullData);
staticChanged = true;
} else {
partialData.setData(fullData);
partialChanged = true;
}
}
} else if (partialFrame.isConfigured()) {
// partial frame is configured, static frame is NOT configured