From 1ed40ad4af53128228b93239be8f171f4e4e991a Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 25 七月 2024 15:27:42 +0800
Subject: [PATCH] 2024-07-25 朱宝民 完成8个报文查询结构(整点报、开关阀报、定时报、工作报)
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java
index 226b17f..2dd5d45 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java
@@ -130,10 +130,29 @@
try {
///////////////
//鍩烘湰閰嶇疆
+ ServerProperties.orgTag = this.conf.getSetAttrTxt(this.doc, "config.base", "orgTag", null, false, null) ;
+ if(ServerProperties.orgTag==null || ServerProperties.orgTag.trim().equals("")){
+ throw new Exception("鏈烘瀯tag涓嶈兘涓虹┖") ;
+ }
ServerProperties.isLowPower = conf.getSetAttrBoolean(doc, "config.base", "isLowPower", null, null) ;
if(ServerProperties.isLowPower == null){
ServerProperties.isLowPower = false ;
}
+
+ String onlyDealRtus = conf.getSetAttrTxt(doc, "config.base", "onlyDealRtus", null, true, null) ;
+ if(onlyDealRtus == null || onlyDealRtus.trim().equals("")){
+ ServerProperties.onlyDealRtusTest = false ;
+ }else{
+ onlyDealRtus = onlyDealRtus.replaceAll("锛�", ",") ;
+ onlyDealRtus = onlyDealRtus.replaceAll(" ", "") ;
+ ServerProperties.onlyDealRtus = onlyDealRtus.split(",") ;
+ if(ServerProperties.onlyDealRtus != null && ServerProperties.onlyDealRtus.length > 0){
+ ServerProperties.onlyDealRtusTest = true ;
+ }else{
+ ServerProperties.onlyDealRtusTest = false ;
+ }
+ }
+
//鍦ㄦ敮鎸佸閫氫俊鍗忚鏃讹紝鍙湁RTU涓婄嚎浜嗭紝鎵嶈兘璇嗗埆鍑鸿RTU瀹為檯鐢ㄧ殑閫氫俊鍗忚锛岃繘鑰岀敤姝ゅ崗璁В鏋愪笂琛屾暟鎹強鏋勯�犱笅琛屽懡浠ゃ��
//濡傛灉RTU鏈浘涓婄嚎锛堥�氫俊涓棿浠跺惎鍔ㄥ悗璇TU鏈浘涓婄嚎锛夛紝閭d箞鍦ㄥ悜瀹冨彂閫佷笅琛屽懡浠ゆ椂锛屼笉鑳藉垽鏂嚭鍏堕噰鐢ㄧ殑鍗忚锛屼篃涓嶈兘鏋勯�犲懡浠わ紝灏ゅ叾鏄綆鍔熻�楁儏鍐典笅锛屼笉涓婄嚎鏄甯哥幇璞°��
// 褰撳彧鏈変竴涓崗璁儏鍐典笅锛屽湪RTU鏈浘涓婄嚎鏃讹紝涔熻兘鐢ㄦ鍗忚鏋勯�犲懡浠ゅ苟缂撳瓨涓嬫潵锛屽挨鍏堕�傚悎浣庡姛鑰楁儏鍐点��
@@ -147,11 +166,11 @@
//閽堝涓�涓猂TU锛屼笅鍙戝懡浠ょ殑鏃堕棿闂撮殧
ServerProperties.commandSendInterval = conf.getSetAttrPlusInt(doc, "config.base", "commandSendInterval", null, 1, 40, null) * 1000L ;
//鍛戒护宸茬粡鍙戦�佽揪鏈�澶ф鏁帮紝浠嶆湭鏀跺埌鍛戒护缁撴灉锛岄渶瑕佸湪缂撳瓨缁х画绛夊緟锛屽叾绛夊緟鏈�澶ф椂闀�
- ServerProperties.cachWaitResultTimeout = conf.getSetAttrPlusInt(doc, "config.base", "cachWaitResultTimeout", null, 10, 60, null) * 1000L ;
+ ServerProperties.cachWaitResultTimeout = conf.getSetAttrPlusInt(doc, "config.base", "cachWaitResultTimeout", null, 10, 360, null) * 1000L ;
//涓嶅湪绾跨紦瀛樼殑鍛戒护鏈�澶х紦瀛樻椂闀�
ServerProperties.offLineCachTimeout = conf.getSetAttrPlusInt(doc, "config.base", "offLineCachTimeout", null, 15, 172800, null) * 1000L ;
//TCP涓婅鏁版嵁鏃跺埢缂撳瓨鏃堕暱锛屽綋杈惧埌鏃堕暱鏃讹紝TCP涓婅鏁版嵁鏃跺埢琚竻绌猴紝閲囩敤TCP涓婅鏁版嵁鏃跺埢鐩殑鏄紝闃绘涓婃暟鎹悓鏃朵笅鍙戞暟鎹紝鍥犱负RTU澶勭悊涓嶈繃鏉�
- ServerProperties.lastUpDataTimeLive = conf.getSetAttrPlusInt(doc, "config.base", "lastUpDataTimeLive", null, 0, 5, null) * 1000L ;
+ ServerProperties.lastUpDataTimeLive = conf.getSetAttrPlusInt(doc, "config.base", "lastUpDataTimeLive", null, 0, 5000, null) * 1L ;
//鏁版嵁搴撴暟鎹甶d鐢熸垚鍣ㄧ殑id鍚庣紑锛�0鏄粯璁ょ殑鍚庣紑锛屼竴鑸瑆eb绯荤粺搴旂敤锛屾暟鎹腑闂翠欢id鍚庣紑澶т簬绛変簬1
ServerProperties.dbDataIdSuffix = conf.getSetAttrInt(doc, "config.base", "dbDataIdSuffix", null, 0, 99, null);
//涓婁笅琛屾暟鎹紦瀛橀槦鍒椾腑缂撳瓨鏁版嵁涓暟鐨勬姤璀﹂噺锛岃繖涓笌鐜板疄椤圭洰鎵�鎺ユ按琛ㄦ暟鐩稿叧
@@ -161,13 +180,19 @@
if(ServerProperties.cacheUpDownDataMaxCount <= ServerProperties.cacheUpDownDataWarnCount){
throw new Exception("cacheUpDownDataMaxCount蹇呴』澶т簬cacheUpDownDataWarnCount") ;
}
- //娌℃湁涓婅鏁版嵁鐨勫垎閽熸暟锛岃揪鍒拌繖涓垎閽熸暟锛岃涓篟TU鏂綉浜嗭紝鍙栧�艰寖鍥存槸2_100
+ //娌℃湁涓婅鏁版嵁鐨勫垎閽熸暟锛岃揪鍒拌繖涓垎閽熸暟锛岃涓篟TU鏂綉浜嗭紝鍙栧�艰寖鍥存槸2-100
ServerProperties.disconnectedByNoUpDataMinutes = 0L + conf.getSetAttrPlusInt(doc, "config.base", "disconnectedByNoUpDataMinutes", null, 1, 100, null) ;
if(ServerProperties.disconnectedByNoUpDataMinutes < 1 || ServerProperties.disconnectedByNoUpDataMinutes > 100){
throw new Exception("disconnectedByNoUpDataMinutes鍙栧�煎繀椤绘槸1~100") ;
}
ServerProperties.disconnectedByNoUpDataMinutes = ServerProperties.disconnectedByNoUpDataMinutes * 60 * 1000 ;
+ //宸ヤ綔鎶ュお棰戠箒锛孨娆′笂鎶ュ鐞�1娆★紝鍙栧�艰寖鍥存槸1-100
+ ServerProperties.workReportDealOneByTimes = conf.getSetAttrPlusInt(doc, "config.base", "workReportDealOneByTimes", null, 1, 100, null) ;
+ if(ServerProperties.workReportDealOneByTimes < 1 || ServerProperties.workReportDealOneByTimes > 100){
+ throw new Exception("workReportDealOneByTimes鍙栧�煎繀椤绘槸1~100") ;
+ }
+
//璁剧疆ID鐢熸垚鍣ㄧ殑鍚庣紑
IDLongGenerator.setSuffix(ServerProperties.dbDataIdSuffix.intValue());
--
Gitblit v1.8.0