From 68873f74ce1b0cd641337fff1ca2b9eb772afe8b Mon Sep 17 00:00:00 2001 From: SmallChi <564952747@qq.com> Date: Wed, 26 Sep 2018 19:33:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E6=8A=A5=E8=AD=A6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9D=A5=E6=BA=90=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JT809.Protocol/JT809.Protocol.csproj | 5 +---- ...{JT809_0x1402_WarnSrc.cs => JT809WarnSrc.cs} | 2 +- .../JT809Enums/JT809_0x9401_WarnSrc.cs | 17 ----------------- .../JT809Enums/JT809_0x9402_WarnSrc.cs | 17 ----------------- .../JT809Enums/JT809_0x9403_WarnSrc.cs | 17 ----------------- .../JT809_0x1400_0x1402Formatter.cs | 2 +- .../JT809_0x9400_0x9401Formatter.cs | 2 +- .../JT809_0x9400_0x9402Formatter.cs | 2 +- .../JT809_0x9400_0x9403Formatter.cs | 2 +- .../JT809MessageBody/JT809_0x1006.cs | 1 - .../JT809SubMessageBody/JT809_0x1400_0x1402.cs | 2 +- .../JT809SubMessageBody/JT809_0x9400_0x9401.cs | 2 +- .../JT809SubMessageBody/JT809_0x9400_0x9402.cs | 2 +- .../JT809SubMessageBody/JT809_0x9400_0x9403.cs | 2 +- 14 files changed, 10 insertions(+), 65 deletions(-) rename src/JT809.Protocol/JT809Enums/{JT809_0x1402_WarnSrc.cs => JT809WarnSrc.cs} (87%) delete mode 100644 src/JT809.Protocol/JT809Enums/JT809_0x9401_WarnSrc.cs delete mode 100644 src/JT809.Protocol/JT809Enums/JT809_0x9402_WarnSrc.cs delete mode 100644 src/JT809.Protocol/JT809Enums/JT809_0x9403_WarnSrc.cs diff --git a/src/JT809.Protocol/JT809.Protocol.csproj b/src/JT809.Protocol/JT809.Protocol.csproj index f5acd13..0b1a46d 100644 --- a/src/JT809.Protocol/JT809.Protocol.csproj +++ b/src/JT809.Protocol/JT809.Protocol.csproj @@ -46,15 +46,12 @@ + - - - - diff --git a/src/JT809.Protocol/JT809Enums/JT809_0x1402_WarnSrc.cs b/src/JT809.Protocol/JT809Enums/JT809WarnSrc.cs similarity index 87% rename from src/JT809.Protocol/JT809Enums/JT809_0x1402_WarnSrc.cs rename to src/JT809.Protocol/JT809Enums/JT809WarnSrc.cs index d0a32eb..799f6b8 100644 --- a/src/JT809.Protocol/JT809Enums/JT809_0x1402_WarnSrc.cs +++ b/src/JT809.Protocol/JT809Enums/JT809WarnSrc.cs @@ -7,7 +7,7 @@ namespace JT809.Protocol.JT809Enums /// /// 报警信息来源 /// - public enum JT809_0x1402_WarnSrc : byte + public enum JT809WarnSrc : byte { 车载终端 = 0x00, 企业监控平台 = 0x01, diff --git a/src/JT809.Protocol/JT809Enums/JT809_0x9401_WarnSrc.cs b/src/JT809.Protocol/JT809Enums/JT809_0x9401_WarnSrc.cs deleted file mode 100644 index 2b52f9b..0000000 --- a/src/JT809.Protocol/JT809Enums/JT809_0x9401_WarnSrc.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace JT809.Protocol.JT809Enums -{ - /// - /// 报警信息来源 - /// - public enum JT809_0x9401_WarnSrc : byte - { - 车载终端 = 0x00, - 企业监控平台 = 0x01, - 政府监管平台 = 0x02, - 其他 =0x09 - } -} diff --git a/src/JT809.Protocol/JT809Enums/JT809_0x9402_WarnSrc.cs b/src/JT809.Protocol/JT809Enums/JT809_0x9402_WarnSrc.cs deleted file mode 100644 index 6423253..0000000 --- a/src/JT809.Protocol/JT809Enums/JT809_0x9402_WarnSrc.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace JT809.Protocol.JT809Enums -{ - /// - /// 报警信息来源 - /// - public enum JT809_0x9402_WarnSrc : byte - { - 车载终端 = 0x00, - 企业监控平台 = 0x01, - 政府监管平台 = 0x02, - 其他 =0x09 - } -} diff --git a/src/JT809.Protocol/JT809Enums/JT809_0x9403_WarnSrc.cs b/src/JT809.Protocol/JT809Enums/JT809_0x9403_WarnSrc.cs deleted file mode 100644 index 48d7f9f..0000000 --- a/src/JT809.Protocol/JT809Enums/JT809_0x9403_WarnSrc.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace JT809.Protocol.JT809Enums -{ - /// - /// 报警信息来源 - /// - public enum JT809_0x9403_WarnSrc : byte - { - 车载终端 = 0x00, - 企业监控平台 = 0x01, - 政府监管平台 = 0x02, - 其他 =0x09 - } -} diff --git a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x1400_0x1402Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x1400_0x1402Formatter.cs index 9e3c335..4d6097e 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x1400_0x1402Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x1400_0x1402Formatter.cs @@ -13,7 +13,7 @@ namespace JT809.Protocol.JT809Formatters.JT809SubMessageBodyFormatters { int offset = 0; JT809_0x1400_0x1402 jT809_0X1400_0X1402 = new JT809_0x1400_0x1402(); - jT809_0X1400_0X1402.WarnSrc = (JT809Enums.JT809_0x1402_WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); + jT809_0X1400_0X1402.WarnSrc = (JT809Enums.JT809WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); jT809_0X1400_0X1402.WarnType= JT809BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT809_0X1400_0X1402.WarnTime = JT809BinaryExtensions.ReadUTCDateTimeLittle(bytes, ref offset); jT809_0X1400_0X1402.InfoID= JT809BinaryExtensions.ReadUInt32Little(bytes, ref offset); diff --git a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9401Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9401Formatter.cs index dc58805..7684a14 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9401Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9401Formatter.cs @@ -13,7 +13,7 @@ namespace JT809.Protocol.JT809Formatters.JT809SubMessageBodyFormatters { int offset = 0; JT809_0x9400_0x9401 jT809_0X9400_0X9401 = new JT809_0x9400_0x9401(); - jT809_0X9400_0X9401.WarnSrc = (JT809Enums.JT809_0x9401_WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); + jT809_0X9400_0X9401.WarnSrc = (JT809Enums.JT809WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); jT809_0X9400_0X9401.WarnType = JT809BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT809_0X9400_0X9401.WarnTime = JT809BinaryExtensions.ReadUTCDateTimeLittle(bytes, ref offset); jT809_0X9400_0X9401.SupervisionID = JT809BinaryExtensions.ReadUInt32Little(bytes, ref offset); diff --git a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9402Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9402Formatter.cs index 033922c..3f12841 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9402Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9402Formatter.cs @@ -13,7 +13,7 @@ namespace JT809.Protocol.JT809Formatters.JT809SubMessageBodyFormatters { int offset = 0; JT809_0x9400_0x9402 jT809_0X9400_0X9402 = new JT809_0x9400_0x9402(); - jT809_0X9400_0X9402.WarnSrc = (JT809Enums.JT809_0x9402_WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); + jT809_0X9400_0X9402.WarnSrc = (JT809Enums.JT809WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); jT809_0X9400_0X9402.WarnType = JT809BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT809_0X9400_0X9402.WarnTime = JT809BinaryExtensions.ReadUTCDateTimeLittle(bytes, ref offset); jT809_0X9400_0X9402.WarnLength = JT809BinaryExtensions.ReadUInt32Little(bytes, ref offset); diff --git a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9403Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9403Formatter.cs index 508eb1a..d3172aa 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9403Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809SubMessageBodyFormatters/JT809_0x9400_0x9403Formatter.cs @@ -13,7 +13,7 @@ namespace JT809.Protocol.JT809Formatters.JT809SubMessageBodyFormatters { int offset = 0; JT809_0x9400_0x9403 jT809_0X9400_0X9403 = new JT809_0x9400_0x9403(); - jT809_0X9400_0X9403.WarnSrc = (JT809Enums.JT809_0x9403_WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); + jT809_0X9400_0X9403.WarnSrc = (JT809Enums.JT809WarnSrc)JT809BinaryExtensions.ReadByteLittle(bytes, ref offset); jT809_0X9400_0X9403.WarnType = JT809BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT809_0X9400_0X9403.WarnTime = JT809BinaryExtensions.ReadUTCDateTimeLittle(bytes, ref offset); jT809_0X9400_0X9403.WarnLength = JT809BinaryExtensions.ReadUInt32Little(bytes, ref offset); diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1006.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1006.cs index dbd8386..f6c0064 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1006.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1006.cs @@ -11,7 +11,6 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台收到下级平台的主链路连接保持请求消息后,向下级平台返回.主链路连接保持应答消息,保持主链路的连接状态。 /// 主链路连接保持应答消息,数据体为空。 /// - [JT809Formatter(typeof(JT809BodiesFormatter))] public class JT809_0x1006:JT809Bodies { diff --git a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x1400_0x1402.cs b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x1400_0x1402.cs index 68a6eaf..91bdc90 100644 --- a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x1400_0x1402.cs +++ b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x1400_0x1402.cs @@ -19,7 +19,7 @@ namespace JT809.Protocol.JT809SubMessageBody /// /// 报警信息来源 /// - public JT809_0x1402_WarnSrc WarnSrc { get; set; } + public JT809WarnSrc WarnSrc { get; set; } /// /// 报警类型 /// diff --git a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9401.cs b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9401.cs index e8b218f..8941349 100644 --- a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9401.cs +++ b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9401.cs @@ -18,7 +18,7 @@ namespace JT809.Protocol.JT809SubMessageBody /// /// 报警信息来源 /// - public JT809_0x9401_WarnSrc WarnSrc { get; set; } + public JT809WarnSrc WarnSrc { get; set; } /// /// 报警类型 /// diff --git a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9402.cs b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9402.cs index ffa8648..320527a 100644 --- a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9402.cs +++ b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9402.cs @@ -19,7 +19,7 @@ namespace JT809.Protocol.JT809SubMessageBody /// /// 报警信息来源 /// - public JT809_0x9402_WarnSrc WarnSrc { get; set; } + public JT809WarnSrc WarnSrc { get; set; } /// /// 报警类型 /// diff --git a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9403.cs b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9403.cs index 474b972..21c11fe 100644 --- a/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9403.cs +++ b/src/JT809.Protocol/JT809SubMessageBody/JT809_0x9400_0x9403.cs @@ -19,7 +19,7 @@ namespace JT809.Protocol.JT809SubMessageBody /// /// 报警信息来源 /// - public JT809_0x9403_WarnSrc WarnSrc { get; set; } + public JT809WarnSrc WarnSrc { get; set; } /// /// 报警类型 ///