浏览代码

Take out the DPCI generation from the dupal analyzer

Baglio Tabifata 5 年之前
父节点
当前提交
54b3ab7c65

+ 4 - 1
src/main/java/info/hkzlab/dupal/analyzer/App.java

@@ -39,13 +39,16 @@ public class App {
         parseArgs(args);
 
         DuPALManager dpm = new DuPALManager(serialDevice);
-        DuPALAnalyzer dpan = new DuPALAnalyzer(dpm, pspecs, outMask, outDir);
+        DuPALCmdInterface dpci = new DuPALCmdInterface(dpm, pspecs);
+        DuPALAnalyzer dpan = new DuPALAnalyzer(dpci, outMask, outDir);
 
         if (!dpm.enterRemoteMode()) {
             System.out.println("Unable to put DuPAL board in REMOTE MODE!");
             System.exit(-1);
         } 
 
+        
+
         dpan.startAnalisys();
     }
 

+ 4 - 5
src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALAnalyzer.java

@@ -3,7 +3,6 @@ package info.hkzlab.dupal.analyzer.board.boardio;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import info.hkzlab.dupal.analyzer.devices.*;
 import info.hkzlab.dupal.analyzer.exceptions.*;
 import info.hkzlab.dupal.analyzer.palanalisys.explorers.OSExplorer;
 import info.hkzlab.dupal.analyzer.palanalisys.graph.OutState;
@@ -24,8 +23,8 @@ public class DuPALAnalyzer {
     private final DuPALCmdInterface dpci;
     private int ioAsOutMask;
     
-    public DuPALAnalyzer(final DuPALManager dpm, final PALSpecs palSpecs, int ioAsOutMask, final String outPath) {
-        this.dpci = new DuPALCmdInterface(dpm, palSpecs);
+    public DuPALAnalyzer(final DuPALCmdInterface dpci, int ioAsOutMask, final String outPath) {
+        this.dpci = dpci;
         this.ioAsOutMask = ioAsOutMask;
 
         //serdump_path = outPath + File.separator+ SERIALIZED_DUMP;
@@ -72,8 +71,8 @@ public class DuPALAnalyzer {
         return ioAsOutMask;
     }
     
-    public DuPALAnalyzer(final DuPALManager dpm, final PALSpecs palSpecs) {
-        this(dpm, palSpecs, -1, null);
+    public DuPALAnalyzer(final DuPALCmdInterface dpci) {
+        this(dpci, -1, null);
     }
 
     public void startAnalisys() throws InvalidIOPinStateException, ICStateException, DuPALBoardException,