From 66160634b3f6ee11af600cc17ef477aed657d28e Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期四, 18 七月 2024 16:47:44 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/tasks/RtuUpTask.java | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/tasks/RtuUpTask.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/tasks/RtuUpTask.java index 167f7d7..bedf45e 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/tasks/RtuUpTask.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/tasks/RtuUpTask.java @@ -78,18 +78,33 @@ } } } - if(rtuAddr != null){ - if(protocolName == null){ - protocolName = TcpSessionCache.getTcpProtocolName(rtuAddr) ; + boolean toDeal = true ; + if(ServerProperties.onlyDealRtusTest){ + boolean find = false ; + for(String testRtu : ServerProperties.onlyDealRtus){ + if(testRtu.equals(rtuAddr)){ + find = true ; + break ; + } + } + if(!find){ + //涓嶅湪澶勭悊鑼冨洿鍐� + toDeal = false ; + } } - - //璁剧疆鏀跺埌鏁版嵁鏃跺埢 - TcpSessionCache.cacheUpDataTime(rtuAddr); - - if(protocolName != null){ - //瀵逛笂琛屾暟鎹繘琛屽鐞� - this.dealUpData(session, rtuAddr, protocolName, isOnLine, upBuf, upHex) ; + if(toDeal){ + if(protocolName == null){ + protocolName = TcpSessionCache.getTcpProtocolName(rtuAddr) ; + } + + //璁剧疆鏀跺埌鏁版嵁鏃跺埢 + TcpSessionCache.cacheUpDataTime(rtuAddr); + + if(protocolName != null){ + //瀵逛笂琛屾暟鎹繘琛屽鐞� + this.dealUpData(session, rtuAddr, protocolName, isOnLine, upBuf, upHex) ; + } } } } -- Gitblit v1.8.0