From c9b14e19a87cbd27e7e8b56bf35726e3760fded4 Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期日, 21 五月 2023 15:00:27 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/ServerBootstrap.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index 8a4ec27..817c710 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -28,7 +28,10 @@
     @Autowired
     private MainProcess mainProcess;
 
-
+    /**
+     * PostConstruct浼氬湪鍔犺浇servlet鐨勬椂鍊欒繍琛屼竴娆�
+     * @throws InterruptedException
+     */
     @PostConstruct
     @Async
     public void init() throws InterruptedException {
@@ -74,7 +77,7 @@
         // 鍒濆鍖栧爢鍨涙満绾跨▼
         log.info("鍒濆鍖栧爢鍨涙満绾跨▼...................................................");
         for (CrnSlave crn : slaveProperties.getCrn()) {
-            CrnThread crnThread = new MelsecCrnThread(crn);
+            CrnThread crnThread = new SiemensCrnThread(crn);
             new Thread((Runnable) crnThread).start();
             SlaveConnection.put(SlaveType.Crn, crn.getId(), crnThread);
         }
@@ -92,6 +95,14 @@
             new Thread(barcodeThread).start();
             SlaveConnection.put(SlaveType.Barcode, barcode.getId(), barcodeThread);
         }
+//        for (Slave barcode : slaveProperties.getBarcode()) {
+//            BarcodeThread barcodeThread = new BarcodeThread(barcode);
+//            if(barcode.getId() > 6)
+//            {//1鍒�6鍙锋壂鐮佸櫒鏁版嵁浠嶱LC涓幏鍙栵紝鏃犻渶start
+//                new Thread(barcodeThread).start();
+//            }
+//            SlaveConnection.put(SlaveType.Barcode, barcode.getId(), barcodeThread);
+//        }
         // 鍒濆鍖朙ED绾跨▼
         log.info("鍒濆鍖朙ED绾跨▼...................................................");
         for (LedSlave led : slaveProperties.getLed()) {

--
Gitblit v1.9.1