From fbf006ebb7b755700ba6572d6b8bce11862ee7e3 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 20 九月 2024 10:23:13 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/DataDecoder.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/DataDecoder.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/DataDecoder.java
index 28720a5..981d847 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/DataDecoder.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/DataDecoder.java
@@ -28,15 +28,15 @@
* org.apache.mina.filter.codec.ProtocolDecoderOutput)
*/
protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) {
- String meterNo = (String)session.getAttribute(TcpIoSessionAttrIdIsRtuAddr.sessionArrIdKey) ;
- if(meterNo == null){
+ String rtuAddr = (String)session.getAttribute(TcpIoSessionAttrIdIsRtuAddr.sessionArrIdKey) ;
+ if(rtuAddr == null){
//浼氳瘽鏈绠$悊
//浼氳瘽绠$悊鍣ㄤ腑涓嶅瓨鍦ㄦ浼氳瘽锛岃鏄庡垰寤虹珛缃戠粶杩炴帴锛�
return this.doDecode_onLineData(session, in, out) ;
}else{
//浼氳瘽宸茶绠$悊
//浼氳瘽绠$悊鍣ㄤ腑瀛樺湪姝や細璇濓紝璇存槑宸茬粡涓婄嚎浜嗭紝
- return this.doDecode_data(session, in, out, meterNo) ;
+ return this.doDecode_data(session, in, out, rtuAddr) ;
}
}
@@ -73,16 +73,16 @@
* @param session IO浼氳瘽
* @param in 杈撳叆Buffer
* @param out 鍗忚杈撳嚭缂栫爜
- * @param meterNo 鎺у埗鍣ㄧ紪鍙�
+ * @param rtuAddr 鎺у埗鍣ㄥ湴鍧�
* @return 鏄惁姝eソ鎴栫矘鍖�
*/
@SuppressWarnings("unused")
- private boolean doDecode_data(IoSession session, IoBuffer in, ProtocolDecoderOutput out, String meterNo) {
+ private boolean doDecode_data(IoSession session, IoBuffer in, ProtocolDecoderOutput out, String rtuAddr) {
//闈炰笂绾挎暟鎹紝鍙兘浼氬嚭鐜版柇鍖呮垨绮樺寘鐜拌薄
PrefixedDataAvailableStatus dataStatus = this.pdaHandle.forUpData(in) ;
if(dataStatus == null){
//涓嶅彲鑳藉彂鐢�
- log.error("涓ラ噸閿欒锛孯tu (姘磋〃鍙蜂负" + meterNo + ")涓婅鏁版嵁瀹屾暣鎬ф鏌ユ椂锛岃繑鍥炵殑瀵硅薄涓虹┖銆�") ;
+ log.error("涓ラ噸閿欒锛孯tu (RTU" + rtuAddr + ")涓婅鏁版嵁瀹屾暣鎬ф鏌ユ椂锛岃繑鍥炵殑瀵硅薄涓虹┖銆�") ;
this.nextDeal(in, null, out) ;
return true;
}else{
@@ -90,11 +90,11 @@
//鏂寘浜�
return false ;
}else if(dataStatus.isCompleted() || dataStatus.isAdjoined()){
- //鏈寘鏁版嵁宸茬粡鍏ㄩ儴鎺ユ敹锛屽苟涓斿彲鑳界矘鏈変笅鍖呮暟鎹�
+ //鏈寘鏁版嵁宸茬粡鍏ㄩ儴鎺ユ敹锛屾垨鍙兘绮樻湁涓嬪寘鏁版嵁
this.nextDeal(in, dataStatus.getDataLen(), out) ;
if(dataStatus.isAdjoined()){
//璇存槑绮樺寘浜嗭紝杩樻湁鏁版嵁锛岄渶瑕佸杩欎簺鏁版嵁鍐嶆鎵цdoDecode_鏂规硶.
- return this.doDecode_data(session, in, out, meterNo) ;//鍔犱笂閫掑綊
+ return this.doDecode_data(session, in, out, rtuAddr) ;//鍔犱笂閫掑綊
}else if(dataStatus.isCompleted()){
//鏁版嵁涓嶆柇涓嶇矘
return true;
--
Gitblit v1.8.0