diff --git a/README.md b/README.md index e36ed60..30e3fab 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ jT809Package.Header = new JT809Header MsgGNSSCENTERID = 20180920, }; -jT809Package.Bodies = new JT809_0x9400 +JT809_0x9400 bodies = new JT809_0x9400 { VehicleNo="粤A12345", VehicleColor= JT809Enums.JT809VehicleColorType.黄色, @@ -95,7 +95,9 @@ JT809_0x9400_0x9401 jT809_0x9400_0x9401 = new JT809_0x9400_0x9401 SupervisorEmail = "123456@qq.com" }; -jT809Package.Bodies.JT809SubBodies = jT809_0x9400_0x9401; +bodies.SubBodies = jT809_0x9400_0x9401; + +jT809Package.Bodies = bodies; byte[] data = JT809Serializer.Serialize(jT809Package); diff --git a/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs b/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs index 48dbec8..37492c8 100644 --- a/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs +++ b/src/JT809.Protocol.Benchmark/JT809SerializerContext.cs @@ -55,7 +55,7 @@ namespace JT809.Protocol.Benchmark MsgGNSSCENTERID = 20180920, }; - jT809Package.Bodies = new JT809_0x9400 + JT809_0x9400 bodies = new JT809_0x9400 { VehicleNo = "粤A12345", VehicleColor = JT809Enums.JT809VehicleColorType.黄色, @@ -74,8 +74,8 @@ namespace JT809.Protocol.Benchmark SupervisorTel = "12345678901", SupervisorEmail = "123456@qq.com" }; - jT809Package.Bodies.JT809SubBodies = jT809_0x9400_0x9401; - + bodies.SubBodies = jT809_0x9400_0x9401; + jT809Package.Bodies = bodies; var hex = JT809Serializer.Serialize(jT809Package); } } diff --git a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1200Test.cs b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1200Test.cs index 6bc9587..9b4ae67 100644 --- a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1200Test.cs +++ b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1200Test.cs @@ -28,7 +28,7 @@ namespace JT809.Protocol.Test.JT809MessageBody TerminalModelType = "11111111", TerminalSimCode = "222222222222" }; - jT809_0X1200.JT809SubBodies = jT809_0X1200_0X1201; + jT809_0X1200.SubBodies = jT809_0X1200_0X1201; var hex = JT809Serializer.Serialize(jT809_0X1200).ToHexString(); //"D4 C1 41 31 32 33 34 35 00 00 00 00 00 00 00 00 00 00 00 00 00 01 12 01 00 00 00 3D 00 00 00 00 00 00 00 42 3A 35 C7 00 00 00 00 00 00 00 42 3A 35 C7 31 31 31 31 31 31 31 31 00 00 00 00 00 00 00 00 00 00 00 00 31 31 31 31 31 41 41 32 32 32 32 32 32 32 32 32 32 32 32" //"D4 C1 41 31 32 33 34 35 00 00 00 00 00 00 00 00 00 00 00 00 00 01 12 01 00 00 00 3D 00 00 00 00 00 00 00 42 3A 35 C7 00 00 00 00 00 00 00 42 3A 35 C7 31 31 31 31 31 31 31 31 00 00 00 00 00 00 00 00 00 00 00 00 31 31 31 31 31 61 61 32 32 32 32 32 32 32 32 32 32 32 32" @@ -43,7 +43,7 @@ namespace JT809.Protocol.Test.JT809MessageBody Assert.Equal(JT809Enums.JT809VehicleColorType.蓝色, jT809_0X9001.VehicleColor); Assert.Equal(JT809Enums.JT809SubBusinessType.上传车辆注册信息, jT809_0X9001.SubBusinessType); Assert.Equal((ushort)61, jT809_0X9001.DataLength); - JT809_0x1200_0x1201 jT809_0X1200_0X1201 = jT809_0X9001.JT809SubBodies as JT809_0x1200_0x1201; + JT809_0x1200_0x1201 jT809_0X1200_0X1201 = jT809_0X9001.SubBodies as JT809_0x1200_0x1201; Assert.Equal("1111111111", jT809_0X1200_0X1201.PlateformId); Assert.Equal("1111111111", jT809_0X1200_0X1201.ProducerId); Assert.Equal("11111AA", jT809_0X1200_0X1201.TerminalId); diff --git a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1300Test.cs b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1300Test.cs index 1ce2189..aa06da0 100644 --- a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1300Test.cs +++ b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1300Test.cs @@ -17,7 +17,7 @@ namespace JT809.Protocol.Test.JT809MessageBody { JT809_0x1300 jT809Bodies = new JT809_0x1300(); jT809Bodies.SubBusinessType = JT809Enums.JT809SubBusinessType.平台查岗应答; - jT809Bodies.JT809SubBodies = new JT809_0x1300_0x1301 + jT809Bodies.SubBodies = new JT809_0x1300_0x1301 { ObjectID="111", InfoContent= "22ha22", @@ -34,7 +34,7 @@ namespace JT809.Protocol.Test.JT809MessageBody var bytes = "13 01 00 00 00 1B 01 31 31 31 00 00 00 00 00 00 00 00 00 00 00 04 D2 00 00 00 06 32 32 68 61 32 32".ToHexBytes(); JT809_0x1300 jT809Bodies = JT809Serializer.Deserialize(bytes); Assert.Equal(JT809Enums.JT809SubBusinessType.平台查岗应答, jT809Bodies.SubBusinessType); - JT809_0x1300_0x1301 jT809SubBodies = (JT809_0x1300_0x1301)jT809Bodies.JT809SubBodies; + JT809_0x1300_0x1301 jT809SubBodies = (JT809_0x1300_0x1301)jT809Bodies.SubBodies; Assert.Equal("111", jT809SubBodies.ObjectID); Assert.Equal("22ha22", jT809SubBodies.InfoContent); Assert.Equal((uint)1234, jT809SubBodies.InfoID); diff --git a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1600Test.cs b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1600Test.cs index d797f91..26a58ed 100644 --- a/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1600Test.cs +++ b/src/JT809.Protocol.Test/JT809MessageBody/JT809_0x1600Test.cs @@ -19,7 +19,7 @@ namespace JT809.Protocol.Test.JT809MessageBody jT809Bodies.VehicleNo = "粤A12345"; jT809Bodies.VehicleColor = JT809Enums.JT809VehicleColorType.蓝色; jT809Bodies.SubBusinessType = JT809Enums.JT809SubBusinessType.补报车辆静态信息应答; - jT809Bodies.JT809SubBodies = new JT809_0x1600_0x1601 + jT809Bodies.SubBodies = new JT809_0x1600_0x1601 { CarInfo = "什么鬼" }; @@ -35,7 +35,7 @@ namespace JT809.Protocol.Test.JT809MessageBody Assert.Equal("粤A12345", jT809Bodies.VehicleNo); Assert.Equal(JT809Enums.JT809VehicleColorType.蓝色, jT809Bodies.VehicleColor); Assert.Equal(JT809Enums.JT809SubBusinessType.补报车辆静态信息应答, jT809Bodies.SubBusinessType); - Assert.Equal("什么鬼", ((JT809_0x1600_0x1601)jT809Bodies.JT809SubBodies).CarInfo); + Assert.Equal("什么鬼", ((JT809_0x1600_0x1601)jT809Bodies.SubBodies).CarInfo); } } } diff --git a/src/JT809.Protocol.Test/JT809Packages/JT809_0x9400_0x9401PackageTest.cs b/src/JT809.Protocol.Test/JT809Packages/JT809_0x9400_0x9401PackageTest.cs index 58cd751..2affc45 100644 --- a/src/JT809.Protocol.Test/JT809Packages/JT809_0x9400_0x9401PackageTest.cs +++ b/src/JT809.Protocol.Test/JT809Packages/JT809_0x9400_0x9401PackageTest.cs @@ -27,7 +27,7 @@ namespace JT809.Protocol.Test.JT809Packages MsgGNSSCENTERID = 20180920, }; - jT809Package.Bodies = new JT809_0x9400 + JT809_0x9400 bodies = new JT809_0x9400 { VehicleNo="粤A12345", VehicleColor= JT809Enums.JT809VehicleColorType.黄色, @@ -46,8 +46,8 @@ namespace JT809.Protocol.Test.JT809Packages SupervisorTel = "12345678901", SupervisorEmail = "123456@qq.com" }; - jT809Package.Bodies.JT809SubBodies = jT809_0x9400_0x9401; - + bodies.SubBodies = jT809_0x9400_0x9401; + jT809Package.Bodies = bodies; var hex = JT809Serializer.Serialize(jT809Package).ToHexString(); //"5B 00 00 00 92 00 00 06 82 94 00 01 33 EF B8 01 00 00 00 00 00 27 0F D4 C1 41 31 32 33 34 35 00 00 00 00 00 00 00 00 00 00 00 00 00 02 94 01 00 00 00 5C 01 00 02 00 00 00 00 5A 01 AC 3F 40 12 3F FA A1 00 00 00 00 5A 01 AC 4D 50 03 73 6D 61 6C 6C 63 68 69 00 00 00 00 00 00 00 00 31 32 33 34 35 36 37 38 39 30 31 00 00 00 00 00 00 00 00 00 31 32 33 34 35 36 40 71 71 2E 63 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BA D8 5D" } @@ -72,7 +72,7 @@ namespace JT809.Protocol.Test.JT809Packages Assert.Equal(JT809Enums.JT809SubBusinessType.报警督办请求, jT809_0X400.SubBusinessType); Assert.Equal((uint)92, jT809_0X400.DataLength); - JT809_0x9400_0x9401 jT809_0x9400_0x9401 = (JT809_0x9400_0x9401)jT809_0X400.JT809SubBodies; + JT809_0x9400_0x9401 jT809_0x9400_0x9401 = (JT809_0x9400_0x9401)jT809_0X400.SubBodies; Assert.Equal(JT809WarnSrc.车载终端, jT809_0x9400_0x9401.WarnSrc); Assert.Equal(JT809WarnType.疲劳驾驶报警, jT809_0x9400_0x9401.WarnType); Assert.Equal(DateTime.Parse("2018-09-27 10:24:00"), jT809_0x9400_0x9401.WarnTime); @@ -97,7 +97,7 @@ namespace JT809.Protocol.Test.JT809Packages VehicleNo = "粤A12345", VehicleColor = JT809Enums.JT809VehicleColorType.黄色, SubBusinessType = JT809Enums.JT809SubBusinessType.报警督办请求, - JT809SubBodies = new JT809_0x9400_0x9401 + SubBodies = new JT809_0x9400_0x9401 { WarnSrc = JT809WarnSrc.车载终端, WarnType = JT809WarnType.疲劳驾驶报警, diff --git a/src/JT809.Protocol/JT809.Protocol.csproj b/src/JT809.Protocol/JT809.Protocol.csproj index 22af396..e61c790 100644 --- a/src/JT809.Protocol/JT809.Protocol.csproj +++ b/src/JT809.Protocol/JT809.Protocol.csproj @@ -14,7 +14,7 @@ https://github.com/SmallChi/JT809 https://github.com/SmallChi/JT809/blob/master/LICENSE true - 1.0.2 + 1.0.3 diff --git a/src/JT809.Protocol/JT809Bodies.cs b/src/JT809.Protocol/JT809Bodies.cs index 3baba1c..588faff 100644 --- a/src/JT809.Protocol/JT809Bodies.cs +++ b/src/JT809.Protocol/JT809Bodies.cs @@ -9,25 +9,6 @@ namespace JT809.Protocol { public abstract class JT809Bodies { - /// - /// 车牌号 - /// - public string VehicleNo { get; set; } - /// - /// 车辆颜色 - /// - public JT809VehicleColorType VehicleColor { get; set; } = JT809VehicleColorType.其他; - /// - /// 子业务类型标识 - /// - public JT809SubBusinessType SubBusinessType { get; set; } = JT809SubBusinessType.None; - /// - /// 后续数据长度 - /// - public uint DataLength { get; set; } - /// - /// 子业务数据体 - /// - public JT809SubBodies JT809SubBodies { get; set; } + } } diff --git a/src/JT809.Protocol/JT809ExchangeMessageBodies.cs b/src/JT809.Protocol/JT809ExchangeMessageBodies.cs new file mode 100644 index 0000000..e8de3f3 --- /dev/null +++ b/src/JT809.Protocol/JT809ExchangeMessageBodies.cs @@ -0,0 +1,36 @@ +using JT809.Protocol.JT809Attributes; +using JT809.Protocol.JT809Enums; +using JT809.Protocol.JT809Formatters; +using System; +using System.Collections.Generic; +using System.Text; + +namespace JT809.Protocol +{ + /// + /// 交换信息体 + /// + public abstract class JT809ExchangeMessageBodies: JT809Bodies + { + /// + /// 车牌号 + /// + public string VehicleNo { get; set; } + /// + /// 车辆颜色 + /// + public JT809VehicleColorType VehicleColor { get; set; } = JT809VehicleColorType.其他; + /// + /// 子业务类型标识 + /// + public JT809SubBusinessType SubBusinessType { get; set; } = JT809SubBusinessType.None; + /// + /// 后续数据长度 + /// + public uint DataLength { get; set; } + /// + /// 子业务数据体 + /// + public JT809SubBodies SubBodies { get; set; } + } +} diff --git a/src/JT809.Protocol/JT809Extensions/JT809PackageExtensions.cs b/src/JT809.Protocol/JT809Extensions/JT809PackageExtensions.cs index 65c6f78..ec5fb56 100644 --- a/src/JT809.Protocol/JT809Extensions/JT809PackageExtensions.cs +++ b/src/JT809.Protocol/JT809Extensions/JT809PackageExtensions.cs @@ -7,13 +7,6 @@ namespace JT809.Protocol.JT809Extensions { public static class JT809PackageExtensions { - /// - /// 创建JT809Package对应的数据体 - /// - /// - /// - /// - /// public static JT809Package Create(this JT809BusinessType jT809BusinessType, TJT809Bodies jT809Bodies) where TJT809Bodies: JT809Bodies { @@ -30,11 +23,7 @@ namespace JT809.Protocol.JT809Extensions }; return jT809Package; } - /// - /// 创建JT809Package对应的数据体 - /// - /// - /// + public static JT809Package Create(this JT809BusinessType jT809BusinessType) { JT809Package jT809Package = new JT809Package(); diff --git a/src/JT809.Protocol/JT809Formatters/JT809BodiesFormatter.cs b/src/JT809.Protocol/JT809Formatters/JT809BodiesFormatter.cs index b90849c..b65bf9e 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809BodiesFormatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809BodiesFormatter.cs @@ -10,7 +10,7 @@ using System.Text; namespace JT809.Protocol.JT809Formatters { public class JT809BodiesFormatter : IJT809Formatter - where TJT809Bodies: JT809Bodies,new () + where TJT809Bodies: JT809ExchangeMessageBodies, new () { public TJT809Bodies Deserialize(ReadOnlySpan bytes, out int readSize) { @@ -28,7 +28,7 @@ namespace JT809.Protocol.JT809Formatters } try { - jT809Bodies.JT809SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809Bodies.DataLength), out readSize); + jT809Bodies.SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809Bodies.DataLength), out readSize); } catch { @@ -53,7 +53,7 @@ namespace JT809.Protocol.JT809Formatters { // 先写入内容,然后在根据内容反写内容长度 offset = offset + 4; - int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.JT809SubBodies); + int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.SubBodies); JT809BinaryExtensions.WriteUInt32Little(memoryOwner, offset - 4, (uint)(contentOffset- offset)); offset = contentOffset; } diff --git a/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x1300Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x1300Formatter.cs index 43c62c9..e552469 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x1300Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x1300Formatter.cs @@ -26,7 +26,7 @@ namespace JT809.Protocol.JT809Formatters.JT809MessageBodyFormatters } try { - jT809_0X1300.JT809SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809_0X1300.DataLength), out readSize); + jT809_0X1300.SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809_0X1300.DataLength), out readSize); } catch { @@ -50,7 +50,7 @@ namespace JT809.Protocol.JT809Formatters.JT809MessageBodyFormatters { // 先写入内容,然后在根据内容反写内容长度 offset = offset + 4; - int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.JT809SubBodies); + int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.SubBodies); JT809BinaryExtensions.WriteUInt32Little(memoryOwner, offset - 4, (uint)(contentOffset - offset)); offset = contentOffset; } diff --git a/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x9300Formatter.cs b/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x9300Formatter.cs index 7d32c1e..35e10df 100644 --- a/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x9300Formatter.cs +++ b/src/JT809.Protocol/JT809Formatters/JT809MessageBodyFormatters/JT809_0x9300Formatter.cs @@ -26,7 +26,7 @@ namespace JT809.Protocol.JT809Formatters.JT809MessageBodyFormatters } try { - jT809_0X9300.JT809SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809_0X9300.DataLength), out readSize); + jT809_0X9300.SubBodies = JT809FormatterResolverExtensions.JT809DynamicDeserialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), bytes.Slice(offset, (int)jT809_0X9300.DataLength), out readSize); } catch { @@ -50,7 +50,7 @@ namespace JT809.Protocol.JT809Formatters.JT809MessageBodyFormatters { // 先写入内容,然后在根据内容反写内容长度 offset = offset + 4; - int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.JT809SubBodies); + int contentOffset = JT809FormatterResolverExtensions.JT809DynamicSerialize(JT809FormatterExtensions.GetFormatter(jT809SubBodiesTypeAttribute.JT809BodiesType), memoryOwner, offset, value.SubBodies); JT809BinaryExtensions.WriteUInt32Little(memoryOwner, offset - 4, (uint)(contentOffset - offset)); offset = contentOffset; } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1200.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1200.cs index 2ae9a7b..bc209d2 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1200.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1200.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:下级平台向上级平台发送车辆动态信息交换业务数据包 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x1200:JT809Bodies + public class JT809_0x1200: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1300.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1300.cs index 85650a7..c3cf12f 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1300.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1300.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:下级平台向上级平台发送平台间交互信息 /// [JT809Formatter(typeof(JT809_0x1300Formatter))] - public class JT809_0x1300:JT809Bodies + public class JT809_0x1300: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1400.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1400.cs index bce5a89..f1df7c5 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1400.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1400.cs @@ -13,7 +13,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:下级平台向上级平台发送车辆报警信息业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x1400:JT809Bodies + public class JT809_0x1400: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1500.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1500.cs index a7fa1b0..65641b7 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1500.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1500.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:下级平台向上级平台发送车辆监管业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x1500:JT809Bodies + public class JT809_0x1500: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x1600.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x1600.cs index 6ff3410..a9626d1 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x1600.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x1600.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:下级平台向上级平台发送车辆睁态信息交换业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x1600:JT809Bodies + public class JT809_0x1600: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x9200.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x9200.cs index 55f397d..a604501 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x9200.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x9200.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台作为客户端向下级平台服务端发送车辆动态信息交换业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x9200:JT809Bodies + public class JT809_0x9200: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x9300.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x9300.cs index 8182731..20b2c0d 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x9300.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x9300.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台向下级平台发送平台问交互信息 /// [JT809Formatter(typeof(JT809_0x9300Formatter))] - public class JT809_0x9300:JT809Bodies + public class JT809_0x9300: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x9400.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x9400.cs index 022e305..0e1d9d3 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x9400.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x9400.cs @@ -16,7 +16,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台向下级平台发送报瞥信息业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x9400:JT809Bodies + public class JT809_0x9400: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x9500.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x9500.cs index b640b54..7baec49 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x9500.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x9500.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台向下级平台发送车辆监监管业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x9500:JT809Bodies + public class JT809_0x9500: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809MessageBody/JT809_0x9600.cs b/src/JT809.Protocol/JT809MessageBody/JT809_0x9600.cs index 6f96fb0..45fa2e2 100644 --- a/src/JT809.Protocol/JT809MessageBody/JT809_0x9600.cs +++ b/src/JT809.Protocol/JT809MessageBody/JT809_0x9600.cs @@ -16,7 +16,7 @@ namespace JT809.Protocol.JT809MessageBody /// 描述:上级平台向下级平台发送车辆静态信息交换业务 /// [JT809Formatter(typeof(JT809BodiesFormatter))] - public class JT809_0x9600:JT809Bodies + public class JT809_0x9600: JT809ExchangeMessageBodies { } diff --git a/src/JT809.Protocol/JT809Serializer.cs b/src/JT809.Protocol/JT809Serializer.cs index 4eff7f4..c78c51d 100644 --- a/src/JT809.Protocol/JT809Serializer.cs +++ b/src/JT809.Protocol/JT809Serializer.cs @@ -12,7 +12,7 @@ namespace JT809.Protocol { public static byte[] Serialize(JT809Package jT809Package, int minBufferSize = 4096) { - return Serialize(jT809Package, minBufferSize); + return Serialize(jT809Package, minBufferSize); } public static JT809Package Deserialize(ReadOnlySpan bytes)