From 70aeac289c132085e91d59dc82bc1facd41889fa Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 24 二月 2025 15:33:53 +0800
Subject: [PATCH] 有关表阀一体机(王江海制定)通信协议: 1、根据新版本协议,解析部分更新; 2、根据测试一体阀协议数据处理需求与逻辑,进行表阀一体机数据处理。

---
 pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/TcpClUnit.java |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/TcpClUnit.java b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/TcpClUnit.java
index 8db9ab8..4537b10 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/TcpClUnit.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-client/src/main/java/com/dy/testClient/tcpClient/TcpClUnit.java
@@ -2,7 +2,7 @@
 
 import com.dy.common.mw.UnitAdapterInterface;
 import com.dy.common.mw.UnitInterface;
-import com.dy.common.mw.UnitStartedCallbackInterface;
+import com.dy.common.mw.UnitCallbackInterface;
 import com.dy.common.threadPool.ThreadPool;
 import com.dy.common.threadPool.TreadPoolFactory;
 import com.dy.common.util.Callback;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public void start(UnitStartedCallbackInterface callback) throws Exception {
+    public void start(UnitCallbackInterface callback) throws Exception {
         pool = TreadPoolFactory.getThreadPoolLong() ;
         System.out.println("Tcp Client妯″潡鎴愬姛鍚姩");
         this.doStart();
@@ -61,7 +61,7 @@
     }
 
     @Override
-    public void stop(UnitStartedCallbackInterface callback) throws Exception {
+    public void stop(UnitCallbackInterface callback) throws Exception {
         callback.call(null);
     }
 
@@ -71,7 +71,7 @@
             public void run() {
                 try {
                     while(true){
-                        if(!ServerProperties.startWork){
+                        if(!ServerProperties.startTcpConnectWork){
                             Thread.sleep(100L);
                         }else{
                             try{
@@ -101,7 +101,14 @@
                                     }
                                 }
 
-                                startJob() ;
+                                while (true){
+                                    if(!ServerProperties.startRtuReportWork){
+                                        Thread.sleep(100L);
+                                    }else{
+                                        startJob() ;
+                                        break ;
+                                    }
+                                }
 
                                 while(true){
                                     if(totalOverClientCount.longValue() >= totalRtuClientCount.longValue()){
@@ -210,16 +217,16 @@
         totalSendDataCount++;
         if(totalOverClientCount.longValue() >= totalRtuClientCount.longValue()){
             RmiClUnit.getInstance().reportHadReportCount(totalSendDataCount);
-            System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹�");
+            System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹紙蹇冭烦鍜屼笂鎶ワ級");
         }else{
             if(totalRtuClientCount > 100){
                 if(totalSendDataCount % 100 == 0){
                     RmiClUnit.getInstance().reportHadReportCount(totalSendDataCount);
-                    System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹�");
+                    System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹紙蹇冭烦鍜屼笂鎶ワ級");
                 }
             }else{
                 RmiClUnit.getInstance().reportHadReportCount(totalSendDataCount);
-                System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹�");
+                System.out.println("宸茬粡鍙戦��" + totalSendDataCount + "鏉℃暟鎹紙蹇冭烦鍜屼笂鎶ワ級");
             }
         }
     }

--
Gitblit v1.8.0