From 400af57e240a4c0d74c81ffc8b3417226b51345a Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 06 六月 2024 08:19:13 +0800
Subject: [PATCH] 2024-06-06 朱宝民 生产环境版本
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
index 8143d3c..5ef3642 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
@@ -86,22 +86,24 @@
DataCdC0Vo cdData = new DataCdC0Vo() ;
dV1.subData = cdData ;
- boolean hasWaterAmount = false ;//鏄惁鏈夋祦閲忔暟鎹�
- boolean hasWaterPress = false ;//鏄惁鏈夋按鍘嬫暟鎹�
- boolean hasEleVolt = false ;//鏄惁鏈夌數鍘嬫暟鎹�
- boolean hasSignal = false ;//鏄惁鏈変俊鍙峰己搴︽暟鎹�
- boolean hasAlarmStatus = false ;//鏄惁鏈夋暟鎹�
+ boolean hasWaterAmount = true ;//鏄惁鏈夋祦閲忔暟鎹�
+ boolean hasWaterPress = true ;//鏄惁鏈夋按鍘嬫暟鎹�
+ boolean hasEleVolt = true ;//鏄惁鏈夌數鍘嬫暟鎹�
+ boolean hasSignal = true ;//鏄惁鏈変俊鍙峰己搴︽暟鎹�
+ boolean hasAlarmStatus = true ;//鏄惁鏈夋暟鎹�
short index = ProtocolConstantV206V1_0_0.dataIndex ;
byte tmpBt1 = bs[index] ;
index++ ;
+ /* RTU瀹炵幇涓�瀹氭湁娴侀噺鏁版嵁
if(((tmpBt1 & 4) >> 2) == 1){
hasWaterAmount = true ;
}
-
+ */
byte tmpBt2 = bs[index] ;
index++ ;
+ /*RTU瀹炵幇涓�瀹氭湁涓嬮潰鍚勯」鏁版嵁
if(((tmpBt2 & 0x10) >> 4) == 1){
hasAlarmStatus = true ;
}
@@ -114,7 +116,7 @@
if(((tmpBt2 & 0x80) >> 7) == 1){
hasSignal = true ;
}
-
+ */
if(hasWaterAmount){
//鐬椂娴侀噺锛�5瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~9999999.999锛屽崟浣嶄负m3/h銆�
cdData.instantAmount = 0.0D ;
@@ -187,7 +189,7 @@
cdData.waterPress += tpInt * 10000.0 ;
}
if(hasEleVolt){
- //鐢垫睜鐢靛帇锛�4瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
+ //鐢垫睜鐢靛帇锛�2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负V銆�
cdData.batteryVolt = 0.0D ;//钃勭數姹犵數鍘�
cdData.sunVolt = 0.0D ;//澶槼鑳界數鍘�
int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
@@ -219,6 +221,16 @@
cdData.stateVo = GlParse.parseState(bs, index) ;
index += 2 ;
}
+
+ //姘翠环锛�2瀛楄妭BCD鐮侊紝鍙栧�艰寖鍥�0~99.99锛屽崟浣嶄负鍏冦��
+ cdData.waterPrice = 0.0D ;//姘翠环
+ int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
+ index++ ;
+ cdData.waterPrice += tpInt/100.0 ;
+ tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ;
+ index++ ;
+ cdData.waterPrice += tpInt;
+
cdData.rtuDt = GlParse.parseTp(bs, index) ;
}
--
Gitblit v1.8.0