Pārlūkot izejas kodu

Begin filling in analyzer

Baglio Tabifata 4 gadi atpakaļ
vecāks
revīzija
cd70df885b

+ 7 - 3
src/net/hkzlab/dupal/App.java

@@ -1,13 +1,17 @@
 package net.hkzlab.dupal;
 
+import net.hkzlab.devices.PAL16R6Specs;
+import net.hkzlab.devices.PALSpecs;
+import net.hkzlab.dupal.boardio.DuPALAnalyzer;
 import net.hkzlab.dupal.boardio.DuPALManager;
-import net.hkzlab.dupal.dupalproto.DuPALProto;
-import net.hkzlab.palanalisys.MacroState;
-import net.hkzlab.palanalisys.SubState;
 
 public class App {
     public static void main(String[] args) throws Exception {
         DuPALManager dpm = new DuPALManager("/dev/ttyUSB0");
+        PALSpecs pspecs = new PAL16R6Specs();
+        DuPALAnalyzer dpan = new DuPALAnalyzer(dpm, pspecs);
+
+        dpan.startAnalisys();
 
         /*
         try {

+ 10 - 1
src/net/hkzlab/dupal/boardio/DuPALAnalyzer.java

@@ -1,8 +1,13 @@
 package net.hkzlab.dupal.boardio;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import net.hkzlab.devices.PALSpecs;
 
 public class DuPALAnalyzer {
+    private final Logger logger = LoggerFactory.getLogger(DuPALAnalyzer.class);
+
     private final DuPALManager dpm;
     private final PALSpecs pspecs;
     private int IOasOUT_Mask = -1;
@@ -19,10 +24,14 @@ public class DuPALAnalyzer {
 
     public void startAnalisys() {
         if(IOasOUT_Mask < 0) { // We need to detect the status of the IOs...
-            // TODO: Try to guess whether IOs are Inputs or Outputs
+            guessIOs(); // TODO: Try to guess whether IOs are Inputs or Outputs
         }
 
         // TODO: Actually perform the analisys
 
     }
+
+    private void guessIOs() {
+
+    }
 }