From 7f5d914898c9d05942705ce7d80c0d14a8174df8 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 19 十二月 2023 15:57:14 +0800
Subject: [PATCH] 1、common模块优化代码; 2、通信中间件优化代码,队列遍历由递归调用改为while循环,原因是队列数据量大时递归调易产生栈溢出,HashTable多线程应用时仍有线程安全问题,改为HashMap+同步锁; 3、RTU模拟器和模拟器控制服务增加report命令
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
index 2a8a6e6..ea3fefd 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
@@ -9,7 +9,7 @@
@AnnotationDriver(name= ProtocolConstantV206V1_0_0.protocolName)
public class DriverV1_0_1 extends Driver {
- private static String scanRootPackage = "" ;
+ private static String scanRootPackage = "com.dy.common.mw.protocol.p206V1_0_0." ;
//鍦―river涓槸鍗曚緥锛岄殢Driver鐨勫崟渚嬪璞″湪鍗曠嚎绋嬩腑杩愯
private ParseParamsForUpV1_0_1 upCpParams ;
@@ -106,6 +106,7 @@
callback.callback(rtuAddr, upCode, upHex, reportOrResponse_trueOrFalse, isFail, rtuAddrInData);
}
}
+
/**
* 鏋勯�犱笅琛屾暟鎹紙鍛戒护锛�
* @param isLowPower 鏄惁鍦ㄤ綆鍔熻�楃幆澧冧笅杩愯
@@ -116,7 +117,7 @@
public MidResult[] createCommand(Boolean isLowPower, Command command, Object... params) {
String rtuAddr = command.getRtuAddr() ;
if(rtuAddr == null){
- return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑IMEI鍙蜂负绌猴紝涓嶈兘鏋勫缓浠讳綍鍛戒护锛�", null))} ;
+ return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑Rtu鍦板潃涓虹┖锛屼笉鑳芥瀯寤轰换浣曞懡浠わ紒", null))} ;
}
try {
String commandCode = command.getCode() ;
--
Gitblit v1.8.0