From 334282da528637bc6c0af3d1085ab3a65b435790 Mon Sep 17 00:00:00 2001 From: CZ Date: Mon, 29 Jul 2024 13:27:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4UPS=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Ups/Client/UpsClient.cs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Service/Ups/Client/UpsClient.cs b/Service/Ups/Client/UpsClient.cs index 6a20511..01506bd 100644 --- a/Service/Ups/Client/UpsClient.cs +++ b/Service/Ups/Client/UpsClient.cs @@ -24,26 +24,6 @@ public class UpsClient: ModbusTcpMaster //TODO::加解码方式 ByteSeq = EndingConst.ByteSeq.BA; WordSeq= EndingConst.WordSeq.CD; - - try - { - string hexString01 = "08FD08FD08F708F500000000000013891389138900640064006408FF08F908F70012001700111388138813880027001D003008B008AF08AE00020000000313871387138700000000000000000000000100000000000100000000000000080000000D00FA086908660000000000FA7FF803E8000000000E0E0E0F08AD08AD08AD0876087800000000000000000000000F08B008AF08AE08FD08F708F500040001"; - string hexString02 = "00010909090609030012001800111388138813880027001C00360E100E0F0869086508760874000000000000000008AD08AE08AD00020000000313881388138800000000000008B008AF08AE090A0908090500000000000100000000000100000000000000080000000D00000000000000000000000000000000000000080000000D0000000000000000000000000000000000200020000000000000FFFF000000000270000704C00100FFFF1BFF00807EFF00000001000183440A66000000000000014501AE015A014F014301660166016600000000000001AE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001003700050029000200370005"; - string hexString03 = "0001000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000030000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - - byte[] bytes01=Convert.FromHexString(hexString01); - byte[] bytes02=Convert.FromHexString(hexString02); - byte[] bytes03=Convert.FromHexString(hexString03); - - ModbusDecoder.Decode(bytes01, UpsMgr.UpsRemoteComm, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); - ModbusDecoder.Decode(bytes03, UpsMgr.UpsTelemetering, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); - - } - catch (Exception ex) - { - - } - } private void BatchRead(ModbusTcpMaster master)