Browse Source

Pass parameter to ignore feedbacks

Baglio Tabifata 5 years ago
parent
commit
2c93a61020

+ 8 - 3
src/main/java/info/hkzlab/dupal/analyzer/App.java

@@ -17,6 +17,7 @@ public class App {
     private static String serialDevice = null;
     private static String serialDevice = null;
     private static PALSpecs pspecs = null;
     private static PALSpecs pspecs = null;
     private static int outMask = -1;
     private static int outMask = -1;
+    private static boolean ignoreFeedbacks = false;
     private static String outFile = null;
     private static String outFile = null;
 
 
     public static void main(String[] args) throws Exception {
     public static void main(String[] args) throws Exception {
@@ -30,7 +31,7 @@ public class App {
             }
             }
 
 
             logger.error("Wrong number of arguments passed.\n"
             logger.error("Wrong number of arguments passed.\n"
-                    + "dupal_analyzer <serial_port> <pal_type> <output_file> [hex_output_mask]\n"
+                    + "dupal_analyzer <serial_port> <pal_type> <output_file> [Y|N] [hex_output_mask]\n"
                     + "Where <pal_type> can be:\n" + supportedPALs.toString() + "\n");
                     + "Where <pal_type> can be:\n" + supportedPALs.toString() + "\n");
 
 
             return;
             return;
@@ -54,7 +55,7 @@ public class App {
             }
             }
         });
         });
 
 
-        dpan.startAnalisys();
+        dpan.startAnalisys(ignoreFeedbacks);
     }
     }
 
 
     private static void parseArgs(String[] args) {
     private static void parseArgs(String[] args) {
@@ -72,7 +73,11 @@ public class App {
         outFile = args[2];
         outFile = args[2];
 
 
         if(args.length >= 4) {
         if(args.length >= 4) {
-            outMask = Integer.parseInt(args[3], 16);
+            ignoreFeedbacks = args[3].equalsIgnoreCase("Y");
+        }
+
+        if(args.length >= 5) {
+            outMask = Integer.parseInt(args[4], 16);
         }
         }
     }
     }
 }
 }

+ 6 - 2
src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALAnalyzer.java

@@ -73,6 +73,10 @@ public class DuPALAnalyzer {
     }
     }
 
 
     public void startAnalisys() throws Exception {
     public void startAnalisys() throws Exception {
+        startAnalisys(false);
+    }
+
+    public void startAnalisys(boolean ignoreFeedbacks) throws Exception {
         int board_revision = dpci.getBoardVersion();
         int board_revision = dpci.getBoardVersion();
         DuPALCmdInterface.DuPAL_LED led;
         DuPALCmdInterface.DuPAL_LED led;
         
         
@@ -108,8 +112,8 @@ public class DuPALAnalyzer {
                 }
                 }
                 
                 
                 OutState[] osArray = OSExplorer.exploreOutStates(dpci, ioAsOutMask);
                 OutState[] osArray = OSExplorer.exploreOutStates(dpci, ioAsOutMask);
-                header = EspressoFormatter.formatEspressoTableHeader(dpci.palSpecs, ioAsOutMask);
-                table = EspressoFormatter.formatEspressoTable(dpci.palSpecs, ioAsOutMask, osArray);
+                header = EspressoFormatter.formatEspressoTableHeader(dpci.palSpecs, ioAsOutMask, ignoreFeedbacks);
+                table = EspressoFormatter.formatEspressoTable(dpci.palSpecs, ioAsOutMask, osArray, ignoreFeedbacks);
 
 
                 logger.info("Got " + osArray.length + " output states!");
                 logger.info("Got " + osArray.length + " output states!");
             }
             }