diff --git a/README.en.md b/README.en.md index e43ebf11..777f03bb 100644 --- a/README.en.md +++ b/README.en.md @@ -211,7 +211,9 @@ DT1JT808Config.Register(Assembly.GetExecutingAssembly()); DT1JT808Config.SkipCRCCode = true; // Add a user-defined message Id based on the device terminal Id DT1JT808Config.MsgIdFactory.SetMap(); +DT1JT808Config.FormatterFactory.SetMap(); DT2JT808Config.MsgIdFactory.SetMap(); +DT2JT808Config.FormatterFactory.SetMap(); // Initializes the serialization instance JT808Serializer DT1JT808Serializer = new JT808Serializer(DT1JT808Config); JT808Serializer DT2JT808Serializer = new JT808Serializer(DT2JT808Config); @@ -385,31 +387,30 @@ Due to access many different equipment vendor's agreement, but each protocol doc ``` ini -BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.819) +BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.1105) Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores -.NET SDK=7.0.100 - [Host] : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 - Job-AEXBOF : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 +.NET SDK=7.0.102 + [Host] : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2 + Job-OIKLWD : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2 Platform=AnyCpu Server=False Toolchain=.NET 7.0 ``` - -| Method | Categories | N | Mean | Error | StdDev | Gen0 | Allocated | -|-------------------------------- |----------------- |------- |--------------:|-------------:|-------------:|-----------:|-------------:| -| **0x0100Serialize** | **0x0100Serializer** | **100** | **85.84 μs** | **1.686 μs** | **1.874 μs** | **10.7422** | **66.41 KB** | -| 0x0100Deserialize | 0x0100Serializer | 100 | 73.65 μs | 1.463 μs | 2.099 μs | 15.7471 | 96.88 KB | -| **0x0100Serialize** | **0x0100Serializer** | **10000** | **8,507.50 μs** | **167.504 μs** | **279.862 μs** | **1078.1250** | **6640.63 KB** | -| 0x0100Deserialize | 0x0100Serializer | 10000 | 7,436.10 μs | 123.684 μs | 103.281 μs | 1578.1250 | 9687.5 KB | -| **0x0100Serialize** | **0x0100Serializer** | **100000** | **87,588.91 μs** | **1,734.191 μs** | **3,842.848 μs** | **10833.3333** | **66406.33 KB** | -| 0x0100Deserialize | 0x0100Serializer | 100000 | 76,992.19 μs | 1,519.795 μs | 3,271.519 μs | 15714.2857 | 96875.07 KB | -| | | | | | | | | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **205.22 μs** | **4.094 μs** | **8.725 μs** | **29.5410** | **181.25 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 896.54 μs | 17.627 μs | 43.571 μs | 82.0313 | 507.03 KB | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **20,329.28 μs** | **407.129 μs** | **1,194.037 μs** | **2937.5000** | **18125.01 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 83,862.14 μs | 1,655.253 μs | 2,719.628 μs | 8142.8571 | 50703.19 KB | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **189,178.02 μs** | **3,595.256 μs** | **3,531.022 μs** | **29333.3333** | **181250.16 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 843,975.52 μs | 8,214.068 μs | 6,859.119 μs | 82000.0000 | 507031.72 KB | +| Method | Categories | N | Mean | Error | StdDev | Gen0 | Gen1 | Allocated | +|-------------------------------- |----------------- |------- |--------------:|-------------:|-------------:|-----------:|---------:|-------------:| +| **0x0100Serialize** | **0x0100Serializer** | **100** | **75.25 μs** | **0.519 μs** | **0.433 μs** | **10.7422** | **-** | **66.41 KB** | +| 0x0100Deserialize | 0x0100Serializer | 100 | 66.56 μs | 0.412 μs | 0.385 μs | 15.7471 | - | 96.88 KB | +| **0x0100Serialize** | **0x0100Serializer** | **10000** | **7,581.60 μs** | **108.729 μs** | **101.705 μs** | **1078.1250** | **-** | **6640.63 KB** | +| 0x0100Deserialize | 0x0100Serializer | 10000 | 6,609.91 μs | 58.293 μs | 51.675 μs | 1578.1250 | - | 9687.5 KB | +| **0x0100Serialize** | **0x0100Serializer** | **100000** | **74,221.22 μs** | **514.498 μs** | **456.089 μs** | **10714.2857** | **-** | **66406.32 KB** | +| 0x0100Deserialize | 0x0100Serializer | 100000 | 65,918.35 μs | 173.702 μs | 162.481 μs | 15750.0000 | - | 96875.06 KB | +| | | | | | | | | | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **133.71 μs** | **1.003 μs** | **0.889 μs** | **29.2969** | **-** | **180.47 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 137.71 μs | 1.125 μs | 0.997 μs | 38.0859 | 0.2441 | 234.38 KB | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **13,317.92 μs** | **82.257 μs** | **68.688 μs** | **2937.5000** | **-** | **18046.88 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 14,040.86 μs | 242.740 μs | 227.060 μs | 3812.5000 | 15.6250 | 23437.51 KB | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **131,292.10 μs** | **871.653 μs** | **815.344 μs** | **29250.0000** | **-** | **180468.87 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 137,063.75 μs | 1,301.430 μs | 1,086.753 μs | 38250.0000 | 250.0000 | 234375.12 KB | ## JT808 Comparison table of terminal communication protocol messages diff --git a/README.md b/README.md index 9deade34..23822b36 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,9 @@ DT1JT808Config.Register(Assembly.GetExecutingAssembly()); DT1JT808Config.SkipCRCCode = true; // 根据不同的设备终端号,添加自定义消息Id DT1JT808Config.MsgIdFactory.SetMap(); +DT1JT808Config.FormatterFactory.SetMap(); DT2JT808Config.MsgIdFactory.SetMap(); +DT2JT808Config.FormatterFactory.SetMap(); // 初始化序列化实例 JT808Serializer DT1JT808Serializer = new JT808Serializer(DT1JT808Config); JT808Serializer DT2JT808Serializer = new JT808Serializer(DT2JT808Config); @@ -385,31 +387,30 @@ JT808Serializer DT2JT808Serializer = new JT808Serializer(DT2JT808Config); ``` ini -BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.819) +BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.1105) Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores -.NET SDK=7.0.100 - [Host] : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 - Job-AEXBOF : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 +.NET SDK=7.0.102 + [Host] : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2 + Job-OIKLWD : .NET 7.0.2 (7.0.222.60605), X64 RyuJIT AVX2 Platform=AnyCpu Server=False Toolchain=.NET 7.0 ``` - -| Method | Categories | N | Mean | Error | StdDev | Gen0 | Allocated | -|-------------------------------- |----------------- |------- |--------------:|-------------:|-------------:|-----------:|-------------:| -| **0x0100Serialize** | **0x0100Serializer** | **100** | **85.84 μs** | **1.686 μs** | **1.874 μs** | **10.7422** | **66.41 KB** | -| 0x0100Deserialize | 0x0100Serializer | 100 | 73.65 μs | 1.463 μs | 2.099 μs | 15.7471 | 96.88 KB | -| **0x0100Serialize** | **0x0100Serializer** | **10000** | **8,507.50 μs** | **167.504 μs** | **279.862 μs** | **1078.1250** | **6640.63 KB** | -| 0x0100Deserialize | 0x0100Serializer | 10000 | 7,436.10 μs | 123.684 μs | 103.281 μs | 1578.1250 | 9687.5 KB | -| **0x0100Serialize** | **0x0100Serializer** | **100000** | **87,588.91 μs** | **1,734.191 μs** | **3,842.848 μs** | **10833.3333** | **66406.33 KB** | -| 0x0100Deserialize | 0x0100Serializer | 100000 | 76,992.19 μs | 1,519.795 μs | 3,271.519 μs | 15714.2857 | 96875.07 KB | -| | | | | | | | | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **205.22 μs** | **4.094 μs** | **8.725 μs** | **29.5410** | **181.25 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 896.54 μs | 17.627 μs | 43.571 μs | 82.0313 | 507.03 KB | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **20,329.28 μs** | **407.129 μs** | **1,194.037 μs** | **2937.5000** | **18125.01 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 83,862.14 μs | 1,655.253 μs | 2,719.628 μs | 8142.8571 | 50703.19 KB | -| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **189,178.02 μs** | **3,595.256 μs** | **3,531.022 μs** | **29333.3333** | **181250.16 KB** | -| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 843,975.52 μs | 8,214.068 μs | 6,859.119 μs | 82000.0000 | 507031.72 KB | +| Method | Categories | N | Mean | Error | StdDev | Gen0 | Gen1 | Allocated | +|-------------------------------- |----------------- |------- |--------------:|-------------:|-------------:|-----------:|---------:|-------------:| +| **0x0100Serialize** | **0x0100Serializer** | **100** | **75.25 μs** | **0.519 μs** | **0.433 μs** | **10.7422** | **-** | **66.41 KB** | +| 0x0100Deserialize | 0x0100Serializer | 100 | 66.56 μs | 0.412 μs | 0.385 μs | 15.7471 | - | 96.88 KB | +| **0x0100Serialize** | **0x0100Serializer** | **10000** | **7,581.60 μs** | **108.729 μs** | **101.705 μs** | **1078.1250** | **-** | **6640.63 KB** | +| 0x0100Deserialize | 0x0100Serializer | 10000 | 6,609.91 μs | 58.293 μs | 51.675 μs | 1578.1250 | - | 9687.5 KB | +| **0x0100Serialize** | **0x0100Serializer** | **100000** | **74,221.22 μs** | **514.498 μs** | **456.089 μs** | **10714.2857** | **-** | **66406.32 KB** | +| 0x0100Deserialize | 0x0100Serializer | 100000 | 65,918.35 μs | 173.702 μs | 162.481 μs | 15750.0000 | - | 96875.06 KB | +| | | | | | | | | | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100** | **133.71 μs** | **1.003 μs** | **0.889 μs** | **29.2969** | **-** | **180.47 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100 | 137.71 μs | 1.125 μs | 0.997 μs | 38.0859 | 0.2441 | 234.38 KB | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **10000** | **13,317.92 μs** | **82.257 μs** | **68.688 μs** | **2937.5000** | **-** | **18046.88 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 10000 | 14,040.86 μs | 242.740 μs | 227.060 μs | 3812.5000 | 15.6250 | 23437.51 KB | +| **0x0200_All_AttachId_Serialize** | **0x0200Serializer** | **100000** | **131,292.10 μs** | **871.653 μs** | **815.344 μs** | **29250.0000** | **-** | **180468.87 KB** | +| 0x0200_All_AttachId_Deserialize | 0x0200Serializer | 100000 | 137,063.75 μs | 1,301.430 μs | 1,086.753 μs | 38250.0000 | 250.0000 | 234375.12 KB | ## JT808终端通讯协议消息对照表 diff --git a/src/Info.props b/src/Info.props index a89f27ca..553e32e8 100644 --- a/src/Info.props +++ b/src/Info.props @@ -1,6 +1,6 @@  - net6.0;net7.0; + net7.0; 11.0 Copyright 2018. SmallChi(Koike) @@ -8,7 +8,8 @@ https://github.com/SmallChi/JT808 https://github.com/SmallChi/JT808/blob/master/LICENSE https://github.com/SmallChi/JT808/blob/master/LICENSE - 2.5.1 + 2.6.0 + enable LICENSE true latest diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj index 6dbe66f6..fb0f6b04 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078.Test/JT808.Protocol.Extensions.JT1078.Test.csproj @@ -1,13 +1,13 @@  - net6.0 + net7.0 - + all diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.xml b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.xml index a666f6f0..8d5ee257 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.xml +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/JT808.Protocol.Extensions.JT1078.xml @@ -1505,11 +1505,36 @@ 查询终端音视频属性 + + + 查询终端音视频属性 + + + + + 0x9003 + + + + + SkipSerialization + + 实时音视频传输请求(live、talk、listen、fanout、passThrough直播、对讲、监听、广播、透传请求) + + + 实时音视频传输请求 + + + + + 0x9101 + + 视频服务器IP地址长度 @@ -1582,6 +1607,16 @@ 音视频实时传输控制(LiveControl直播控制) + + + 音视频实时传输控制 + + + + + 0x9102 + + 逻辑通道号 @@ -1644,6 +1679,16 @@ 实时音视频传输状态通知 + + + 实时音视频传输状态通知 + + + + + 0x9105 + + 逻辑通道号 @@ -1684,6 +1729,16 @@ 平台下发远程录像回放请求(vod点播请求) + + + 平台下发远程录像回放请求 + + + + + 0x9201 + + 服务器IP地址长度 @@ -1795,6 +1850,16 @@ 平台下发远程录像回放控制(VodControl点播控制) + + + 平台下发远程录像回放控制 + + + + + 0x9202 + + 音视频通道号 @@ -1857,6 +1922,16 @@ 查询资源列表 + + + 查询资源列表 + + + + + 0x9205 + + 逻辑通道号 @@ -1902,6 +1977,30 @@ 2:灾备存储器 + + + + + + + + + + + + + + + + + + + + + + + + 文件上传指令 @@ -2031,6 +2130,16 @@ 文件上传控制 + + + 文件上传控制 + + + + + 0x9207 + + 流水号 @@ -2041,11 +2150,45 @@ 上传控制 + + + + + + + + + + + + + + + + + + + + + + + + 云台旋转 + + + 云台旋转 + + + + + 0x9301 + + 逻辑通道号 @@ -2067,11 +2210,45 @@ 0-255 + + + + + + + + + + + + + + + + + + + + + + + + 云台调整焦距控制 + + + 云台调整焦距控制 + + + + + 0x9302 + + 逻辑通道号 @@ -2082,11 +2259,45 @@ 焦距调整方向 + + + + + + + + + + + + + + + + + + + + + + + + 云台调整光圈控制 + + + 云台调整光圈控制 + + + + + 0x9303 + + 逻辑通道号 @@ -2097,11 +2308,45 @@ 光圈调整方式 + + + + + + + + + + + + + + + + + + + + + + + + 云台雨刷控制 + + + 云台雨刷控制 + + + + + 0x9304 + + 逻辑通道号 @@ -2112,11 +2357,45 @@ 启停标识 + + + + + + + + + + + + + + + + + + + + + + + + 红外补光控制 + + + 红外补光控制 + + + + + 0x9305 + + 逻辑通道号 @@ -2127,11 +2406,46 @@ 启停标识 + + + + + + + + + + + + + + + + + + + + + + + + + 云台变倍控制 + + + 云台变倍控制 + + + + + 0x9306 + + 逻辑通道号 @@ -2142,5 +2456,29 @@ 变倍控制 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x14.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x14.cs index 1ce43c84..31b56672 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x14.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x14.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 视频相关报警 /// 0x0200_0x14 /// - public class JT808_0x0200_0x14 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter,IJT808Analyze + public class JT808_0x0200_0x14 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// /// - public override byte AttachInfoId { get; set; } = 0x14; + public byte AttachInfoId { get; set; } = 0x14; /// /// 数据 长度 /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 视频相关报警 /// @@ -59,7 +59,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x14 value = new JT808_0x0200_0x14(); value.AttachInfoId = reader.ReadByte(); @@ -73,7 +73,7 @@ public JT808_0x0200_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x14 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x14 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x15.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x15.cs index 99a9278f..3abd5ad9 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x15.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x15.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 视频信号丢失报警状态 /// 0x0200_0x15 /// - public class JT808_0x0200_0x15 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x15 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// /// - public override byte AttachInfoId { get; set; } = 0x15; + public byte AttachInfoId { get; set; } = 0x15; /// /// 数据 长度 /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 视频信号丢失报警状态 /// @@ -63,7 +63,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x15 value = new JT808_0x0200_0x15(); value.AttachInfoId = reader.ReadByte(); @@ -77,7 +77,7 @@ public JT808_0x0200_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x15 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x15 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x16.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x16.cs index ac27f0da..03a43cbe 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x16.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x16.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 视频信号遮挡报警状态 /// 0x0200_0x16 /// - public class JT808_0x0200_0x16 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x16 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// /// - public override byte AttachInfoId { get; set; } = 0x16; + public byte AttachInfoId { get; set; } = 0x16; /// /// 数据 长度 /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 视频信号遮挡报警状态 /// @@ -63,7 +63,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x16 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x16 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x16 value = new JT808_0x0200_0x16(); value.AttachInfoId = reader.ReadByte(); @@ -77,7 +77,7 @@ public JT808_0x0200_0x16 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x16 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x16 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x17.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x17.cs index 74223084..f4d9e57f 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x17.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x17.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 存储器故障报警状态 /// 0x0200_0x17 /// - public class JT808_0x0200_0x17 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x17 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// /// - public override byte AttachInfoId { get; set; } = 0x17; + public byte AttachInfoId { get; set; } = 0x17; /// /// 数据 长度 /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// 存储器故障报警状态 /// @@ -77,7 +77,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x17 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x17 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x17 value = new JT808_0x0200_0x17(); value.AttachInfoId = reader.ReadByte(); @@ -91,7 +91,7 @@ public JT808_0x0200_0x17 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x17 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x17 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x18.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x18.cs index a2df1a3e..84edb1db 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x18.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x0200_0x18.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 异常驾驶行为报警详细描述 /// 0x0200_0x18 /// - public class JT808_0x0200_0x18 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x18 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// /// - public override byte AttachInfoId { get; set; } = 0x18; + public byte AttachInfoId { get; set; } = 0x18; /// /// 数据 长度 /// - public override byte AttachInfoLength { get; set; } = 3; + public byte AttachInfoLength { get; set; } = 3; /// /// 异常驾驶行为报警类型 /// @@ -82,7 +82,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x18 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x18 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x18 value = new JT808_0x0200_0x18(); value.AttachInfoId = reader.ReadByte(); @@ -97,7 +97,7 @@ public JT808_0x0200_0x18 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x18 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x18 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1003.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1003.cs index 5bf07312..8516a610 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1003.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1003.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 终端上传音视频属性 /// - public class JT808_0x1003 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1003 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 输入音频编码方式 @@ -52,11 +52,11 @@ public class JT808_0x1003 : JT808Bodies, IJT808MessagePackFormatter /// /// - public override ushort MsgId => 0x1003; + public ushort MsgId => 0x1003; /// /// /// - public override string Description => "终端上传音视频属性"; + public string Description => "终端上传音视频属性"; /// /// /// @@ -142,7 +142,7 @@ string AudioSampleDigitsDisplay(byte AudioSampleDigits) { /// /// /// - public JT808_0x1003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1003 jT808_0x1003 = new JT808_0x1003(); jT808_0x1003.EnterAudioEncoding = reader.ReadByte(); @@ -162,7 +162,7 @@ public JT808_0x1003 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1003 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1003 value, IJT808Config config) { writer.WriteByte(value.EnterAudioEncoding); writer.WriteByte(value.EnterAudioChannelsNumber); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1005.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1005.cs index c705a537..99f059ec 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1005.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1005.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 终端上传乘客流量 /// - public class JT808_0x1005 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1005 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// /// - public override string Description => "终端上传乘客流量"; + public string Description => "终端上传乘客流量"; /// /// /// - public override ushort MsgId => 0x1005; + public ushort MsgId => 0x1005; /// /// 起始时间 /// @@ -61,7 +61,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1005 jT808_0x1005 = new JT808_0x1005(); jT808_0x1005.BeginTime = reader.ReadDateTime_yyMMddHHmmss(); @@ -76,7 +76,7 @@ public JT808_0x1005 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1005 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1005 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.BeginTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205.cs index 1130fbe8..306ed8a2 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 终端上传音视频资源列表 /// - public class JT808_0x1205 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1205 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// /// - public override string Description => "终端上传音视频资源列表"; + public string Description => "终端上传音视频资源列表"; /// /// /// - public override ushort MsgId => 0x1205; + public ushort MsgId => 0x1205; /// /// 流水号 /// @@ -63,7 +63,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1205 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1205 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1205 jT808_0x1205 = new JT808_0x1205(); jT808_0x1205.MsgNum = reader.ReadUInt16(); @@ -86,7 +86,7 @@ public JT808_0x1205 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1205 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1205 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteUInt32(value.AVResouceTotal); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205_AVResouce.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205_AVResouce.cs index 2ceccee3..99627bb0 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205_AVResouce.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1205_AVResouce.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 终端上传音视频资源列表 /// - public class JT808_0x1205_AVResouce:IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1205_AVResouce:JT808MessagePackFormatter, IJT808Analyze { /// /// 逻辑通道号 @@ -152,7 +152,7 @@ string MemoryTypeDisplay(byte MemoryType) /// /// /// - public JT808_0x1205_AVResouce Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1205_AVResouce Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1205_AVResouce jT808_0x1205_AVResouce = new JT808_0x1205_AVResouce(); jT808_0x1205_AVResouce.LogicChannelNo = reader.ReadByte(); @@ -171,7 +171,7 @@ public JT808_0x1205_AVResouce Deserialize(ref JT808MessagePackReader reader, IJT /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1205_AVResouce value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1205_AVResouce value, IJT808Config config) { writer.WriteByte(value.LogicChannelNo); writer.WriteDateTime_yyMMddHHmmss(value.BeginTime); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1206.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1206.cs index b047c6b7..9d8164c4 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1206.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x1206.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 文件上传完成通知 /// - public class JT808_0x1206 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1206 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// /// - public override string Description => "文件上传完成通知"; + public string Description => "文件上传完成通知"; /// /// /// - public override ushort MsgId => 0x1206; + public ushort MsgId => 0x1206; /// /// 流水号 /// @@ -60,7 +60,7 @@ string ResultDisplay(byte Result) { /// /// /// - public JT808_0x1206 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1206 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1206 jT808_0x1206 = new JT808_0x1206(); jT808_0x1206.MsgNum = reader.ReadUInt16(); @@ -73,7 +73,7 @@ public JT808_0x1206 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1206 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1206 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteByte(value.Result); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0075.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0075.cs index a3e550cc..74cc1e3d 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0075.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0075.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 音视频参数设置 /// 0x8103_0x0075 /// - public class JT808_0x8103_0x0075 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0075 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x0075; + public uint ParamId { get; set; } = 0x0075; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 21; + public byte ParamLength { get; set; } = 21; /// /// 实时流编码模式 /// @@ -78,7 +78,7 @@ public class JT808_0x8103_0x0075 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 音视频参数设置 /// - public override string Description => "音视频参数设置"; + public string Description => "音视频参数设置"; /// /// @@ -209,7 +209,7 @@ string OBDDisplay(ushort OBD) { /// /// /// - public JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0075 jT808_0X8103_0X0075 = new JT808_0x8103_0x0075(); jT808_0X8103_0X0075.ParamId = reader.ReadUInt32(); @@ -234,7 +234,7 @@ public JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0075 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0075 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076.cs index 4cc0f003..a3aa9e17 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 音视频通道列表设置 /// 0x8103_0x0076 /// - public class JT808_0x8103_0x0076 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0076 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x0076; + public uint ParamId { get; set; } = 0x0076; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 音视频通道总数 /// l @@ -45,7 +45,7 @@ public class JT808_0x8103_0x0076 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 音视频通道列表设置 /// - public override string Description => "音视频通道列表设置"; + public string Description => "音视频通道列表设置"; /// /// @@ -84,7 +84,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0076 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0076 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0076 jT808_0X8103_0X0076 = new JT808_0x8103_0x0076(); jT808_0X8103_0X0076.ParamId = reader.ReadUInt32(); @@ -110,7 +110,7 @@ public JT808_0x8103_0x0076 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0076 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0076 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int position); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076_AVChannelRefTable.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076_AVChannelRefTable.cs index b25f1ca5..603d0eb1 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076_AVChannelRefTable.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0076_AVChannelRefTable.cs @@ -9,7 +9,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 音视频通道列表设置 /// 0x8103_0x0076_AVChannelRefTable /// - public class JT808_0x8103_0x0076_AVChannelRefTable: IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0076_AVChannelRefTable: JT808MessagePackFormatter, IJT808Analyze { /// /// 物理通道号 @@ -113,7 +113,7 @@ string IsConnectCloudPlatDisplay(byte IsConnectCloudPlat) { /// /// /// - public JT808_0x8103_0x0076_AVChannelRefTable Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0076_AVChannelRefTable Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0076_AVChannelRefTable jT808_0X8103_0X0076_AVChannelRefTable = new JT808_0x8103_0x0076_AVChannelRefTable(); jT808_0X8103_0X0076_AVChannelRefTable.PhysicalChannelNo = reader.ReadByte(); @@ -128,7 +128,7 @@ public JT808_0x8103_0x0076_AVChannelRefTable Deserialize(ref JT808MessagePackRea /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0076_AVChannelRefTable value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0076_AVChannelRefTable value, IJT808Config config) { writer.WriteByte(value.PhysicalChannelNo); writer.WriteByte(value.LogicChannelNo); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077.cs index 1f9bbfc0..2e10d955 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody ///单独视频通道参数设置 /// 0x8103_0x0077 /// - public class JT808_0x8103_0x0077 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0077 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x0077; + public uint ParamId { get; set; } = 0x0077; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 需单独设置视频参数的通道数量 用n表示 /// @@ -33,7 +33,7 @@ public class JT808_0x8103_0x0077 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 单独视频通道参数设置 /// - public override string Description => "单独视频通道参数设置"; + public string Description => "单独视频通道参数设置"; /// /// @@ -66,7 +66,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0077 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0077 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0077 jT808_0X8103_0X0077 = new JT808_0x8103_0x0077(); jT808_0X8103_0X0077.ParamId = reader.ReadUInt32(); @@ -89,7 +89,7 @@ public JT808_0x8103_0x0077 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0077 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0077 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out var position); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077_SignalChannel.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077_SignalChannel.cs index 596fadd3..340f7e4f 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077_SignalChannel.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0077_SignalChannel.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// /// - public class JT808_0x8103_0x0077_SignalChannel: IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0077_SignalChannel: JT808MessagePackFormatter, IJT808Analyze { /// /// 逻辑通道号 @@ -233,7 +233,7 @@ string OBDDisplay(ushort OBD) /// /// /// - public JT808_0x8103_0x0077_SignalChannel Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0077_SignalChannel Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0077_SignalChannel jT808_0X8103_0X0077_SignalChannel = new JT808_0x8103_0x0077_SignalChannel(); jT808_0X8103_0X0077_SignalChannel.LogicChannelNo = reader.ReadByte(); @@ -256,7 +256,7 @@ public JT808_0x8103_0x0077_SignalChannel Deserialize(ref JT808MessagePackReader /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0077_SignalChannel value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0077_SignalChannel value, IJT808Config config) { writer.WriteByte(value.LogicChannelNo); writer.WriteByte(value.RTS_EncodeMode); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0079.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0079.cs index 9626f5b6..8635ad62 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0079.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x0079.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 特殊报警录像参数设置 /// 0x8103_0x0079 /// - public class JT808_0x8103_0x0079 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0079 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x0079; + public uint ParamId { get; set; } = 0x0079; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 3; + public byte ParamLength { get; set; } = 3; /// /// 特殊报警录像存储阈值 /// @@ -37,7 +37,7 @@ public class JT808_0x8103_0x0079 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 特殊报警录像参数设置 /// - public override string Description => "特殊报警录像参数设置"; + public string Description => "特殊报警录像参数设置"; /// /// @@ -65,7 +65,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0079 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0079 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0079 jT808_0x8103_0x0079 = new JT808_0x8103_0x0079(); jT808_0x8103_0x0079.ParamId = reader.ReadUInt32(); @@ -81,7 +81,7 @@ public JT808_0x8103_0x0079 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0079 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0079 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007A.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007A.cs index 2909f82f..b368ca3d 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007A.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007A.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 视频相关报警屏蔽字 /// 0x8103_0x007A /// - public class JT808_0x8103_0x007A : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x007A : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x007A; + public uint ParamId { get; set; } = 0x007A; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 视频相关屏蔽报警字 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x007A : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 视频相关报警屏蔽字 /// - public override string Description => "视频相关报警屏蔽字"; + public string Description => "视频相关报警屏蔽字"; /// /// @@ -71,7 +71,7 @@ string AlarmShieldingDisplay(uint AlarmShielding) /// /// /// - public JT808_0x8103_0x007A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x007A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x007A jT808_0x8103_0x007A = new JT808_0x8103_0x007A(); jT808_0x8103_0x007A.ParamId = reader.ReadUInt32(); @@ -85,7 +85,7 @@ public JT808_0x8103_0x007A Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007A value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007A value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007B.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007B.cs index 9bf39418..930efbe2 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007B.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007B.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// 图像分析报警参数设置 /// 0x8103_0x007B /// - public class JT808_0x8103_0x007B : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x007B : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x007B; + public uint ParamId { get; set; } = 0x007B; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 车辆核载人数 /// @@ -32,7 +32,7 @@ public class JT808_0x8103_0x007B : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 图像分析报警参数设置 /// - public override string Description => "图像分析报警参数设置"; + public string Description => "图像分析报警参数设置"; /// /// @@ -58,7 +58,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x007B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x007B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x007B jT808_0x8103_0x007B = new JT808_0x8103_0x007B(); jT808_0x8103_0x007B.ParamId = reader.ReadUInt32(); @@ -73,7 +73,7 @@ public JT808_0x8103_0x007B Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007B value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007B value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C.cs index 2f960141..1e219c14 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody ///终端休眠模式唤醒设置 /// 0x8103_0x007C /// - public class JT808_0x8103_0x007C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x007C : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// /// - public override uint ParamId { get; set; } = 0x007C; + public uint ParamId { get; set; } = 0x007C; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 20; + public byte ParamLength { get; set; } = 20; /// /// 休眠唤醒模式 /// @@ -40,7 +40,7 @@ public class JT808_0x8103_0x007C : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 终端休眠模式唤醒设置 /// - public override string Description => "终端休眠模式唤醒设置"; + public string Description => "终端休眠模式唤醒设置"; /// /// @@ -98,7 +98,7 @@ string TimerWakeDaySetDisplay(byte TimerWakeDaySet) /// /// /// - public JT808_0x8103_0x007C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x007C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x007C jT808_0x8103_0x007C = new JT808_0x8103_0x007C(); jT808_0x8103_0x007C.ParamId = reader.ReadUInt32(); @@ -115,7 +115,7 @@ public JT808_0x8103_0x007C Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007C value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007C value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out var position); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C_TimerWakeDayParamter.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C_TimerWakeDayParamter.cs index f6fdb894..6471b1e4 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C_TimerWakeDayParamter.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x8103_0x007C_TimerWakeDayParamter.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody ///终端休眠模式唤醒设置 /// 0x8103_0x007C /// - public class JT808_0x8103_0x007C_TimerWakeDayParamter:IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x007C_TimerWakeDayParamter:JT808MessagePackFormatter, IJT808Analyze { /// /// 定时唤醒启用标志 @@ -99,7 +99,7 @@ string TimerWakeEnableFlagDisplay(byte TimerWakeEnableFlag) { /// /// /// - public JT808_0x8103_0x007C_TimerWakeDayParamter Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x007C_TimerWakeDayParamter Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x007C_TimerWakeDayParamter jT808_0x8103_0x007C_TimerWakeDayParamter = new JT808_0x8103_0x007C_TimerWakeDayParamter(); jT808_0x8103_0x007C_TimerWakeDayParamter.TimerWakeEnableFlag = reader.ReadByte(); @@ -119,7 +119,7 @@ public JT808_0x8103_0x007C_TimerWakeDayParamter Deserialize(ref JT808MessagePack /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007C_TimerWakeDayParamter value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x007C_TimerWakeDayParamter value, IJT808Config config) { writer.WriteByte(value.TimerWakeEnableFlag); writer.WriteBCD(value.TimePeriod1WakeTime, 4); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9003.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9003.cs index fc049430..84694f1c 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9003.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9003.cs @@ -9,11 +9,17 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// public class JT808_0x9003:JT808Bodies { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "查询终端音视频属性"; - - public override ushort MsgId => 0x9003; - public override bool SkipSerialization { get; set; } = true; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 查询终端音视频属性 + /// + public string Description => "查询终端音视频属性"; + /// + /// 0x9003 + /// + public ushort MsgId => 0x9003; + /// + /// SkipSerialization + /// + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9101.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9101.cs index 3473455c..be64e078 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9101.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9101.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 实时音视频传输请求(live、talk、listen、fanout、passThrough直播、对讲、监听、广播、透传请求) /// - public class JT808_0x9101: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9101: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "实时音视频传输请求"; - public override ushort MsgId => 0x9101; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 实时音视频传输请求 + /// + public string Description => "实时音视频传输请求"; + /// + /// 0x9101 + /// + public ushort MsgId => 0x9101; /// /// 视频服务器IP地址长度 @@ -120,7 +124,7 @@ string LogicalChannelNoDisplay(byte LogicalChannelNo) { /// /// /// - public JT808_0x9101 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9101 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9101 = new JT808_0x9101(); jT808_0x9101.ServerIpLength = reader.ReadByte(); @@ -139,7 +143,7 @@ public JT808_0x9101 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9101 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9101 value, IJT808Config config) { writer.Skip(1, out int position); writer.WriteString(value.ServerIp); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9102.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9102.cs index fd4a5e1c..20cc68bd 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9102.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9102.cs @@ -11,12 +11,17 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 音视频实时传输控制(LiveControl直播控制) /// - public class JT808_0x9102 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9102 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "音视频实时传输控制"; - public override ushort MsgId => 0x9102; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 音视频实时传输控制 + /// + public string Description => "音视频实时传输控制"; + /// + /// 0x9102 + /// + public ushort MsgId => 0x9102; + /// /// 逻辑通道号 /// @@ -116,7 +121,7 @@ string LogicalChannelNoDisplay(byte LogicalChannelNo) /// /// /// - public JT808_0x9102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0X9102 = new JT808_0x9102(); jT808_0X9102.ChannelNo = reader.ReadByte(); @@ -131,7 +136,7 @@ public JT808_0x9102 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9102 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9102 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.ControlCmd); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9105.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9105.cs index 9f10bc9d..d04667b1 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9105.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9105.cs @@ -11,12 +11,17 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 实时音视频传输状态通知 /// - public class JT808_0x9105 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9105 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "实时音视频传输状态通知"; - public override ushort MsgId => 0x9105; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 实时音视频传输状态通知 + /// + public string Description => "实时音视频传输状态通知"; + /// + /// 0x9105 + /// + public ushort MsgId => 0x9105; + /// /// 逻辑通道号 /// @@ -70,7 +75,7 @@ string LogicalChannelNoDisplay(byte LogicalChannelNo) /// /// /// - public JT808_0x9105 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9105 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9105 jT808_0x9105 = new JT808_0x9105(); jT808_0x9105.ChannelNo = reader.ReadByte(); @@ -83,7 +88,7 @@ public JT808_0x9105 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9105 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9105 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.DropRate); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9201.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9201.cs index 852ac436..5d07946e 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9201.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9201.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 平台下发远程录像回放请求(vod点播请求) /// - public class JT808_0x9201 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9201 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "平台下发远程录像回放请求"; - public override ushort MsgId => 0x9201; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 平台下发远程录像回放请求 + /// + public string Description => "平台下发远程录像回放请求"; + /// + /// 0x9201 + /// + public ushort MsgId => 0x9201; /// /// 服务器IP地址长度 /// @@ -207,7 +211,7 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) /// /// /// - public JT808_0x9201 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9201 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9201 jT808_0x9201 = new JT808_0x9201(); jT808_0x9201.ServerIpLength = reader.ReadByte(); @@ -231,7 +235,7 @@ public JT808_0x9201 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9201 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9201 value, IJT808Config config) { writer.Skip(1, out int position); writer.WriteString(value.ServerIp); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9202.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9202.cs index 80bbc7e0..f4ff4867 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9202.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9202.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 平台下发远程录像回放控制(VodControl点播控制) /// - public class JT808_0x9202 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9202 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "平台下发远程录像回放控制"; - public override ushort MsgId => 0x9202; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 平台下发远程录像回放控制 + /// + public string Description => "平台下发远程录像回放控制"; + /// + /// 0x9202 + /// + public ushort MsgId => 0x9202; /// /// 音视频通道号 /// @@ -118,7 +122,7 @@ static string FastForwardOrFastRewindMultiplesDisplay(byte FastForwardOrFastRewi /// /// /// - public JT808_0x9202 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9202 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9202 = new JT808_0x9202(); jT808_0x9202.ChannelNo = reader.ReadByte(); @@ -133,7 +137,7 @@ public JT808_0x9202 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9202 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9202 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.PlayControl); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9205.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9205.cs index 64c5f95a..90d44f02 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9205.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9205.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 查询资源列表 /// - public class JT808_0x9205 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9205 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "查询资源列表"; - public override ushort MsgId => 0x9205; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 查询资源列表 + /// + public string Description => "查询资源列表"; + /// + /// 0x9205 + /// + public ushort MsgId => 0x9205; /// /// 逻辑通道号 /// @@ -55,7 +59,12 @@ public class JT808_0x9205 : JT808Bodies, IJT808MessagePackFormatter public byte MemoryType { get; set; } -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9205 value = new JT808_0x9205(); @@ -128,8 +137,13 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9205 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9205 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9205 = new JT808_0x9205(); jT808_0x9205.ChannelNo = reader.ReadByte(); @@ -141,8 +155,13 @@ public JT808_0x9205 Deserialize(ref JT808MessagePackReader reader, IJT808Config jT808_0x9205.MemoryType = reader.ReadByte(); return jT808_0x9205; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9205 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9205 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteDateTime_yyMMddHHmmss(value.BeginTime); @@ -152,6 +171,5 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9205 value, IJT writer.WriteByte(value.StreamType); writer.WriteByte(value.MemoryType); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9206.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9206.cs index f36d0fd5..d72bf56d 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9206.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9206.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 文件上传指令 /// - public class JT808_0x9206 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9206 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 文件上传指令 /// - public override string Description => "文件上传指令"; + public string Description => "文件上传指令"; /// /// 0x9206 /// - public override ushort MsgId => 0x9206; + public ushort MsgId => 0x9206; /// /// 服务器IP地址服务 /// @@ -206,7 +206,7 @@ static string TaskExcuteConditionDisplay(byte TaskExcuteCondition) { /// /// /// - public JT808_0x9206 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9206 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9206 = new JT808_0x9206(); jT808_0x9206.ServerIpLength = reader.ReadByte(); @@ -234,7 +234,7 @@ public JT808_0x9206 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9206 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9206 value, IJT808Config config) { writer.Skip(1, out int serverIpLengthposition); writer.WriteString(value.ServerIp); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9207.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9207.cs index 0867ffd4..06d9613a 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9207.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9207.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 文件上传控制 /// - public class JT808_0x9207 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9207 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "文件上传控制"; - public override ushort MsgId => 0x9207; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 文件上传控制 + /// + public string Description => "文件上传控制"; + /// + /// 0x9207 + /// + public ushort MsgId => 0x9207; /// /// 流水号 /// @@ -26,7 +30,12 @@ public class JT808_0x9207 : JT808Bodies, IJT808MessagePackFormatter public byte UploadControl { get; set; } -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9207 value = new JT808_0x9207(); @@ -44,20 +53,29 @@ static string UploadControlDisplay(byte UploadControl) { }; } } - - public JT808_0x9207 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9207 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9207 = new JT808_0x9207(); jT808_0x9207.MgsNum = reader.ReadUInt16(); jT808_0x9207.UploadControl = reader.ReadByte(); return jT808_0x9207; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9207 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9207 value, IJT808Config config) { writer.WriteUInt16(value.MgsNum); writer.WriteByte(value.UploadControl); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9301.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9301.cs index bbc77376..e01ee181 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9301.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9301.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 云台旋转 /// - public class JT808_0x9301 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9301 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "云台旋转"; - public override ushort MsgId => 0x9301; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 云台旋转 + /// + public string Description => "云台旋转"; + /// + /// 0x9301 + /// + public ushort MsgId => 0x9301; /// /// 逻辑通道号 /// @@ -35,7 +39,12 @@ public class JT808_0x9301 : JT808Bodies, IJT808MessagePackFormatter public byte Speed { get; set; } -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9301 value = new JT808_0x9301(); @@ -79,8 +88,13 @@ static string DirectionDisplay(byte Direction) { }; } } - - public JT808_0x9301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9301 = new JT808_0x9301(); jT808_0x9301.ChannelNo = reader.ReadByte(); @@ -88,13 +102,17 @@ public JT808_0x9301 Deserialize(ref JT808MessagePackReader reader, IJT808Config jT808_0x9301.Speed = reader.ReadByte(); return jT808_0x9301; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9301 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9301 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.Direction); writer.WriteByte(value.Speed); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9302.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9302.cs index 27802fb5..a28aabbe 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9302.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9302.cs @@ -11,13 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 云台调整焦距控制 /// - public class JT808_0x9302 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9302 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "云台调整焦距控制"; - public override ushort MsgId => 0x9302; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 - + /// + /// 云台调整焦距控制 + /// + public string Description => "云台调整焦距控制"; + /// + /// 0x9302 + /// + public ushort MsgId => 0x9302; /// /// 逻辑通道号 /// @@ -26,7 +29,12 @@ public class JT808_0x9302 : JT808Bodies, IJT808MessagePackFormatter public byte FocusAdjustmentDirection { get; set; } -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { var value = new JT808_0x9302(); @@ -59,20 +67,29 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9302 = new JT808_0x9302(); jT808_0x9302.LogicChannelNo = reader.ReadByte(); jT808_0x9302.FocusAdjustmentDirection = reader.ReadByte(); return jT808_0x9302; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9302 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9302 value, IJT808Config config) { writer.WriteByte(value.LogicChannelNo); writer.WriteByte(value.FocusAdjustmentDirection); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9303.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9303.cs index 77764008..0a232487 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9303.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9303.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 云台调整光圈控制 /// - public class JT808_0x9303 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9303 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "云台调整光圈控制"; - public override ushort MsgId => 0x9303; -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// 云台调整光圈控制 + /// + public string Description => "云台调整光圈控制"; + /// + /// 0x9303 + /// + public ushort MsgId => 0x9303; /// /// 逻辑通道号 /// @@ -25,7 +29,12 @@ public class JT808_0x9303 : JT808Bodies, IJT808MessagePackFormatter public byte IrisAdjustment { get; set; } -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9303 value = new JT808_0x9303(); @@ -57,20 +66,29 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9303 = new JT808_0x9303(); jT808_0x9303.ChannelNo = reader.ReadByte(); jT808_0x9303.IrisAdjustment = reader.ReadByte(); return jT808_0x9303; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9303 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9303 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.IrisAdjustment); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9304.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9304.cs index 8b01d6ea..4414bea2 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9304.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9304.cs @@ -11,11 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 云台雨刷控制 /// - public class JT808_0x9304 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9304 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "云台雨刷控制"; - public override ushort MsgId => 0x9304; + /// + /// 云台雨刷控制 + /// + public string Description => "云台雨刷控制"; + /// + /// 0x9304 + /// + public ushort MsgId => 0x9304; /// /// 逻辑通道号 /// @@ -24,7 +29,12 @@ public class JT808_0x9304 : JT808Bodies, IJT808MessagePackFormatter public byte StartOrStop { get; set; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9304 value = new JT808_0x9304(); @@ -56,20 +66,29 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9304 = new JT808_0x9304(); jT808_0x9304.ChannelNo = reader.ReadByte(); jT808_0x9304.StartOrStop = reader.ReadByte(); return jT808_0x9304; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9304 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9304 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.StartOrStop); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9305.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9305.cs index aa2aa332..04cd2848 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9305.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9305.cs @@ -11,11 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 红外补光控制 /// - public class JT808_0x9305 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9305 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "红外补光控制"; - public override ushort MsgId => 0x9305; + /// + /// 红外补光控制 + /// + public string Description => "红外补光控制"; + /// + /// 0x9305 + /// + public ushort MsgId => 0x9305; /// /// 逻辑通道号 /// @@ -24,7 +29,12 @@ public class JT808_0x9305 : JT808Bodies, IJT808MessagePackFormatter public byte StartOrStop { get; set; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9305 value = new JT808_0x9305(); @@ -56,16 +66,27 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9305 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9305 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9305 = new JT808_0x9305(); jT808_0x9305.ChannelNo = reader.ReadByte(); jT808_0x9305.StartOrStop = reader.ReadByte(); return jT808_0x9305; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9305 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9305 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.StartOrStop); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9306.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9306.cs index c0f7f797..c320ee4f 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9306.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.JT1078/MessageBody/JT808_0x9306.cs @@ -11,12 +11,16 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody /// /// 云台变倍控制 /// - public class JT808_0x9306 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9306 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { -#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释 - public override string Description => "云台变倍控制"; - - public override ushort MsgId => 0x9306; + /// + /// 云台变倍控制 + /// + public string Description => "云台变倍控制"; + /// + /// 0x9306 + /// + public ushort MsgId => 0x9306; /// /// 逻辑通道号 /// @@ -25,7 +29,12 @@ public class JT808_0x9306 : JT808Bodies, IJT808MessagePackFormatter public byte ChangeMultipleControl { get; set; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { var value = new JT808_0x9306(); @@ -57,20 +66,29 @@ static string LogicalChannelNoDisplay(byte LogicalChannelNo) }; } } - - public JT808_0x9306 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override JT808_0x9306 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { var jT808_0x9306 = new JT808_0x9306(); jT808_0x9306.ChannelNo = reader.ReadByte(); jT808_0x9306.ChangeMultipleControl = reader.ReadByte(); return jT808_0x9306; } - - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9306 value, IJT808Config config) + /// + /// + /// + /// + /// + /// + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9306 value, IJT808Config config) { writer.WriteByte(value.ChannelNo); writer.WriteByte(value.ChangeMultipleControl); } -#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释 } } diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao.Test/JT808.Protocol.Extensions.SuBiao.Test.csproj b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao.Test/JT808.Protocol.Extensions.SuBiao.Test.csproj index f4db3762..94a138b6 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao.Test/JT808.Protocol.Extensions.SuBiao.Test.csproj +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao.Test/JT808.Protocol.Extensions.SuBiao.Test.csproj @@ -1,14 +1,14 @@  - net6.0 + net7.0 false - + all diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x64.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x64.cs index f0f66555..15902e02 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x64.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x64.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 高级驾驶辅助系统报警信息 /// - public class JT808_0x0200_0x64 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x64 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// 高级驾驶辅助系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x64; + public byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x64; /// /// 高级驾驶辅助系统报警信息附加长度 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// 报警ID /// @@ -276,7 +276,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x64 value = new JT808_0x0200_0x64(); value.AttachInfoId = reader.ReadByte(); @@ -312,7 +312,7 @@ public JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x64 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x64 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x65.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x65.cs index 990c62c7..dc7c51f9 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x65.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x65.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 驾驶员状态监测系统报警信息 /// - public class JT808_0x0200_0x65 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x65 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// 驾驶员状态监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x65; + public byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x65; /// /// 驾驶员状态监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// 报警ID /// @@ -228,7 +228,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x65 value = new JT808_0x0200_0x65(); value.AttachInfoId = reader.ReadByte(); @@ -261,7 +261,7 @@ public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x65 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x65 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x66.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x66.cs index 9809ceea..c617ea01 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x66.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x66.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 胎压监测系统报警信息 /// - public class JT808_0x0200_0x66 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x66 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// 胎压监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x66; + public byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x66; /// /// 胎压监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// 报警ID /// @@ -229,7 +229,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x66 value = new JT808_0x0200_0x66(); value.AttachInfoId = reader.ReadByte(); @@ -273,7 +273,7 @@ public JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x66 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x66 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x67.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x67.cs index 51b15ffb..8065881a 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x67.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0200_0x67.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 盲区监测系统报警信息 /// - public class JT808_0x0200_0x67 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x67 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze { /// /// 盲区监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x67; + public byte AttachInfoId { get; set; } = JT808_SuBiao_Constants.JT808_0X0200_0x67; /// /// 盲区监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// 报警ID /// @@ -220,7 +220,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x67 value = new JT808_0x0200_0x67(); value.AttachInfoId = reader.ReadByte(); @@ -251,7 +251,7 @@ public JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x67 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x67 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF7.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF7.cs index 7966ba55..39330dbb 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF7.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF7.cs @@ -14,12 +14,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 透传数据 /// - public class JT808_0x0900_0xF7 : JT808_0x0900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0900_0xF7 : JT808MessagePackFormatter, JT808_0x0900_BodyBase, IJT808Analyze { /// /// 透传类型 /// - public override byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF7; + public byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF7; /// /// 消息列表总数 /// @@ -79,7 +79,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900_0xF7 value = new JT808_0x0900_0xF7(); value.USBMessageCount = reader.ReadByte(); @@ -104,7 +104,7 @@ public JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF7 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF7 value, IJT808Config config) { if (value.USBMessages != null && value.USBMessages.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF8.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF8.cs index 0908fdf4..c9e783e3 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF8.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x0900_0xF8.cs @@ -13,12 +13,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 透传数据 /// - public class JT808_0x0900_0xF8 : JT808_0x0900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0900_0xF8 : JT808MessagePackFormatter, JT808_0x0900_BodyBase, IJT808Analyze { /// /// 透传类型 /// - public override byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF8; + public byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF8; /// /// 消息列表总数 /// @@ -98,7 +98,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900_0xF8 value = new JT808_0x0900_0xF8(); value.USBMessageCount = reader.ReadByte(); @@ -133,7 +133,7 @@ public JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF8 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF8 value, IJT808Config config) { if (value.USBMessages != null && value.USBMessages.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1210.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1210.cs index ac35a34a..5f38eae0 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1210.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1210.cs @@ -12,7 +12,7 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 报警附件信息消息 /// - public class JT808_0x1210: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1210: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 终端ID @@ -45,11 +45,11 @@ public class JT808_0x1210: JT808Bodies, IJT808MessagePackFormatter /// /// 报警附件信息消息Id /// - public override ushort MsgId => 0x1210; + public ushort MsgId => 0x1210; /// /// 报警附件信息消息 /// - public override string Description => "报警附件信息消息"; + public string Description => "报警附件信息消息"; /// /// /// @@ -106,7 +106,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1210 value = new JT808_0x1210(); value.TerminalId = reader.ReadString(7); @@ -141,7 +141,7 @@ public JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1210 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1210 value, IJT808Config config) { writer.WriteString(value.TerminalId.PadRight(7, '\0')); if (value.AlarmIdentification == null) diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1211.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1211.cs index 203968f4..3e04a9a3 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1211.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1211.cs @@ -8,12 +8,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 文件信息上传 /// - public class JT808_0x1211 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1211 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 文件信息上传 /// - public override string Description => "文件信息上传"; + public string Description => "文件信息上传"; /// /// 文件名称长度 /// @@ -34,7 +34,7 @@ public class JT808_0x1211 : JT808Bodies, IJT808MessagePackFormatter /// 文件信息上传Id /// - public override ushort MsgId => 0x1211; + public ushort MsgId => 0x1211; /// /// /// @@ -60,7 +60,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1211 value = new JT808_0x1211(); value.FileNameLength = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1211 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1211 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1212.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1212.cs index 858fb032..cacc509a 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1212.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x1212.cs @@ -8,12 +8,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 文件上传完成消息 /// - public class JT808_0x1212 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x1212 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 文件上传完成消息 /// - public override string Description => "文件上传完成消息"; + public string Description => "文件上传完成消息"; /// /// 文件名称长度 /// @@ -34,7 +34,7 @@ public class JT808_0x1212 : JT808Bodies, IJT808MessagePackFormatter /// 文件上传完成消息 /// - public override ushort MsgId => 0x1212; + public ushort MsgId => 0x1212; /// /// /// @@ -60,7 +60,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1212 value = new JT808_0x1212(); value.FileNameLength = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1212 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1212 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF364.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF364.cs index f424a03a..5682b216 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF364.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF364.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 高级驾驶辅助系统参数 /// - public class JT808_0x8103_0xF364 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0xF364 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 高级驾驶辅助系统参数 /// - public override uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF364; + public uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF364; /// /// 高级驾驶辅助系统参数长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 报警判断速度阈值 /// @@ -207,7 +207,7 @@ public class JT808_0x8103_0xF364 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 高级驾驶辅助系统参数 /// - public override string Description => "高级驾驶辅助系统参数"; + public string Description => "高级驾驶辅助系统参数"; /// /// @@ -348,7 +348,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF364 value = new JT808_0x8103_0xF364(); value.ParamId = reader.ReadUInt32(); @@ -406,7 +406,7 @@ public JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF364 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF364 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF365.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF365.cs index 328376b2..710bc4c7 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF365.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF365.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 驾驶员状态监测系统参数 /// - public class JT808_0x8103_0xF365 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0xF365 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 驾驶员状态监测系统参数 /// - public override uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF365; + public uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF365; /// /// 驾驶员状态监测系统参数长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 报警判断速度阈值 /// @@ -160,7 +160,7 @@ public class JT808_0x8103_0xF365 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 驾驶员状态监测系统参数 /// - public override string Description => "驾驶员状态监测系统参数"; + public string Description => "驾驶员状态监测系统参数"; /// /// @@ -279,7 +279,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF365 value = new JT808_0x8103_0xF365(); value.ParamId = reader.ReadUInt32(); @@ -326,7 +326,7 @@ public JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF365 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF365 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF366.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF366.cs index 839e184a..cc158460 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF366.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF366.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 胎压监测系统参数 /// - public class JT808_0x8103_0xF366 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0xF366 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 胎压监测系统参数Id /// - public override uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF366; + public uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF366; /// /// 胎压监测系统参数长度 /// - public override byte ParamLength { get; set; } = 46; + public byte ParamLength { get; set; } = 46; /// /// 轮胎规格型号 12位 /// @@ -66,7 +66,7 @@ public class JT808_0x8103_0xF366 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 胎压监测系统参数 /// - public override string Description => "胎压监测系统参数"; + public string Description => "胎压监测系统参数"; /// /// @@ -111,7 +111,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF366 value = new JT808_0x8103_0xF366(); value.ParamId = reader.ReadUInt32(); @@ -135,7 +135,7 @@ public JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF366 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF366 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF367.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF367.cs index 8aeaf644..189951b2 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF367.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8103_0xF367.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 盲区监测系统参数 /// - public class JT808_0x8103_0xF367 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0xF367 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 盲区监测系统参数Id /// - public override uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF367; + public uint ParamId { get; set; } = JT808_SuBiao_Constants.JT808_0X8103_0xF367; /// /// 盲区监测系统参数长度 /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 后方接近报警时间阈值 /// @@ -30,7 +30,7 @@ public class JT808_0x8103_0xF367 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 盲区监测系统参数 /// - public override string Description => "盲区监测系统参数"; + public string Description => "盲区监测系统参数"; /// /// @@ -56,7 +56,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF367 value = new JT808_0x8103_0xF367(); value.ParamId = reader.ReadUInt32(); @@ -71,7 +71,7 @@ public JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF367 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF367 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(2); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF7.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF7.cs index 48b8988f..0955b046 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF7.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF7.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 查询基本信息 /// - public class JT808_0x8900_0xF7 : JT808_0x8900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8900_0xF7 : JT808MessagePackFormatter, JT808_0x8900_BodyBase, IJT808Analyze { /// /// 查询基本信息类型 /// - public override byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF7; + public byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF7; /// /// 外设ID列表总数 /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8900_0xF7 value = new JT808_0x8900_0xF7(); value.USBCount = reader.ReadByte(); @@ -74,7 +74,7 @@ public JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF7 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF7 value, IJT808Config config) { if (value.MultipleUSB != null && value.MultipleUSB.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF8.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF8.cs index ccadebb2..af519b9d 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF8.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x8900_0xF8.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 查询基本信息 /// - public class JT808_0x8900_0xF8 : JT808_0x8900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8900_0xF8 : JT808MessagePackFormatter, JT808_0x8900_BodyBase, IJT808Analyze { /// /// 查询基本信息透传类型 /// - public override byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF8; + public byte PassthroughType { get; set; } = JT808_SuBiao_Constants.JT808_0X0900_0xF8; /// /// 外设ID列表总数 /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8900_0xF8 value = new JT808_0x8900_0xF8(); value.USBCount = reader.ReadByte(); @@ -74,7 +74,7 @@ public JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF8 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF8 value, IJT808Config config) { if (value.MultipleUSB != null && value.MultipleUSB.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9208.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9208.cs index 0172cd5c..48bbfcd8 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9208.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9208.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 报警附件上传指令 /// - public class JT808_0x9208: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9208: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// Description /// - public override string Description => "报警附件上传指令"; + public string Description => "报警附件上传指令"; /// /// 服务IP地址长度 /// @@ -48,7 +48,7 @@ public class JT808_0x9208: JT808Bodies, IJT808MessagePackFormatter /// /// 报警附件上传指令Id /// - public override ushort MsgId => 0x9208; + public ushort MsgId => 0x9208; /// /// /// @@ -91,7 +91,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9208 value = new JT808_0x9208(); value.AttachmentServerIPLength = reader.ReadByte(); @@ -116,7 +116,7 @@ public JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9208 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9208 value, IJT808Config config) { writer.Skip(1, out int AttachmentServerIPLengthPosition); writer.WriteString(value.AttachmentServerIP); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9212.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9212.cs index 1243c18e..7db155fe 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9212.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.SuBiao/MessageBody/JT808_0x9212.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.SuBiao.MessageBody /// /// 文件上传完成消息应答 /// - public class JT808_0x9212: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x9212: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 文件上传完成消息应答 /// - public override string Description => "文件上传完成消息应答"; + public string Description => "文件上传完成消息应答"; /// /// 文件名称长度 /// @@ -44,7 +44,7 @@ public class JT808_0x9212: JT808Bodies, IJT808MessagePackFormatter /// /// 文件上传完成消息应答Id /// - public override ushort MsgId => 0x9212; + public ushort MsgId => 0x9212; /// /// /// @@ -87,7 +87,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9212 value = new JT808_0x9212(); value.FileNameLength = reader.ReadByte(); @@ -114,7 +114,7 @@ public JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9212 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9212 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao.Test/JT808.Protocol.Extensions.YueBiao.Test.csproj b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao.Test/JT808.Protocol.Extensions.YueBiao.Test.csproj index 37b0a564..b47847bb 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao.Test/JT808.Protocol.Extensions.YueBiao.Test.csproj +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao.Test/JT808.Protocol.Extensions.YueBiao.Test.csproj @@ -1,14 +1,14 @@ - net6.0 + net7.0 false - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x64.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x64.cs index dcb8f989..81bfd786 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x64.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x64.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 高级驾驶辅助系统报警信息 /// - public class JT808_0x0200_0x64 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze,IJT808_2019_Version + public class JT808_0x0200_0x64 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze,IJT808_2019_Version { /// /// 高级驾驶辅助系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x64; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x64; /// /// 高级驾驶辅助系统报警信息附加长度 /// - public override byte AttachInfoLength { get; set; } = 73; + public byte AttachInfoLength { get; set; } = 73; /// /// 报警ID /// @@ -290,7 +290,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x64 value = new JT808_0x0200_0x64(); value.AttachInfoId = reader.ReadByte(); @@ -327,7 +327,7 @@ public JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x64 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x64 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x65.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x65.cs index a761738a..ac867124 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x65.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x65.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 驾驶员状态监测系统报警信息 /// - public class JT808_0x0200_0x65 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x65 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 驾驶员状态监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x65; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x65; /// /// 驾驶员状态监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } = 47; + public byte AttachInfoLength { get; set; } = 47; /// /// 报警ID /// @@ -246,7 +246,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x65 value = new JT808_0x0200_0x65(); value.AttachInfoId = reader.ReadByte(); @@ -280,7 +280,7 @@ public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x65 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x65 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x66.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x66.cs index 0a335c15..6fc175f4 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x66.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x66.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 胎压监测系统报警信息 /// - public class JT808_0x0200_0x66 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x66 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 胎压监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x66; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x66; /// /// 胎压监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// 报警ID /// @@ -187,7 +187,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x66 value = new JT808_0x0200_0x66(); value.AttachInfoId = reader.ReadByte(); @@ -232,7 +232,7 @@ public JT808_0x0200_0x66 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x66 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x66 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x67.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x67.cs index 7f2007cd..68dda1f1 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x67.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0x67.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 盲区监测系统报警信息 /// - public class JT808_0x0200_0x67 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x67 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 盲区监测系统报警信息Id /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x67; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0x67; /// /// 盲区监测系统报警信息长度 /// - public override byte AttachInfoLength { get; set; } = 26; + public byte AttachInfoLength { get; set; } = 26; /// /// 报警ID /// @@ -162,7 +162,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x67 value = new JT808_0x0200_0x67(); value.AttachInfoId = reader.ReadByte(); @@ -193,7 +193,7 @@ public JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x67 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x67 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.Skip(1, out int AttachInfoLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF1.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF1.cs index 0eb9311e..b282d3fc 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF1.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF1.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 安装异常信息 /// - public class JT808_0x0200_0xF1 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0xF1 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 安装异常信息附件ID /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0xF1; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0xF1; /// /// 算法异常信息长度 /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 厂家自定义 /// @@ -49,7 +49,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0xF1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0xF1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0xF1 value = new JT808_0x0200_0xF1(); value.AttachInfoId = reader.ReadByte(); @@ -63,7 +63,7 @@ public JT808_0x0200_0xF1 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0xF1 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0xF1 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF2.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF2.cs index 4764c3f8..48765935 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF2.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0200_0xF2.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 算法异常信息 /// - public class JT808_0x0200_0xF2 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0xF2 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 算法异常信息附件ID /// - public override byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0xF2; + public byte AttachInfoId { get; set; } = JT808_YueBiao_Constants.JT808_0X0200_0xF2; /// /// 算法异常信息长度 /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 厂家自定义 /// @@ -49,7 +49,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0xF2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0xF2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0xF2 value = new JT808_0x0200_0xF2(); value.AttachInfoId = reader.ReadByte(); @@ -63,7 +63,7 @@ public JT808_0x0200_0xF2 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0xF2 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0xF2 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF7.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF7.cs index d79615ba..96fd67f9 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF7.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF7.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 透传数据 /// - public class JT808_0x0900_0xF7 : JT808_0x0900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0900_0xF7 : JT808MessagePackFormatter, JT808_0x0900_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 透传类型 /// - public override byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF7; + public byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF7; /// /// 消息列表总数 /// @@ -80,7 +80,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900_0xF7 value = new JT808_0x0900_0xF7(); value.USBMessageCount = reader.ReadByte(); @@ -105,7 +105,7 @@ public JT808_0x0900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF7 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF7 value, IJT808Config config) { if (value.USBMessages != null && value.USBMessages.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF8.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF8.cs index 18ff27a1..9321f7cc 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF8.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x0900_0xF8.cs @@ -13,12 +13,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 透传数据 /// - public class JT808_0x0900_0xF8 : JT808_0x0900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0900_0xF8 : JT808MessagePackFormatter, JT808_0x0900_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 透传类型 /// - public override byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF8; + public byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF8; /// /// 消息列表总数 /// @@ -98,7 +98,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900_0xF8 value = new JT808_0x0900_0xF8(); value.USBMessageCount = reader.ReadByte(); @@ -133,7 +133,7 @@ public JT808_0x0900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF8 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0xF8 value, IJT808Config config) { if (value.USBMessages != null && value.USBMessages.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1210.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1210.cs index f2ee7728..a14cdb19 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1210.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1210.cs @@ -12,7 +12,7 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 报警附件信息消息 /// - public class JT808_0x1210: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze,IJT808_2019_Version + public class JT808_0x1210: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze,IJT808_2019_Version { /// /// 终端 ID @@ -45,11 +45,11 @@ public class JT808_0x1210: JT808Bodies, IJT808MessagePackFormatter /// /// 报警附件信息消息Id /// - public override ushort MsgId => 0x1210; + public ushort MsgId => 0x1210; /// /// 报警附件信息消息 /// - public override string Description => "报警附件信息消息"; + public string Description => "报警附件信息消息"; /// /// /// @@ -108,7 +108,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1210 value = new JT808_0x1210(); value.TerminalId = reader.ReadString(30); @@ -144,7 +144,7 @@ public JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1210 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1210 value, IJT808Config config) { writer.WriteString(value.TerminalId.PadRight(30, '\0')); if (value.AlarmIdentification == null) diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1211.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1211.cs index c769e04c..fcb30bc4 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1211.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1211.cs @@ -8,12 +8,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 文件信息上传 /// - public class JT808_0x1211 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x1211 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 文件信息上传 /// - public override string Description => "文件信息上传"; + public string Description => "文件信息上传"; /// /// 文件名称长度 /// @@ -34,7 +34,7 @@ public class JT808_0x1211 : JT808Bodies, IJT808MessagePackFormatter /// 文件信息上传Id /// - public override ushort MsgId => 0x1211; + public ushort MsgId => 0x1211; /// /// /// @@ -60,7 +60,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1211 value = new JT808_0x1211(); value.FileNameLength = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x1211 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1211 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1211 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1212.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1212.cs index bbbf5235..37fccdd1 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1212.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1212.cs @@ -8,12 +8,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 文件上传完成消息 /// - public class JT808_0x1212 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x1212 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 文件上传完成消息 /// - public override string Description => "文件上传完成消息"; + public string Description => "文件上传完成消息"; /// /// 文件名称长度 /// @@ -34,7 +34,7 @@ public class JT808_0x1212 : JT808Bodies, IJT808MessagePackFormatter /// 文件上传完成消息 /// - public override ushort MsgId => 0x1212; + public ushort MsgId => 0x1212; /// /// /// @@ -60,7 +60,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1212 value = new JT808_0x1212(); value.FileNameLength = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x1212 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1212 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1212 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1FC4.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1FC4.cs index 406c8261..67a38efa 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1FC4.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x1FC4.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 终端升级进度上报 /// - public class JT808_0x1FC4 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x1FC4 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 终端升级进度上报 /// - public override string Description => "终端升级进度上报"; + public string Description => "终端升级进度上报"; /// /// 终端升级进度上报 /// - public override ushort MsgId => JT808_YueBiao_MsgId.terminal_upgrade_progress_reported.ToUInt16Value(); + public ushort MsgId => JT808_YueBiao_MsgId.terminal_upgrade_progress_reported.ToUInt16Value(); /// /// 流水号 /// @@ -71,7 +71,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x1FC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x1FC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1FC4 value = new JT808_0x1FC4(); value.MsgNum = reader.ReadUInt16(); @@ -87,7 +87,7 @@ public JT808_0x1FC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x1FC4 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x1FC4 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteByte(value.UpgradeType.ToByteValue()); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF364.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF364.cs index 0b0a52e5..dc3b1fab 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF364.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF364.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 高级驾驶辅助系统参数 /// - public class JT808_0x8103_0xF364 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8103_0xF364 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 高级驾驶辅助系统参数 /// - public override uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF364; + public uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF364; /// /// 高级驾驶辅助系统参数长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 报警判断速度阈值 /// @@ -240,7 +240,7 @@ public class JT808_0x8103_0xF364 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 高级驾驶辅助系统参数 /// - public override string Description => "高级驾驶辅助系统参数"; + public string Description => "高级驾驶辅助系统参数"; /// /// @@ -402,7 +402,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF364 value = new JT808_0x8103_0xF364(); value.ParamId = reader.ReadUInt32(); @@ -471,7 +471,7 @@ public JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF364 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF364 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF365.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF365.cs index c7daee4e..f0d4aafd 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF365.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF365.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 驾驶员状态监测系统参数 /// - public class JT808_0x8103_0xF365 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8103_0xF365 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 驾驶员状态监测系统参数 /// - public override uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF365; + public uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF365; /// /// 驾驶员状态监测系统参数长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 报警判断速度阈值 /// @@ -238,7 +238,7 @@ public class JT808_0x8103_0xF365 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 驾驶员状态监测系统参数 /// - public override string Description => "驾驶员状态监测系统参数"; + public string Description => "驾驶员状态监测系统参数"; /// /// @@ -406,7 +406,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF365 value = new JT808_0x8103_0xF365(); value.ParamId = reader.ReadUInt32(); @@ -477,7 +477,7 @@ public JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF365 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF365 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF366.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF366.cs index 32d7164c..f6efb729 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF366.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF366.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 胎压监测系统参数 /// - public class JT808_0x8103_0xF366 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8103_0xF366 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 胎压监测系统参数Id /// - public override uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF366; + public uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF366; /// /// 胎压监测系统参数长度 /// - public override byte ParamLength { get; set; } = 46; + public byte ParamLength { get; set; } = 46; /// /// 轮胎规格型号 12位 /// @@ -66,7 +66,7 @@ public class JT808_0x8103_0xF366 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 胎压监测系统参数 /// - public override string Description => "胎压监测系统参数"; + public string Description => "胎压监测系统参数"; /// /// @@ -111,7 +111,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF366 value = new JT808_0x8103_0xF366(); value.ParamId = reader.ReadUInt32(); @@ -135,7 +135,7 @@ public JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF366 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF366 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int ParamLengthPosition); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF367.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF367.cs index 35b18ae7..a3aba54c 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF367.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF367.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 盲区监测系统参数 /// - public class JT808_0x8103_0xF367 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8103_0xF367 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 盲区监测系统参数Id /// - public override uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF367; + public uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF367; /// /// 盲区监测系统参数长度 /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 后方接近报警时间阈值 /// @@ -30,7 +30,7 @@ public class JT808_0x8103_0xF367 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 盲区监测系统参数 /// - public override string Description => "盲区监测系统参数"; + public string Description => "盲区监测系统参数"; /// /// @@ -56,7 +56,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF367 value = new JT808_0x8103_0xF367(); value.ParamId = reader.ReadUInt32(); @@ -71,7 +71,7 @@ public JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF367 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF367 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(2); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF370.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF370.cs index f65a4207..180bbf69 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF370.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8103_0xF370.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 智能视频协议版本信息 /// - public class JT808_0x8103_0xF370 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8103_0xF370 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 系统参数Id /// - public override uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF370; + public uint ParamId { get; set; } = JT808_YueBiao_Constants.JT808_0X8103_0xF370; /// /// 参数长度 /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// 智能视频协议版本信息 /// 引入此智能视频协议版本信息方便平台进行版本控制初始版本是 @@ -29,7 +29,7 @@ public class JT808_0x8103_0xF370 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 智能视频协议版本信息 /// - public override string Description => "智能视频协议版本信息"; + public string Description => "智能视频协议版本信息"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0xF370 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0xF370 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0xF370 value = new JT808_0x8103_0xF370(); value.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0xF370 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF370 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF370 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF7.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF7.cs index 710a3118..228f3472 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF7.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF7.cs @@ -10,13 +10,13 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 状态查询 /// - public class JT808_0x8900_0xF7 : JT808_0x8900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8900_0xF7 : JT808MessagePackFormatter, JT808_0x8900_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 查询基本信息类型 /// 外设状态信息:外设工作状态、设备报警信息 /// - public override byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF7; + public byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF7; /// /// 外设ID列表总数 /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8900_0xF7 value = new JT808_0x8900_0xF7(); value.USBCount = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x8900_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF7 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF7 value, IJT808Config config) { if (value.MultipleUSB != null && value.MultipleUSB.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF8.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF8.cs index b5ed717a..a0ee5c87 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF8.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x8900_0xF8.cs @@ -10,13 +10,13 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 信息查询 /// - public class JT808_0x8900_0xF8 : JT808_0x8900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8900_0xF8 : JT808MessagePackFormatter, JT808_0x8900_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 查询基本信息透传类型 /// 外设传感器的基本信息:公司信息、 产品代码、 版本号、 外设 ID、 客户代码。对应的消息内容见表 /// - public override byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF8; + public byte PassthroughType { get; set; } = JT808_YueBiao_Constants.JT808_0X0900_0xF8; /// /// 外设ID列表总数 /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8900_0xF8 value = new JT808_0x8900_0xF8(); value.USBCount = reader.ReadByte(); @@ -75,7 +75,7 @@ public JT808_0x8900_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF8 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900_0xF8 value, IJT808Config config) { if (value.MultipleUSB != null && value.MultipleUSB.Count > 0) { diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9208.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9208.cs index 597d35b2..c60a9db4 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9208.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9208.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 报警附件上传指令 /// - public class JT808_0x9208: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x9208: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// Description /// - public override string Description => "报警附件上传指令"; + public string Description => "报警附件上传指令"; /// /// 服务IP地址长度 /// @@ -48,7 +48,7 @@ public class JT808_0x9208: JT808Bodies, IJT808MessagePackFormatter /// /// 报警附件上传指令Id /// - public override ushort MsgId => 0x9208; + public ushort MsgId => 0x9208; /// /// /// @@ -93,7 +93,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9208 value = new JT808_0x9208(); value.AttachmentServerIPLength = reader.ReadByte(); @@ -119,7 +119,7 @@ public JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9208 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9208 value, IJT808Config config) { writer.Skip(1, out int AttachmentServerIPLengthPosition); writer.WriteString(value.AttachmentServerIP); diff --git a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9212.cs b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9212.cs index 4c0584d6..ce91ff74 100644 --- a/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9212.cs +++ b/src/JT808.Protocol.Extensions/JT808.Protocol.Extensions.YueBiao/MessageBody/JT808_0x9212.cs @@ -10,12 +10,12 @@ namespace JT808.Protocol.Extensions.YueBiao.MessageBody /// /// 文件上传完成消息应答 /// - public class JT808_0x9212: JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x9212: JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 文件上传完成消息应答 /// - public override string Description => "文件上传完成消息应答"; + public string Description => "文件上传完成消息应答"; /// /// 文件名称长度 /// @@ -44,7 +44,7 @@ public class JT808_0x9212: JT808Bodies, IJT808MessagePackFormatter /// /// 文件上传完成消息应答Id /// - public override ushort MsgId => 0x9212; + public ushort MsgId => 0x9212; /// /// /// @@ -87,7 +87,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9212 value = new JT808_0x9212(); value.FileNameLength = reader.ReadByte(); @@ -114,7 +114,7 @@ public JT808_0x9212 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9212 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9212 value, IJT808Config config) { writer.Skip(1, out int FileNameLengthPosition); writer.WriteString(value.FileName); diff --git a/src/JT808.Protocol.Test/Extensions/JT808EnumExtensionsTest.cs b/src/JT808.Protocol.Test/Extensions/JT808EnumExtensionsTest.cs index be94e96b..8b0e3ca2 100644 --- a/src/JT808.Protocol.Test/Extensions/JT808EnumExtensionsTest.cs +++ b/src/JT808.Protocol.Test/Extensions/JT808EnumExtensionsTest.cs @@ -33,7 +33,7 @@ public void Test1() public void Test2() { var types = Enum.GetNames(typeof(JT808MsgId)); - var bodyTypes = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w => w.BaseType == typeof(JT808Bodies)).ToList(); + var bodyTypes = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w => w.GetInterface(nameof(JT808Bodies)) == typeof(JT808Bodies)).ToList(); Assert.Equal(types.Length, bodyTypes.Count); } @@ -41,7 +41,7 @@ public void Test2() public void Test3() { var types = Enum.GetNames(typeof(JT808MsgId)); - var bodyTypes = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w => w.BaseType == typeof(JT808Bodies)).ToList(); + var bodyTypes = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w => w.GetInterface(nameof(JT808Bodies)) == typeof(JT808Bodies)).ToList(); foreach (var type in bodyTypes) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol.Test/Extensions/JT808PackageExtensionsTest.cs b/src/JT808.Protocol.Test/Extensions/JT808PackageExtensionsTest.cs index affa3d3a..bef3e08a 100644 --- a/src/JT808.Protocol.Test/Extensions/JT808PackageExtensionsTest.cs +++ b/src/JT808.Protocol.Test/Extensions/JT808PackageExtensionsTest.cs @@ -15,17 +15,17 @@ public class JT808PackageExtensionsTest [Fact] public void CreatePackage() { - var package= JT808MsgId._0x0002.Create_终端心跳("123456789", new Protocol.MessageBody.JT808_0x0002 { - - }); + var package = JT808MsgId._0x0002.Create_终端心跳("123456789", new Protocol.MessageBody.JT808_0x0002 + { + + }); } - //[Fact] - //public void Get() - //{ - // string type = "222".Replace("",""); - // var a = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w=>w.FullName.EndsWith("Formatter")).ToList(); - //} + [Fact] + public void Get() + { + var a = Assembly.GetAssembly(typeof(JT808Package)).GetTypes().Where(w => w.FullName.EndsWith("Formatter")).ToList(); + } } } diff --git a/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj b/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj index 02c374ae..7bf89dcd 100644 --- a/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj +++ b/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj @@ -110,7 +110,6 @@ - diff --git a/src/JT808.Protocol.Test/MessageBody/JT808LocationAttachExtensions/JT808LocationAttachImpl0x61.cs b/src/JT808.Protocol.Test/MessageBody/JT808LocationAttachExtensions/JT808LocationAttachImpl0x61.cs index a12ea916..c7ebd616 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808LocationAttachExtensions/JT808LocationAttachImpl0x61.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808LocationAttachExtensions/JT808LocationAttachImpl0x61.cs @@ -10,14 +10,14 @@ namespace JT808.Protocol.Test.JT808LocationAttach /// UserName-BCD(10) /// Gerder-byte-1 /// - public class JT808LocationAttachImpl0x61: JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter + public class JT808LocationAttachImpl0x61: JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase { - public override byte AttachInfoId { get; set; } = 0x61; - public override byte AttachInfoLength { get; set; } = 13; + public byte AttachInfoId { get; set; } = 0x61; + public byte AttachInfoLength { get; set; } = 13; public int Age { get; set; } public byte Gender { get; set; } public string UserName { get; set; } - public JT808LocationAttachImpl0x61 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808LocationAttachImpl0x61 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808LocationAttachImpl0x61 jT808LocationAttachImpl0x61 = new JT808LocationAttachImpl0x61(); jT808LocationAttachImpl0x61.AttachInfoId = reader.ReadByte(); @@ -28,7 +28,7 @@ public JT808LocationAttachImpl0x61 Deserialize(ref JT808MessagePackReader reader return jT808LocationAttachImpl0x61; } - public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0x61 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0x61 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0X8900_BodiesImpl/JT808_0X8900_Test_BodiesImpl.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0X8900_BodiesImpl/JT808_0X8900_Test_BodiesImpl.cs index 3c6c6f9b..5563c233 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0X8900_BodiesImpl/JT808_0X8900_Test_BodiesImpl.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0X8900_BodiesImpl/JT808_0X8900_Test_BodiesImpl.cs @@ -7,12 +7,12 @@ namespace JT808.Protocol.Test.MessageBody.JT808_0X8900_BodiesImpl { - public class JT808_0X8900_Test_BodiesImpl: JT808_0x8900_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0X8900_Test_BodiesImpl: JT808MessagePackFormatter, JT808_0x8900_BodyBase, IJT808Analyze { public uint Id { get; set; } public byte Sex { get; set; } - public override byte PassthroughType { get; set; } = 0x0B; + public byte PassthroughType { get; set; } = 0x0B; public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { @@ -23,7 +23,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteNumber($"[{value.Sex.ReadNumber()}]性别", value.Sex); } - public JT808_0X8900_Test_BodiesImpl Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0X8900_Test_BodiesImpl Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0X8900_Test_BodiesImpl value = new JT808_0X8900_Test_BodiesImpl(); value.Id = reader.ReadUInt32(); @@ -31,7 +31,7 @@ public JT808_0X8900_Test_BodiesImpl Deserialize(ref JT808MessagePackReader reade return value; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0X8900_Test_BodiesImpl value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0X8900_Test_BodiesImpl value, IJT808Config config) { writer.WriteUInt32(value.Id); writer.WriteByte(value.Sex); diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x0200Test.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x0200Test.cs index d4e04571..4355f65a 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x0200Test.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x0200Test.cs @@ -26,6 +26,7 @@ public JT808_0x0200Test() IJT808Config jT808Config1 = new DefaultGlobalConfig(); jT808Config1.SkipCRCCode = true; jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer = new JT808Serializer(jT808Config); JT808Serializer1 = new JT808Serializer(jT808Config1); } diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x0701BodiesImpl/JT808_0x0701TestBodiesImpl.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x0701BodiesImpl/JT808_0x0701TestBodiesImpl.cs index 6d9d61ac..357b059b 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x0701BodiesImpl/JT808_0x0701TestBodiesImpl.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x0701BodiesImpl/JT808_0x0701TestBodiesImpl.cs @@ -4,7 +4,7 @@ namespace JT808.Protocol.Test.MessageBody.JT808_0x0701BodiesImpl { - public class JT808_0x0701TestBodiesImpl: JT808_0x0701_CustomBodyBase, IJT808MessagePackFormatter + public class JT808_0x0701TestBodiesImpl: JT808MessagePackFormatter,JT808_0x0701_CustomBodyBase { public uint Id { get; set; } @@ -12,7 +12,7 @@ public class JT808_0x0701TestBodiesImpl: JT808_0x0701_CustomBodyBase, IJT808Mess public string UserName { get; set; } - public JT808_0x0701TestBodiesImpl Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0701TestBodiesImpl Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0701TestBodiesImpl jT808_0X0701TestBodiesImpl = new JT808_0x0701TestBodiesImpl(); jT808_0X0701TestBodiesImpl.Id = reader.ReadUInt32(); @@ -21,7 +21,7 @@ public JT808_0x0701TestBodiesImpl Deserialize(ref JT808MessagePackReader reader, return jT808_0X0701TestBodiesImpl; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0701TestBodiesImpl value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0701TestBodiesImpl value, IJT808Config config) { writer.WriteUInt32(value.Id); writer.Skip(2, out int position); diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x0900_BodiesImpl/JT808_0x0900_0x83.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x0900_BodiesImpl/JT808_0x0900_0x83.cs index c00fa9a1..8e3bd63a 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x0900_BodiesImpl/JT808_0x0900_0x83.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x0900_BodiesImpl/JT808_0x0900_0x83.cs @@ -6,13 +6,13 @@ namespace JT808.Protocol.Test.JT808_0x0900_BodiesImpl { - public class JT808_0x0900_0x83 : JT808_0x0900_BodyBase,IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0900_0x83 : JT808MessagePackFormatter, JT808_0x0900_BodyBase, IJT808Analyze { /// /// 透传内容 /// public string PassthroughContent { get; set; } - public override byte PassthroughType { get; set; } = 0x83; + public byte PassthroughType { get; set; } = 0x83; public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { @@ -21,14 +21,14 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteString("透传内容", value.PassthroughContent); } - public JT808_0x0900_0x83 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900_0x83 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900_0x83 value = new JT808_0x0900_0x83(); value.PassthroughContent = reader.ReadRemainStringContent(); return value; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0x83 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900_0x83 value, IJT808Config config) { writer.WriteString(value.PassthroughContent); } diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x8103CustomIdExtensions/JT808_0x8103_0x0075.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x8103CustomIdExtensions/JT808_0x8103_0x0075.cs index 2c3b467f..4e2341aa 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x8103CustomIdExtensions/JT808_0x8103_0x0075.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x8103CustomIdExtensions/JT808_0x8103_0x0075.cs @@ -15,13 +15,13 @@ namespace JT808.Protocol.Test.MessageBody.JT808_0x8103CustomIdExtensions /// 音视频参数设置 /// 0x8103_0x0075 /// - public class JT808_0x8103_0x0075 : JT808_0x8103_CustomBodyBase, IJT808MessagePackFormatter,IJT808Analyze + public class JT808_0x8103_0x0075 : JT808MessagePackFormatter, JT808_0x8103_CustomBodyBase, IJT808Analyze { - public override uint ParamId { get; set; } = 0x0075; + public uint ParamId { get; set; } = 0x0075; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 21; + public byte ParamLength { get; set; } = 21; /// /// 实时流编码模式 /// @@ -79,7 +79,7 @@ public class JT808_0x8103_0x0075 : JT808_0x8103_CustomBodyBase, IJT808MessagePac /// /// 音视频参数设置 /// - public override string Description => "音视频参数设置"; + public string Description => "音视频参数设置"; public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { @@ -114,7 +114,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteNumber($"[{value.AudioOutputEnabled.ReadNumber()}]是否启用音频输出", value.AudioOutputEnabled); } - public JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0075 jT808_0X8103_0X0075 = new JT808_0x8103_0x0075(); jT808_0X8103_0X0075.ParamId = reader.ReadUInt32(); @@ -134,7 +134,7 @@ public JT808_0x8103_0x0075 Deserialize(ref JT808MessagePackReader reader, IJT808 return jT808_0X8103_0X0075; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0075 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0075 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x8103Test.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x8103Test.cs index 2dd1c142..098f651b 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x8103Test.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x8103Test.cs @@ -17,6 +17,7 @@ public JT808_0x8103Test() { IJT808Config jT808Config = new DefaultGlobalConfig(); jT808Config.JT808_0X8103_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer = new JT808Serializer(jT808Config); } [Fact] diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x8500Test.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x8500Test.cs index c9a8f464..d7a077c1 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x8500Test.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x8500Test.cs @@ -96,9 +96,9 @@ public void Test_2019_3() /// /// 自定义控制类型 /// - public class JT808_0x8500_0xF001 : JT808_0x8500_ControlType, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8500_0xF001 : JT808MessagePackFormatter, JT808_0x8500_ControlType, IJT808Analyze { - public override ushort ControlTypeId { get; set; } = 0xF001; + public ushort ControlTypeId { get; set; } = 0xF001; public byte ControlTypeParameter { get; set; } @@ -111,7 +111,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteNumber($"[{ value.ControlTypeParameter.ReadNumber()}]控制类型参数", value.ControlTypeParameter); } - public JT808_0x8500_0xF001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8500_0xF001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8500_0xF001 value = new JT808_0x8500_0xF001(); value.ControlTypeId = reader.ReadUInt16(); @@ -119,7 +119,7 @@ public JT808_0x8500_0xF001 Deserialize(ref JT808MessagePackReader reader, IJT808 return value; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500_0xF001 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500_0xF001 value, IJT808Config config) { writer.WriteUInt16(value.ControlTypeId); writer.WriteByte(value.ControlTypeParameter); diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x9999.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x9999.cs index 0c64e565..960042ea 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x9999.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x9999.cs @@ -6,22 +6,22 @@ namespace JT808.Protocol.Test.MessageBody { - public class JT808_0x9999 : JT808Bodies, IJT808MessagePackFormatter + public class JT808_0x9999 : JT808MessagePackFormatter, JT808Bodies { public byte Sex { get; set; } - public override ushort MsgId => 0x9999; + public ushort MsgId => 0x9999; - public override string Description => "自定义消息"; + public string Description => "自定义消息"; - public JT808_0x9999 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x9999 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9999 jT808_0X9999 = new JT808_0x9999(); jT808_0X9999.Sex = reader.ReadByte(); return jT808_0X9999; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9999 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x9999 value, IJT808Config config) { writer.WriteByte(value.Sex); } diff --git a/src/JT808.Protocol.Test/Simples/Demo10.cs b/src/JT808.Protocol.Test/Simples/Demo10.cs index c17a94c4..e77f4758 100644 --- a/src/JT808.Protocol.Test/Simples/Demo10.cs +++ b/src/JT808.Protocol.Test/Simples/Demo10.cs @@ -37,9 +37,13 @@ public Demo10() { IJT808Config jT808Config = new Demo10ConfigBase(); jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); jT808Config.JT808_0X0200_Custom_Factory.SetMap2(); + jT808Config.FormatterFactory.SetMap(); jT808Config.JT808_0X0200_Custom_Factory.SetMap3(); + jT808Config.FormatterFactory.SetMap(); jT808Config.JT808_0X0200_Custom_Factory.SetMap4(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer = new JT808Serializer(jT808Config); } @@ -487,21 +491,21 @@ public void Test_Repeat_2() /// /// 1:1 /// - public class JT808LocationAttachImpl0xDF : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter + public class JT808LocationAttachImpl0xDF : JT808MessagePackFormatter,JT808_0x0200_CustomBodyBase { /// /// 附加Id 0xDF /// - public override byte AttachInfoId { get; set; } = 0xDF; + public byte AttachInfoId { get; set; } = 0xDF; /// /// /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// /// public byte[] TestValue { get; set; } - public JT808LocationAttachImpl0xDF Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808LocationAttachImpl0xDF Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808LocationAttachImpl0xDF jT808LocationAttachImpl0XDF = new JT808LocationAttachImpl0xDF(); jT808LocationAttachImpl0XDF.AttachInfoId = reader.ReadByte(); @@ -509,7 +513,7 @@ public JT808LocationAttachImpl0xDF Deserialize(ref JT808MessagePackReader reader jT808LocationAttachImpl0XDF.TestValue = reader.ReadArray(jT808LocationAttachImpl0XDF.AttachInfoLength).ToArray(); return jT808LocationAttachImpl0XDF; } - public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDF value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDF value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); if (value.TestValue != null) @@ -526,22 +530,22 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl /// /// 2:1 /// - public class JT808LocationAttachImpl0xDE : JT808_0x0200_CustomBodyBase2, IJT808MessagePackFormatter + public class JT808LocationAttachImpl0xDE : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase2 { /// /// 附加Id 0xDE /// - public override ushort AttachInfoId { get; set; } = 0xDE; + public ushort AttachInfoId { get; set; } = 0xDE; /// /// 不固定 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// /// public byte[] TestValue { get; set; } - public JT808LocationAttachImpl0xDE Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808LocationAttachImpl0xDE Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808LocationAttachImpl0xDE jT808LocationAttachImpl0XDE = new JT808LocationAttachImpl0xDE(); jT808LocationAttachImpl0XDE.AttachInfoId = reader.ReadUInt16(); @@ -550,7 +554,7 @@ public JT808LocationAttachImpl0xDE Deserialize(ref JT808MessagePackReader reader return jT808LocationAttachImpl0XDE; } - public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDE value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDE value, IJT808Config config) { writer.WriteUInt16(value.AttachInfoId); if (value.TestValue != null) @@ -567,22 +571,22 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl /// /// 2:2 /// - public class JT808LocationAttachImpl0xDD : JT808_0x0200_CustomBodyBase3, IJT808MessagePackFormatter + public class JT808LocationAttachImpl0xDD : JT808MessagePackFormatter,JT808_0x0200_CustomBodyBase3 { /// /// 附加Id 0xDD /// - public override ushort AttachInfoId { get; set; } = 0xDD; + public ushort AttachInfoId { get; set; } = 0xDD; /// /// /// - public override ushort AttachInfoLength { get; set; } + public ushort AttachInfoLength { get; set; } /// /// /// public byte[] TestValue { get; set; } - public JT808LocationAttachImpl0xDD Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808LocationAttachImpl0xDD Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808LocationAttachImpl0xDD jT808LocationAttachImpl0XDD = new JT808LocationAttachImpl0xDD(); jT808LocationAttachImpl0XDD.AttachInfoId = reader.ReadUInt16(); @@ -591,7 +595,7 @@ public JT808LocationAttachImpl0xDD Deserialize(ref JT808MessagePackReader reader return jT808LocationAttachImpl0XDD; } - public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDD value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0xDD value, IJT808Config config) { writer.WriteUInt16(value.AttachInfoId); if (value.TestValue != null) @@ -608,13 +612,13 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl /// /// 1:4 /// - public class JT808LocationAttachImpl0x62 : JT808_0x0200_CustomBodyBase4, IJT808MessagePackFormatter + public class JT808LocationAttachImpl0x62 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase4 { - public override byte AttachInfoId { get; set; } = 0x62; - public override uint AttachInfoLength { get; set; } = 256; + public byte AttachInfoId { get; set; } = 0x62; + public uint AttachInfoLength { get; set; } = 256; public byte[] Data { get; set; } - public JT808LocationAttachImpl0x62 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808LocationAttachImpl0x62 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808LocationAttachImpl0x62 jT808LocationAttachImpl0x62 = new JT808LocationAttachImpl0x62(); jT808LocationAttachImpl0x62.AttachInfoId = reader.ReadByte(); @@ -623,7 +627,7 @@ public JT808LocationAttachImpl0x62 Deserialize(ref JT808MessagePackReader reader return jT808LocationAttachImpl0x62; } - public void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0x62 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808LocationAttachImpl0x62 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteUInt32((uint)value.Data.Length); diff --git a/src/JT808.Protocol.Test/Simples/Demo13.cs b/src/JT808.Protocol.Test/Simples/Demo13.cs index bcfeeeee..d5704112 100644 --- a/src/JT808.Protocol.Test/Simples/Demo13.cs +++ b/src/JT808.Protocol.Test/Simples/Demo13.cs @@ -85,16 +85,16 @@ public void Test2() /// 终端通用应答_替换原有的消息,来解决库现有的bug /// The terminal general answer _ replaces the original message to solve the existing library bug /// - public class JT808_0x0001_Replace : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0001_Replace : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0001 /// - public override ushort MsgId => 0x0001; + public ushort MsgId => 0x0001; /// /// 终端通用应答 /// - public override string Description => "终端通用应答"; + public string Description => "终端通用应答"; /// /// 应答流水号 /// 对应的平台消息的流水号 @@ -122,7 +122,7 @@ public class JT808_0x0001_Replace : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0001_Replace Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0001_Replace Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0001_Replace jT808_0X0001 = new JT808_0x0001_Replace(); jT808_0X0001.ReplyMsgNum = reader.ReadUInt16(); @@ -137,7 +137,7 @@ public JT808_0x0001_Replace Deserialize(ref JT808MessagePackReader reader, IJT80 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0001_Replace value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0001_Replace value, IJT808Config config) { writer.WriteUInt16(value.ReplyMsgNum); writer.WriteUInt16(value.ReplyMsgId); diff --git a/src/JT808.Protocol.Test/Simples/Demo4.cs b/src/JT808.Protocol.Test/Simples/Demo4.cs index 4ab4010e..dde0c7a7 100644 --- a/src/JT808.Protocol.Test/Simples/Demo4.cs +++ b/src/JT808.Protocol.Test/Simples/Demo4.cs @@ -35,6 +35,7 @@ public void Test1() { IJT808Config jT808Config = new DefaultGlobalConfig(); jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer demo5JT808Serializer = new JT808Serializer(jT808Config); JT808Package jT808Package = JT808MsgId._0x0200.Create("123456789012", @@ -167,7 +168,9 @@ public DeviceType1(Dictionary jT808CustomLoca { IJT808Config jT808Config = new DefaultGlobalConfig(); jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer = new JT808Serializer(jT808Config); } public override Dictionary JT808CustomLocationAttachData { get; protected set; } @@ -185,7 +188,7 @@ protected override void Execute(Dictionary jT IExtDataProcessor extDataProcessor81 = new JT808_0x0200_DT1_0x81_ExtDataProcessor(info81); extDataProcessor81.Processor(ExtData); JT808CustomLocationAttachData.Add(dt1_0x81, info81); - + break; case dt1_0x82: var info82 = (JT808_0x0200_DT1_0x82)item.Value; @@ -209,6 +212,7 @@ public DeviceType2(Dictionary jT808CustomLoca { IJT808Config jT808Config = new DefaultGlobalConfig(); jT808Config.JT808_0X0200_Custom_Factory.SetMap(); + jT808Config.FormatterFactory.SetMap(); JT808Serializer = new JT808Serializer(jT808Config); } public override Dictionary JT808CustomLocationAttachData { get; protected set; } @@ -227,7 +231,7 @@ protected override void Execute(Dictionary jT var info81 = (JT808_0x0200_DT2_0x81)item.Value; IExtDataProcessor extDataProcessor = new JT808_0x0200_DT2_0x81_ExtDataProcessor(info81); extDataProcessor.Processor(ExtData); - JT808CustomLocationAttachData.Add(dt2_0x81, info81); + JT808CustomLocationAttachData.Add(dt2_0x81, info81); break; } } @@ -242,15 +246,15 @@ protected override void Execute(Dictionary jT /// /// 设备类型1-对应消息协议0x81 /// - public class JT808_0x0200_DT1_0x81 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter + public class JT808_0x0200_DT1_0x81 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase { - public override byte AttachInfoId { get; set; } = 0x81; - public override byte AttachInfoLength { get; set; } = 13; + public byte AttachInfoId { get; set; } = 0x81; + public byte AttachInfoLength { get; set; } = 13; public uint Age { get; set; } public byte Gender { get; set; } public string UserName { get; set; } - public JT808_0x0200_DT1_0x81 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_DT1_0x81 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_DT1_0x81 jT808_0X0200_DT1_0X81 = new JT808_0x0200_DT1_0x81(); jT808_0X0200_DT1_0X81.AttachInfoId = reader.ReadByte(); @@ -260,7 +264,7 @@ public JT808_0x0200_DT1_0x81 Deserialize(ref JT808MessagePackReader reader, IJT8 jT808_0X0200_DT1_0X81.UserName = reader.ReadRemainStringContent(); return jT808_0X0200_DT1_0X81; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x81 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x81 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); @@ -272,12 +276,12 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x81 v /// /// 设备类型1-对应消息协议0x82 /// - public class JT808_0x0200_DT1_0x82 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter + public class JT808_0x0200_DT1_0x82 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase { - public override byte AttachInfoId { get; set; } = 0x82; - public override byte AttachInfoLength { get; set; } = 1; + public byte AttachInfoId { get; set; } = 0x82; + public byte AttachInfoLength { get; set; } = 1; public byte Gender1 { get; set; } - public JT808_0x0200_DT1_0x82 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_DT1_0x82 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_DT1_0x82 jT808_0X0200_DT1_0X82 = new JT808_0x0200_DT1_0x82(); jT808_0X0200_DT1_0X82.AttachInfoId = reader.ReadByte(); @@ -286,7 +290,7 @@ public JT808_0x0200_DT1_0x82 Deserialize(ref JT808MessagePackReader reader, IJT8 return jT808_0X0200_DT1_0X82; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x82 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x82 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); @@ -296,14 +300,14 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT1_0x82 v /// /// 设备类型2-对应消息协议0x81 /// - public class JT808_0x0200_DT2_0x81 : JT808_0x0200_CustomBodyBase, IJT808MessagePackFormatter + public class JT808_0x0200_DT2_0x81 : JT808MessagePackFormatter, JT808_0x0200_CustomBodyBase { - public override byte AttachInfoId { get; set; } = 0x81; - public override byte AttachInfoLength { get; set; } = 7; + public byte AttachInfoId { get; set; } = 0x81; + public byte AttachInfoLength { get; set; } = 7; public uint Age { get; set; } public byte Gender { get; set; } public ushort MsgNum { get; set; } - public JT808_0x0200_DT2_0x81 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_DT2_0x81 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_DT2_0x81 jT808_0X0200_DT2_0X81 = new JT808_0x0200_DT2_0x81(); jT808_0X0200_DT2_0X81.AttachInfoId = reader.ReadByte(); @@ -314,7 +318,7 @@ public JT808_0x0200_DT2_0x81 Deserialize(ref JT808MessagePackReader reader, IJT8 return jT808_0X0200_DT2_0X81; } - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT2_0x81 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_DT2_0x81 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol.Test/Simples/Demo6.cs b/src/JT808.Protocol.Test/Simples/Demo6.cs index d934579b..28770850 100644 --- a/src/JT808.Protocol.Test/Simples/Demo6.cs +++ b/src/JT808.Protocol.Test/Simples/Demo6.cs @@ -67,7 +67,9 @@ public Demo6() //这边是因为程序集存在协议冲突的情况,所以不直接采用注册程序集的方式。 //根据不同的设备终端号,添加自定义消息Id DT1JT808Config.MsgIdFactory.SetMap(); + DT1JT808Config.FormatterFactory.SetMap(); DT2JT808Config.MsgIdFactory.SetMap(); + DT2JT808Config.FormatterFactory.SetMap(); Assert.Equal("DT1", DT1JT808Config.ConfigId); Assert.Equal("DT2", DT2JT808Config.ConfigId); @@ -140,17 +142,17 @@ public void Test1() } } - public class DT1Demo6 : JT808Bodies, IJT808MessagePackFormatter + public class DT1Demo6 : JT808MessagePackFormatter, JT808Bodies { public byte Sex1 { get; set; } public ushort Age1 { get; set; } - public override ushort MsgId => 0x91; + public ushort MsgId => 0x91; - public override string Description =>"DT1Demo6"; + public string Description =>"DT1Demo6"; - public DT1Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override DT1Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { DT1Demo6 dT1Demo6 = new DT1Demo6(); dT1Demo6.Sex1 = reader.ReadByte(); @@ -158,23 +160,23 @@ public DT1Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config conf return dT1Demo6; } - public void Serialize(ref JT808MessagePackWriter writer, DT1Demo6 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, DT1Demo6 value, IJT808Config config) { writer.WriteByte(value.Sex1); writer.WriteUInt16(value.Age1); } } - public class DT2Demo6 : JT808Bodies, IJT808MessagePackFormatter + public class DT2Demo6 : JT808MessagePackFormatter,JT808Bodies { - public override ushort MsgId => 0x91; + public ushort MsgId => 0x91; public byte Sex2 { get; set; } public ushort Age2 { get; set; } - public override string Description => "DT2Demo6"; + public string Description => "DT2Demo6"; - public DT2Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override DT2Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { DT2Demo6 dT2Demo6 = new DT2Demo6(); dT2Demo6.Sex2 = reader.ReadByte(); @@ -182,7 +184,7 @@ public DT2Demo6 Deserialize(ref JT808MessagePackReader reader, IJT808Config conf return dT2Demo6; } - public void Serialize(ref JT808MessagePackWriter writer, DT2Demo6 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, DT2Demo6 value, IJT808Config config) { writer.WriteByte(value.Sex2); writer.WriteUInt16(value.Age2); diff --git a/src/JT808.Protocol.Test/Simples/Demo8.cs b/src/JT808.Protocol.Test/Simples/Demo8.cs index 7e3089a7..6b6c9d9d 100644 --- a/src/JT808.Protocol.Test/Simples/Demo8.cs +++ b/src/JT808.Protocol.Test/Simples/Demo8.cs @@ -51,17 +51,17 @@ public void Test2() //{"[7E]\u5F00\u59CB":126,"[0093]\u6D88\u606FId":147,"\u6D88\u606F\u4F53\u5C5E\u6027\u5BF9\u8C61":{"[0000000000000011]\u6D88\u606F\u4F53\u5C5E\u6027":3,"[bit15]\u4FDD\u7559":0,"[bit14]\u4FDD\u7559":0,"[bit13]\u662F\u5426\u5206\u5305":false,"[bit10~bit12]\u6570\u636E\u52A0\u5BC6":"None","[bit0~bit9]\u6D88\u606F\u4F53\u957F\u5EA6":3},"[1234567891]\u7EC8\u7AEF\u624B\u673A\u53F7":"1234567891","[007E]\u6D88\u606F\u6D41\u6C34\u53F7":126,"\u6570\u636E\u4F53\u5BF9\u8C61":{"DT1Demo8":"020012","[02]\u6027\u522B":2,"[0012]\u5E74\u9F84":18},"[67]\u6821\u9A8C\u7801":103,"[7E]\u7ED3\u675F":126} } - public class DT1Demo8 : JT808Bodies, IJT808MessagePackFormatter,IJT808Analyze + public class DT1Demo8 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { public byte Sex1 { get; set; } public ushort Age1 { get; set; } - public override ushort MsgId => 0x93; + public ushort MsgId => 0x93; - public override string Description => "DT1Demo8"; + public string Description => "DT1Demo8"; - public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) + public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { DT1Demo8 dT1Demo6 = new DT1Demo8(); dT1Demo6.Sex1 = reader.ReadByte(); @@ -70,7 +70,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteNumber($"[{dT1Demo6.Age1.ReadNumber()}]年龄", dT1Demo6.Age1); } - public DT1Demo8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override DT1Demo8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { DT1Demo8 dT1Demo8 = new DT1Demo8(); dT1Demo8.Sex1 = reader.ReadByte(); @@ -78,7 +78,7 @@ public DT1Demo8 Deserialize(ref JT808MessagePackReader reader, IJT808Config conf return dT1Demo8; } - public void Serialize(ref JT808MessagePackWriter writer, DT1Demo8 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, DT1Demo8 value, IJT808Config config) { writer.WriteByte(value.Sex1); writer.WriteUInt16(value.Age1); diff --git a/src/JT808.Protocol/Extensions/JT808ConfigExtensions.cs b/src/JT808.Protocol/Extensions/JT808ConfigExtensions.cs index d7b789b6..1800a7a3 100644 --- a/src/JT808.Protocol/Extensions/JT808ConfigExtensions.cs +++ b/src/JT808.Protocol/Extensions/JT808ConfigExtensions.cs @@ -2,6 +2,7 @@ using JT808.Protocol.Exceptions; using JT808.Protocol.Formatters; using JT808.Protocol.Interfaces; +using JT808.Protocol.MessagePack; using System; using System.Collections.Concurrent; @@ -20,7 +21,7 @@ public static class JT808ConfigExtensions /// /// /// - public static object GetMessagePackFormatterByType(this IJT808Config jT808Config,Type type) + public static IJT808MessagePackFormatter GetMessagePackFormatterByType(this IJT808Config jT808Config,Type type) { if (!jT808Config.FormatterFactory.FormatterDict.TryGetValue(type.GUID, out var formatter)) { @@ -28,6 +29,55 @@ public static object GetMessagePackFormatterByType(this IJT808Config jT808Config } return formatter; } + /// + /// + /// + /// + /// + /// + public static T Cast(this object instance) where T : class + { + if (instance == null) { return default(T); } + return instance as T; + } + /// + /// + /// + /// + /// + /// + /// + /// + public static TValue DeserializeExt(this object instance, ref JT808MessagePackReader reader, IJT808Config config) + where TValue : class + { + if (instance == null) { return default(TValue); } + var formatter= instance as IJT808MessagePackFormatter; + if (formatter != null) + { + return formatter.Deserialize(ref reader, config) as TValue; + } + return default(TValue); + } + + /// + /// + /// + /// + /// + /// + /// + /// + public static void SerializeExt(this object instance, ref JT808MessagePackWriter writer, object value , IJT808Config config) + { + if (instance == null) { return; } + var formatter = instance as IJT808MessagePackFormatter; + if (formatter != null) + { + formatter.Serialize(ref writer, value, config); + } + } + /// /// 通过类型获取对应的消息分析器 /// diff --git a/src/JT808.Protocol/Extensions/JT808MessagePackFormatterResolverExtensions.cs b/src/JT808.Protocol/Extensions/JT808MessagePackFormatterResolverExtensions.cs deleted file mode 100644 index f6e5fd2b..00000000 --- a/src/JT808.Protocol/Extensions/JT808MessagePackFormatterResolverExtensions.cs +++ /dev/null @@ -1,95 +0,0 @@ -using JT808.Protocol.Formatters; -using System; -using System.Collections.Concurrent; -using System.Linq.Expressions; -using System.Reflection; -using JT808.Protocol.Interfaces; -using JT808.Protocol.MessagePack; - -namespace JT808.Protocol.Extensions -{ - /// - /// - /// ref http://adamsitnik.com/Span/#span-must-not-be-a-generic-type-argument - /// ref http://adamsitnik.com/Span/ - /// ref:MessagePack.Formatters.DynamicObjectTypeFallbackFormatter - /// - public static class JT808MessagePackFormatterResolverExtensions - { - delegate void JT808SerializeMethod(object dynamicFormatter, ref JT808MessagePackWriter writer,object value, IJT808Config config); - - delegate dynamic JT808DeserializeMethod(object dynamicFormatter, ref JT808MessagePackReader reader, IJT808Config config); - - static readonly ConcurrentDictionary jT808Serializers = new ConcurrentDictionary(); - - static readonly ConcurrentDictionary jT808Deserializes = new ConcurrentDictionary(); - /// - /// JT808动态序列化 - /// - /// - /// - /// - /// - public static void JT808DynamicSerialize(object objFormatter, ref JT808MessagePackWriter writer, object value, IJT808Config config) - { - Type type = value.GetType(); - var ti = type.GetTypeInfo(); - // (object Value, JT808SerializeMethod SerializeMethod) formatterAndDelegate; - if (!jT808Serializers.TryGetValue(type, out var formatterAndDelegate)) - { - var t = type; - { - var formatterType = typeof(IJT808MessagePackFormatter<>).MakeGenericType(t); - var param0 = Expression.Parameter(typeof(object), "formatter"); - var param1 = Expression.Parameter(typeof(JT808MessagePackWriter).MakeByRefType(), "writer"); - var param2 = Expression.Parameter(typeof(object), "value"); - var param3 = Expression.Parameter(typeof(IJT808Config), "config"); - var serializeMethodInfo = formatterType.GetRuntimeMethod("Serialize", new[] { typeof(JT808MessagePackWriter).MakeByRefType(), t, typeof(IJT808Config) }); - var body = Expression.Call( - Expression.Convert(param0, formatterType), - serializeMethodInfo, - param1, - ti.IsValueType ? Expression.Unbox(param2, t) : Expression.Convert(param2, t), - param3); - var lambda = Expression.Lambda(body, param0, param1, param2, param3).Compile(); - formatterAndDelegate = (objFormatter, lambda); - } - jT808Serializers.TryAdd(t, formatterAndDelegate); - } - formatterAndDelegate.SerializeMethod(formatterAndDelegate.Value, ref writer, value, config); - } - /// - /// JT808动态反序列化 - /// - /// - /// - /// - /// - public static dynamic JT808DynamicDeserialize(object objFormatter, ref JT808MessagePackReader reader, IJT808Config config) - { - var type = objFormatter.GetType(); - // (object Value, JT808DeserializeMethod DeserializeMethod) formatterAndDelegate; - if (!jT808Deserializes.TryGetValue(type, out var formatterAndDelegate)) - { - var t = type; - { - var formatterType = typeof(IJT808MessagePackFormatter<>).MakeGenericType(t); - ParameterExpression param0 = Expression.Parameter(typeof(object), "formatter"); - ParameterExpression param1 = Expression.Parameter(typeof(JT808MessagePackReader).MakeByRefType(), "reader"); - ParameterExpression param2 = Expression.Parameter(typeof(IJT808Config), "config"); - var deserializeMethodInfo = type.GetRuntimeMethod("Deserialize", new[] { typeof(JT808MessagePackReader).MakeByRefType(), typeof(IJT808Config) }); - var body = Expression.Call( - Expression.Convert(param0, type), - deserializeMethodInfo, - param1, - param2 - ); - var lambda = Expression.Lambda(body, param0, param1, param2).Compile(); - formatterAndDelegate = (objFormatter, lambda); - } - jT808Deserializes.TryAdd(t, formatterAndDelegate); - } - return formatterAndDelegate.DeserializeMethod(formatterAndDelegate.Value,ref reader, config); - } - } -} diff --git a/src/JT808.Protocol/Formatters/IJT808FormatterFactory.cs b/src/JT808.Protocol/Formatters/IJT808FormatterFactory.cs index 394e6283..5353a311 100644 --- a/src/JT808.Protocol/Formatters/IJT808FormatterFactory.cs +++ b/src/JT808.Protocol/Formatters/IJT808FormatterFactory.cs @@ -15,13 +15,12 @@ public interface IJT808FormatterFactory: IJT808ExternalRegister /// /// /// - IDictionary FormatterDict { get;} + IDictionary FormatterDict { get;} /// /// /// - /// + /// /// - IJT808FormatterFactory SetMap() - where TIJT808Formatter : IJT808Formatter; + IJT808FormatterFactory SetMap() where TJT808MessagePackFormatter : IJT808MessagePackFormatter; } } diff --git a/src/JT808.Protocol/Formatters/IJT808MessagePackFormatter.cs b/src/JT808.Protocol/Formatters/IJT808MessagePackFormatter.cs index ea1d6da4..76dc2b3b 100644 --- a/src/JT808.Protocol/Formatters/IJT808MessagePackFormatter.cs +++ b/src/JT808.Protocol/Formatters/IJT808MessagePackFormatter.cs @@ -6,7 +6,7 @@ namespace JT808.Protocol.Formatters /// 序列化器接口 /// /// - public interface IJT808MessagePackFormatter : IJT808Formatter + public interface IJT808MessagePackFormatter { /// /// @@ -26,8 +26,54 @@ public interface IJT808MessagePackFormatter : IJT808Formatter /// /// /// - public interface IJT808Formatter + public interface IJT808MessagePackFormatter { + /// + /// + /// + /// + /// + /// + void Serialize(ref JT808MessagePackWriter writer, object value, IJT808Config config); + /// + /// + /// + /// + /// + /// + object Deserialize(ref JT808MessagePackReader reader, IJT808Config config); + } + + /// + /// + /// + /// + public abstract class JT808MessagePackFormatter : IJT808MessagePackFormatter, IJT808MessagePackFormatter where T : class, new() + { + /// + /// + /// + /// + /// + /// + public abstract T Deserialize(ref JT808MessagePackReader reader, IJT808Config config); + /// + /// + /// + /// + /// + /// + public abstract void Serialize(ref JT808MessagePackWriter writer, T value, IJT808Config config); + + object IJT808MessagePackFormatter.Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + { + return Deserialize(ref reader, config); + } + void IJT808MessagePackFormatter.Serialize(ref JT808MessagePackWriter writer, object value, IJT808Config config) + { + var v = (value == null)? default(T) : (T)value; + Serialize(ref writer, v, config); + } } } diff --git a/src/JT808.Protocol/Interfaces/GlobalConfigBase.cs b/src/JT808.Protocol/Interfaces/GlobalConfigBase.cs index 2f04e4ca..af01d769 100644 --- a/src/JT808.Protocol/Interfaces/GlobalConfigBase.cs +++ b/src/JT808.Protocol/Interfaces/GlobalConfigBase.cs @@ -165,7 +165,7 @@ public void ReplaceMsgId() TTargetJT808Bodies bodies = new TTargetJT808Bodies(); MsgIdFactory.Map[bodies.MsgId] = bodies; FormatterFactory.FormatterDict.Remove(typeof(TSourceJT808Bodies).GUID); - FormatterFactory.FormatterDict.Add(typeof(TTargetJT808Bodies).GUID, bodies); + FormatterFactory.FormatterDict.Add(typeof(TTargetJT808Bodies).GUID, (IJT808MessagePackFormatter)bodies); } } } diff --git a/src/JT808.Protocol/Internal/DefaultMsgSNDistributedImpl.cs b/src/JT808.Protocol/Internal/DefaultMsgSNDistributedImpl.cs index 3e90222d..fd91dc10 100644 --- a/src/JT808.Protocol/Internal/DefaultMsgSNDistributedImpl.cs +++ b/src/JT808.Protocol/Internal/DefaultMsgSNDistributedImpl.cs @@ -8,14 +8,24 @@ namespace JT808.Protocol.Internal { internal class DefaultMsgSNDistributedImpl : IJT808MsgSNDistributed { - ConcurrentDictionary counterDict; + ConcurrentDictionary counterDict; public DefaultMsgSNDistributedImpl() { - counterDict = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); + counterDict = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); } public ushort Increment(string terminalPhoneNo) { - return (ushort)counterDict.AddOrUpdate(terminalPhoneNo, 1, (id, count) => count + 1); + if (counterDict.TryGetValue(terminalPhoneNo, out ushort value)) + { + ushort newValue = ++value; + counterDict.TryUpdate(terminalPhoneNo, newValue, value); + return newValue; + } + else + { + counterDict.TryAdd(terminalPhoneNo, 1); + return 1; + } } } } diff --git a/src/JT808.Protocol/Internal/JT808FormatterFactory.cs b/src/JT808.Protocol/Internal/JT808FormatterFactory.cs index 0ea834d1..0f839ad9 100644 --- a/src/JT808.Protocol/Internal/JT808FormatterFactory.cs +++ b/src/JT808.Protocol/Internal/JT808FormatterFactory.cs @@ -12,28 +12,31 @@ namespace JT808.Protocol.Internal { internal class JT808FormatterFactory : IJT808FormatterFactory { - public IDictionary FormatterDict { get; } + public IDictionary FormatterDict { get; } public JT808FormatterFactory() { - FormatterDict = new Dictionary(); + FormatterDict = new Dictionary(); Init(Assembly.GetExecutingAssembly()); } private void Init(Assembly assembly) { - foreach(var type in assembly.GetTypes().Where(w=>w.GetInterfaces().Contains(typeof(IJT808Formatter)))) + foreach(var type in assembly.GetTypes().Where(w=>w.GetInterfaces().Contains(typeof(IJT808MessagePackFormatter)))) { var implTypes = type.GetInterfaces(); if(implTypes!=null && implTypes .Length>1) { - var firstType = implTypes.FirstOrDefault(f=>f.Name== typeof(IJT808MessagePackFormatter<>).Name); - var genericImplType = firstType.GetGenericArguments().FirstOrDefault(); - if (genericImplType != null) + var firstType = implTypes.FirstOrDefault(f=>f.Name== typeof(IJT808MessagePackFormatter<>).Name && !string.IsNullOrEmpty(f.FullName)); + if (firstType != null) { - if (!FormatterDict.ContainsKey(genericImplType.GUID)) + var genericImplType = firstType.GetGenericArguments().FirstOrDefault(); + if (genericImplType != null) { - FormatterDict.Add(genericImplType.GUID, Activator.CreateInstance(genericImplType)); + if (!FormatterDict.ContainsKey(genericImplType.GUID)) + { + FormatterDict.Add(genericImplType.GUID, (IJT808MessagePackFormatter)Activator.CreateInstance(genericImplType)); + } } } } @@ -45,12 +48,12 @@ public void Register(Assembly externalAssembly) Init(externalAssembly); } - public IJT808FormatterFactory SetMap() where TIJT808Formatter : IJT808Formatter + public IJT808FormatterFactory SetMap() where TJT808MessagePackFormatter : IJT808MessagePackFormatter { - Type type = typeof(TIJT808Formatter); + Type type = typeof(TJT808MessagePackFormatter); if (!FormatterDict.ContainsKey(type.GUID)) { - FormatterDict.Add(type.GUID, Activator.CreateInstance(type)); + FormatterDict.Add(type.GUID, (IJT808MessagePackFormatter)Activator.CreateInstance(type)); } return this; } diff --git a/src/JT808.Protocol/Internal/JT808MsgIdFactory.cs b/src/JT808.Protocol/Internal/JT808MsgIdFactory.cs index d8ab2fc3..34c87b96 100644 --- a/src/JT808.Protocol/Internal/JT808MsgIdFactory.cs +++ b/src/JT808.Protocol/Internal/JT808MsgIdFactory.cs @@ -23,7 +23,7 @@ internal JT808MsgIdFactory() private void InitMap(Assembly assembly) { - var types = assembly.GetTypes().Where(w => w.BaseType == typeof(JT808Bodies)).ToList(); + var types = assembly.GetTypes().Where(w => w.GetInterface(nameof(JT808Bodies)) == typeof(JT808Bodies)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x0200_Custom_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x0200_Custom_Factory.cs index faec1444..bb3d9340 100644 --- a/src/JT808.Protocol/Internal/JT808_0x0200_Custom_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x0200_Custom_Factory.cs @@ -28,7 +28,7 @@ public JT808_0x0200_Custom_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_CustomBodyBase)) == typeof(JT808_0x0200_CustomBodyBase)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); @@ -43,7 +43,7 @@ public void Register(Assembly externalAssembly) } } - var types2 = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase2)).ToList(); + var types2 = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_CustomBodyBase2)) == typeof(JT808_0x0200_CustomBodyBase2)).ToList(); foreach (var type in types2) { var instance = Activator.CreateInstance(type); @@ -58,7 +58,7 @@ public void Register(Assembly externalAssembly) } } - var types3 = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase3)).ToList(); + var types3 = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_CustomBodyBase3)) == typeof(JT808_0x0200_CustomBodyBase3)).ToList(); foreach (var type in types3) { var instance = Activator.CreateInstance(type); @@ -73,7 +73,7 @@ public void Register(Assembly externalAssembly) } } - var types4 = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase4)).ToList(); + var types4 = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_CustomBodyBase4)) == typeof(JT808_0x0200_CustomBodyBase4)).ToList(); foreach (var type in types4) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x0200_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x0200_Factory.cs index e15ae627..6c31954e 100644 --- a/src/JT808.Protocol/Internal/JT808_0x0200_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x0200_Factory.cs @@ -51,7 +51,7 @@ public IJT808_0x0200_Factory SetMap() where TJT808_0x0200_Bo public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_BodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_BodyBase)) == typeof(JT808_0x0200_BodyBase)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs index eda96b46..2a17c216 100644 --- a/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs @@ -19,7 +19,7 @@ public JT808_0x0900_Custom_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0900_BodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0900_BodyBase)) == typeof(JT808_0x0900_BodyBase)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x8103_Custom_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8103_Custom_Factory.cs index ac45b344..9f775f74 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8103_Custom_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8103_Custom_Factory.cs @@ -1,6 +1,7 @@ using JT808.Protocol.MessageBody; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Text; @@ -18,7 +19,7 @@ public JT808_0x8103_Custom_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x8103_CustomBodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x8103_CustomBodyBase)) == typeof(JT808_0x8103_CustomBodyBase)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs index d6b4a71e..3e1bb2fe 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Text; @@ -101,7 +102,7 @@ public JT808_0x8103_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x8103_BodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x8103_BodyBase)) == typeof(JT808_0x8103_BodyBase)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x8105_Cusotm_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8105_Cusotm_Factory.cs index 3397dbe8..3693cdd0 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8105_Cusotm_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8105_Cusotm_Factory.cs @@ -2,6 +2,7 @@ using JT808.Protocol.MessageBody; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Text; @@ -20,7 +21,7 @@ public JT808_0x8105_Cusotm_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(ICusotmCommandParameter)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(ICusotmCommandParameter)) == typeof(ICusotmCommandParameter)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x8500_2019_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8500_2019_Factory.cs index d7f21968..6a194729 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8500_2019_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8500_2019_Factory.cs @@ -2,9 +2,11 @@ using JT808.Protocol.MessageBody; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Text; +using static JT808.Protocol.MessageBody.JT808_0x8105; namespace JT808.Protocol.Internal { @@ -19,7 +21,7 @@ public JT808_0x8500_2019_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x8500_ControlType)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x8500_ControlType)) == typeof(JT808_0x8500_ControlType)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_0x8900_Custom_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8900_Custom_Factory.cs index 8140ad25..84bd5762 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8900_Custom_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8900_Custom_Factory.cs @@ -19,7 +19,7 @@ public JT808_0x8900_Custom_Factory() public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808_0x0200_CustomBodyBase)) == typeof(JT808_0x0200_CustomBodyBase)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs b/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs index 9d040002..20fc5d6b 100644 --- a/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs @@ -1,4 +1,5 @@ -using System; +using JT808.Protocol.MessageBody; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -29,7 +30,7 @@ public JT808_CarDVR_Down_Factory() /// public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808CarDVRDownBodies)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808CarDVRDownBodies)) == typeof(JT808CarDVRDownBodies)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/Internal/JT808_CarDVR_Up_Factory.cs b/src/JT808.Protocol/Internal/JT808_CarDVR_Up_Factory.cs index bbb9a08f..bf244172 100644 --- a/src/JT808.Protocol/Internal/JT808_CarDVR_Up_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_CarDVR_Up_Factory.cs @@ -29,7 +29,7 @@ public JT808_CarDVR_Up_Factory() /// public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808CarDVRUpBodies)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.GetInterface(nameof(JT808CarDVRUpBodies)) == typeof(JT808CarDVRUpBodies)).ToList(); foreach (var type in types) { var instance = Activator.CreateInstance(type); diff --git a/src/JT808.Protocol/JT808.Protocol.csproj b/src/JT808.Protocol/JT808.Protocol.csproj index 43da00a2..85d54070 100644 --- a/src/JT808.Protocol/JT808.Protocol.csproj +++ b/src/JT808.Protocol/JT808.Protocol.csproj @@ -39,12 +39,7 @@ - - - - - - + diff --git a/src/JT808.Protocol/JT808.Protocol.xml b/src/JT808.Protocol/JT808.Protocol.xml index 957cbc1e..902c6ed2 100644 --- a/src/JT808.Protocol/JT808.Protocol.xml +++ b/src/JT808.Protocol/JT808.Protocol.xml @@ -2239,32 +2239,6 @@ - - - - ref http://adamsitnik.com/Span/#span-must-not-be-a-generic-type-argument - ref http://adamsitnik.com/Span/ - ref:MessagePack.Formatters.DynamicObjectTypeFallbackFormatter - - - - - JT808动态序列化 - - - - - - - - - JT808动态反序列化 - - - - - - JT808创建包扩展 @@ -4145,6 +4119,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 通过类型获取对应的消息分析器 @@ -4198,7 +4200,7 @@ - + @@ -4223,11 +4225,49 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JT808构造器 @@ -4942,7 +4982,7 @@ - JT808抽象数据体 + JT808数据体 @@ -4957,11 +4997,6 @@ 消息Id - - - 消息描述 - - 记录仪上行数据体 @@ -4979,11 +5014,6 @@ 当数据体为空的时候,使用null作为空包感觉不适合,所以就算使用空包也需要new一下来表达意思。 - - - 消息描述 - - 行车记录仪下行数据包 @@ -5247,11 +5277,6 @@ 当数据体为空的时候,使用null作为空包感觉不适合,所以就算使用空包也需要new一下来表达意思。 - - - 消息描述 - - 行车记录仪上行数据包 @@ -16090,11 +16115,6 @@ 参数长度 - - - 消息描述 - - 自定义终端参数设置 @@ -16110,11 +16130,6 @@ 参数长度 - - - 消息描述 - - 查询终端参数 diff --git a/src/JT808.Protocol/JT808Bodies.cs b/src/JT808.Protocol/JT808Bodies.cs index 72d0d518..2fd891a4 100644 --- a/src/JT808.Protocol/JT808Bodies.cs +++ b/src/JT808.Protocol/JT808Bodies.cs @@ -3,23 +3,19 @@ namespace JT808.Protocol { /// - /// JT808抽象数据体 + /// JT808数据体 /// - public abstract class JT808Bodies: IJT808Description + public interface JT808Bodies: IJT808Description { /// /// 跳过数据体序列化 /// 默认不跳过 /// 当数据体为空的时候,使用null作为空包感觉不适合,所以就算使用空包也需要new一下来表达意思。 /// - public virtual bool SkipSerialization { get; set; } = false; + bool SkipSerialization { get { return false; } } /// /// 消息Id /// - public abstract ushort MsgId { get;} - /// - /// 消息描述 - /// - public abstract string Description { get; } + ushort MsgId { get;} } } diff --git a/src/JT808.Protocol/JT808CarDVRDownBodies.cs b/src/JT808.Protocol/JT808CarDVRDownBodies.cs index 2dc9ec2d..c19eb689 100644 --- a/src/JT808.Protocol/JT808CarDVRDownBodies.cs +++ b/src/JT808.Protocol/JT808CarDVRDownBodies.cs @@ -1,29 +1,21 @@ using JT808.Protocol.Interfaces; -using JT808.Protocol.MessagePack; -using System; -using System.Collections.Generic; -using System.Text; namespace JT808.Protocol { /// /// 记录仪上行数据体 /// - public abstract class JT808CarDVRDownBodies : IJT808Description + public interface JT808CarDVRDownBodies : IJT808Description { /// /// 命令字 /// - public abstract byte CommandId { get; } + byte CommandId { get; } /// /// 跳过数据体序列化 /// 默认不跳过 /// 当数据体为空的时候,使用null作为空包感觉不适合,所以就算使用空包也需要new一下来表达意思。 /// - public virtual bool SkipSerialization { get; set; } = false; - /// - /// 消息描述 - /// - public abstract string Description { get; } + bool SkipSerialization { get { return false; }} } } diff --git a/src/JT808.Protocol/JT808CarDVRDownPackage.cs b/src/JT808.Protocol/JT808CarDVRDownPackage.cs index 3d781763..e06fe21d 100644 --- a/src/JT808.Protocol/JT808CarDVRDownPackage.cs +++ b/src/JT808.Protocol/JT808CarDVRDownPackage.cs @@ -14,7 +14,7 @@ namespace JT808.Protocol /// /// 行车记录仪下行数据包 /// - public class JT808CarDVRDownPackage : IJT808_CarDVR_Down_Package, IJT808MessagePackFormatter, IJT808Analyze + public class JT808CarDVRDownPackage : JT808MessagePackFormatter, IJT808_CarDVR_Down_Package, IJT808Analyze { /// /// 头标识 @@ -50,7 +50,7 @@ public class JT808CarDVRDownPackage : IJT808_CarDVR_Down_Package, IJT808MessageP /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRDownPackage value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRDownPackage value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteUInt16(value.Begin); @@ -62,7 +62,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRDownPackage if (!value.Bodies?.SkipSerialization == true) { //4.2.处理消息体 - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(instance, ref writer, value.Bodies, config); + instance.SerializeExt(ref writer, value.Bodies, config); } } writer.WriteUInt16Return((ushort)(writer.GetCurrentPosition() - 2 - 1 - datalengthPosition), datalengthPosition);//此处-2:减去数据长度字段2位,-1:减去保留字长度 @@ -74,7 +74,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRDownPackage /// /// /// - public JT808CarDVRDownPackage Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808CarDVRDownPackage Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808CarDVRDownPackage value = new JT808CarDVRDownPackage(); int currentPosition = reader.ReaderCount; @@ -87,8 +87,7 @@ public JT808CarDVRDownPackage Deserialize(ref JT808MessagePackReader reader, IJT if (config.JT808_CarDVR_Down_Factory.Map.TryGetValue(value.CommandId, out var instance)) { //4.2.处理消息体 - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.Bodies = attachImpl; + value.Bodies = instance.DeserializeExt(ref reader, config); } } var carDVRCheckCode = reader.ReadCarDVRCheckCode(currentPosition); diff --git a/src/JT808.Protocol/JT808CarDVRSerializer.cs b/src/JT808.Protocol/JT808CarDVRSerializer.cs index ce048f41..6430b1c7 100644 --- a/src/JT808.Protocol/JT808CarDVRSerializer.cs +++ b/src/JT808.Protocol/JT808CarDVRSerializer.cs @@ -1,7 +1,5 @@ using JT808.Protocol.Enums; using JT808.Protocol.Extensions; -using JT808.Protocol.Formatters; -using JT808.Protocol.Interfaces; using JT808.Protocol.Internal; using JT808.Protocol.MessagePack; using System; @@ -228,7 +226,7 @@ public dynamic Deserialize(ReadOnlySpan bytes, Type type, JT808Version ver { var formatter = jT808Config.GetMessagePackFormatterByType(type); JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); - return JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(formatter,ref jT808MessagePackReader, jT808Config); + return formatter.Deserialize(ref jT808MessagePackReader, jT808Config); } /// /// diff --git a/src/JT808.Protocol/JT808CarDVRUpBodies.cs b/src/JT808.Protocol/JT808CarDVRUpBodies.cs index 508398e4..ad85906c 100644 --- a/src/JT808.Protocol/JT808CarDVRUpBodies.cs +++ b/src/JT808.Protocol/JT808CarDVRUpBodies.cs @@ -1,29 +1,21 @@ using JT808.Protocol.Interfaces; -using JT808.Protocol.MessagePack; -using System; -using System.Collections.Generic; -using System.Text; namespace JT808.Protocol { /// /// 记录仪上行数据体 /// - public abstract class JT808CarDVRUpBodies: IJT808Description + public interface JT808CarDVRUpBodies: IJT808Description { /// /// 命令字 /// - public abstract byte CommandId { get; } + byte CommandId { get; } /// /// 跳过数据体序列化 /// 默认不跳过 /// 当数据体为空的时候,使用null作为空包感觉不适合,所以就算使用空包也需要new一下来表达意思。 /// - public virtual bool SkipSerialization { get; set; } = false; - /// - /// 消息描述 - /// - public abstract string Description { get; } + bool SkipSerialization { get { return false; } } } } diff --git a/src/JT808.Protocol/JT808CarDVRUpPackage.cs b/src/JT808.Protocol/JT808CarDVRUpPackage.cs index 44a21848..e52cacac 100644 --- a/src/JT808.Protocol/JT808CarDVRUpPackage.cs +++ b/src/JT808.Protocol/JT808CarDVRUpPackage.cs @@ -14,7 +14,7 @@ namespace JT808.Protocol /// /// 行车记录仪上行数据包 /// - public class JT808CarDVRUpPackage : IJT808_CarDVR_Up_Package,IJT808MessagePackFormatter, IJT808Analyze + public class JT808CarDVRUpPackage : JT808MessagePackFormatter, IJT808_CarDVR_Up_Package, IJT808Analyze { /// /// 起始字头 @@ -105,7 +105,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808CarDVRUpPackage Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808CarDVRUpPackage Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808CarDVRUpPackage value = new JT808CarDVRUpPackage(); int currentPosition = reader.ReaderCount; @@ -123,8 +123,7 @@ public JT808CarDVRUpPackage Deserialize(ref JT808MessagePackReader reader, IJT80 if (config.JT808_CarDVR_Up_Factory.Map.TryGetValue(value.CommandId, out var instance)) { //4.2.处理消息体 - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.Bodies = attachImpl; + value.Bodies = instance.DeserializeExt(ref reader, config); } } var (CalculateXorCheckCode, RealXorCheckCode) = reader.ReadCarDVRCheckCode(currentPosition); @@ -142,7 +141,7 @@ public JT808CarDVRUpPackage Deserialize(ref JT808MessagePackReader reader, IJT80 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRUpPackage value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRUpPackage value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteUInt16(value.Begin); @@ -161,7 +160,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808CarDVRUpPackage va if (!value.Bodies.SkipSerialization) { //4.2.处理消息体 - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(instance, ref writer, value.Bodies, config); + instance.SerializeExt(ref writer, value.Bodies, config); } } writer.WriteUInt16Return((ushort)(writer.GetCurrentPosition() - 2 - 1 - datalengthPosition), datalengthPosition);//此处-2:减去数据长度字段2位,-1:减去保留字长度 diff --git a/src/JT808.Protocol/JT808Header.cs b/src/JT808.Protocol/JT808Header.cs index e6a767fc..354c310e 100644 --- a/src/JT808.Protocol/JT808Header.cs +++ b/src/JT808.Protocol/JT808Header.cs @@ -6,7 +6,7 @@ namespace JT808.Protocol /// /// 头部 /// - public class JT808Header : IJT808MessagePackFormatter + public class JT808Header : JT808MessagePackFormatter { /// /// 消息ID @@ -55,7 +55,7 @@ public class JT808Header : IJT808MessagePackFormatter /// /// /// - public JT808Header Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808Header Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808Header jT808Header = new JT808Header(); // 1.消息ID @@ -93,7 +93,7 @@ public JT808Header Deserialize(ref JT808MessagePackReader reader, IJT808Config c /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808Header value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808Header value, IJT808Config config) { // 1.消息ID writer.WriteUInt16(value.MsgId); diff --git a/src/JT808.Protocol/JT808Package.cs b/src/JT808.Protocol/JT808Package.cs index a1c27b7b..cfdab5d3 100644 --- a/src/JT808.Protocol/JT808Package.cs +++ b/src/JT808.Protocol/JT808Package.cs @@ -12,7 +12,7 @@ namespace JT808.Protocol /// /// JT808数据包 /// - public class JT808Package : IJT808MessagePackFormatter, IJT808Analyze + public class JT808Package : JT808MessagePackFormatter, IJT808Analyze { /// /// 起始符 @@ -57,7 +57,7 @@ public class JT808Package : IJT808MessagePackFormatter, IJT808Anal /// /// /// - public JT808Package Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808Package Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { // 1. 验证校验和 if (!config.SkipCRCCode) @@ -132,9 +132,7 @@ public JT808Package Deserialize(ref JT808MessagePackReader reader, IJT808Config try { //4.2.处理消息体 - jT808Package.Bodies = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize( - instance, - ref reader, config); + jT808Package.Bodies = instance.DeserializeExt(ref reader, config); } catch (Exception ex) { @@ -156,7 +154,7 @@ public JT808Package Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808Package value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808Package value, IJT808Config config) { // ---------------开始组包-------------- // 1.起始符 @@ -217,9 +215,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808Package value, IJT { if (!value.Bodies.SkipSerialization) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(value.Bodies, - ref writer, value.Bodies, - config); + value.Bodies.SerializeExt(ref writer, value.Bodies, config); } } } diff --git a/src/JT808.Protocol/JT808Serializer.cs b/src/JT808.Protocol/JT808Serializer.cs index b60d0285..c80413e8 100644 --- a/src/JT808.Protocol/JT808Serializer.cs +++ b/src/JT808.Protocol/JT808Serializer.cs @@ -18,6 +18,10 @@ public class JT808Serializer { private readonly static JT808Package jT808Package = new JT808Package(); + private readonly static Type JT808_Header_Package_Type = typeof(JT808HeaderPackage); + + private readonly static Type JT808_Package_Type = typeof(JT808Package); + /// /// /// @@ -53,7 +57,7 @@ public byte[] Serialize(JT808Package package, JT808Version version = JT808Versio try { JT808MessagePackWriter jT808MessagePackWriter = new JT808MessagePackWriter(buffer, version); - jT808Package.Serialize(ref jT808MessagePackWriter, package, jT808Config); + package.Serialize(ref jT808MessagePackWriter, package, jT808Config); return jT808MessagePackWriter.FlushAndGetEncodingArray(); } finally @@ -74,7 +78,7 @@ public ReadOnlySpan SerializeReadOnlySpan(JT808Package package, JT808Versi try { JT808MessagePackWriter jT808MessagePackWriter = new JT808MessagePackWriter(buffer, version); - jT808Package.Serialize(ref jT808MessagePackWriter, package, jT808Config); + package.Serialize(ref jT808MessagePackWriter, package, jT808Config); return jT808MessagePackWriter.FlushAndGetEncodingReadOnlySpan(); } finally @@ -180,7 +184,7 @@ public T Deserialize(ReadOnlySpan bytes, JT808Version version = JT808Ve /// private static bool CheckPackageType(Type type) { - return type == typeof(JT808Package) || type == typeof(JT808HeaderPackage); + return type == JT808_Package_Type || type == JT808_Header_Package_Type; } /// @@ -222,7 +226,7 @@ public dynamic Deserialize(ReadOnlySpan bytes, Type type, JT808Version ver JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); if (CheckPackageType(type)) jT808MessagePackReader.Decode(buffer); - return JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(formatter,ref jT808MessagePackReader, jT808Config); + return formatter.Deserialize(ref jT808MessagePackReader, jT808Config); } finally { @@ -305,7 +309,7 @@ public string Analyze(ushort msgid,ReadOnlySpan bytes, JT808Version versio { if(jT808Config.MsgIdFactory.TryGetValue(msgid,out object msgHandle)) { - if (jT808Config.FormatterFactory.FormatterDict.TryGetValue(msgHandle.GetType().GUID, out object instance)) + if (msgHandle is IJT808MessagePackFormatter instance) { using MemoryStream memoryStream = new MemoryStream(); using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); @@ -343,7 +347,7 @@ public byte[] AnalyzeJsonBuffer(ushort msgid, ReadOnlySpan bytes, JT808Ver { if (jT808Config.MsgIdFactory.TryGetValue(msgid, out object msgHandle)) { - if (jT808Config.FormatterFactory.FormatterDict.TryGetValue(msgHandle.GetType().GUID, out object instance)) + if (msgHandle is IJT808MessagePackFormatter instance) { using MemoryStream memoryStream = new MemoryStream(); using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs index 4ba856fc..c4ac773c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x00 : JT808CarDVRDownBodies /// /// 0x00 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_performs_standard_version.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_performs_standard_version.ToByteValue(); /// /// 采集记录仪执行标准版本 /// - public override string Description => "采集记录仪执行标准版本"; + public string Description => "采集记录仪执行标准版本"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs index a4598394..aa24b312 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x01 : JT808CarDVRDownBodies /// /// 0x01 /// - public override byte CommandId => JT808CarDVRCommandID.collect_driver.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_driver.ToByteValue(); /// /// 采集机动车驾驶证号码 /// - public override string Description => "采集机动车驾驶证号码"; + public string Description => "采集机动车驾驶证号码"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs index 5affeb1d..51d65986 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x02 : JT808CarDVRDownBodies /// /// 0x02 /// - public override byte CommandId => JT808CarDVRCommandID.collect_realtime.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_realtime.ToByteValue(); /// /// 实时时间 /// - public override string Description => "实时时间"; + public string Description => "实时时间"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs index af075f07..69a85680 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x03 : JT808CarDVRDownBodies /// /// 0x03 /// - public override byte CommandId => JT808CarDVRCommandID.collect_accumulated_mileage.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_accumulated_mileage.ToByteValue(); /// /// 实时时间、安装时的初始里程及安装后的累计行驶里程 /// - public override string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; + public string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs index 07c80cd2..a8c24284 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x04 : JT808CarDVRDownBodies /// /// 0x04 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_pulse_coefficient.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_pulse_coefficient.ToByteValue(); /// /// 实时时间及设定的脉冲系数 /// - public override string Description => "实时时间及设定的脉冲系数"; + public string Description => "实时时间及设定的脉冲系数"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs index e24e391b..3e0cf3d9 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x05 : JT808CarDVRDownBodies /// /// 0x05 /// - public override byte CommandId => JT808CarDVRCommandID.collect_vehicle_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_vehicle_information.ToByteValue(); /// /// 车辆识别代号、机动车号牌号码和机动车号牌分类 /// - public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; + public string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs index 9fed6d3a..45310c53 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x06 : JT808CarDVRDownBodies /// /// 0x06 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_status_signal_configuration_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_status_signal_configuration_information.ToByteValue(); /// /// 状态信号配置信息 /// - public override string Description => "状态信号配置信息"; + public string Description => "状态信号配置信息"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs index fe261619..5e5f4950 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs @@ -19,14 +19,14 @@ public class JT808_CarDVR_Down_0x07 : JT808CarDVRDownBodies /// /// 0x07 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_unique_number.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_unique_number.ToByteValue(); /// /// 唯一性编号及初次安装日期 /// - public override string Description => "唯一性编号及初次安装日期"; + public string Description => "唯一性编号及初次安装日期"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs index 4436c55f..112774f0 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的行驶速度记录 /// 如在指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Down_0x08 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x08 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x08 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_specified_speed.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_specified_speed.ToByteValue(); /// /// 开始时间 /// @@ -36,14 +36,14 @@ public class JT808_CarDVR_Down_0x08 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 符合条件的行驶速度记录 /// - public override string Description => "符合条件的行驶速度记录"; + public string Description => "符合条件的行驶速度记录"; /// /// /// /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x08 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x08 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -55,7 +55,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x08 /// /// /// - public JT808_CarDVR_Down_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x08 value = new JT808_CarDVR_Down_0x08(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs index 8aee5034..c8efe808 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的位置信息记录 /// 指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Down_0x09 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x09 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x09 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_location_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_location_information.ToByteValue(); /// /// 符合条件的位置信息记录 /// - public override string Description => "符合条件的位置信息记录"; + public string Description => "符合条件的位置信息记录"; /// /// 开始时间 /// @@ -43,7 +43,7 @@ public class JT808_CarDVR_Down_0x09 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x09 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x09 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -55,7 +55,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x09 /// /// /// - public JT808_CarDVR_Down_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x09 value = new JT808_CarDVR_Down_0x09(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs index 8e350be5..c965091e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的事故疑点记录 /// 指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Down_0x10 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x10 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x10 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_incident_suspect_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_incident_suspect_records.ToByteValue(); /// /// 符合条件的事故疑点记录 /// - public override string Description => "符合条件的事故疑点记录"; + public string Description => "符合条件的事故疑点记录"; /// /// 开始时间 /// @@ -43,7 +43,7 @@ public class JT808_CarDVR_Down_0x10 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x10 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x10 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -55,7 +55,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x10 /// /// /// - public JT808_CarDVR_Down_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x10 value = new JT808_CarDVR_Down_0x10(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs index 05ca431f..55c484f0 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的超时驾驶记录 /// 返回:符合条件的超时驾驶记录 /// - public class JT808_CarDVR_Down_0x11 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x11 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x11 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_driving_overtime_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_driving_overtime_records.ToByteValue(); /// /// 符合条件的超时驾驶记录 /// - public override string Description => "符合条件的超时驾驶记录"; + public string Description => "符合条件的超时驾驶记录"; /// /// 开始时间 /// @@ -42,7 +42,7 @@ public class JT808_CarDVR_Down_0x11 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x11 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x11 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -54,7 +54,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x11 /// /// /// - public JT808_CarDVR_Down_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x11 value = new JT808_CarDVR_Down_0x11(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs index f9da7812..a0b2424d 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的驾驶人身份记录 /// 返回:符合条件的驾驶人登录退出记录 /// - public class JT808_CarDVR_Down_0x12 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x12 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x12 /// - public override byte CommandId => JT808CarDVRCommandID.collect_drivers_identification_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_drivers_identification_records.ToByteValue(); /// /// 符合条件的驾驶人登录退出记录 /// - public override string Description => "符合条件的驾驶人登录退出记录"; + public string Description => "符合条件的驾驶人登录退出记录"; /// /// 开始时间 /// @@ -42,7 +42,7 @@ public class JT808_CarDVR_Down_0x12 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x12 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x12 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -54,7 +54,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x12 /// /// /// - public JT808_CarDVR_Down_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x12 value = new JT808_CarDVR_Down_0x12(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs index 4de7e6c4..21b84f3b 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的外部供电记录 /// 返回:符合条件的供电记录 /// - public class JT808_CarDVR_Down_0x13 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x13 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x13 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_external_power_supply_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_external_power_supply_records.ToByteValue(); /// /// 符合条件的供电记录 /// - public override string Description => "符合条件的供电记录"; + public string Description => "符合条件的供电记录"; /// /// 开始时间 /// @@ -42,7 +42,7 @@ public class JT808_CarDVR_Down_0x13 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x13 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x13 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -54,7 +54,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x13 /// /// /// - public JT808_CarDVR_Down_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x13 value = new JT808_CarDVR_Down_0x13(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs index 54157788..aff214ca 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的参数修改记录 /// 返回:符合条件的参数修改记录 /// - public class JT808_CarDVR_Down_0x14 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x14 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x14 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_modify_parameters_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_modify_parameters_records.ToByteValue(); /// /// 符合条件的参数修改记录 /// - public override string Description => "符合条件的参数修改记录"; + public string Description => "符合条件的参数修改记录"; /// /// 开始时间 /// @@ -42,7 +42,7 @@ public class JT808_CarDVR_Down_0x14 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x14 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x14 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -54,7 +54,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x14 /// /// /// - public JT808_CarDVR_Down_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x14 value = new JT808_CarDVR_Down_0x14(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs index 578ec733..e27b6f82 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的速度状态日志 /// 返回:符合条件的速度状态日志 /// - public class JT808_CarDVR_Down_0x15 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x15 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x15 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_speed_status_logs.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_speed_status_logs.ToByteValue(); /// /// 符合条件的速度状态日志 /// - public override string Description => "符合条件的速度状态日志"; + public string Description => "符合条件的速度状态日志"; /// /// 开始时间 /// @@ -42,7 +42,7 @@ public class JT808_CarDVR_Down_0x15 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x15 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x15 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.StartTime); writer.WriteDateTime_yyMMddHHmmss(value.EndTime); @@ -54,7 +54,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x15 /// /// /// - public JT808_CarDVR_Down_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x15 value = new JT808_CarDVR_Down_0x15(); value.StartTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs index e67b49b2..8b57298e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置车辆信息 /// 返回:车辆信息 /// - public class JT808_CarDVR_Down_0x82 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x82 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x82 /// - public override byte CommandId => JT808CarDVRCommandID.setting_vehicle_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.setting_vehicle_information.ToByteValue(); /// /// 车辆识别代号 /// @@ -38,7 +38,7 @@ public class JT808_CarDVR_Down_0x82 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 车辆信息 /// - public override string Description => "车辆信息"; + public string Description => "车辆信息"; /// /// /// @@ -64,7 +64,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x82 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x82 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.Vin); @@ -82,7 +82,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x82 /// /// /// - public JT808_CarDVR_Down_0x82 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x82 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x82 value = new JT808_CarDVR_Down_0x82(); value.Vin = reader.ReadASCII(17); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs index c744b0db..c1ddcdc2 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置记录仪初次安装日期 /// 返回:初次安装日期 /// - public class JT808_CarDVR_Down_0x83 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x83 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x83 /// - public override byte CommandId => JT808CarDVRCommandID.set_first_install_date_recorder.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_first_install_date_recorder.ToByteValue(); /// /// 实时时间 /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Down_0x83 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 初次安装日期 /// - public override string Description => "初次安装日期"; + public string Description => "初次安装日期"; /// /// /// @@ -47,7 +47,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x83 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x83 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); } @@ -57,7 +57,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x83 /// /// /// - public JT808_CarDVR_Down_0x83 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x83 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x83 value = new JT808_CarDVR_Down_0x83(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs index 66026363..b0d13cc2 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置状态量配置信息 /// 返回:状态量配置信息 /// - public class JT808_CarDVR_Down_0x84 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0x84 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0x84 /// - public override byte CommandId => JT808CarDVRCommandID.set_state_quantity_configuration_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_state_quantity_configuration_information.ToByteValue(); /// /// 实时时间 /// @@ -70,7 +70,7 @@ public class JT808_CarDVR_Down_0x84 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 状态量配置信息 /// - public override string Description => "状态量配置信息"; + public string Description => "状态量配置信息"; /// /// /// @@ -115,7 +115,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x84 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x84 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteByte(value.SignalOperate); @@ -150,7 +150,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x84 /// /// /// - public JT808_CarDVR_Down_0x84 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0x84 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x84 value = new JT808_CarDVR_Down_0x84(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs index 2dacf768..fdbccdcd 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置记录仪时间 /// 返回:北京时间的日期、时钟 /// - public class JT808_CarDVR_Down_0xC2 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0xC2 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0xC2 /// - public override byte CommandId => JT808CarDVRCommandID.set_recorder_time.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_recorder_time.ToByteValue(); /// /// 实时时间 /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Down_0xC2 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 北京时间的日期、时钟 /// - public override string Description => "北京时间的日期、时钟"; + public string Description => "北京时间的日期、时钟"; /// /// /// @@ -48,7 +48,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC2 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC2 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); } @@ -58,7 +58,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC2 /// /// /// - public JT808_CarDVR_Down_0xC2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0xC2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC2 value = new JT808_CarDVR_Down_0xC2(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs index cf9f6fe9..828b4aae 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置记录仪脉冲系数 /// 返回:记录仪脉冲系数 /// - public class JT808_CarDVR_Down_0xC3 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0xC3 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0xC3 /// - public override byte CommandId => JT808CarDVRCommandID.set_pulse_coefficient_recorder.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_pulse_coefficient_recorder.ToByteValue(); /// /// 当前时间 /// @@ -32,7 +32,7 @@ public class JT808_CarDVR_Down_0xC3 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 记录仪脉冲系数 /// - public override string Description => "记录仪脉冲系数"; + public string Description => "记录仪脉冲系数"; /// /// @@ -56,7 +56,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC3 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC3 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteUInt16(value.PulseCoefficient); @@ -67,7 +67,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC3 /// /// /// - public JT808_CarDVR_Down_0xC3 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0xC3 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC3 value = new JT808_CarDVR_Down_0xC3(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs index 95eba786..986b49b5 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 设置初始里程 /// 返回:记录仪初次安装时车辆已行驶的总里程 /// - public class JT808_CarDVR_Down_0xC4 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0xC4 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0xC4 /// - public override byte CommandId => JT808CarDVRCommandID.set_init_mileage.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_init_mileage.ToByteValue(); /// /// 实时时间 /// @@ -40,7 +40,7 @@ public class JT808_CarDVR_Down_0xC4 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 车辆识别代号、机动车号牌号码和机动车号牌分类 /// - public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; + public string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; /// /// /// @@ -65,7 +65,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC4 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC4 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteDateTime_yyMMddHHmmss(value.FirstInstallTime); @@ -78,7 +78,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC4 /// /// /// - public JT808_CarDVR_Down_0xC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0xC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC4 value = new JT808_CarDVR_Down_0xC4(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs index 62aaaff7..883e04cd 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs @@ -20,15 +20,15 @@ public class JT808_CarDVR_Down_0xE0 : JT808CarDVRDownBodies /// /// 0xE0 /// - public override byte CommandId => JT808CarDVRCommandID.enters_maintains_check_state.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enters_maintains_check_state.ToByteValue(); /// /// 进入或保持检定状态 /// - public override string Description => "进入或保持检定状态"; + public string Description => "进入或保持检定状态"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs index 70e8e227..f3143100 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 进入里程误差测量 /// 返回:通过 DB9 的 7 脚接收标准速度脉冲测量信号(TTL 电平) /// - public class JT808_CarDVR_Down_0xE1 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Down_0xE1 : JT808MessagePackFormatter, JT808CarDVRDownBodies, IJT808Analyze { /// /// 0xE1 /// - public override byte CommandId => JT808CarDVRCommandID.enter_mileage_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_mileage_error_measurement.ToByteValue(); /// /// 记录仪唯一性编号 /// @@ -45,7 +45,7 @@ public class JT808_CarDVR_Down_0xE1 : JT808CarDVRDownBodies, IJT808MessagePackFo /// /// 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) /// - public override string Description => "通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; + public string Description => "通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; /// /// /// @@ -73,7 +73,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xE1 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xE1 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.UniqueNumber); @@ -89,7 +89,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xE1 /// /// /// - public JT808_CarDVR_Down_0xE1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Down_0xE1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xE1 value = new JT808_CarDVR_Down_0xE1(); value.UniqueNumber = reader.ReadASCII(35); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs index 085024cc..1391d145 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Down_0xE2 : JT808CarDVRDownBodies /// /// 0xE2 /// - public override byte CommandId => JT808CarDVRCommandID.enter_pulse_coefficient_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_pulse_coefficient_error_measurement.ToByteValue(); /// /// 通过DB9的7脚输出车速传感器信号(TTL 电平) /// - public override string Description => "通过DB9的7脚输出车速传感器信号(TTL 电平)"; + public string Description => "通过DB9的7脚输出车速传感器信号(TTL 电平)"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs index bb24b3c0..4f66647b 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Down_0xE3 : JT808CarDVRDownBodies /// /// 0xE3 /// - public override byte CommandId => JT808CarDVRCommandID.enter_realtime_time_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_realtime_time_error_measurement.ToByteValue(); /// /// 通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平) /// - public override string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; + public string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs index ae5a27c5..b30a7be4 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Down_0xE4 : JT808CarDVRDownBodies /// /// 0xE4 /// - public override byte CommandId => JT808CarDVRCommandID.return_normal_working_status.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.return_normal_working_status.ToByteValue(); /// /// 返回正常工作状态 /// - public override string Description => "返回正常工作状态"; + public string Description => "返回正常工作状态"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs index 73cb18a3..0c3af5e4 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集记录仪执行标准版本 /// 返回:记录仪执行标准的年号及修改单号 /// - public class JT808_CarDVR_Up_0x00 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x00 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x00 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_performs_standard_version.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_performs_standard_version.ToByteValue(); /// /// 记录仪执行标准年号后 2 位 BCD 码 /// 无应答则默认为 03 @@ -34,7 +34,7 @@ public class JT808_CarDVR_Up_0x00 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 记录仪执行标准的年号及修改单号 /// - public override string Description => "记录仪执行标准的年号及修改单号"; + public string Description => "记录仪执行标准的年号及修改单号"; /// /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x00 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x00 value, IJT808Config config) { writer.WriteBCD(value.StandardYear, 2); writer.WriteByte(value.ModifyNumber); @@ -66,7 +66,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x00 va /// /// /// - public JT808_CarDVR_Up_0x00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x00 value = new JT808_CarDVR_Up_0x00(); value.StandardYear = reader.ReadBCD(2); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs index e4eb46b4..e8a1aa28 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 机动车驾驶证号码 /// 返回:当前驾驶人的机动车驾驶证号码 /// - public class JT808_CarDVR_Up_0x01 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x01 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x01 /// - public override byte CommandId => JT808CarDVRCommandID.collect_driver.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_driver.ToByteValue(); /// /// 机动车驾驶证号码 /// 机动车驾驶证号码为 15 位时,后 3 位以 00H 补齐。驾驶人身份未知时以 00H 表示 @@ -29,7 +29,7 @@ public class JT808_CarDVR_Up_0x01 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 当前驾驶人的机动车驾驶证号码 /// - public override string Description => "当前驾驶人的机动车驾驶证号码"; + public string Description => "当前驾驶人的机动车驾驶证号码"; /// /// /// @@ -49,7 +49,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x01 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x01 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.DriverLicenseNo); @@ -61,7 +61,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x01 va /// /// /// - public JT808_CarDVR_Up_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x01 value = new JT808_CarDVR_Up_0x01(); value.DriverLicenseNo = reader.ReadASCII(18); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs index e83430cc..4721b919 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集记录仪实时时间 /// 返回:实时时间 /// - public class JT808_CarDVR_Up_0x02 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x02 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x02 /// - public override byte CommandId => JT808CarDVRCommandID.collect_realtime.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_realtime.ToByteValue(); /// /// 实时时间 /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x02 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 实时时间 /// - public override string Description => "实时时间"; + public string Description => "实时时间"; /// /// /// @@ -48,7 +48,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x02 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x02 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); } @@ -58,7 +58,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x02 va /// /// /// - public JT808_CarDVR_Up_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x02 value = new JT808_CarDVR_Up_0x02(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs index a6697b51..c45f9c18 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs @@ -12,12 +12,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集累计行驶里程 /// 返回:实时时间、安装时的初始里程及安装后的累计行驶里程 /// - public class JT808_CarDVR_Up_0x03 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x03 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x03 /// - public override byte CommandId => JT808CarDVRCommandID.collect_accumulated_mileage.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_accumulated_mileage.ToByteValue(); /// /// 实时时间 /// @@ -37,7 +37,7 @@ public class JT808_CarDVR_Up_0x03 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 实时时间、安装时的初始里程及安装后的累计行驶里程 /// - public override string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; + public string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; /// /// /// @@ -66,7 +66,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x03 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x03 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteDateTime_yyMMddHHmmss(value.FirstInstallTime); @@ -79,7 +79,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x03 va /// /// /// - public JT808_CarDVR_Up_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x03 value = new JT808_CarDVR_Up_0x03(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs index 3087fc26..2ec8025c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集记录仪脉冲系数 /// 返回:实时时间及设定的脉冲系数 /// - public class JT808_CarDVR_Up_0x04 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x04 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x04 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_pulse_coefficient.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_pulse_coefficient.ToByteValue(); /// /// 当前时间 /// @@ -32,7 +32,7 @@ public class JT808_CarDVR_Up_0x04 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 实时时间及设定的脉冲系数 /// - public override string Description => "实时时间及设定的脉冲系数"; + public string Description => "实时时间及设定的脉冲系数"; /// /// /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x04 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x04 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteUInt16(value.PulseCoefficient); @@ -65,7 +65,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x04 va /// /// /// - public JT808_CarDVR_Up_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x04 value = new JT808_CarDVR_Up_0x04(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs index a3e4189e..a50319af 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集车辆信息 /// 返回:车辆识别代号、机动车号牌号码和机动车号牌分类 /// - public class JT808_CarDVR_Up_0x05 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x05 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x05 /// - public override byte CommandId => JT808CarDVRCommandID.collect_vehicle_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_vehicle_information.ToByteValue(); /// /// 车辆识别代号 /// @@ -38,7 +38,7 @@ public class JT808_CarDVR_Up_0x05 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 车辆识别代号、机动车号牌号码和机动车号牌分类 /// - public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; + public string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; /// /// /// @@ -64,7 +64,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x05 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x05 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.Vin); @@ -82,7 +82,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x05 va /// /// /// - public JT808_CarDVR_Up_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x05 value = new JT808_CarDVR_Up_0x05(); value.Vin = reader.ReadASCII(17); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs index 4cfaf047..1de5af05 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集记录仪状态信号配置信息 /// 返回:状态信号配置信息 /// - public class JT808_CarDVR_Up_0x06 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x06 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x06 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_status_signal_configuration_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_status_signal_configuration_information.ToByteValue(); /// /// 实时时间 /// @@ -70,7 +70,7 @@ public class JT808_CarDVR_Up_0x06 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 状态信号配置信息 /// - public override string Description => "状态信号配置信息"; + public string Description => "状态信号配置信息"; /// /// /// @@ -116,7 +116,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x06 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x06 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.RealTime); writer.WriteByte(value.SignalOperate); @@ -151,7 +151,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x06 va /// /// /// - public JT808_CarDVR_Up_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x06 value = new JT808_CarDVR_Up_0x06(); value.RealTime = reader.ReadDateTime_yyMMddHHmmss(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs index 99405b1b..fe4aa728 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集记录仪唯一性编号 /// 返回:唯一性编号及初次安装日期 /// - public class JT808_CarDVR_Up_0x07 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x07 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x07 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_unique_number.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_unique_number.ToByteValue(); /// /// 生产厂 CCC 认证代码 7字节 /// @@ -44,7 +44,7 @@ public class JT808_CarDVR_Up_0x07 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 唯一性编号及初次安装日期 /// - public override string Description => "唯一性编号及初次安装日期"; + public string Description => "唯一性编号及初次安装日期"; /// /// /// @@ -76,7 +76,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x07 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x07 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.ProductionPlantCCCCertificationCode); @@ -98,7 +98,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x07 va /// /// /// - public JT808_CarDVR_Up_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x07 value = new JT808_CarDVR_Up_0x07(); value.ProductionPlantCCCCertificationCode = reader.ReadASCII(7); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs index 3b9a115f..f965cf11 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs @@ -16,12 +16,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的行驶速度记录 /// 如在指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Up_0x08 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x08 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x08 /// - public override byte CommandId => JT808CarDVRCommandID.collect_recorder_specified_speed.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_recorder_specified_speed.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -29,7 +29,7 @@ public class JT808_CarDVR_Up_0x08 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的行驶速度记录 /// - public override string Description => "符合条件的行驶速度记录"; + public string Description => "符合条件的行驶速度记录"; /// /// /// @@ -70,7 +70,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x08 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x08 value, IJT808Config config) { foreach (var speedPerMinute in value.JT808_CarDVR_Up_0x08_SpeedPerMinutes) { @@ -95,7 +95,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x08 va /// /// /// - public JT808_CarDVR_Up_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x08 value = new JT808_CarDVR_Up_0x08(); value.JT808_CarDVR_Up_0x08_SpeedPerMinutes = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs index dbc29192..ea32fe6a 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs @@ -16,12 +16,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的位置信息记录 /// 指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Up_0x09 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x09 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x09 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_location_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_location_information.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -29,7 +29,7 @@ public class JT808_CarDVR_Up_0x09 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的位置信息记录 /// - public override string Description => "符合条件的位置信息记录"; + public string Description => "符合条件的位置信息记录"; /// /// /// @@ -73,7 +73,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x09 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x09 value, IJT808Config config) { foreach (var positionPerHour in value.JT808_CarDVR_Up_0x09_PositionPerHours) { @@ -102,7 +102,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x09 va /// /// /// - public JT808_CarDVR_Up_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x09 value = new JT808_CarDVR_Up_0x09(); value.JT808_CarDVR_Up_0x09_PositionPerHours = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs index 9f7fa029..464fa117 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs @@ -17,12 +17,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 返回:符合条件的事故疑点记录 /// 指定的时间范围内无数据记录,则本数据块数据为空 /// - public class JT808_CarDVR_Up_0x10 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x10 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x10 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_incident_suspect_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_incident_suspect_records.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -30,7 +30,7 @@ public class JT808_CarDVR_Up_0x10 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的事故疑点记录 /// - public override string Description => "符合条件的事故疑点记录"; + public string Description => "符合条件的事故疑点记录"; /// /// /// @@ -85,7 +85,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x10 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x10 value, IJT808Config config) { foreach (var accidentSuspectin in value.JT808_CarDVR_Up_0x10_AccidentSuspectins) { @@ -117,7 +117,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x10 va /// /// /// - public JT808_CarDVR_Up_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x10 value = new JT808_CarDVR_Up_0x10(); value.JT808_CarDVR_Up_0x10_AccidentSuspectins = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs index 13b935fa..91d26976 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的超时驾驶记录 /// 返回:符合条件的超时驾驶记录 /// - public class JT808_CarDVR_Up_0x11 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x11 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x11 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_driving_overtime_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_driving_overtime_records.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x11 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的超时驾驶记录 /// - public override string Description => "符合条件的超时驾驶记录"; + public string Description => "符合条件的超时驾驶记录"; /// /// /// @@ -80,7 +80,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x11 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x11 value, IJT808Config config) { foreach (var driveOverTime in value.JT808_CarDVR_Up_0x11_DriveOverTimes) { @@ -103,7 +103,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x11 va /// /// /// - public JT808_CarDVR_Up_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x11 value = new JT808_CarDVR_Up_0x11(); value.JT808_CarDVR_Up_0x11_DriveOverTimes = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs index cb7c9457..04edd3a7 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的驾驶人身份记录 /// 返回:符合条件的驾驶人登录退出记录 /// - public class JT808_CarDVR_Up_0x12 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x12 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x12 /// - public override byte CommandId => JT808CarDVRCommandID.collect_drivers_identification_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_drivers_identification_records.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x12 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的驾驶人登录退出记录 /// - public override string Description => "符合条件的驾驶人登录退出记录"; + public string Description => "符合条件的驾驶人登录退出记录"; /// /// /// @@ -77,7 +77,7 @@ static string LoginTypeDisplay(byte loginType){ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x12 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x12 value, IJT808Config config) { foreach (var driveLogin in value.JT808_CarDVR_Up_0x12_DriveLogins) { @@ -94,7 +94,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x12 va /// /// /// - public JT808_CarDVR_Up_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x12 value = new JT808_CarDVR_Up_0x12(); value.JT808_CarDVR_Up_0x12_DriveLogins = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs index efccee06..050d73ae 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的外部供电记录 /// 返回:符合条件的供电记录 /// - public class JT808_CarDVR_Up_0x13 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x13 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x13 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_external_power_supply_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_external_power_supply_records.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x13 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的供电记录 /// - public override string Description => "符合条件的供电记录"; + public string Description => "符合条件的供电记录"; /// /// /// @@ -70,7 +70,7 @@ static string EventTypeDisplay(byte eventType) { /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x13 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x13 value, IJT808Config config) { foreach (var externalPowerSupply in value.JT808_CarDVR_Up_0x13_ExternalPowerSupplys) { @@ -84,7 +84,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x13 va /// /// /// - public JT808_CarDVR_Up_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x13 value = new JT808_CarDVR_Up_0x13(); value.JT808_CarDVR_Up_0x13_ExternalPowerSupplys = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs index 707eb5e8..2887a773 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的参数修改记录 /// 返回:符合条件的参数修改记录 /// - public class JT808_CarDVR_Up_0x14 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x14 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x14 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_modify_parameters_records.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_modify_parameters_records.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x14 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的参数修改记录 /// - public override string Description => "符合条件的参数修改记录"; + public string Description => "符合条件的参数修改记录"; /// /// /// @@ -60,7 +60,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x14 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x14 value, IJT808Config config) { foreach (var parameterModify in value.JT808_CarDVR_Up_0x14_ParameterModifys) { @@ -74,7 +74,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x14 va /// /// /// - public JT808_CarDVR_Up_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x14 value = new JT808_CarDVR_Up_0x14(); value.JT808_CarDVR_Up_0x14_ParameterModifys = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs index 066f8bee..2cf4e8c0 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs @@ -15,12 +15,12 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 采集指定的速度状态日志 /// 返回:符合条件的速度状态日志 /// - public class JT808_CarDVR_Up_0x15 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_CarDVR_Up_0x15 : JT808MessagePackFormatter, JT808CarDVRUpBodies, IJT808Analyze { /// /// 0x15 /// - public override byte CommandId => JT808CarDVRCommandID.collect_specified_speed_status_logs.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.collect_specified_speed_status_logs.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// @@ -28,7 +28,7 @@ public class JT808_CarDVR_Up_0x15 : JT808CarDVRUpBodies, IJT808MessagePackFormat /// /// 符合条件的速度状态日志 /// - public override string Description => "符合条件的速度状态日志"; + public string Description => "符合条件的速度状态日志"; /// /// /// @@ -99,7 +99,7 @@ static string SpeedStatusDisplay(byte speedStatus) { /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x15 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x15 value, IJT808Config config) { foreach (var speedStatusLog in value.JT808_CarDVR_Up_0x15_SpeedStatusLogs) { @@ -126,7 +126,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x15 va /// /// /// - public JT808_CarDVR_Up_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_CarDVR_Up_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x15 value = new JT808_CarDVR_Up_0x15(); value.JT808_CarDVR_Up_0x15_SpeedStatusLogs = new List(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs index d6d42cce..29c444ce 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0x82 : JT808CarDVRUpBodies /// /// 0x82 /// - public override byte CommandId => JT808CarDVRCommandID.setting_vehicle_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.setting_vehicle_information.ToByteValue(); /// /// 车辆信息 /// - public override string Description => "车辆信息"; + public string Description => "车辆信息"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs index 4aeb0833..58c3b97d 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0x83 : JT808CarDVRUpBodies /// /// 0x83 /// - public override byte CommandId => JT808CarDVRCommandID.set_first_install_date_recorder.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_first_install_date_recorder.ToByteValue(); /// /// 初次安装日期 /// - public override string Description => "初次安装日期"; + public string Description => "初次安装日期"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs index 8a0af3ae..38ff29e6 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0x84 : JT808CarDVRUpBodies /// /// 0x84 /// - public override byte CommandId => JT808CarDVRCommandID.set_state_quantity_configuration_information.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_state_quantity_configuration_information.ToByteValue(); /// /// 状态量配置信息 /// - public override string Description => "状态量配置信息"; + public string Description => "状态量配置信息"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs index 23888029..dceecd9e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xC2 : JT808CarDVRUpBodies /// /// 0xC2 /// - public override byte CommandId => JT808CarDVRCommandID.set_recorder_time.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_recorder_time.ToByteValue(); /// /// 北京时间的日期、时钟 /// - public override string Description => "北京时间的日期、时钟"; + public string Description => "北京时间的日期、时钟"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs index 13084e79..9cc39910 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xC3 : JT808CarDVRUpBodies /// /// 0xC3 /// - public override byte CommandId => JT808CarDVRCommandID.set_pulse_coefficient_recorder.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_pulse_coefficient_recorder.ToByteValue(); /// /// 记录仪脉冲系数 /// - public override string Description => "记录仪脉冲系数"; + public string Description => "记录仪脉冲系数"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs index 7ab25a9f..28233894 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xC4 : JT808CarDVRUpBodies /// /// 0xC4 /// - public override byte CommandId => JT808CarDVRCommandID.set_init_mileage.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.set_init_mileage.ToByteValue(); /// /// 车辆识别代号、机动车号牌号码和机动车号牌分类 /// - public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; + public string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs index 5b2be94a..280acbd7 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs @@ -21,14 +21,14 @@ public class JT808_CarDVR_Up_0xE0 : JT808CarDVRUpBodies /// /// 0xE0 /// - public override byte CommandId => JT808CarDVRCommandID.enters_maintains_check_state.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enters_maintains_check_state.ToByteValue(); /// /// 进入或保持检定状态 /// - public override string Description => "进入或保持检定状态"; + public string Description => "进入或保持检定状态"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs index 6d49cfeb..2346a423 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xE1 : JT808CarDVRUpBodies /// /// 0xE1 /// - public override byte CommandId => JT808CarDVRCommandID.enter_mileage_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_mileage_error_measurement.ToByteValue(); /// /// 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) /// - public override string Description => "通过 DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; + public string Description => "通过 DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs index ecabcf1d..2fd7b747 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xE2 : JT808CarDVRUpBodies /// /// 0xE2 /// - public override byte CommandId => JT808CarDVRCommandID.enter_pulse_coefficient_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_pulse_coefficient_error_measurement.ToByteValue(); /// /// 通过DB9的7脚输出车速传感器信号(TTL 电平) /// - public override string Description => "通过 DB9 的 7 脚输出车速传感器信号(TTL 电平)"; + public string Description => "通过 DB9 的 7 脚输出车速传感器信号(TTL 电平)"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs index b423accf..1b40a749 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xE3 : JT808CarDVRUpBodies /// /// 0xE3 /// - public override byte CommandId => JT808CarDVRCommandID.enter_realtime_time_error_measurement.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.enter_realtime_time_error_measurement.ToByteValue(); /// /// 通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平) /// - public override string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; + public string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs index d24d86ab..4a03ecc9 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs @@ -20,14 +20,14 @@ public class JT808_CarDVR_Up_0xE4 : JT808CarDVRUpBodies /// /// 0xE4 /// - public override byte CommandId => JT808CarDVRCommandID.return_normal_working_status.ToByteValue(); + public byte CommandId => JT808CarDVRCommandID.return_normal_working_status.ToByteValue(); /// /// 返回正常工作状态 /// - public override string Description => "返回正常工作状态"; + public string Description => "返回正常工作状态"; /// /// /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization =>true; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0001.cs b/src/JT808.Protocol/MessageBody/JT808_0x0001.cs index 6f9ca7a5..f24020ce 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0001.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0001.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 终端通用应答 /// - public class JT808_0x0001 : JT808Bodies,IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0001 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0001 /// - public override ushort MsgId => 0x0001; + public ushort MsgId => 0x0001; /// /// 终端通用应答 /// - public override string Description => "终端通用应答"; + public string Description => "终端通用应答"; /// /// 应答流水号 /// 对应的平台消息的流水号 @@ -43,7 +43,7 @@ public class JT808_0x0001 : JT808Bodies,IJT808MessagePackFormatter /// /// /// - public JT808_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0001 jT808_0X0001 = new JT808_0x0001(); jT808_0X0001.ReplyMsgNum = reader.ReadUInt16(); @@ -57,7 +57,7 @@ public JT808_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0001 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0001 value, IJT808Config config) { writer.WriteUInt16(value.ReplyMsgNum); writer.WriteUInt16(value.ReplyMsgId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0002.cs b/src/JT808.Protocol/MessageBody/JT808_0x0002.cs index dbfaac33..911e118f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0002.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0002.cs @@ -8,14 +8,14 @@ public class JT808_0x0002 : JT808Bodies /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 0x0002 /// - public override ushort MsgId { get; } = 0x0002; + public ushort MsgId => 0x0002; /// /// 终端心跳 /// - public override string Description => "终端心跳"; + public string Description => "终端心跳"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0003.cs b/src/JT808.Protocol/MessageBody/JT808_0x0003.cs index 09bde200..998d97a8 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0003.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0003.cs @@ -8,14 +8,14 @@ public class JT808_0x0003 : JT808Bodies /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 0x0003 /// - public override ushort MsgId { get; } = 0x0003; + public ushort MsgId =>0x0003; /// /// 终端注销 /// - public override string Description => "终端注销"; + public string Description => "终端注销"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0004.cs b/src/JT808.Protocol/MessageBody/JT808_0x0004.cs index d86fd989..fa13da25 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0004.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0004.cs @@ -11,14 +11,14 @@ public class JT808_0x0004 : JT808Bodies, IJT808_2019_Version /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 0x0004 /// - public override ushort MsgId { get; } = 0x0004; + public ushort MsgId => 0x0004; /// /// 查询服务器时间请求 /// - public override string Description => "查询服务器时间请求"; + public string Description => "查询服务器时间请求"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0005.cs b/src/JT808.Protocol/MessageBody/JT808_0x0005.cs index e8519db4..33ce0fe3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0005.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0005.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 终端补传分包请求 /// 2019版本 /// - public class JT808_0x0005 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x0005 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x0005 /// - public override ushort MsgId { get; } = 0x0005; + public ushort MsgId => 0x0005; /// /// 终端补传分包请求 /// - public override string Description => "终端补传分包请求"; + public string Description => "终端补传分包请求"; /// /// 原始消息流水号 /// 对应要求补传的原始消息第一包的消息流水号 @@ -43,7 +43,7 @@ public class JT808_0x0005 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0005 value = new JT808_0x0005(); value.OriginalMsgNum = reader.ReadUInt16(); @@ -64,7 +64,7 @@ public JT808_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0005 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0005 value, IJT808Config config) { writer.WriteUInt16(value.OriginalMsgNum); if(writer.Version== JT808Version.JTT2013) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0100.cs b/src/JT808.Protocol/MessageBody/JT808_0x0100.cs index 4d01ed93..338b55ff 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0100.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0100.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// /// 终端注册 /// - public class JT808_0x0100 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version,IJT808Analyze + public class JT808_0x0100 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version,IJT808Analyze { /// /// 0x0100 /// - public override ushort MsgId { get; } = 0x0100; + public ushort MsgId => 0x0100; /// /// 终端注册 /// - public override string Description => "终端注册"; + public string Description => "终端注册"; /// /// 省域 ID /// 标示终端安装车辆所在的省域,0 保留,由平台取默 @@ -79,7 +79,7 @@ public class JT808_0x0100 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0100 jT808_0X0100 = new JT808_0x0100(); jT808_0X0100.AreaID = reader.ReadUInt16(); @@ -114,7 +114,7 @@ public JT808_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0100 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0100 value, IJT808Config config) { writer.WriteUInt16(value.AreaID); writer.WriteUInt16(value.CityOrCountyId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0102.cs b/src/JT808.Protocol/MessageBody/JT808_0x0102.cs index 57a4cbc1..cf369c97 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0102.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0102.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// /// 终端鉴权 /// - public class JT808_0x0102 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x0102 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x0102 /// - public override ushort MsgId { get; } = 0x0102; + public ushort MsgId => 0x0102; /// /// 终端鉴权 /// - public override string Description => "终端鉴权"; + public string Description => "终端鉴权"; /// /// 鉴权码 /// 鉴权码内容 2019版本 @@ -44,7 +44,7 @@ public class JT808_0x0102 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0102 jT808_0X0102 = new JT808_0x0102(); if(reader.Version== JT808Version.JTT2019) @@ -67,7 +67,7 @@ public JT808_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0102 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0102 value, IJT808Config config) { if (writer.Version == JT808Version.JTT2019) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0104.cs b/src/JT808.Protocol/MessageBody/JT808_0x0104.cs index 9c312e78..093ec932 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0104.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0104.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// /// 查询终端参数应答 /// - public class JT808_0x0104 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0104 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0104 /// - public override ushort MsgId { get; } = 0x0104; + public ushort MsgId => 0x0104; /// /// 查询终端参数应答 /// - public override string Description => "查询终端参数应答"; + public string Description => "查询终端参数应答"; /// /// 应答流水号 /// 查询指定终端参数的流水号 @@ -34,14 +34,14 @@ public class JT808_0x0104 : JT808Bodies, IJT808MessagePackFormatter /// 参数列表 /// - public IList ParamList { get; set; } + public List ParamList { get; set; } /// /// /// /// /// /// - public JT808_0x0104 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0104 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0104 jT808_0x0104 = new JT808_0x0104(); jT808_0x0104.MsgNum = reader.ReadUInt16(); @@ -51,16 +51,18 @@ public JT808_0x0104 Deserialize(ref JT808MessagePackReader reader, IJT808Config var paramId = reader.ReadVirtualUInt32();//参数ID if (config.JT808_0X8103_Factory.Map.TryGetValue(paramId, out object instance)) { - if (jT808_0x0104.ParamList != null) + JT808_0x8103_BodyBase value = instance.DeserializeExt(ref reader, config); + if (jT808_0x0104.ParamList == null) { - jT808_0x0104.ParamList.Add(JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config)); + jT808_0x0104.ParamList = new (); } - else + if (value != null) { - jT808_0x0104.ParamList = new List { JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config) }; + jT808_0x0104.ParamList.Add(value); } } - else { + else + { //对于未能解析的自定义项,过滤其长度,以保证后续解析正常 reader.Skip(4);//跳过参数id长度 var len = reader.ReadByte();//获取协议长度 @@ -75,14 +77,14 @@ public JT808_0x0104 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0104 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0104 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteByte(value.AnswerParamsCount); foreach (var item in value.ParamList) { - object obj = config.GetMessagePackFormatterByType(item.GetType()); - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(obj, ref writer, item, config); + IJT808MessagePackFormatter formatter = config.GetMessagePackFormatterByType(item.GetType()); + formatter.Serialize(ref writer, item, config); } } /// diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0107.cs b/src/JT808.Protocol/MessageBody/JT808_0x0107.cs index ff97cc20..a82b3c83 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0107.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0107.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 查询终端属性应答 /// - public class JT808_0x0107 : JT808Bodies,IJT808MessagePackFormatter, IJT808_2019_Version,IJT808Analyze + public class JT808_0x0107 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version,IJT808Analyze { /// /// 0x0107 /// - public override ushort MsgId { get; } = 0x0107; + public ushort MsgId => 0x0107; /// /// 查询终端属性应答 /// - public override string Description => "查询终端属性应答"; + public string Description => "查询终端属性应答"; /// /// 终端类型 /// bit0,0:不适用客运车辆,1:适用客运车辆; @@ -99,7 +99,7 @@ public class JT808_0x0107 : JT808Bodies,IJT808MessagePackFormatter /// /// /// - public JT808_0x0107 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0107 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0107 jT808_0X0107 = new JT808_0x0107(); jT808_0X0107.TerminalType = reader.ReadUInt16(); @@ -130,7 +130,7 @@ public JT808_0x0107 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0107 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0107 value, IJT808Config config) { writer.WriteUInt16(value.TerminalType); if (writer.Version == JT808Version.JTT2019) @@ -159,7 +159,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0107 value, IJT /// /// /// - public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) + public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x0107 jT808_0X0107 = new JT808_0x0107(); jT808_0X0107.TerminalType = reader.ReadUInt16(); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0108.cs b/src/JT808.Protocol/MessageBody/JT808_0x0108.cs index 9cb94a18..0f990f06 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0108.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0108.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 终端升级结果通知 /// - public class JT808_0x0108 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0108 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0108 /// - public override ushort MsgId { get; } = 0x0108; + public ushort MsgId => 0x0108; /// /// 终端升级结果通知 /// - public override string Description => "终端升级结果通知"; + public string Description => "终端升级结果通知"; /// /// 升级类型 /// 0:终端,12:道路运输证 IC 卡读卡器,52:北斗卫星定位模块 @@ -37,7 +37,7 @@ public class JT808_0x0108 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0108 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0108 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0108 jT808_0X0108 = new JT808_0x0108(); jT808_0X0108.UpgradeType = (JT808UpgradeType)reader.ReadByte(); @@ -50,7 +50,7 @@ public JT808_0x0108 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0108 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0108 value, IJT808Config config) { writer.WriteByte((byte)value.UpgradeType); writer.WriteByte((byte)value.UpgradeResult); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200.cs index f96bc147..72b8c57b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody /// /// 位置信息汇报 /// - public class JT808_0x0200 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0200 /// - public override ushort MsgId { get; } = 0x0200; + public ushort MsgId => 0x0200; /// /// 位置信息汇报 /// - public override string Description => "位置信息汇报"; + public string Description => "位置信息汇报"; /// /// 报警标志 /// @@ -106,9 +106,9 @@ public class JT808_0x0200 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { - JT808_0x0200 jT808_0X0200 = new JT808_0x0200(); + JT808_0x0200 jT808_0X0200 = new (); jT808_0X0200.AlarmFlag = reader.ReadUInt32(); jT808_0X0200.StatusFlag = reader.ReadUInt32(); if (((jT808_0X0200.StatusFlag >> 28) & 1) == 1) @@ -162,8 +162,11 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config } else { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(attachInstance, ref reader, config); - jT808_0X0200.BasicLocationAttachData.Add(attachImpl.AttachInfoId, attachImpl); + var attachImpl = attachInstance.DeserializeExt(ref reader, config); ; + if (attachImpl != null) + { + jT808_0X0200.BasicLocationAttachData.Add(attachImpl.AttachInfoId, attachImpl); + } } } else if (config.JT808_0X0200_Custom_Factory.Map.TryGetValue(attachId, out object customAttachInstance)) @@ -177,8 +180,11 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config } else { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(customAttachInstance, ref reader, config); - jT808_0X0200.CustomLocationAttachData.Add(attachImpl.AttachInfoId, attachImpl); + var attachImpl = customAttachInstance.DeserializeExt(ref reader, config); ; + if (attachImpl != null) + { + jT808_0X0200.CustomLocationAttachData.Add(attachImpl.AttachInfoId, attachImpl); + } } } else if (config.JT808_0X0200_Custom_Factory.Map2.TryGetValue(attachId2_3, out object customAttachInstance2)) @@ -192,8 +198,11 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config } else { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(customAttachInstance2, ref reader, config); - jT808_0X0200.CustomLocationAttachData2.Add(attachImpl.AttachInfoId, attachImpl); + var attachImpl = customAttachInstance2.DeserializeExt(ref reader, config); ; + if (attachImpl != null) + { + jT808_0X0200.CustomLocationAttachData2.Add(attachImpl.AttachInfoId, attachImpl); + } } } else if (config.JT808_0X0200_Custom_Factory.Map4.TryGetValue(attachId, out object customAttachInstance4)) @@ -207,8 +216,11 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config } else { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(customAttachInstance4, ref reader, config); - jT808_0X0200.CustomLocationAttachData4.Add(attachImpl.AttachInfoId, attachImpl); + var attachImpl = customAttachInstance4.DeserializeExt(ref reader, config); ; + if (attachImpl != null) + { + jT808_0X0200.CustomLocationAttachData4.Add(attachImpl.AttachInfoId, attachImpl); + } } } else if (config.JT808_0X0200_Custom_Factory.Map3.TryGetValue(attachId2_3, out object customAttachInstance3)) @@ -222,8 +234,11 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config } else { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(customAttachInstance3, ref reader, config); - jT808_0X0200.CustomLocationAttachData3.Add(attachImpl.AttachInfoId, attachImpl); + var attachImpl = customAttachInstance3.DeserializeExt(ref reader, config); ; + if (attachImpl != null) + { + jT808_0X0200.CustomLocationAttachData3.Add(attachImpl.AttachInfoId, attachImpl); + } } } else @@ -278,7 +293,7 @@ public JT808_0x0200 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200 value, IJT808Config config) { writer.WriteUInt32(value.AlarmFlag); writer.WriteUInt32(value.StatusFlag); @@ -321,7 +336,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200 value, IJT { try { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); + item.Value.SerializeExt(ref writer, item.Value, config); } catch { @@ -333,28 +348,28 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200 value, IJT { foreach (var item in value.CustomLocationAttachData) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); + item.Value.SerializeExt(ref writer, item.Value, config); } } if (value.CustomLocationAttachData2 != null && value.CustomLocationAttachData2.Count > 0) { foreach (var item in value.CustomLocationAttachData2) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); + item.Value.SerializeExt(ref writer, item.Value, config); } } if (value.CustomLocationAttachData3 != null && value.CustomLocationAttachData3.Count > 0) { foreach (var item in value.CustomLocationAttachData3) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); + item.Value.SerializeExt(ref writer, item.Value, config); } } if (value.CustomLocationAttachData4 != null && value.CustomLocationAttachData4.Count > 0) { foreach (var item in value.CustomLocationAttachData4) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); + item.Value.SerializeExt(ref writer, item.Value, config); } } if (value.UnknownLocationAttachData!=null && value.UnknownLocationAttachData.Count > 0) @@ -386,7 +401,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200 value, IJT /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_0x0200 value = new JT808_0x0200(); + JT808_0x0200 value = new (); value.AlarmFlag = reader.ReadUInt32(); writer.WriteNumber($"[{value.AlarmFlag.ReadBinary().ToString()}]报警标志", value.AlarmFlag); value.StatusFlag = reader.ReadUInt32(); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x01.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x01.cs index eee4c3c5..e0570cd0 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x01.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x01.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 里程 /// - public class JT808_0x0200_0x01 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x01 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// JT808_0x0200_0x01 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x01; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x01; /// /// 4 byte /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// 里程 /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x01 value = new JT808_0x0200_0x01(); value.AttachInfoId = reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x0200_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x01 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x01 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x02.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x02.cs index 9ab21bff..80b56bc0 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x02.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x02.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 油量 /// - public class JT808_0x0200_0x02 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x02 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 油量 @@ -24,11 +24,11 @@ public class JT808_0x0200_0x02 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x02 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x02; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x02; /// /// 2 byte /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x02 value = new JT808_0x0200_0x02(); value.AttachInfoId = reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x0200_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x02 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x02 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x03.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x03.cs index 9b2e6aa7..64381292 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x03.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x03.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 行驶记录功能获取的速度 /// - public class JT808_0x0200_0x03 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x03 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 行驶记录功能获取的速度 @@ -24,11 +24,11 @@ public class JT808_0x0200_0x03 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x03 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x03; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x03; /// /// 2 byte /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x03 value = new JT808_0x0200_0x03(); value.AttachInfoId = reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x0200_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x03 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x03 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x04.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x04.cs index d2511311..42ee9d41 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x04.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x04.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 人工确认报警事件 /// - public class JT808_0x0200_0x04 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x04 :JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 需要人工确认报警事件的 ID,从 1 开始计数 @@ -19,11 +19,11 @@ public class JT808_0x0200_0x04 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x04 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x04; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x04; /// /// 2 byte /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// /// @@ -46,7 +46,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x04 value = new JT808_0x0200_0x04(); value.AttachInfoId = reader.ReadByte(); @@ -60,7 +60,7 @@ public JT808_0x0200_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x04 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x04 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x05.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x05.cs index ccd07b5e..7857509d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x05.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x05.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.MessageBody /// 胎压 /// 2019版本 /// - public class JT808_0x0200_0x05 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x05 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 胎压 @@ -20,11 +20,11 @@ public class JT808_0x0200_0x05 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x05 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x05; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x05; /// /// 30 byte /// - public override byte AttachInfoLength { get; set; } = 30; + public byte AttachInfoLength { get; set; } = 30; /// /// /// @@ -47,7 +47,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x05 value = new JT808_0x0200_0x05(); value.AttachInfoId = reader.ReadByte(); @@ -61,7 +61,7 @@ public JT808_0x0200_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x05 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x05 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x06.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x06.cs index 4bc79051..add0422a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x06.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x06.cs @@ -11,7 +11,7 @@ namespace JT808.Protocol.MessageBody /// 胎压 /// 2019版本 /// - public class JT808_0x0200_0x06 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x06 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// 车厢温度 @@ -20,11 +20,11 @@ public class JT808_0x0200_0x06 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x06 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x06; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x06; /// /// 2 byte /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// /// @@ -47,7 +47,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x06 value = new JT808_0x0200_0x06(); value.AttachInfoId = reader.ReadByte(); @@ -61,7 +61,7 @@ public JT808_0x0200_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x06 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x06 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x07.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x07.cs index 1446811d..3ae4c0a1 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x07.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x07.cs @@ -12,7 +12,7 @@ namespace JT808.Protocol.MessageBody /// 卫星状态数据 /// 2019版本 /// - public class JT808_0x0200_0x07 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0200_0x07 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze, IJT808_2019_Version { /// /// @@ -27,11 +27,11 @@ public JT808_0x0200_0x07() /// /// JT808_0x0200_0x07 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x07; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x07; /// /// 4 的倍数 /// - public override byte AttachInfoLength { get; set; } + public byte AttachInfoLength { get; set; } /// /// BeiDou /// 最小值是 0,最大值 12,CN 值大于等于 20 的卫星数量 @@ -125,7 +125,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x07 value = new JT808_0x0200_0x07(); value.AttachInfoId = reader.ReadByte(); @@ -178,7 +178,7 @@ public JT808_0x0200_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x07 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x07 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); //各个类型的卫星数量为1个字节 diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x11.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x11.cs index 0d073d5d..fb8d9b20 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x11.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x11.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 超速报警附加信息 /// - public class JT808_0x0200_0x11 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x11 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 超速报警附加信息 @@ -30,11 +30,11 @@ public class JT808_0x0200_0x11 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x11 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x11; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x11; /// /// 1或5 byte /// - public override byte AttachInfoLength + public byte AttachInfoLength { get { @@ -76,7 +76,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x11 value = new JT808_0x0200_0x11(); value.AttachInfoId = reader.ReadByte(); @@ -94,7 +94,7 @@ public JT808_0x0200_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x11 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x11 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x12.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x12.cs index 5ea97149..f11b5253 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x12.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x12.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 进出区域/路线报警附加信息 /// - public class JT808_0x0200_0x12 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x12 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 位置类型 @@ -35,11 +35,11 @@ public class JT808_0x0200_0x12 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x12 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x12; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x12; /// /// 6 byte /// - public override byte AttachInfoLength { get; set; } = 6; + public byte AttachInfoLength { get; set; } = 6; /// /// /// @@ -66,7 +66,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x12 value = new JT808_0x0200_0x12(); value.AttachInfoId = reader.ReadByte(); @@ -82,7 +82,7 @@ public JT808_0x0200_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x12 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x12 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x13.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x13.cs index fabb5e9b..cb0eb143 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x13.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x13.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 路段行驶时间不足/过长报警附加信息 /// - public class JT808_0x0200_0x13 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x13 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// JT808_0x0200_0x13 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x13; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x13; /// /// 7 byte /// - public override byte AttachInfoLength { get; set; } = 7; + public byte AttachInfoLength { get; set; } = 7; /// /// 路段 ID @@ -63,7 +63,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x13 value = new JT808_0x0200_0x13(); value.AttachInfoId = reader.ReadByte(); @@ -79,7 +79,7 @@ public JT808_0x0200_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x13 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x13 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x25.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x25.cs index fd983282..4cb70dca 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x25.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x25.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 扩展车辆信号状态位 /// - public class JT808_0x0200_0x25 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x25 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 扩展车辆信号状态位 @@ -20,11 +20,11 @@ public class JT808_0x0200_0x25 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x25 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x25; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x25; /// /// 4 byte /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// /// @@ -67,7 +67,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x25 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x25 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x25 value = new JT808_0x0200_0x25(); value.AttachInfoId = reader.ReadByte(); @@ -81,7 +81,7 @@ public JT808_0x0200_0x25 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x25 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x25 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2A.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2A.cs index 9ed40068..7388dfde 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2A.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2A.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// IO状态位 /// - public class JT808_0x0200_0x2A : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x2A : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// IO状态位 @@ -21,11 +21,11 @@ public class JT808_0x0200_0x2A : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x2A /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x2A; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x2A; /// /// AttachInfoLength /// - public override byte AttachInfoLength { get; set; } = 2; + public byte AttachInfoLength { get; set; } = 2; /// /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x2A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x2A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x2A value = new JT808_0x0200_0x2A(); value.AttachInfoId = reader.ReadByte(); @@ -69,7 +69,7 @@ public JT808_0x0200_0x2A Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x2A value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x2A value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2B.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2B.cs index 785142c5..2c4ebd4f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2B.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x2B.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 模拟量 /// - public class JT808_0x0200_0x2B : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x2B : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 模拟量 bit0-15,AD0;bit16-31,AD1 @@ -19,11 +19,11 @@ public class JT808_0x0200_0x2B : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x2B /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x2B; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x2B; /// /// 4 byte /// - public override byte AttachInfoLength { get; set; } = 4; + public byte AttachInfoLength { get; set; } = 4; /// /// /// @@ -46,7 +46,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x2B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x2B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x2B value = new JT808_0x0200_0x2B(); value.AttachInfoId = reader.ReadByte(); @@ -60,7 +60,7 @@ public JT808_0x0200_0x2B Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x2B value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x2B value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x30.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x30.cs index 611cc601..790eb160 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x30.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x30.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.MessageBody /// /// 无线通信网络信号强度 /// - public class JT808_0x0200_0x30 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x30 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// 无线通信网络信号强度 @@ -19,11 +19,11 @@ public class JT808_0x0200_0x30 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x30 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x30; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x30; /// /// AttachInfoLength /// - public override byte AttachInfoLength { get; set; } = 1; + public byte AttachInfoLength { get; set; } = 1; /// /// /// @@ -46,7 +46,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x30 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x30 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x30 value = new JT808_0x0200_0x30(); value.AttachInfoId = reader.ReadByte(); @@ -60,7 +60,7 @@ public JT808_0x0200_0x30 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x30 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x30 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x31.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x31.cs index e5a9f04c..ef5c0cb3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_0x31.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_0x31.cs @@ -9,7 +9,7 @@ namespace JT808.Protocol.MessageBody /// /// GNSS 定位卫星数 /// - public class JT808_0x0200_0x31 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0200_0x31 : JT808MessagePackFormatter, JT808_0x0200_BodyBase, IJT808Analyze { /// /// GNSS 定位卫星数 @@ -18,11 +18,11 @@ public class JT808_0x0200_0x31 : JT808_0x0200_BodyBase, IJT808MessagePackFormatt /// /// JT808_0x0200_0x31 /// - public override byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x31; + public byte AttachInfoId { get; set; } = JT808Constants.JT808_0x0200_0x31; /// /// 1 byte /// - public override byte AttachInfoLength { get; set; } = 1; + public byte AttachInfoLength { get; set; } = 1; /// /// /// @@ -45,7 +45,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0200_0x31 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0200_0x31 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x31 value = new JT808_0x0200_0x31(); value.AttachInfoId = reader.ReadByte(); @@ -59,7 +59,7 @@ public JT808_0x0200_0x31 Deserialize(ref JT808MessagePackReader reader, IJT808Co /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x31 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x31 value, IJT808Config config) { writer.WriteByte(value.AttachInfoId); writer.WriteByte(value.AttachInfoLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_BodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_BodyBase.cs index c33f3078..f25ebc4b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_BodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_BodyBase.cs @@ -6,16 +6,16 @@ namespace JT808.Protocol.MessageBody /// /// 位置附加信息 /// - public abstract class JT808_0x0200_BodyBase + public interface JT808_0x0200_BodyBase { /// /// 附加信息Id /// - public abstract byte AttachInfoId { get; set; } + byte AttachInfoId { get; set; } /// /// 附加信息长度 /// - public abstract byte AttachInfoLength { get; set; } + byte AttachInfoLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase.cs index c6dfe9aa..0c2ea031 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase.cs @@ -5,16 +5,16 @@ namespace JT808.Protocol.MessageBody /// /// 自定义位置附加信息 /// - public abstract class JT808_0x0200_CustomBodyBase + public interface JT808_0x0200_CustomBodyBase { /// /// 自定义附加信息Id /// - public abstract byte AttachInfoId { get; set; } + byte AttachInfoId { get; set; } /// /// 自定义附加信息长度 /// - public abstract byte AttachInfoLength { get; set; } + byte AttachInfoLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase2.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase2.cs index 8ae2a6df..d4029280 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase2.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase2.cs @@ -7,16 +7,16 @@ namespace JT808.Protocol.MessageBody /// /// 自定义位置附加信息 /// - public abstract class JT808_0x0200_CustomBodyBase2 + public interface JT808_0x0200_CustomBodyBase2 { /// /// 自定义附加信息Id扩展 /// 两个字节 /// - public abstract ushort AttachInfoId { get; set; } + ushort AttachInfoId { get; set; } /// /// 自定义附加信息长度 /// - public abstract byte AttachInfoLength { get; set; } + byte AttachInfoLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase3.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase3.cs index bac4cacc..75df1469 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase3.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase3.cs @@ -7,17 +7,17 @@ namespace JT808.Protocol.MessageBody /// /// 自定义位置附加信息 /// - public abstract class JT808_0x0200_CustomBodyBase3 + public interface JT808_0x0200_CustomBodyBase3 { /// /// 自定义附加信息Id扩展 /// 两个字节 /// - public abstract ushort AttachInfoId { get; set; } + ushort AttachInfoId { get; set; } /// /// 自定义附加信息长度 /// 两个字节 /// - public abstract ushort AttachInfoLength { get; set; } + ushort AttachInfoLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase4.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase4.cs index d9366331..7e62127c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase4.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200_CustomBodyBase4.cs @@ -7,16 +7,16 @@ namespace JT808.Protocol.MessageBody /// /// 自定义位置附加信息 /// - public abstract class JT808_0x0200_CustomBodyBase4 + public interface JT808_0x0200_CustomBodyBase4 { /// /// 自定义附加信息Id扩展 /// - public abstract byte AttachInfoId { get; set; } + byte AttachInfoId { get; set; } /// /// 自定义附加信息长度 /// 四个字节 /// - public abstract uint AttachInfoLength { get; set; } + uint AttachInfoLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0201.cs b/src/JT808.Protocol/MessageBody/JT808_0x0201.cs index 7b2c8c43..18ef3d00 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0201.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0201.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.MessageBody /// /// 位置信息查询应答 /// - public class JT808_0x0201 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0201 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0201 /// - public override ushort MsgId { get; } = 0x0201; + public ushort MsgId => 0x0201; /// /// 位置信息查询应答 /// - public override string Description => "位置信息查询应答"; + public string Description => "位置信息查询应答"; /// /// 应答流水号 /// 对应的终端注册消息的流水号 @@ -50,7 +50,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0201 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0201 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0201 jT808_0X0201 = new JT808_0x0201(); jT808_0X0201.ReplyMsgNum = reader.ReadUInt16(); @@ -63,7 +63,7 @@ public JT808_0x0201 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0201 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0201 value, IJT808Config config) { writer.WriteUInt16(value.ReplyMsgNum); config.GetMessagePackFormatter().Serialize(ref writer, value.Position, config); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0301.cs b/src/JT808.Protocol/MessageBody/JT808_0x0301.cs index a5b8993d..d0f8464b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0301.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0301.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 0x0301 /// 2019版本已作删除 /// - public class JT808_0x0301 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x0301 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x0301 /// - public override ushort MsgId { get; } = 0x0301; + public ushort MsgId => 0x0301; /// /// 事件报告 /// - public override string Description => "事件报告"; + public string Description => "事件报告"; /// /// 事件 ID /// @@ -43,7 +43,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0301 jT808_0X0301 = new JT808_0x0301(); jT808_0X0301.EventId = reader.ReadByte(); @@ -55,7 +55,7 @@ public JT808_0x0301 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0301 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0301 value, IJT808Config config) { writer.WriteByte(value.EventId); } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0302.cs b/src/JT808.Protocol/MessageBody/JT808_0x0302.cs index cd31c040..5251cd3f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0302.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0302.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// 0x0302 /// 2019版本已作删除 /// - public class JT808_0x0302 : JT808Bodies, IJT808MessagePackFormatter,IJT808_2019_Version, IJT808Analyze + public class JT808_0x0302 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x0302 /// - public override ushort MsgId { get; } = 0x0302; + public ushort MsgId => 0x0302; /// /// 提问应答 /// - public override string Description => "提问应答"; + public string Description => "提问应答"; /// /// 应答流水号 /// 对应的提问下发消息的流水号 @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0302 jT808_0X0302 = new JT808_0x0302(); jT808_0X0302.ReplySNo = reader.ReadUInt16(); @@ -66,7 +66,7 @@ public JT808_0x0302 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0302 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0302 value, IJT808Config config) { writer.WriteUInt16(value.ReplySNo); writer.WriteByte(value.AnswerId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0303.cs b/src/JT808.Protocol/MessageBody/JT808_0x0303.cs index c78a314b..19cba771 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0303.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0303.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 0x0303 /// 2019版本已作删除 /// - public class JT808_0x0303 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x0303 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x0303 /// - public override ushort MsgId { get; } = 0x0303; + public ushort MsgId => 0x0303; /// /// 信息点播_取消 /// - public override string Description => "信息点播_取消"; + public string Description => "信息点播_取消"; /// /// 信息类型 /// @@ -50,7 +50,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0303 value = new JT808_0x0303(); value.InformationType = reader.ReadByte(); @@ -63,7 +63,7 @@ public JT808_0x0303 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0303 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0303 value, IJT808Config config) { writer.WriteByte(value.InformationType); writer.WriteByte(value.Flag); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0500.cs b/src/JT808.Protocol/MessageBody/JT808_0x0500.cs index 573c3105..840b613f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0500.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0500.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.MessageBody /// /// 车辆控制应答 /// - public class JT808_0x0500 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0500 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0500 /// - public override ushort MsgId { get; } = 0x0500; + public ushort MsgId => 0x0500; /// /// 车辆控制应答 /// - public override string Description => "车辆控制应答"; + public string Description => "车辆控制应答"; /// /// 应答流水号 /// 对应的终端注册消息的流水号 @@ -49,7 +49,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0500 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0500 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0500 value = new JT808_0x0500(); value.MsgNum = reader.ReadUInt16(); @@ -62,7 +62,7 @@ public JT808_0x0500 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0500 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0500 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); config.GetMessagePackFormatter().Serialize(ref writer, value.JT808_0x0200, config); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0608.cs b/src/JT808.Protocol/MessageBody/JT808_0x0608.cs index aef02c08..fc5650e7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0608.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0608.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 查询区域或线路数据应答 /// - public class JT808_0x0608 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0608 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0608 /// - public override ushort MsgId { get; } = 0x0608; + public ushort MsgId => 0x0608; /// /// 查询区域或线路数据应答 /// - public override string Description => "查询区域或线路数据应答"; + public string Description => "查询区域或线路数据应答"; /// /// 查询类型 /// @@ -73,7 +73,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteStartArray("设置圆形区域"); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8600).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8600).GUID, out IJT808MessagePackFormatter instance)) { writer.WriteStartObject(); instance.Analyze(ref reader, writer, config); @@ -86,7 +86,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteStartArray("设置矩形区域"); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8602).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8602).GUID, out IJT808MessagePackFormatter instance)) { writer.WriteStartObject(); instance.Analyze(ref reader, writer, config); @@ -99,7 +99,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteStartArray("设置多边形区域"); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8604).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8604).GUID, out IJT808MessagePackFormatter instance)) { writer.WriteStartObject(); instance.Analyze(ref reader, writer, config); @@ -112,7 +112,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ writer.WriteStartArray("设置路线"); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8606).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8606).GUID, out IJT808MessagePackFormatter instance)) { writer.WriteStartObject(); instance.Analyze(ref reader, writer, config); @@ -141,7 +141,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0608 value = new JT808_0x0608(); value.QueryType = reader.ReadByte(); @@ -154,10 +154,13 @@ public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config value.JT808_0x8600s = new List(); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8600).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8600).GUID, out IJT808MessagePackFormatter instance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.JT808_0x8600s.Add(attachImpl); + object attachImpl = instance.Deserialize(ref reader, config); + if (attachImpl != null) + { + value.JT808_0x8600s.Add((JT808_0x8600)attachImpl); + } } } break; @@ -165,10 +168,13 @@ public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config value.JT808_0x8602s = new List(); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8602).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8602).GUID, out IJT808MessagePackFormatter instance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.JT808_0x8602s.Add(attachImpl); + object attachImpl = instance.Deserialize(ref reader, config); + if (attachImpl != null) + { + value.JT808_0x8602s.Add((JT808_0x8602)attachImpl); + } } } break; @@ -176,10 +182,13 @@ public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config value.JT808_0x8604s = new List(); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8604).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8604).GUID, out IJT808MessagePackFormatter instance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.JT808_0x8604s.Add(attachImpl); + object attachImpl = instance.Deserialize(ref reader, config); + if (attachImpl != null) + { + value.JT808_0x8604s.Add((JT808_0x8604)attachImpl); + } } } break; @@ -187,10 +196,13 @@ public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config value.JT808_0x8606s = new List(); for (int i = 0; i < value.Count; i++) { - if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8606).GUID, out object instance)) + if (config.FormatterFactory.FormatterDict.TryGetValue(typeof(JT808_0x8606).GUID, out IJT808MessagePackFormatter instance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.JT808_0x8606s.Add(attachImpl); + object attachImpl = instance.Deserialize(ref reader, config); + if (attachImpl != null) + { + value.JT808_0x8606s.Add((JT808_0x8606)attachImpl); + } } } break; @@ -211,7 +223,7 @@ public JT808_0x0608 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT808Config config) { writer.WriteByte(value.QueryType); switch (value.QueryType) @@ -222,7 +234,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT writer.WriteUInt32((uint)value.JT808_0x8600s.Count); foreach (var item in value.JT808_0x8600s) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } break; @@ -232,7 +244,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT writer.WriteUInt32((uint)value.JT808_0x8602s.Count); foreach (var item in value.JT808_0x8602s) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } break; @@ -242,7 +254,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT writer.WriteUInt32((uint)value.JT808_0x8604s.Count); foreach (var item in value.JT808_0x8604s) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } break; @@ -252,7 +264,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0608 value, IJT writer.WriteUInt32((uint)value.JT808_0x8606s.Count); foreach (var item in value.JT808_0x8606s) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } break; diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0700.cs b/src/JT808.Protocol/MessageBody/JT808_0x0700.cs index 66b5fe6f..88f7a79d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0700.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0700.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 行驶记录仪数据上传 /// 0x0700 /// - public class JT808_0x0700 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0700 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0700 /// - public override ushort MsgId { get; } = 0x0700; + public ushort MsgId => 0x0700; /// /// 行驶记录仪数据上传 /// - public override string Description => "行驶记录仪数据上传"; + public string Description => "行驶记录仪数据上传"; /// /// 应答流水号 /// @@ -59,7 +59,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0700 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0700 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0700 value = new JT808_0x0700(); value.ReplyMsgNum = reader.ReadUInt16(); @@ -73,7 +73,7 @@ public JT808_0x0700 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0700 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0700 value, IJT808Config config) { writer.WriteUInt16(value.ReplyMsgNum); writer.WriteByte(value.CommandId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0701.cs b/src/JT808.Protocol/MessageBody/JT808_0x0701.cs index 9c05dceb..482e05b1 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0701.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0701.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 电子运单上报 /// 0x0701 /// - public class JT808_0x0701 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0701 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0701 /// - public override ushort MsgId { get; } = 0x0701; + public ushort MsgId => 0x0701; /// /// 电子运单上报 /// - public override string Description => "电子运单上报"; + public string Description => "电子运单上报"; /// /// 电子运单长度 /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0701 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0701 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0701 value = new JT808_0x0701(); value.ElectronicWaybillLength = reader.ReadUInt32(); @@ -67,11 +67,11 @@ public JT808_0x0701 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0701 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0701 value, IJT808Config config) { writer.Skip(4, out int skipPosition); - object obj = config.GetMessagePackFormatterByType(value.ElectronicContentObj.GetType()); - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(obj, ref writer, value.ElectronicContentObj, config); + IJT808MessagePackFormatter formatter = config.GetMessagePackFormatterByType(value.ElectronicContentObj.GetType()); + formatter.Serialize(ref writer, value.ElectronicContentObj, config); int contentLength = writer.GetCurrentPosition() - skipPosition - 4; writer.WriteInt32Return(contentLength, skipPosition); } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0701_CustomBodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x0701_CustomBodyBase.cs index 3d74f36f..a033dfb8 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0701_CustomBodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0701_CustomBodyBase.cs @@ -6,7 +6,7 @@ namespace JT808.Protocol.MessageBody /// 电子运单内容基类 /// 注意:需要具体的实现 /// - public abstract class JT808_0x0701_CustomBodyBase + public interface JT808_0x0701_CustomBodyBase { } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0702.cs b/src/JT808.Protocol/MessageBody/JT808_0x0702.cs index 43bce98f..7313f8d3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0702.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0702.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// /// 驾驶员身份信息采集上报 /// - public class JT808_0x0702 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0702 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0702 /// - public override ushort MsgId { get; } = 0x0702; + public ushort MsgId => 0x0702; /// /// Description /// - public override string Description => "驾驶员身份信息采集上报"; + public string Description => "驾驶员身份信息采集上报"; /// /// 状态 /// 0x01:从业资格证 IC 卡插入(驾驶员上班); @@ -180,7 +180,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0702 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0702 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0702 value = new JT808_0x0702(); var firstByte = reader.ReadVirtualByte(); @@ -238,7 +238,7 @@ public JT808_0x0702 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0702 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0702 value, IJT808Config config) { if (writer.Version == JT808Version.JTT2011) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0704.cs b/src/JT808.Protocol/MessageBody/JT808_0x0704.cs index ba673806..f3135457 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0704.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0704.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// /// 定位数据批量上传 /// - public class JT808_0x0704 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0704 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0704 /// - public override ushort MsgId { get; } = 0x0704; + public ushort MsgId => 0x0704; /// /// 定位数据批量上传 /// - public override string Description => "定位数据批量上传"; + public string Description => "定位数据批量上传"; /// /// 数据项个数 /// @@ -62,7 +62,7 @@ public enum BatchLocationType : byte /// /// /// - public JT808_0x0704 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0704 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0704 jT808_0X0704 = new JT808_0x0704(); jT808_0X0704.Count = reader.ReadUInt16(); @@ -103,7 +103,7 @@ public JT808_0x0704 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0704 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0704 value, IJT808Config config) { if(value.Positions!=null && value.Positions.Count > 0) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0705.cs b/src/JT808.Protocol/MessageBody/JT808_0x0705.cs index c32472c2..bc0d345e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0705.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0705.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody /// CAN 总线数据上传 /// 0x0705 /// - public class JT808_0x0705 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0705 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0705 /// - public override ushort MsgId { get; } = 0x0705; + public ushort MsgId => 0x0705; /// /// CAN总线数据上传 /// - public override string Description => "CAN总线数据上传"; + public string Description => "CAN总线数据上传"; /// /// 数据项个数 /// 包含的 CAN 总线数据项个数,>0 @@ -75,7 +75,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0705 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0705 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0705 value = new JT808_0x0705(); value.CanItemCount = reader.ReadUInt16(); @@ -100,7 +100,7 @@ public JT808_0x0705 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0705 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0705 value, IJT808Config config) { if (value.CanItems != null && value.CanItems.Count > 0) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0800.cs b/src/JT808.Protocol/MessageBody/JT808_0x0800.cs index 1a3cbcbe..1df33554 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0800.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0800.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 多媒体事件信息上传 /// 0x0800 /// - public class JT808_0x0800 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0800 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0800 /// - public override ushort MsgId { get; } = 0x0800; + public ushort MsgId => 0x0800; /// /// 多媒体事件信息上传 /// - public override string Description => "多媒体事件信息上传"; + public string Description => "多媒体事件信息上传"; /// /// 多媒体数据 ID /// @@ -80,7 +80,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0800 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0800 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0800 value = new JT808_0x0800(); value.MultimediaId = reader.ReadUInt32(); @@ -96,7 +96,7 @@ public JT808_0x0800 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0800 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0800 value, IJT808Config config) { writer.WriteUInt32(value.MultimediaId); writer.WriteByte(value.MultimediaType); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0801.cs b/src/JT808.Protocol/MessageBody/JT808_0x0801.cs index 96742f06..e3f2fecc 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0801.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0801.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 多媒体数据上传 /// 0x0801 /// - public class JT808_0x0801 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0801 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0801 /// - public override ushort MsgId { get; } = 0x0801; + public ushort MsgId => 0x0801; /// /// 多媒体数据上传 /// - public override string Description => "多媒体数据上传"; + public string Description => "多媒体数据上传"; /// /// 多媒体 ID /// @@ -106,7 +106,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0801 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0801 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0801 value = new JT808_0x0801(); value.MultimediaId = reader.ReadUInt32(); @@ -140,7 +140,7 @@ public JT808_0x0801 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0801 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0801 value, IJT808Config config) { writer.WriteUInt32(value.MultimediaId); writer.WriteByte(value.MultimediaType); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0802.cs b/src/JT808.Protocol/MessageBody/JT808_0x0802.cs index 7dbc9355..4b3b8a7a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0802.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0802.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// 存储多媒体数据检索应答 /// 0x0802 /// - public class JT808_0x0802 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0802 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0802 /// - public override ushort MsgId { get; } = 0x0802; + public ushort MsgId => 0x0802; /// /// 存储多媒体数据检索应答 /// - public override string Description => "存储多媒体数据检索应答"; + public string Description => "存储多媒体数据检索应答"; /// /// 应答流水号 /// 对应的多媒体数据检索消息的流水号 @@ -81,7 +81,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0802 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0802 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0802 value = new JT808_0x0802(); value.MsgNum = reader.ReadUInt16(); @@ -111,7 +111,7 @@ public JT808_0x0802 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0802 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0802 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteUInt16((ushort)value.MultimediaSearchItems.Count); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0805.cs b/src/JT808.Protocol/MessageBody/JT808_0x0805.cs index c92b1495..ed4005ce 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0805.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0805.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 摄像头立即拍摄命令应答 /// 0x0805 /// - public class JT808_0x0805 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0805 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0805 /// - public override ushort MsgId { get; } = 0x0805; + public ushort MsgId => 0x0805; /// /// 摄像头立即拍摄命令应答 /// - public override string Description => "摄像头立即拍摄命令应答"; + public string Description => "摄像头立即拍摄命令应答"; /// /// 应答流水号 /// 对应平台摄像头立即拍摄命令的消息流水号 @@ -84,7 +84,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0805 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0805 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0805 value = new JT808_0x0805(); value.ReplyMsgNum = reader.ReadUInt16(); @@ -107,7 +107,7 @@ public JT808_0x0805 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0805 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0805 value, IJT808Config config) { writer.WriteUInt16(value.ReplyMsgNum); writer.WriteByte(value.Result); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0900.cs b/src/JT808.Protocol/MessageBody/JT808_0x0900.cs index 6aad958e..22d503fe 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0900.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0900.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 数据上行透传 /// - public class JT808_0x0900 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x0900 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x0900 /// - public override ushort MsgId { get; } = 0x0900; + public ushort MsgId => 0x0900; /// /// 数据上行透传 /// - public override string Description => "数据上行透传"; + public string Description => "数据上行透传"; /// /// 透传消息类型 /// @@ -70,13 +70,13 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0900 value = new JT808_0x0900(); value.PassthroughType = reader.ReadByte(); if(config.JT808_0x0900_Custom_Factory.Map.TryGetValue(value.PassthroughType,out var instance)) { - value.JT808_0x0900_BodyBase = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); + value.JT808_0x0900_BodyBase = instance.DeserializeExt(ref reader, config); } else { @@ -90,14 +90,14 @@ public JT808_0x0900 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0900 value, IJT808Config config) { writer.WriteByte(value.PassthroughType); if ( value.JT808_0x0900_BodyBase != null ) { - object obj = config.GetMessagePackFormatterByType( value.JT808_0x0900_BodyBase.GetType() ); - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize( obj, ref writer, value.JT808_0x0900_BodyBase, config ); + IJT808MessagePackFormatter formatter = config.GetMessagePackFormatterByType( value.JT808_0x0900_BodyBase.GetType() ); + formatter.Serialize(ref writer, value.JT808_0x0900_BodyBase, config ); } else { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0900_BodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x0900_BodyBase.cs index 1e3604cc..52b66145 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0900_BodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0900_BodyBase.cs @@ -3,11 +3,11 @@ /// /// 数据上行透传 /// - public abstract class JT808_0x0900_BodyBase + public interface JT808_0x0900_BodyBase { /// /// 透传消息类型 /// - public abstract byte PassthroughType { get; set; } + byte PassthroughType { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0901.cs b/src/JT808.Protocol/MessageBody/JT808_0x0901.cs index 90c18d09..ebd292cb 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0901.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0901.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 数据压缩上报 /// 0x0901 /// - public class JT808_0x0901 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0901 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0901 /// - public override ushort MsgId { get; } = 0x0901; + public ushort MsgId => 0x0901; /// /// 数据压缩上报 /// - public override string Description => "数据压缩上报"; + public string Description => "数据压缩上报"; /// /// 未压缩消息长度 /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0901 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0901 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0901 value = new JT808_0x0901(); var compressMessageLength = reader.ReadUInt32(); @@ -70,7 +70,7 @@ public JT808_0x0901 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0901 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0901 value, IJT808Config config) { var data = config.Compress.Compress(value.UnCompressMessage); writer.WriteUInt32((uint)data.Length); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0A00.cs b/src/JT808.Protocol/MessageBody/JT808_0x0A00.cs index 0e505df9..fa358aaf 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0A00.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0A00.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 终端 RSA 公钥 /// 0x0A00 /// - public class JT808_0x0A00 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x0A00 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x0A00 /// - public override ushort MsgId { get; } = 0x0A00; + public ushort MsgId => 0x0A00; /// /// 终端RSA公钥 /// - public override string Description => "终端RSA公钥"; + public string Description => "终端RSA公钥"; /// /// e /// 终端 RSA 公钥{e,n}中的 e @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x0A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x0A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0A00 value = new JT808_0x0A00 { @@ -74,7 +74,7 @@ public JT808_0x0A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0A00 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0A00 value, IJT808Config config) { writer.WriteUInt32(value.E); if (value.N.Length != 128) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8001.cs b/src/JT808.Protocol/MessageBody/JT808_0x8001.cs index 60e77daf..7b070156 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8001.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8001.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 平台通用应答 /// - public class JT808_0x8001 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8001 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8001 /// - public override ushort MsgId { get; } = 0x8001; + public ushort MsgId => 0x8001; /// /// 平台通用应答 /// - public override string Description => "平台通用应答"; + public string Description => "平台通用应答"; /// /// 应答消息流水号 /// @@ -56,7 +56,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8001 value = new JT808_0x8001(); value.MsgNum = reader.ReadUInt16(); @@ -70,7 +70,7 @@ public JT808_0x8001 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8001 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8001 value, IJT808Config config) { writer.WriteUInt16(value.MsgNum); writer.WriteUInt16(value.AckMsgId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8003.cs b/src/JT808.Protocol/MessageBody/JT808_0x8003.cs index a2360b42..3d72884f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8003.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8003.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 补传分包请求 /// 0x8003 /// - public class JT808_0x8003 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8003 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8003 /// - public override ushort MsgId { get; } = 0x8003; + public ushort MsgId => 0x8003; /// /// 补传分包请求 /// - public override string Description => "补传分包请求"; + public string Description => "补传分包请求"; /// /// 原始消息流水号 /// 对应要求补传的原始消息第一包的消息流水号 @@ -74,7 +74,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8003 value = new JT808_0x8003(); value.OriginalMsgNum = reader.ReadUInt16(); @@ -95,7 +95,7 @@ public JT808_0x8003 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8003 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8003 value, IJT808Config config) { writer.WriteUInt16(value.OriginalMsgNum); if (writer.Version == JT808Version.JTT2019) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8004.cs b/src/JT808.Protocol/MessageBody/JT808_0x8004.cs index 73118870..fcba91da 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8004.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8004.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// 查询服务器时间应答 /// 2019版本 /// - public class JT808_0x8004 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8004 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8004 /// - public override ushort MsgId { get; } = 0x8004; + public ushort MsgId => 0x8004; /// /// 查询服务器时间应答 /// - public override string Description => "查询服务器时间应答"; + public string Description => "查询服务器时间应答"; /// /// 服务器时间 /// @@ -41,7 +41,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8004 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8004 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8004 value = new JT808_0x8004(); value.Time = reader.ReadDateTime_yyMMddHHmmss(); @@ -53,7 +53,7 @@ public JT808_0x8004 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8004 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8004 value, IJT808Config config) { writer.WriteDateTime_yyMMddHHmmss(value.Time); } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8100.cs b/src/JT808.Protocol/MessageBody/JT808_0x8100.cs index 3ae8998d..1d00a1fd 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8100.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8100.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 终端注册应答 /// - public class JT808_0x8100 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8100 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8100 /// - public override ushort MsgId { get; } = 0x8100; + public ushort MsgId => 0x8100; /// /// 终端注册应答 /// - public override string Description => "终端注册应答"; + public string Description => "终端注册应答"; /// /// 应答流水号 /// 对应的终端注册消息的流水号 @@ -63,7 +63,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8100 value = new JT808_0x8100(); value.AckMsgNum = reader.ReadUInt16(); @@ -81,7 +81,7 @@ public JT808_0x8100 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8100 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8100 value, IJT808Config config) { writer.WriteUInt16(value.AckMsgNum); writer.WriteByte((byte)value.JT808TerminalRegisterResult); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103.cs index 96fa7460..870e0d5c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 设置终端参数 /// - public class JT808_0x8103 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8103 /// - public override ushort MsgId { get; } = 0x8103; + public ushort MsgId => 0x8103; /// /// 设置终端参数 /// - public override string Description => "设置终端参数"; + public string Description => "设置终端参数"; /// /// 参数总数 /// @@ -52,7 +52,7 @@ internal byte ParamCount /// /// /// - public JT808_0x8103 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103 value = new JT808_0x8103 { @@ -67,13 +67,19 @@ public JT808_0x8103 Deserialize(ref JT808MessagePackReader reader, IJT808Config var paramId = reader.ReadVirtualUInt32();//参数ID if (config.JT808_0X8103_Factory.Map.TryGetValue(paramId, out object instance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); - value.ParamList.Add(attachImpl); + var bodyValue = instance.DeserializeExt(ref reader, config); + if (bodyValue != null) + { + value.ParamList.Add(bodyValue); + } } else if (config.JT808_0X8103_Custom_Factory.Map.TryGetValue(paramId, out object customInstance)) { - dynamic attachImpl = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(customInstance, ref reader, config); - value.CustomParamList.Add(attachImpl); + var bodyValue = customInstance.DeserializeExt(ref reader, config); + if (bodyValue != null) + { + value.CustomParamList.Add(bodyValue); + } } } } @@ -89,20 +95,20 @@ public JT808_0x8103 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103 value, IJT808Config config) { writer.WriteByte(value.ParamCount); try { foreach (var item in value.ParamList) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } if (value.CustomParamList != null) { foreach (var item in value.CustomParamList) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs index e24c1d21..4cd2e33c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// 终端心跳发送间隔,单位为秒(s) /// 0x8103_0x0001 /// - public class JT808_0x8103_0x0001 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0001 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0001 /// - public override uint ParamId { get; set; } = 0x0001; + public uint ParamId { get; set; } = 0x0001; /// /// 数据 长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 终端心跳发送间隔,单位为秒(s) /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0001 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 终端心跳发送间隔 /// - public override string Description => "终端心跳发送间隔"; + public string Description => "终端心跳发送间隔"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0001 jT808_0x8103_0x0001 = new JT808_0x8103_0x0001(); jT808_0x8103_0x0001.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0001 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0001 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs index 2fe67863..ae19016a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// TCP 消息应答超时时间,单位为秒(s) /// 0x8103_0x0002 /// - public class JT808_0x8103_0x0002 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0002 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0002 /// - public override uint ParamId { get; set; } = 0x0002; + public uint ParamId { get; set; } = 0x0002; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// TCP 消息应答超时时间,单位为秒(s) /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0002 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// TCP消息应答超时时间 /// - public override string Description => "TCP消息应答超时时间"; + public string Description => "TCP消息应答超时时间"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0002 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0002 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0002 jT808_0x8103_0x0002 = new JT808_0x8103_0x0002(); jT808_0x8103_0x0002.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0002 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0002 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0002 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs index e74c9ab0..8df166c3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// TCP 消息重传次数 /// 0x8103_0x0003 /// - public class JT808_0x8103_0x0003 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0003 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0003 /// - public override uint ParamId { get; set; } = 0x0003; + public uint ParamId { get; set; } = 0x0003; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// TCP 消息重传次数 /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0003 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// TCP消息重传次数 /// - public override string Description => "TCP消息重传次数"; + public string Description => "TCP消息重传次数"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0003 jT808_0x8103_0x0003 = new JT808_0x8103_0x0003(); jT808_0x8103_0x0003.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0003 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0003 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0003 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs index 4f1f1d52..d0717805 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// UDP 消息应答超时时间,单位为秒(s) /// 0x8103_0x0004 /// - public class JT808_0x8103_0x0004 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0004 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0004 /// - public override uint ParamId { get; set; } = 0x0004; + public uint ParamId { get; set; } = 0x0004; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// UDP 消息应答超时时间,单位为秒(s) /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0004 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// UDP消息应答超时时间 /// - public override string Description => "UDP消息应答超时时间"; + public string Description => "UDP消息应答超时时间"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0004 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0004 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0004 jT808_0x8103_0x0004 = new JT808_0x8103_0x0004(); jT808_0x8103_0x0004.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0004 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0004 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0004 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs index 4967d098..fc45e064 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// UDP 消息重传次数 /// 0x8103_0x0005 /// - public class JT808_0x8103_0x0005 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0005 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0005 /// - public override uint ParamId { get; set; } = 0x0005; + public uint ParamId { get; set; } = 0x0005; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// UDP 消息重传次数 /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0005 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// UDP消息重传次数 /// - public override string Description => "UDP消息重传次数"; + public string Description => "UDP消息重传次数"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0005 jT808_0x8103_0x0005 = new JT808_0x8103_0x0005(); jT808_0x8103_0x0005.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0005 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0005 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs index eb81c4e3..3b01d9c2 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// SMS 消息应答超时时间,单位为秒(s) /// 0x8103_0x0006 /// - public class JT808_0x8103_0x0006 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0006 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0006 /// - public override uint ParamId { get; set; } = 0x0006; + public uint ParamId { get; set; } = 0x0006; /// /// 数据长度 /// byte 4 /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// SMS 消息应答超时时间,单位为秒(s) /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0006 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// SMS消息应答超时时间 /// - public override string Description => "SMS消息应答超时时间"; + public string Description => "SMS消息应答超时时间"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0006 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0006 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0006 jT808_0x8103_0x0006 = new JT808_0x8103_0x0006(); jT808_0x8103_0x0006.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0006 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0006 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0006 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs index 7beeb0ba..62c614d7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// SMS 消息重传次数 /// 0x8103_0x0007 /// - public class JT808_0x8103_0x0007 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0007 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0007 /// - public override uint ParamId { get; set; } = 0x0007; + public uint ParamId { get; set; } = 0x0007; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// SMS 消息重传次数 /// @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0007 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// SMS消息重传次数 /// - public override string Description => "SMS消息重传次数"; + public string Description => "SMS消息重传次数"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0007 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0007 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0007 jT808_0x8103_0x0007 = new JT808_0x8103_0x0007(); jT808_0x8103_0x0007.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0007 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0007 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0007 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs index 66af2632..6f6d8718 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 主服务器 APN,无线通信拨号访问点。若网络制式为 CDMA,则该处为PPP 拨号号码 /// - public class JT808_0x8103_0x0010 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0010 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0010 /// - public override uint ParamId { get; set; } = 0x0010; + public uint ParamId { get; set; } = 0x0010; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 主服务器 APN,无线通信拨号访问点。若网络制式为 CDMA,则该处为PPP 拨号号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0010 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 主服务器APN /// - public override string Description => "主服务器APN"; + public string Description => "主服务器APN"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0010 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0010 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0010 jT808_0x8103_0x0010 = new JT808_0x8103_0x0010(); jT808_0x8103_0x0010.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0010 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0010 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0010 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs index e7db13ac..56d7b02c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 主服务器无线通信拨号用户名 /// - public class JT808_0x8103_0x0011 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0011 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0011 /// - public override uint ParamId { get; set; } = 0x0011; + public uint ParamId { get; set; } = 0x0011; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 主服务器无线通信拨号用户名 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0011 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 主服务器无线通信拨号用户名 /// - public override string Description => "主服务器无线通信拨号用户名"; + public string Description => "主服务器无线通信拨号用户名"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0011 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0011 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0011 jT808_0x8103_0x0011 = new JT808_0x8103_0x0011(); jT808_0x8103_0x0011.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0011 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0011 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0011 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs index 55e11fde..99821400 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs @@ -9,17 +9,17 @@ namespace JT808.Protocol.MessageBody /// /// 主服务器无线通信拨号密码 /// - public class JT808_0x8103_0x0012 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0012 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0012 /// - public override uint ParamId { get; set; } = 0x0012; + public uint ParamId { get; set; } = 0x0012; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 主服务器无线通信拨号密码 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0012 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 主服务器无线通信拨号密码 /// - public override string Description => "主服务器无线通信拨号密码"; + public string Description => "主服务器无线通信拨号密码"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0012 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0012 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0012 jT808_0x8103_0x0012 = new JT808_0x8103_0x0012(); jT808_0x8103_0x0012.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0012 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0012 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0012 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs index 4ae36842..e949925b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 主服务器地址,IP 或域名 /// - public class JT808_0x8103_0x0013 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0013 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0013 /// - public override uint ParamId { get; set; } = 0x0013; + public uint ParamId { get; set; } = 0x0013; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 主服务器地址,IP 或域名 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0013 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 主服务器地址 /// - public override string Description => "主服务器地址"; + public string Description => "主服务器地址"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0013 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0013 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0013 jT808_0x8103_0x0013 = new JT808_0x8103_0x0013(); jT808_0x8103_0x0013.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0013 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0013 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0013 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs index 48f1b77e..f96d1e99 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 备份服务器 APN,无线通信拨号访问点 /// - public class JT808_0x8103_0x0014 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0014 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0014 /// - public override uint ParamId { get; set; } = 0x0014; + public uint ParamId { get; set; } = 0x0014; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 备份服务器 APN,无线通信拨号访问点 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0014 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 备份服务器 APN /// - public override string Description => "备份服务器APN"; + public string Description => "备份服务器APN"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0014 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0014 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0014 jT808_0x8103_0x0014 = new JT808_0x8103_0x0014(); jT808_0x8103_0x0014.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0014 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0014 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0014 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs index cbb35a96..22d79f6a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 备份服务器无线通信拨号用户名 /// - public class JT808_0x8103_0x0015 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0015 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0015 /// - public override uint ParamId { get; set; } = 0x0015; + public uint ParamId { get; set; } = 0x0015; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 备份服务器无线通信拨号用户名 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0015 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 备份服务器无线通信拨号用户名 /// - public override string Description => "备份服务器无线通信拨号用户名"; + public string Description => "备份服务器无线通信拨号用户名"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0015 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0015 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0015 jT808_0x8103_0x0015 = new JT808_0x8103_0x0015(); jT808_0x8103_0x0015.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0015 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0015 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0015 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs index 0bffe516..3530a923 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 备份服务器无线通信拨号密码 /// - public class JT808_0x8103_0x0016 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0016 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0016 /// - public override uint ParamId { get; set; } = 0x0016; + public uint ParamId { get; set; } = 0x0016; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 备份服务器无线通信拨号密码 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0016 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 备份服务器无线通信拨号密码 /// - public override string Description => "备份服务器无线通信拨号密码"; + public string Description => "备份服务器无线通信拨号密码"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0016 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0016 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0016 jT808_0x8103_0x0016 = new JT808_0x8103_0x0016(); jT808_0x8103_0x0016.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0016 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0016 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0016 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs index e3274269..a9236406 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 备份服务器地址,IP 或域名 /// - public class JT808_0x8103_0x0017 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0017 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0017 /// - public override uint ParamId { get; set; } = 0x0017; + public uint ParamId { get; set; } = 0x0017; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 备份服务器地址,IP 或域名 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0017 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 备份服务器地址 /// - public override string Description => "备份服务器地址"; + public string Description => "备份服务器地址"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0017 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0017 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0017 jT808_0x8103_0x0017 = new JT808_0x8103_0x0017(); jT808_0x8103_0x0017.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0017 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0017 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0017 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs index 9a093b19..0b990f45 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs @@ -12,17 +12,17 @@ namespace JT808.Protocol.MessageBody /// 服务器 TCP 端口 /// 2019版本已作为保留 /// - public class JT808_0x8103_0x0018 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0018 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0018 /// - public override uint ParamId { get; set; } = 0x0018; + public uint ParamId { get; set; } = 0x0018; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// ///服务器 TCP 端口 /// @@ -30,7 +30,7 @@ public class JT808_0x8103_0x0018 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 服务器TCP端口 /// - public override string Description => "服务器TCP端口"; + public string Description => "服务器TCP端口"; /// /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0018 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0018 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0018 value = new JT808_0x8103_0x0018(); value.ParamId = reader.ReadUInt32(); @@ -68,7 +68,7 @@ public JT808_0x8103_0x0018 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0018 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0018 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs index d1bc6471..8d0047a8 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 服务器 UDP 端口 /// - public class JT808_0x8103_0x0019 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0019 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0019 /// - public override uint ParamId { get; set; } = 0x0019; + public uint ParamId { get; set; } = 0x0019; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// ///服务器 UDP 端口 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0019 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 服务器UDP端口 /// - public override string Description => "服务器UDP端口"; + public string Description => "服务器UDP端口"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0019 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0019 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0019 value = new JT808_0x8103_0x0019(); value.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0019 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0019 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0019 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs index 07c4c22e..daf0812c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 道路运输证 IC 卡认证主服务器 IP 地址或域名 /// - public class JT808_0x8103_0x001A : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x001A : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x001A /// - public override uint ParamId { get; set; } = 0x001A; + public uint ParamId { get; set; } = 0x001A; /// /// 数据长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 道路运输证 IC 卡认证主服务器 IP 地址或域名 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x001A : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 道路运输证IC卡认证主服务器IP地址或域名 /// - public override string Description => "道路运输证IC卡认证主服务器IP地址或域名"; + public string Description => "道路运输证IC卡认证主服务器IP地址或域名"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x001A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x001A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x001A jT808_0x8103_0x001A = new JT808_0x8103_0x001A(); jT808_0x8103_0x001A.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x001A Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001A value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001A value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs index 77a160f9..c4b84f35 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs @@ -9,17 +9,17 @@ namespace JT808.Protocol.MessageBody /// /// 道路运输证 IC 卡认证主服务器 TCP 端口 /// - public class JT808_0x8103_0x001B : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x001B : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x001B /// - public override uint ParamId { get; set; } = 0x001B; + public uint ParamId { get; set; } = 0x001B; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// ///道路运输证 IC 卡认证主服务器 TCP 端口 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x001B : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 道路运输证IC卡认证主服务器TCP端口 /// - public override string Description => "道路运输证IC卡认证主服务器TCP端口"; + public string Description => "道路运输证IC卡认证主服务器TCP端口"; /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x001B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x001B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x001B jT808_0x8103_0x001B = new JT808_0x8103_0x001B(); jT808_0x8103_0x001B.ParamId = reader.ReadUInt32(); @@ -65,7 +65,7 @@ public JT808_0x8103_0x001B Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001B value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001B value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs index cc81b21c..a602f185 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 道路运输证 IC 卡认证主服务器 UDP 端口 /// - public class JT808_0x8103_0x001C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x001C : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x001C /// - public override uint ParamId { get; set; } = 0x001C; + public uint ParamId { get; set; } = 0x001C; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// ///道路运输证 IC 卡认证主服务器 UDP 端口 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x001C : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 道路运输证IC卡认证主服务器UDP端口 /// - public override string Description => "道路运输证IC卡认证主服务器UDP端口"; + public string Description => "道路运输证IC卡认证主服务器UDP端口"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x001C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x001C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x001C jT808_0x8103_0x001C = new JT808_0x8103_0x001C(); jT808_0x8103_0x001C.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x001C Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001C value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001C value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs index 0659d896..468973eb 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 道路运输证 IC 卡认证备份服务器 IP 地址或域名,端口同主服务器 /// - public class JT808_0x8103_0x001D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x001D : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x001D /// - public override uint ParamId { get; set; } = 0x001D; + public uint ParamId { get; set; } = 0x001D; /// /// 数据长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 道路运输证 IC 卡认证备份服务器 IP 地址或域名,端口同主服务器 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x001D : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 道路运输证IC卡认证备份服务器IP地址或域名 /// - public override string Description => "道路运输证IC卡认证备份服务器IP地址或域名"; + public string Description => "道路运输证IC卡认证备份服务器IP地址或域名"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x001D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x001D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x001D jT808_0x8103_0x001D = new JT808_0x8103_0x001D(); jT808_0x8103_0x001D.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x001D Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001D value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x001D value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs index eb23748d..2dc1c098 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 位置汇报策略,0:定时汇报;1:定距汇报;2:定时和定距汇报 /// - public class JT808_0x8103_0x0020 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0020 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0020 /// - public override uint ParamId { get; set; } = 0x0020; + public uint ParamId { get; set; } = 0x0020; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 位置汇报策略, /// 0:定时汇报; @@ -31,7 +31,7 @@ public class JT808_0x8103_0x0020 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 位置汇报策略 /// - public override string Description => "位置汇报策略"; + public string Description => "位置汇报策略"; /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0020 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0020 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0020 jT808_0x8103_0x0020 = new JT808_0x8103_0x0020(); jT808_0x8103_0x0020.ParamId = reader.ReadUInt32(); @@ -69,7 +69,7 @@ public JT808_0x8103_0x0020 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0020 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0020 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs index 21aaaf81..3a0023c1 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 位置汇报方案,0:根据 ACC 状态; 1:根据登录状态和 ACC 状态,先判断登录状态,若登录再根据 ACC 状态 /// - public class JT808_0x8103_0x0021 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0021 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0021 /// - public override uint ParamId { get; set; } = 0x0021; + public uint ParamId { get; set; } = 0x0021; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 位置汇报方案, /// 0:根据 ACC 状态; @@ -30,7 +30,7 @@ public class JT808_0x8103_0x0021 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 位置汇报方案 /// - public override string Description => "位置汇报方案"; + public string Description => "位置汇报方案"; /// /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0021 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0021 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0021 jT808_0x8103_0x0021 = new JT808_0x8103_0x0021(); jT808_0x8103_0x0021.ParamId = reader.ReadUInt32(); @@ -68,7 +68,7 @@ public JT808_0x8103_0x0021 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0021 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0021 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs index a87a94ec..5765232e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 驾驶员未登录汇报时间间隔,单位为秒(s),>0 /// - public class JT808_0x8103_0x0022 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0022 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0022 /// - public override uint ParamId { get; set; } = 0x0022; + public uint ParamId { get; set; } = 0x0022; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 驾驶员未登录汇报时间间隔,单位为秒(s),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0022 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 驾驶员未登录汇报时间间隔 /// - public override string Description => "驾驶员未登录汇报时间间隔"; + public string Description => "驾驶员未登录汇报时间间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0022 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0022 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0022 jT808_0x8103_0x0022 = new JT808_0x8103_0x0022(); jT808_0x8103_0x0022.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0022 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0022 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0022 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs index 3446124a..8ec59f30 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// 从服务器APN。该值为空时,终端应使用主服务器相同配置 /// 2019版本 /// - public class JT808_0x8103_0x0023 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0023 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0023 /// - public override uint ParamId { get; set; } = 0x0023; + public uint ParamId { get; set; } = 0x0023; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 参数值 /// 从服务器APN @@ -30,7 +30,7 @@ public class JT808_0x8103_0x0023 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 从服务器APN /// - public override string Description => "从服务器APN"; + public string Description => "从服务器APN"; /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0023 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0023 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0023 value = new JT808_0x8103_0x0023(); value.ParamId = reader.ReadUInt32(); @@ -69,7 +69,7 @@ public JT808_0x8103_0x0023 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0023 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0023 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs index 8732d7ab..43552956 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// 从服务器无线通信拨号用户名。该值为空时,终端应使用主服务器相同配置 /// 2019版本 /// - public class JT808_0x8103_0x0024 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0024 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0024 /// - public override uint ParamId { get; set; } = 0x0024; + public uint ParamId { get; set; } = 0x0024; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 参数值 /// 从服务器无线通信拨号用户名 @@ -30,7 +30,7 @@ public class JT808_0x8103_0x0024 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 从服务器无线通信拨号用户名 /// - public override string Description => "从服务器无线通信拨号用户名"; + public string Description => "从服务器无线通信拨号用户名"; /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0024 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0024 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0024 jT808_0x8103_0x0024 = new JT808_0x8103_0x0024(); jT808_0x8103_0x0024.ParamId = reader.ReadUInt32(); @@ -69,7 +69,7 @@ public JT808_0x8103_0x0024 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0024 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0024 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs index cf5bd867..1d6fcd1f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 从服务器无线通信拨号密码。该值为空,终端应使用主服务器相同配置 /// 2019版本 /// - public class JT808_0x8103_0x0025 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0025 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0025 /// - public override uint ParamId { get; set; } = 0x0025; + public uint ParamId { get; set; } = 0x0025; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 参数值 /// 从服务器无线通信拨号密码 @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0025 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 从服务器无线通信拨号密码 /// - public override string Description => "从服务器无线通信拨号密码"; + public string Description => "从服务器无线通信拨号密码"; /// /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0025 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0025 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0025 jT808_0x8103_0x0025 = new JT808_0x8103_0x0025(); jT808_0x8103_0x0025.ParamId = reader.ReadUInt32(); @@ -68,7 +68,7 @@ public JT808_0x8103_0x0025 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0025 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0025 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs index c700e47f..dbefd14b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// 从服务器备份地址IP。该值为空,终端应使用主服务器相同配置 /// 2019版本 /// - public class JT808_0x8103_0x0026 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0026 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0026 /// - public override uint ParamId { get; set; } = 0x0026; + public uint ParamId { get; set; } = 0x0026; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 参数值 /// 从服务器备份地址IP @@ -30,7 +30,7 @@ public class JT808_0x8103_0x0026 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 从服务器备份地址IP /// - public override string Description => "从服务器备份地址IP"; + public string Description => "从服务器备份地址IP"; /// /// @@ -55,7 +55,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0026 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0026 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0026 value = new JT808_0x8103_0x0026(); value.ParamId = reader.ReadUInt32(); @@ -69,7 +69,7 @@ public JT808_0x8103_0x0026 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0026 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0026 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs index 67342053..76fc68a0 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 休眠时汇报时间间隔,单位为秒(s),>0 /// - public class JT808_0x8103_0x0027 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0027 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0027 /// - public override uint ParamId { get; set; } = 0x0027; + public uint ParamId { get; set; } = 0x0027; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 休眠时汇报时间间隔,单位为秒(s),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0027 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 休眠时汇报时间间隔 /// - public override string Description => "休眠时汇报时间间隔"; + public string Description => "休眠时汇报时间间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0027 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0027 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0027 jT808_0x8103_0x0027 = new JT808_0x8103_0x0027(); jT808_0x8103_0x0027.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0027 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0027 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0027 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs index 625836ac..5398c61f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 紧急报警时汇报时间间隔,单位为秒(s),>0 /// - public class JT808_0x8103_0x0028 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0028 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0028 /// - public override uint ParamId { get; set; } = 0x0028; + public uint ParamId { get; set; } = 0x0028; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 参数值 /// 紧急报警时汇报时间间隔,单位为秒(s),>0 @@ -29,7 +29,7 @@ public class JT808_0x8103_0x0028 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 紧急报警时汇报时间间隔 /// - public override string Description => "紧急报警时汇报时间间隔"; + public string Description => "紧急报警时汇报时间间隔"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0028 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0028 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0028 jT808_0x8103_0x0028 = new JT808_0x8103_0x0028(); jT808_0x8103_0x0028.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0028 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0028 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0028 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs index d18d9144..328764a7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 缺省时间汇报间隔,单位为秒(s),>0 /// - public class JT808_0x8103_0x0029 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0029 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0029 /// - public override uint ParamId { get; set; } = 0x0029; + public uint ParamId { get; set; } = 0x0029; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 缺省时间汇报间隔,单位为秒(s),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0029 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 缺省时间汇报间隔 /// - public override string Description => "缺省时间汇报间隔"; + public string Description => "缺省时间汇报间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0029 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0029 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0029 jT808_0x8103_0x0029 = new JT808_0x8103_0x0029(); jT808_0x8103_0x0029.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0029 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0029 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0029 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs index 936fb9ed..3ca2f2f6 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 缺省距离汇报间隔,单位为米(m),>0 /// - public class JT808_0x8103_0x002C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x002C : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x002C /// - public override uint ParamId { get; set; } = 0x002C; + public uint ParamId { get; set; } = 0x002C; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 缺省距离汇报间隔,单位为米(m),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x002C : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 缺省距离汇报间隔 /// - public override string Description => "缺省距离汇报间隔"; + public string Description => "缺省距离汇报间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x002C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x002C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x002C jT808_0x8103_0x002C = new JT808_0x8103_0x002C(); jT808_0x8103_0x002C.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x002C Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002C value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002C value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs index b130002f..b0826cf9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 驾驶员未登录汇报距离间隔,单位为米(m),>0 /// - public class JT808_0x8103_0x002D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x002D : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x002D /// - public override uint ParamId { get; set; } = 0x002D; + public uint ParamId { get; set; } = 0x002D; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 驾驶员未登录汇报距离间隔,单位为米(m),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x002D : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 驾驶员未登录汇报距离间隔 /// - public override string Description => "驾驶员未登录汇报距离间隔"; + public string Description => "驾驶员未登录汇报距离间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x002D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x002D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x002D jT808_0x8103_0x002D = new JT808_0x8103_0x002D(); jT808_0x8103_0x002D.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x002D Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002D value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002D value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs index d32dbfeb..580d1e47 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 休眠时汇报距离间隔,单位为米(m),>0 /// - public class JT808_0x8103_0x002E : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x002E : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x002E /// - public override uint ParamId { get; set; } = 0x002E; + public uint ParamId { get; set; } = 0x002E; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 休眠时汇报距离间隔,单位为米(m),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x002E : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 休眠时汇报距离间隔 /// - public override string Description => "休眠时汇报距离间隔"; + public string Description => "休眠时汇报距离间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x002E Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x002E Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x002E jT808_0x8103_0x002E = new JT808_0x8103_0x002E(); jT808_0x8103_0x002E.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x002E Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002E value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002E value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs index 5bb02310..6349c35f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 紧急报警时汇报距离间隔,单位为米(m),>0 /// - public class JT808_0x8103_0x002F : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x002F : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x002F /// - public override uint ParamId { get; set; } = 0x002F; + public uint ParamId { get; set; } = 0x002F; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 紧急报警时汇报距离间隔,单位为米(m),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x002F : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 紧急报警时汇报距离间隔 /// - public override string Description => "紧急报警时汇报距离间隔"; + public string Description => "紧急报警时汇报距离间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x002F Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x002F Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x002F jT808_0x8103_0x002F = new JT808_0x8103_0x002F(); jT808_0x8103_0x002F.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x002F Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002F value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x002F value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0030.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0030.cs index 780d41f5..e1c4484e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0030.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0030.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 拐点补传角度,小于180 /// - public class JT808_0x8103_0x0030 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0030 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0030 /// - public override uint ParamId { get; set; } = 0x0030; + public uint ParamId { get; set; } = 0x0030; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 拐点补传角度,小于180 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0030 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 拐点补传角度 /// - public override string Description => "拐点补传角度"; + public string Description => "拐点补传角度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0030 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0030 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0030 jT808_0x8103_0x0030 = new JT808_0x8103_0x0030(); jT808_0x8103_0x0030.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0030 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0030 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0030 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0031.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0031.cs index 46d0e1ed..c102cf5b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0031.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0031.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 电子围栏半径(非法位移阈值),单位为米 /// - public class JT808_0x8103_0x0031 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0031 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0031 /// - public override uint ParamId { get; set; } = 0x0031; + public uint ParamId { get; set; } = 0x0031; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 电子围栏半径(非法位移阈值),单位为米 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0031 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 电子围栏半径 /// - public override string Description => "电子围栏半径"; + public string Description => "电子围栏半径"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0031 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0031 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0031 jT808_0x8103_0x0031 = new JT808_0x8103_0x0031(); jT808_0x8103_0x0031.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0031 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0031 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0031 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0032.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0032.cs index 4d6d79fb..4cb88bb9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0032.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0032.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 违规行驶时段范围 /// - public class JT808_0x8103_0x0032 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0032 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0032 /// - public override uint ParamId { get; set; } = 0x0032; + public uint ParamId { get; set; } = 0x0032; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 违规行驶时段范围(非法位移阈值),单位为米 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0032 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 违规行驶时段范围 /// - public override string Description => "违规行驶时段范围"; + public string Description => "违规行驶时段范围"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0032 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0032 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0032 value = new JT808_0x8103_0x0032(); value.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0032 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0032 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0032 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0040.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0040.cs index 1a25f7b7..84a640a8 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0040.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0040.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 监控平台电话号码 /// - public class JT808_0x8103_0x0040 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0040 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0040 /// - public override uint ParamId { get; set; } = 0x0040; + public uint ParamId { get; set; } = 0x0040; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 监控平台电话号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0040 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 监控平台电话号码 /// - public override string Description => "监控平台电话号码"; + public string Description => "监控平台电话号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0040 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0040 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0040 jT808_0x8103_0x0040 = new JT808_0x8103_0x0040(); jT808_0x8103_0x0040.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0040 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0040 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0040 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0041.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0041.cs index a9f6549b..8001220d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0041.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0041.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 复位电话号码,可采用此电话号码拨打终端电话让终端复位 /// - public class JT808_0x8103_0x0041 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0041 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0041 /// - public override uint ParamId { get; set; } = 0x0041; + public uint ParamId { get; set; } = 0x0041; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 复位电话号码,可采用此电话号码拨打终端电话让终端复位 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0041 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 复位电话号码 /// - public override string Description => "复位电话号码"; + public string Description => "复位电话号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0041 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0041 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0041 jT808_0x8103_0x0041 = new JT808_0x8103_0x0041(); jT808_0x8103_0x0041.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0041 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0041 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0041 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0042.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0042.cs index 45a731da..794ca64f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0042.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0042.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 恢复出厂设置电话号码,可采用此电话号码拨打终端电话让终端恢复出厂设置 /// - public class JT808_0x8103_0x0042 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0042 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0042 /// - public override uint ParamId { get; set; } = 0x0042; + public uint ParamId { get; set; } = 0x0042; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 恢复出厂设置电话号码,可采用此电话号码拨打终端电话让终端恢复出厂设置 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0042 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 恢复出厂设置电话号码 /// - public override string Description => "恢复出厂设置电话号码"; + public string Description => "恢复出厂设置电话号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0042 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0042 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0042 jT808_0x8103_0x0042 = new JT808_0x8103_0x0042(); jT808_0x8103_0x0042.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0042 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0042 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0042 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0043.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0043.cs index 6f22ac3f..14c1cf8a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0043.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0043.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 监控平台 SMS 电话号码 /// - public class JT808_0x8103_0x0043 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0043 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0043 /// - public override uint ParamId { get; set; } = 0x0043; + public uint ParamId { get; set; } = 0x0043; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 监控平台 SMS 电话号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0043 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 监控平台SMS电话号码 /// - public override string Description => "监控平台SMS电话号码"; + public string Description => "监控平台SMS电话号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0043 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0043 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0043 jT808_0x8103_0x0043 = new JT808_0x8103_0x0043(); jT808_0x8103_0x0043.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0043 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0043 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0043 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0044.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0044.cs index 7d8abd67..77970672 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0044.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0044.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 接收终端 SMS 文本报警号码 /// - public class JT808_0x8103_0x0044 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0044 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0044 /// - public override uint ParamId { get; set; } = 0x0044; + public uint ParamId { get; set; } = 0x0044; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 接收终端 SMS 文本报警号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0044 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 接收终端SMS文本报警号码 /// - public override string Description => "接收终端SMS文本报警号码"; + public string Description => "接收终端SMS文本报警号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0044 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0044 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0044 jT808_0x8103_0x0044 = new JT808_0x8103_0x0044(); jT808_0x8103_0x0044.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0044 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0044 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0044 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0045.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0045.cs index 9d648ab5..6d82bfbe 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0045.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0045.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 终端电话接听策略,0:自动接听;1:ACC ON 时自动接听,OFF 时手动接听 /// - public class JT808_0x8103_0x0045 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0045 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0045 /// - public override uint ParamId { get; set; } = 0x0045; + public uint ParamId { get; set; } = 0x0045; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 终端电话接听策略,0:自动接听;1:ACC ON 时自动接听,OFF 时手动接听 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0045 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 终端电话接听策略 /// - public override string Description => "终端电话接听策略"; + public string Description => "终端电话接听策略"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0045 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0045 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0045 jT808_0x8103_0x0045 = new JT808_0x8103_0x0045(); jT808_0x8103_0x0045.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0045 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0045 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0045 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0046.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0046.cs index 997de31a..b3f5e12f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0046.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0046.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 每次最长通话时间,单位为秒(s),0 为不允许通话,0xFFFFFFFF 为不限制 /// - public class JT808_0x8103_0x0046 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0046 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0046 /// - public override uint ParamId { get; set; } = 0x0046; + public uint ParamId { get; set; } = 0x0046; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 每次最长通话时间,单位为秒(s),0 为不允许通话,0xFFFFFFFF 为不限制 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0046 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 每次最长通话时间 /// - public override string Description => "每次最长通话时间"; + public string Description => "每次最长通话时间"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0046 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0046 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0046 jT808_0x8103_0x0046 = new JT808_0x8103_0x0046(); jT808_0x8103_0x0046.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0046 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0046 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0046 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0047.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0047.cs index 301dd2fd..2394aa27 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0047.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0047.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 当月最长通话时间,单位为秒(s),0 为不允许通话,0xFFFFFFFF 为不限制 /// - public class JT808_0x8103_0x0047 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0047 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0047 /// - public override uint ParamId { get; set; } = 0x0047; + public uint ParamId { get; set; } = 0x0047; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 当月最长通话时间,单位为秒(s),0 为不允许通话,0xFFFFFFFF 为不限制 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0047 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 当月最长通话时间 /// - public override string Description => "当月最长通话时间"; + public string Description => "当月最长通话时间"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0047 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0047 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0047 jT808_0x8103_0x0047 = new JT808_0x8103_0x0047(); jT808_0x8103_0x0047.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0047 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0047 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0047 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0048.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0048.cs index 751d4a42..59d7ce0f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0048.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0048.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 监听电话号码 /// - public class JT808_0x8103_0x0048 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0048 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0048 /// - public override uint ParamId { get; set; } = 0x0048; + public uint ParamId { get; set; } = 0x0048; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 监听电话号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0048 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 监听电话号码 /// - public override string Description => "监听电话号码"; + public string Description => "监听电话号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0048 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0048 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0048 jT808_0x8103_0x0048 = new JT808_0x8103_0x0048(); jT808_0x8103_0x0048.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0048 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0048 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0048 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0049.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0049.cs index fdb555c2..e1105522 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0049.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0049.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 监管平台特权短信号码 /// - public class JT808_0x8103_0x0049 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0049 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0049 /// - public override uint ParamId { get; set; } = 0x0049; + public uint ParamId { get; set; } = 0x0049; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 监管平台特权短信号码 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0049 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 监管平台特权短信号码 /// - public override string Description => "监管平台特权短信号码"; + public string Description => "监管平台特权短信号码"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0049 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0049 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0049 jT808_0x8103_0x0049 = new JT808_0x8103_0x0049(); jT808_0x8103_0x0049.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0049 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0049 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0049 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0050.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0050.cs index 498e10c5..621a2fb2 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0050.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0050.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 报警屏蔽字,与位置信息汇报消息中的报警标志相对应,相应位为 1则相应报警被屏蔽 /// - public class JT808_0x8103_0x0050 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0050 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0050 /// - public override uint ParamId { get; set; } = 0x0050; + public uint ParamId { get; set; } = 0x0050; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 报警屏蔽字,与位置信息汇报消息中的报警标志相对应,相应位为 1则相应报警被屏蔽 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0050 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 报警屏蔽字 /// - public override string Description => "报警屏蔽字"; + public string Description => "报警屏蔽字"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0050 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0050 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0050 jT808_0x8103_0x0050 = new JT808_0x8103_0x0050(); jT808_0x8103_0x0050.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0050 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0050 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0050 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0051.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0051.cs index 78d16928..b8ad5315 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0051.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0051.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 报警发送文本 SMS 开关,与位置信息汇报消息中的报警标志相对应,相应位为 1 则相应报警时发送文本 SMS /// - public class JT808_0x8103_0x0051 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0051 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0051 /// - public override uint ParamId { get; set; } = 0x0051; + public uint ParamId { get; set; } = 0x0051; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 报警发送文本 SMS 开关,与位置信息汇报消息中的报警标志相对应,相应位为 1 则相应报警时发送文本 SMS /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0051 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 报警发送文本SMS开关 /// - public override string Description => "报警发送文本SMS开关"; + public string Description => "报警发送文本SMS开关"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0051 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0051 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0051 jT808_0x8103_0x0051 = new JT808_0x8103_0x0051(); jT808_0x8103_0x0051.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0051 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0051 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0051 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0052.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0052.cs index 628715cc..b86de0d2 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0052.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0052.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 报警拍摄开关,与位置信息汇报消息中的报警标志相对应,相应位为1 则相应报警时摄像头拍摄 /// - public class JT808_0x8103_0x0052 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0052 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0052 /// - public override uint ParamId { get; set; } = 0x0052; + public uint ParamId { get; set; } = 0x0052; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 报警拍摄开关,与位置信息汇报消息中的报警标志相对应,相应位为1 则相应报警时摄像头拍摄 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0052 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 报警拍摄开关 /// - public override string Description => "报警拍摄开关"; + public string Description => "报警拍摄开关"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0052 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0052 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0052 jT808_0x8103_0x0052 = new JT808_0x8103_0x0052(); jT808_0x8103_0x0052.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0052 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0052 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0052 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0053.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0053.cs index c5281465..62c7ac1a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0053.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0053.cs @@ -9,17 +9,17 @@ namespace JT808.Protocol.MessageBody /// /// 报警拍摄存储标志,与位置信息汇报消息中的报警标志相对应,相应位为 1 则对相应报警时拍的照片进行存储,否则实时上传 /// - public class JT808_0x8103_0x0053 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0053 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0053 /// - public override uint ParamId { get; set; } = 0x0053; + public uint ParamId { get; set; } = 0x0053; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 报警拍摄存储标志,与位置信息汇报消息中的报警标志相对应,相应位为 1 则对相应报警时拍的照片进行存储,否则实时上传 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0053 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 报警拍摄存储标志 /// - public override string Description => "报警拍摄存储标志"; + public string Description => "报警拍摄存储标志"; /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0053 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0053 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0053 jT808_0x8103_0x0053 = new JT808_0x8103_0x0053(); jT808_0x8103_0x0053.ParamId = reader.ReadUInt32(); @@ -65,7 +65,7 @@ public JT808_0x8103_0x0053 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0053 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0053 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0054.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0054.cs index 635d8d2a..e719e7c9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0054.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0054.cs @@ -9,17 +9,17 @@ namespace JT808.Protocol.MessageBody /// /// 关键标志,与位置信息汇报消息中的报警标志相对应,相应位为 1 则对相应报警为关键报警 /// - public class JT808_0x8103_0x0054 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0054 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0054 /// - public override uint ParamId { get; set; } = 0x0054; + public uint ParamId { get; set; } = 0x0054; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 关键标志,与位置信息汇报消息中的报警标志相对应,相应位为 1 则对相应报警为关键报警 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0054 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 关键标志 /// - public override string Description => "关键标志"; + public string Description => "关键标志"; /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0054 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0054 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0054 jT808_0x8103_0x0054 = new JT808_0x8103_0x0054(); jT808_0x8103_0x0054.ParamId = reader.ReadUInt32(); @@ -65,7 +65,7 @@ public JT808_0x8103_0x0054 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0054 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0054 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0055.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0055.cs index 47ab90ab..bddf8726 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0055.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0055.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 最高速度,单位为公里每小时(km/h) /// - public class JT808_0x8103_0x0055 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0055 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0055 /// - public override uint ParamId { get; set; } = 0x0055; + public uint ParamId { get; set; } = 0x0055; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 最高速度,单位为公里每小时(km/h) /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0055 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 最高速度 /// - public override string Description => "最高速度"; + public string Description => "最高速度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0055 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0055 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0055 jT808_0x8103_0x0055 = new JT808_0x8103_0x0055(); jT808_0x8103_0x0055.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0055 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0055 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0055 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0056.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0056.cs index 1c28444a..edf7062b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0056.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0056.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 超速持续时间,单位为秒(s) /// - public class JT808_0x8103_0x0056 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0056 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0056 /// - public override uint ParamId { get; set; } = 0x0056; + public uint ParamId { get; set; } = 0x0056; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 超速持续时间,单位为秒(s) /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0056 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 超速持续时间 /// - public override string Description => "超速持续时间"; + public string Description => "超速持续时间"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0056 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0056 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0056 jT808_0x8103_0x0056 = new JT808_0x8103_0x0056(); jT808_0x8103_0x0056.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0056 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0056 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0056 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0057.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0057.cs index 00f3918a..1ca789d3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0057.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0057.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 连续驾驶时间门限,单位为秒(s) /// - public class JT808_0x8103_0x0057 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0057 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0057 /// - public override uint ParamId { get; set; } = 0x0057; + public uint ParamId { get; set; } = 0x0057; /// /// 数据长度 /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 连续驾驶时间门限,单位为秒(s) /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0057 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 连续驾驶时间门限 /// - public override string Description => "连续驾驶时间门限"; + public string Description => "连续驾驶时间门限"; /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0057 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0057 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0057 jT808_0x8103_0x0057 = new JT808_0x8103_0x0057(); jT808_0x8103_0x0057.ParamId = reader.ReadUInt32(); @@ -65,7 +65,7 @@ public JT808_0x8103_0x0057 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0057 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0057 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0058.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0058.cs index 12cd10e7..570eafdc 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0058.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0058.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 当天累计驾驶时间门限,单位为秒(s) /// - public class JT808_0x8103_0x0058 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0058 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0058 /// - public override uint ParamId { get; set; } = 0x0058; + public uint ParamId { get; set; } = 0x0058; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 当天累计驾驶时间门限,单位为秒(s) /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0058 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 当天累计驾驶时间门限 /// - public override string Description => "当天累计驾驶时间门限"; + public string Description => "当天累计驾驶时间门限"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0058 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0058 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0058 jT808_0x8103_0x0058 = new JT808_0x8103_0x0058(); jT808_0x8103_0x0058.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0058 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0058 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0058 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0059.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0059.cs index 1c50d997..83f1fd04 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0059.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0059.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 最小休息时间,单位为秒(s) /// - public class JT808_0x8103_0x0059 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0059 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0059 /// - public override uint ParamId { get; set; } = 0x0059; + public uint ParamId { get; set; } = 0x0059; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 最小休息时间,单位为秒(s) /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0059 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 最小休息时间 /// - public override string Description => "最小休息时间"; + public string Description => "最小休息时间"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0059 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0059 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0059 jT808_0x8103_0x0059 = new JT808_0x8103_0x0059(); jT808_0x8103_0x0059.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0059 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0059 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0059 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005A.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005A.cs index 3a932ff4..57889ca2 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005A.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005A.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 最长停车时间,单位为秒(s) /// - public class JT808_0x8103_0x005A : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x005A : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x005A /// - public override uint ParamId { get; set; } = 0x005A; + public uint ParamId { get; set; } = 0x005A; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 最长停车时间,单位为秒(s) /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x005A : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 最长停车时间 /// - public override string Description => "最长停车时间"; + public string Description => "最长停车时间"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x005A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x005A Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x005A jT808_0x8103_0x005A = new JT808_0x8103_0x005A(); jT808_0x8103_0x005A.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x005A Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005A value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005A value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005B.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005B.cs index 7a1bcd9a..b6cae096 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005B.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005B.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 超速报警预警差值,单位为 1/10Km/h /// - public class JT808_0x8103_0x005B : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x005B : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x005B /// - public override uint ParamId { get; set; } = 0x005B; + public uint ParamId { get; set; } = 0x005B; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 超速报警预警差值,单位为 1/10Km/h /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x005B : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 超速报警预警差值 /// - public override string Description => "超速报警预警差值"; + public string Description => "超速报警预警差值"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x005B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x005B Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x005B jT808_0x8103_0x005B = new JT808_0x8103_0x005B(); jT808_0x8103_0x005B.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x005B Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005B value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005B value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005C.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005C.cs index 78e6df8e..5dc41962 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005C.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005C.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 疲劳驾驶预警差值,单位为秒(s),>0 /// - public class JT808_0x8103_0x005C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x005C : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x005C /// - public override uint ParamId { get; set; } = 0x005C; + public uint ParamId { get; set; } = 0x005C; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 疲劳驾驶预警差值,单位为秒(s),>0 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x005C : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 疲劳驾驶预警差值 /// - public override string Description => "疲劳驾驶预警差值"; + public string Description => "疲劳驾驶预警差值"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x005C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x005C Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x005C jT808_0x8103_0x005C = new JT808_0x8103_0x005C(); jT808_0x8103_0x005C.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x005C Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005C value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005C value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005D.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005D.cs index 2027fcac..2d5fb643 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005D.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005D.cs @@ -12,17 +12,17 @@ namespace JT808.Protocol.MessageBody /// b7-b0: 碰撞时间,单位 4ms; /// b15-b8:碰撞加速度,单位 0.1g,设置范围在:0-79 之间,默认为10。 /// - public class JT808_0x8103_0x005D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x005D : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x005D /// - public override uint ParamId { get; set; } = 0x005D; + public uint ParamId { get; set; } = 0x005D; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 碰撞报警参数设置 /// b7-b0: 碰撞时间,单位4ms; @@ -32,7 +32,7 @@ public class JT808_0x8103_0x005D : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 碰撞报警参数设置 /// - public override string Description => "碰撞报警参数设置"; + public string Description => "碰撞报警参数设置"; /// /// @@ -56,7 +56,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x005D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x005D Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x005D jT808_0x8103_0x005D = new JT808_0x8103_0x005D(); jT808_0x8103_0x005D.ParamId = reader.ReadUInt32(); @@ -70,7 +70,7 @@ public JT808_0x8103_0x005D Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005D value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005D value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005E.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005E.cs index 7572a88e..30cee8e7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005E.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x005E.cs @@ -11,17 +11,17 @@ namespace JT808.Protocol.MessageBody /// 侧翻报警参数设置: /// 侧翻角度,单位 1 度,默认为 30 度 /// - public class JT808_0x8103_0x005E : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x005E : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x005E /// - public override uint ParamId { get; set; } = 0x005E; + public uint ParamId { get; set; } = 0x005E; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 侧翻报警参数设置: /// 侧翻角度,单位 1 度,默认为 30 度 @@ -30,7 +30,7 @@ public class JT808_0x8103_0x005E : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 侧翻报警参数设置 /// - public override string Description => "侧翻报警参数设置"; + public string Description => "侧翻报警参数设置"; /// /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x005E Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x005E Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x005E jT808_0x8103_0x005E = new JT808_0x8103_0x005E(); jT808_0x8103_0x005E.ParamId = reader.ReadUInt32(); @@ -68,7 +68,7 @@ public JT808_0x8103_0x005E Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005E value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x005E value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0064.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0064.cs index de958a15..fbe51aee 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0064.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0064.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 定时拍照控制,见 表 14 /// - public class JT808_0x8103_0x0064 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0064 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0064 /// - public override uint ParamId { get; set; } = 0x0064; + public uint ParamId { get; set; } = 0x0064; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 定时拍照控制,见808表 14 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0064 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 定时拍照控制 /// - public override string Description => "定时拍照控制"; + public string Description => "定时拍照控制"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0064 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0064 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0064 jT808_0x8103_0x0064 = new JT808_0x8103_0x0064(); jT808_0x8103_0x0064.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0064 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0064 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0064 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0065.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0065.cs index 1b619154..fdbe9968 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0065.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0065.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 定距拍照控制,见 表 15 /// - public class JT808_0x8103_0x0065 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0065 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0065 /// - public override uint ParamId { get; set; } = 0x0065; + public uint ParamId { get; set; } = 0x0065; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 定距拍照控制,见808表15 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0065 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 定距拍照控制 /// - public override string Description => "定距拍照控制"; + public string Description => "定距拍照控制"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0065 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0065 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0065 jT808_0x8103_0x0065 = new JT808_0x8103_0x0065(); jT808_0x8103_0x0065.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0065 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0065 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0065 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0070.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0070.cs index 62430118..e06e5da4 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0070.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0070.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 图像/视频质量,1-10,1 最好 /// - public class JT808_0x8103_0x0070 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0070 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0070 /// - public override uint ParamId { get; set; } = 0x0070; + public uint ParamId { get; set; } = 0x0070; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 图像/视频质量,1-10,1 最好 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0070 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 图像/视频质量 /// - public override string Description => "图像_视频质量"; + public string Description => "图像_视频质量"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0070 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0070 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0070 jT808_0x8103_0x0070 = new JT808_0x8103_0x0070(); jT808_0x8103_0x0070.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0070 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0070 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0070 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0071.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0071.cs index f97374e6..aa63d27d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0071.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0071.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 亮度,0-255 /// - public class JT808_0x8103_0x0071 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0071 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0071 /// - public override uint ParamId { get; set; } = 0x0071; + public uint ParamId { get; set; } = 0x0071; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 亮度,0-255 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0071 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 亮度 /// - public override string Description => "亮度"; + public string Description => "亮度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0071 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0071 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0071 jT808_0x8103_0x0071 = new JT808_0x8103_0x0071(); jT808_0x8103_0x0071.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0071 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0071 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0071 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0072.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0072.cs index e989f8c4..4a6c39c7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0072.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0072.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 对比度,0-127 /// - public class JT808_0x8103_0x0072 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0072 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0072 /// - public override uint ParamId { get; set; } = 0x0072; + public uint ParamId { get; set; } = 0x0072; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 对比度,0-127 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0072 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 对比度 /// - public override string Description => "对比度"; + public string Description => "对比度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0072 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0072 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0072 jT808_0x8103_0x0072 = new JT808_0x8103_0x0072(); jT808_0x8103_0x0072.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0072 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0072 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0072 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0073.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0073.cs index edcbfdba..e4fc7fa6 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0073.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0073.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 饱和度,0-127 /// - public class JT808_0x8103_0x0073 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0073 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0073 /// - public override uint ParamId { get; set; } = 0x0073; + public uint ParamId { get; set; } = 0x0073; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 饱和度,0-127 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0073 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 饱和度 /// - public override string Description => "饱和度"; + public string Description => "饱和度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0073 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0073 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0073 jT808_0x8103_0x0073 = new JT808_0x8103_0x0073(); jT808_0x8103_0x0073.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0073 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0073 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0073 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0074.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0074.cs index 5296a2c6..c786ef7c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0074.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0074.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 色度,0-255 /// - public class JT808_0x8103_0x0074 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0074 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0074 /// - public override uint ParamId { get; set; } = 0x0074; + public uint ParamId { get; set; } = 0x0074; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 色度,0-255 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0074 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 色度 /// - public override string Description => "色度"; + public string Description => "色度"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0074 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0074 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0074 jT808_0x8103_0x0074 = new JT808_0x8103_0x0074(); jT808_0x8103_0x0074.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0074 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0074 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0074 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0080.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0080.cs index 61d87a12..0a8647e7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0080.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0080.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 车辆里程表读数,1/10km /// - public class JT808_0x8103_0x0080 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0080 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0080 /// - public override uint ParamId { get; set; } = 0x0080; + public uint ParamId { get; set; } = 0x0080; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// 车辆里程表读数,1/10km /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0080 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 车辆里程表读数 /// - public override string Description => "车辆里程表读数"; + public string Description => "车辆里程表读数"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0080 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0080 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0080 jT808_0x8103_0x0080 = new JT808_0x8103_0x0080(); jT808_0x8103_0x0080.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0080 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0080 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0080 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0081.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0081.cs index c43d60e5..c9b17966 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0081.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0081.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 车辆所在的省域 ID /// - public class JT808_0x8103_0x0081 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0081 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0081 /// - public override uint ParamId { get; set; } = 0x0081; + public uint ParamId { get; set; } = 0x0081; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 车辆所在的省域 ID /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0081 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 车辆所在的省域ID /// - public override string Description => "车辆所在的省域ID"; + public string Description => "车辆所在的省域ID"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0081 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0081 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0081 jT808_0x8103_0x0081 = new JT808_0x8103_0x0081(); jT808_0x8103_0x0081.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0081 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0081 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0081 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0082.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0082.cs index 7f15f573..da4b7b3f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0082.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0082.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 车辆所在的市域 ID /// - public class JT808_0x8103_0x0082 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0082 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0082 /// - public override uint ParamId { get; set; } = 0x0082; + public uint ParamId { get; set; } = 0x0082; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// 车辆所在的市域 ID /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0082 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 车辆所在的市域ID /// - public override string Description => "车辆所在的市域ID"; + public string Description => "车辆所在的市域ID"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0082 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0082 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0082 jT808_0x8103_0x0082 = new JT808_0x8103_0x0082(); jT808_0x8103_0x0082.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0082 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0082 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0082 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0083.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0083.cs index 73ce623a..2767bf58 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0083.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0083.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 公安交通管理部门颁发的机动车号牌 /// - public class JT808_0x8103_0x0083 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0083 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0083 /// - public override uint ParamId { get; set; } = 0x0083; + public uint ParamId { get; set; } = 0x0083; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } + public byte ParamLength { get; set; } /// /// 公安交通管理部门颁发的机动车号牌 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0083 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 公安交通管理部门颁发的机动车号牌 /// - public override string Description => "公安交通管理部门颁发的机动车号牌"; + public string Description => "公安交通管理部门颁发的机动车号牌"; /// /// @@ -53,7 +53,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0083 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0083 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0083 jT808_0x8103_0x0083 = new JT808_0x8103_0x0083(); jT808_0x8103_0x0083.ParamId = reader.ReadUInt32(); @@ -67,7 +67,7 @@ public JT808_0x8103_0x0083 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0083 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0083 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.Skip(1, out int skipPosition); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0084.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0084.cs index cc570469..1ec5e476 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0084.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0084.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 车牌颜色,按照 JT/T415-2006 的 5.4.12 /// - public class JT808_0x8103_0x0084 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8103_0x0084 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808_2019_Version, IJT808Analyze { /// /// 0x0084 /// - public override uint ParamId { get; set; } = 0x0084; + public uint ParamId { get; set; } = 0x0084; /// /// 数据长度 /// n byte /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// 车牌颜色,按照 JT/T415-2006 的 5.4.12 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0084 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 车牌颜色 /// - public override string Description => "车牌颜色"; + public string Description => "车牌颜色"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0084 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0084 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0084 jT808_0x8103_0x0084 = new JT808_0x8103_0x0084(); jT808_0x8103_0x0084.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0084 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0084 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0084 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0090.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0090.cs index 04fa237f..30271e67 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0090.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0090.cs @@ -14,17 +14,17 @@ namespace JT808.Protocol.MessageBody /// bit2,0:禁用 GLONASS 定位, 1:启用 GLONASS 定位; /// bit3,0:禁用 Galileo 定位, 1:启用 Galileo 定位。 /// - public class JT808_0x8103_0x0090 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0090 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0090 /// - public override uint ParamId { get; set; } = 0x0090; + public uint ParamId { get; set; } = 0x0090; /// /// 数据长度 /// 1 byte /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// GNSS 定位模式,定义如下: /// bit0,0:禁用 GPS 定位, 1:启用 GPS 定位; @@ -36,7 +36,7 @@ public class JT808_0x8103_0x0090 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS 定位模式 /// - public override string Description => "GNSS定位模式"; + public string Description => "GNSS定位模式"; /// /// @@ -65,7 +65,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0090 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0090 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0090 jT808_0x8103_0x0090 = new JT808_0x8103_0x0090(); jT808_0x8103_0x0090.ParamId = reader.ReadUInt32(); @@ -79,7 +79,7 @@ public JT808_0x8103_0x0090 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0090 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0090 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0091.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0091.cs index 098be733..18045acb 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0091.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0091.cs @@ -14,17 +14,17 @@ namespace JT808.Protocol.MessageBody /// 0x02:19200;0x03:38400; /// 0x04:57600;0x05:115200。 /// - public class JT808_0x8103_0x0091 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0091 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0091 /// - public override uint ParamId { get; set; } = 0x0091; + public uint ParamId { get; set; } = 0x0091; /// /// 数据长度 /// 1 byte /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// GNSS 波特率,定义如下: /// 0x00:4800;0x01:9600; @@ -35,7 +35,7 @@ public class JT808_0x8103_0x0091 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS 波特率 /// - public override string Description => "GNSS波特率"; + public string Description => "GNSS波特率"; /// /// @@ -59,7 +59,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0091 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0091 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0091 jT808_0x8103_0x0091 = new JT808_0x8103_0x0091(); jT808_0x8103_0x0091.ParamId = reader.ReadUInt32(); @@ -73,7 +73,7 @@ public JT808_0x8103_0x0091 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0091 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0091 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0092.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0092.cs index 892f042d..e81ce53e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0092.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0092.cs @@ -13,17 +13,17 @@ namespace JT808.Protocol.MessageBody /// 0x02:2000ms;0x03:3000ms; /// 0x04:4000ms。 /// - public class JT808_0x8103_0x0092 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0092 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0092 /// - public override uint ParamId { get; set; } = 0x0092; + public uint ParamId { get; set; } = 0x0092; /// /// 数据长度 /// 1 byte /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// GNSS 模块详细定位数据输出频率,定义如下: /// 0x00:500ms;0x01:1000ms(默认值); @@ -34,7 +34,7 @@ public class JT808_0x8103_0x0092 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS模块详细定位数据输出频率 /// - public override string Description => "GNSS模块详细定位数据输出频率"; + public string Description => "GNSS模块详细定位数据输出频率"; /// /// @@ -58,7 +58,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0092 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0092 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0092 jT808_0x8103_0x0092 = new JT808_0x8103_0x0092(); jT808_0x8103_0x0092.ParamId = reader.ReadUInt32(); @@ -72,7 +72,7 @@ public JT808_0x8103_0x0092 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0092 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0092 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0093.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0093.cs index 5e31a795..857a755a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0093.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0093.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// GNSS 模块详细定位数据采集频率,单位为秒,默认为 1。 /// - public class JT808_0x8103_0x0093 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0093 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0093 /// - public override uint ParamId { get; set; } = 0x0093; + public uint ParamId { get; set; } = 0x0093; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// GNSS 模块详细定位数据采集频率,单位为秒,默认为 1。 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0093 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS模块详细定位数据采集频率 /// - public override string Description => "GNSS模块详细定位数据采集频率"; + public string Description => "GNSS模块详细定位数据采集频率"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0093 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0093 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0093 jT808_0x8103_0x0093 = new JT808_0x8103_0x0093(); jT808_0x8103_0x0093.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0093 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0093 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0093 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0094.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0094.cs index 6fd5f194..cffe32c9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0094.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0094.cs @@ -16,17 +16,17 @@ namespace JT808.Protocol.MessageBody /// 0x0C,按累计距离上传,达到距离后自动停止上传; /// 0x0D,按累计条数上传,达到上传条数后自动停止上传。 /// - public class JT808_0x8103_0x0094 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0094 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0094 /// - public override uint ParamId { get; set; } = 0x0094; + public uint ParamId { get; set; } = 0x0094; /// /// 数据长度 /// 1 byte /// - public override byte ParamLength { get; set; } = 1; + public byte ParamLength { get; set; } = 1; /// /// GNSS 模块详细定位数据上传方式 /// 0x00,本地存储,不上传(默认值); @@ -40,7 +40,7 @@ public class JT808_0x8103_0x0094 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS 模块详细定位数据上传方式 /// - public override string Description => "GNSS模块详细定位数据上传方式"; + public string Description => "GNSS模块详细定位数据上传方式"; /// /// @@ -83,7 +83,7 @@ string GetUploadType(byte num) { /// /// /// - public JT808_0x8103_0x0094 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0094 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0094 jT808_0x8103_0x0094 = new JT808_0x8103_0x0094(); jT808_0x8103_0x0094.ParamId = reader.ReadUInt32(); @@ -97,7 +97,7 @@ public JT808_0x8103_0x0094 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0094 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0094 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs index dd7f4030..5514652f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs @@ -15,17 +15,17 @@ namespace JT808.Protocol.MessageBody /// 上传方式为 0x0C 时,单位为米; /// 上传方式为 0x0D 时,单位为条。 /// - public class JT808_0x8103_0x0095 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0095 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0095 /// - public override uint ParamId { get; set; } = 0x0095; + public uint ParamId { get; set; } = 0x0095; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// GNSS 模块详细定位数据上传设置: /// 上传方式为 0x01 时,单位为秒; @@ -38,7 +38,7 @@ public class JT808_0x8103_0x0095 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// GNSS模块详细定位数据上传设置 /// - public override string Description => "GNSS模块详细定位数据上传设置"; + public string Description => "GNSS模块详细定位数据上传设置"; /// /// @@ -62,7 +62,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0095 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0095 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0095 jT808_0x8103_0x0095 = new JT808_0x8103_0x0095(); jT808_0x8103_0x0095.ParamId = reader.ReadUInt32(); @@ -76,7 +76,7 @@ public JT808_0x8103_0x0095 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0095 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0095 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs index ceab4fd8..c14c3e6c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// CAN 总线通道 1 采集时间间隔(ms),0 表示不采集 /// - public class JT808_0x8103_0x0100 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0100 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0100 /// - public override uint ParamId { get; set; } = 0x0100; + public uint ParamId { get; set; } = 0x0100; /// /// 数据 长度 /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// CAN 总线通道 1 采集时间间隔(ms),0 表示不采集 /// @@ -27,7 +27,7 @@ public class JT808_0x8103_0x0100 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// CAN 总线通道 1 采集时间间隔 /// - public override string Description => "CAN总线通道1采集时间间隔"; + public string Description => "CAN总线通道1采集时间间隔"; /// /// @@ -51,7 +51,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0100 jT808_0x8103_0x0100 = new JT808_0x8103_0x0100(); jT808_0x8103_0x0100.ParamId = reader.ReadUInt32(); @@ -65,7 +65,7 @@ public JT808_0x8103_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0100 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0100 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0101.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0101.cs index 5f668a32..82feedc7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0101.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0101.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// CAN 总线通道 1 上传时间间隔(s),0 表示不上传 /// - public class JT808_0x8103_0x0101 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0101 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0101 /// - public override uint ParamId { get; set; } = 0x0101; + public uint ParamId { get; set; } = 0x0101; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// CAN 总线通道 1 上传时间间隔(s),0 表示不上传 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0101 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// 总线通道1上传时间间隔 /// - public override string Description => "CAN 总线通道1上传时间间隔"; + public string Description => "CAN 总线通道1上传时间间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0101 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0101 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0101 jT808_0x8103_0x0101 = new JT808_0x8103_0x0101(); jT808_0x8103_0x0101.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0101 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0101 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0101 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0102.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0102.cs index 3b91f086..20c78252 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0102.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0102.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// CAN 总线通道 2 采集时间间隔(ms),0 表示不采集 /// - public class JT808_0x8103_0x0102 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0102 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0102 /// - public override uint ParamId { get; set; } = 0x0102; + public uint ParamId { get; set; } = 0x0102; /// /// 数据长度 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public byte ParamLength { get; set; } = 4; /// /// CAN 总线通道 2 采集时间间隔(ms),0 表示不采集 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0102 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// CAN总线通道2采集时间间隔 /// - public override string Description => "CAN总线通道2采集时间间隔"; + public string Description => "CAN总线通道2采集时间间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0102 jT808_0x8103_0x0102 = new JT808_0x8103_0x0102(); jT808_0x8103_0x0102.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0102 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0102 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0102 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0103.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0103.cs index 5220d77f..0327df3a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0103.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0103.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// CAN 总线通道 2 上传时间间隔(s),0 表示不上传 /// - public class JT808_0x8103_0x0103 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0103 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0103 /// - public override uint ParamId { get; set; } = 0x0103; + public uint ParamId { get; set; } = 0x0103; /// /// 数据长度 /// 2 byte /// - public override byte ParamLength { get; set; } = 2; + public byte ParamLength { get; set; } = 2; /// /// CAN 总线通道 2 上传时间间隔(s),0 表示不上传 /// @@ -28,7 +28,7 @@ public class JT808_0x8103_0x0103 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// CAN总线通道2上传时间间隔 /// - public override string Description => "CAN总线通道2上传时间间隔"; + public string Description => "CAN总线通道2上传时间间隔"; /// /// @@ -52,7 +52,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0103 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0103 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0103 jT808_0x8103_0x0103 = new JT808_0x8103_0x0103(); jT808_0x8103_0x0103.ParamId = reader.ReadUInt32(); @@ -66,7 +66,7 @@ public JT808_0x8103_0x0103 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0103 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0103 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0110.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0110.cs index 8cc3b553..80f5c3dc 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0110.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0110.cs @@ -17,17 +17,17 @@ namespace JT808.Protocol.MessageBody /// bit29 表示数据采集方式,0:原始数据,1:采集区间的计算值; /// bit28-bit0 表示 CAN 总线 ID。 /// - public class JT808_0x8103_0x0110 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8103_0x0110 : JT808MessagePackFormatter, JT808_0x8103_BodyBase, IJT808Analyze { /// /// 0x0110 /// - public override uint ParamId { get; set; } = 0x0110; + public uint ParamId { get; set; } = 0x0110; /// /// 数据长度 /// 8 byte /// - public override byte ParamLength { get; set; } = 8; + public byte ParamLength { get; set; } = 8; /// /// bit63-bit32 表示此 ID 采集时间间隔(ms),0 表示不采集; /// @@ -51,7 +51,7 @@ public class JT808_0x8103_0x0110 : JT808_0x8103_BodyBase, IJT808MessagePackForma /// /// CAN总线ID单独采集设置 /// - public override string Description => "CAN总线ID单独采集设置"; + public string Description => "CAN总线ID单独采集设置"; /// /// @@ -87,7 +87,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8103_0x0110 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8103_0x0110 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0110 jT808_0x8103_0x0110 = new JT808_0x8103_0x0110(); jT808_0x8103_0x0110.ParamId = reader.ReadUInt32(); @@ -106,7 +106,7 @@ public JT808_0x8103_0x0110 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0110 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0110 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs index e2c30e40..210bd1be 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs @@ -9,19 +9,15 @@ namespace JT808.Protocol.MessageBody /// /// 终端参数设置 /// - public abstract class JT808_0x8103_BodyBase: IJT808Description + public interface JT808_0x8103_BodyBase: IJT808Description { /// /// 参数 ID /// - public abstract uint ParamId { get; set; } + uint ParamId { get; set; } /// /// 参数长度 /// - public abstract byte ParamLength { get; set; } - /// - /// 消息描述 - /// - public abstract string Description { get; } + byte ParamLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_CustomBodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_CustomBodyBase.cs index 2b841565..001aaee4 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_CustomBodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_CustomBodyBase.cs @@ -7,20 +7,16 @@ namespace JT808.Protocol.MessageBody /// /// 自定义终端参数设置 /// - public abstract class JT808_0x8103_CustomBodyBase : IJT808Description + public interface JT808_0x8103_CustomBodyBase : IJT808Description { /// /// 参数 ID /// - public abstract uint ParamId { get; set; } + uint ParamId { get; set; } /// /// 参数长度 /// - public abstract byte ParamLength { get; set; } - /// - /// 消息描述 - /// - public abstract string Description { get; } + byte ParamLength { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8104.cs b/src/JT808.Protocol/MessageBody/JT808_0x8104.cs index 84d78282..c662b79f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8104.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8104.cs @@ -8,14 +8,14 @@ public class JT808_0x8104 : JT808Bodies /// /// 0x8104 /// - public override ushort MsgId { get; } = 0x8104; + public ushort MsgId => 0x8104; /// /// 查询终端参数 /// - public override string Description => "查询终端参数"; + public string Description => "查询终端参数"; /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8105.cs b/src/JT808.Protocol/MessageBody/JT808_0x8105.cs index 6bee7db3..09c7b0d2 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8105.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8105.cs @@ -13,7 +13,7 @@ namespace JT808.Protocol.MessageBody /// /// 终端控制 /// - public class JT808_0x8105 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8105 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 标准命令参数数量 @@ -24,11 +24,11 @@ public class JT808_0x8105 : JT808Bodies, IJT808MessagePackFormatter /// 0x8105 /// - public override ushort MsgId { get; } = 0x8105; + public ushort MsgId => 0x8105; /// /// 终端控制 /// - public override string Description => "终端控制"; + public string Description => "终端控制"; /// /// 命令字 /// @@ -53,7 +53,7 @@ public class JT808_0x8105 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8105 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8105 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8105 jT808_0x8105 = new JT808_0x8105 { @@ -124,7 +124,7 @@ public JT808_0x8105 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8105 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8105 value, IJT808Config config) { writer.WriteByte(value.CommandWord); if (value.CommandWord == 1 || value.CommandWord == 2) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8106.cs b/src/JT808.Protocol/MessageBody/JT808_0x8106.cs index 355b0f22..d3d448c9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8106.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8106.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 查询指定终端参数 /// 0x8106 /// - public class JT808_0x8106 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8106 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8106 /// - public override ushort MsgId { get; } = 0x8106; + public ushort MsgId => 0x8106; /// /// 查询指定终端参数 /// - public override string Description => "查询指定终端参数"; + public string Description => "查询指定终端参数"; /// /// 参数总数 /// 参数总数为 n @@ -37,7 +37,7 @@ public class JT808_0x8106 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8106 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8106 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8106 jT808_0X8106 = new JT808_0x8106(); jT808_0X8106.ParameterCount = reader.ReadByte(); @@ -54,7 +54,7 @@ public JT808_0x8106 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8106 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8106 value, IJT808Config config) { writer.WriteByte(value.ParameterCount); for (int i = 0; i < value.ParameterCount; i++) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8107.cs b/src/JT808.Protocol/MessageBody/JT808_0x8107.cs index a1f1f44a..df412337 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8107.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8107.cs @@ -8,14 +8,14 @@ public class JT808_0x8107 : JT808Bodies /// /// 0x8107 /// - public override ushort MsgId { get; } = 0x8107; + public ushort MsgId => 0x8107; /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 查询终端属性 /// - public override string Description => "查询终端属性"; + public string Description => "查询终端属性"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8108.cs b/src/JT808.Protocol/MessageBody/JT808_0x8108.cs index 5a378ffd..6a1538d7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8108.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8108.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 下发终端升级包 /// - public class JT808_0x8108 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8108 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8108 /// - public override ushort MsgId { get; } = 0x8108; + public ushort MsgId => 0x8108; /// /// 下发终端升级包 /// - public override string Description => "下发终端升级包"; + public string Description => "下发终端升级包"; /// /// 升级类型 /// @@ -52,7 +52,7 @@ public class JT808_0x8108 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8108 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8108 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8108 jT808_0X8108 = new JT808_0x8108(); jT808_0X8108.UpgradeType = (JT808UpgradeType)reader.ReadByte(); @@ -76,7 +76,7 @@ public JT808_0x8108 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8108 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8108 value, IJT808Config config) { writer.WriteByte((byte)value.UpgradeType); if (writer.Version == JT808Version.JTT2019) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8201.cs b/src/JT808.Protocol/MessageBody/JT808_0x8201.cs index cbed0b7c..f8cf9b3c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8201.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8201.cs @@ -8,14 +8,14 @@ public class JT808_0x8201: JT808Bodies /// /// 0x8201 /// - public override ushort MsgId { get; } = 0x8201; + public ushort MsgId => 0x8201; /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 位置信息查询 /// - public override string Description => "位置信息查询"; + public string Description => "位置信息查询"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8202.cs b/src/JT808.Protocol/MessageBody/JT808_0x8202.cs index d9549a9d..0c9ad9ae 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8202.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8202.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.MessageBody /// /// 临时位置跟踪控制 /// - public class JT808_0x8202 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8202 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8202 /// - public override ushort MsgId { get; } = 0x8202; + public ushort MsgId => 0x8202; /// /// 临时位置跟踪控制 /// - public override string Description => "临时位置跟踪控制"; + public string Description => "临时位置跟踪控制"; /// /// 时间间隔 /// 单位为秒(s),0 则停止跟踪。停止跟踪无需带后继字段 @@ -35,7 +35,7 @@ public class JT808_0x8202 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8202 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8202 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8202 jT808_0X8202 = new JT808_0x8202(); jT808_0X8202.Interval = reader.ReadUInt16(); @@ -48,7 +48,7 @@ public JT808_0x8202 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8202 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8202 value, IJT808Config config) { writer.WriteUInt16(value.Interval); writer.WriteInt32(value.LocationTrackingValidity); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8203.cs b/src/JT808.Protocol/MessageBody/JT808_0x8203.cs index ed0ca845..ef595966 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8203.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8203.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 人工确认报警消息 /// 0x8203 /// - public class JT808_0x8203 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8203 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8203 /// - public override ushort MsgId { get; } = 0x8203; + public ushort MsgId => 0x8203; /// /// 人工确认报警消息 /// - public override string Description => "人工确认报警消息"; + public string Description => "人工确认报警消息"; /// /// 报警消息流水号 /// 需人工确认的报警消息流水号,0 表示该报警类型所有消息 @@ -37,7 +37,7 @@ public class JT808_0x8203 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8203 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8203 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8203 jT808_0X8203 = new JT808_0x8203(); jT808_0X8203.AlarmMsgNum = reader.ReadUInt16(); @@ -50,7 +50,7 @@ public JT808_0x8203 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8203 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8203 value, IJT808Config config) { writer.WriteUInt16(value.AlarmMsgNum); writer.WriteUInt32(value.ManualConfirmAlarmType); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8204.cs b/src/JT808.Protocol/MessageBody/JT808_0x8204.cs index 76119608..7a9bcf29 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8204.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8204.cs @@ -13,14 +13,14 @@ public class JT808_0x8204 : JT808Bodies, IJT808_2019_Version /// /// 0x8204 /// - public override ushort MsgId { get; } = 0x8204; + public ushort MsgId => 0x8204; /// /// 跳过序列化器 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; /// /// 链路检测 /// - public override string Description => "链路检测"; + public string Description => "链路检测"; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8300.cs b/src/JT808.Protocol/MessageBody/JT808_0x8300.cs index 8859ba59..e7b18025 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8300.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8300.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 文本信息下发 /// - public class JT808_0x8300 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8300 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8300 /// - public override ushort MsgId { get; } = 0x8300; + public ushort MsgId => 0x8300; /// /// 文本信息下发 /// - public override string Description => "文本信息下发"; + public string Description => "文本信息下发"; /// /// 文本信息标志位含义见 表 38 /// @@ -44,7 +44,7 @@ public class JT808_0x8300 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8300 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8300 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8300 jT808_0X8300 = new JT808_0x8300(); jT808_0X8300.TextFlag = reader.ReadByte(); @@ -61,7 +61,7 @@ public JT808_0x8300 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8300 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8300 value, IJT808Config config) { writer.WriteByte(value.TextFlag); if (writer.Version == JT808Version.JTT2019) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8301.cs b/src/JT808.Protocol/MessageBody/JT808_0x8301.cs index abca7241..04f29d65 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8301.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8301.cs @@ -14,16 +14,16 @@ namespace JT808.Protocol.MessageBody /// 0x8301 /// 2019版本已作删除 /// - public class JT808_0x8301 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8301 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8301 /// - public override ushort MsgId { get; } = 0x8301; + public ushort MsgId => 0x8301; /// /// 事件设置 /// - public override string Description => "事件设置"; + public string Description => "事件设置"; /// /// 设置类型 /// @@ -43,7 +43,7 @@ public class JT808_0x8301 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8301 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8301 jT808_0X8301 = new JT808_0x8301(); jT808_0X8301.SettingType = reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x8301 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8301 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8301 value, IJT808Config config) { writer.WriteByte(value.SettingType); if (value.EventItems != null && value.EventItems.Count > 0) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8302.cs b/src/JT808.Protocol/MessageBody/JT808_0x8302.cs index 73a17ba4..044aafba 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8302.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8302.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// 0x8302 /// 2019版本已作删除 /// - public class JT808_0x8302 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8302 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8302 /// - public override ushort MsgId { get; } = 0x8302; + public ushort MsgId =>0x8302; /// /// 提问下发 /// - public override string Description => "提问下发"; + public string Description => "提问下发"; /// /// 标志 /// 提问下发标志位定义 @@ -67,7 +67,7 @@ public class Answer /// /// /// - public JT808_0x8302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8302 jT808_0X8302 = new JT808_0x8302(); jT808_0X8302.Flag = reader.ReadByte(); @@ -97,7 +97,7 @@ public JT808_0x8302 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8302 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8302 value, IJT808Config config) { writer.WriteByte(value.Flag); // 先计算内容长度(汉字为两个字节) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8303.cs b/src/JT808.Protocol/MessageBody/JT808_0x8303.cs index cce04d24..0e863b41 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8303.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8303.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// 信息点播菜单设置 /// 0x8303 /// - public class JT808_0x8303 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8303 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8303 /// - public override ushort MsgId { get; } = 0x8303; + public ushort MsgId =>0x8303; /// /// 信息点播菜单设置 /// - public override string Description => "信息点播菜单设置"; + public string Description => "信息点播菜单设置"; /// /// 设置类型 /// @@ -43,7 +43,7 @@ public class JT808_0x8303 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8303 jT808_0X8303 = new JT808_0x8303(); jT808_0X8303.SettingType = reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x8303 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8303 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8303 value, IJT808Config config) { writer.WriteByte(value.SettingType); writer.WriteByte((byte)value.InformationItems.Count); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8304.cs b/src/JT808.Protocol/MessageBody/JT808_0x8304.cs index 29d79ac1..f8346aab 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8304.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8304.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 0x8304 /// 2019版本已作删除 /// - public class JT808_0x8304 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8304 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8304 /// - public override ushort MsgId { get; } = 0x8304; + public ushort MsgId => 0x8304; /// /// 信息服务 /// - public override string Description => "信息服务"; + public string Description => "信息服务"; /// /// 信息类型 /// @@ -41,7 +41,7 @@ public class JT808_0x8304 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8304 jT808_0X8304 = new JT808_0x8304(); jT808_0X8304.InformationType = reader.ReadByte(); @@ -55,7 +55,7 @@ public JT808_0x8304 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8304 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8304 value, IJT808Config config) { writer.WriteByte(value.InformationType); // 先计算内容长度(汉字为两个字节) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8400.cs b/src/JT808.Protocol/MessageBody/JT808_0x8400.cs index 4aba3b77..f2cfb6b9 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8400.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8400.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 电话回拨 /// - public class JT808_0x8400 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8400 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8400 /// - public override ushort MsgId { get; } = 0x8400; + public ushort MsgId =>0x8400; /// /// 电话回拨 /// - public override string Description => "电话回拨"; + public string Description => "电话回拨"; /// /// 0:普通通话;1:监听 /// @@ -35,7 +35,7 @@ public class JT808_0x8400 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8400 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8400 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8400 jT808_0X8400 = new JT808_0x8400(); jT808_0X8400.CallBack = (JT808CallBackType)reader.ReadByte(); @@ -49,7 +49,7 @@ public JT808_0x8400 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8400 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8400 value, IJT808Config config) { writer.WriteByte((byte)value.CallBack); writer.WriteString(value.PhoneNumber.ValiMaxString(nameof(value.PhoneNumber),20)); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8401.cs b/src/JT808.Protocol/MessageBody/JT808_0x8401.cs index 15cd26a6..8f5f8b3b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8401.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8401.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// /// 设置电话本 /// - public class JT808_0x8401 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8401 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8401 /// - public override ushort MsgId { get; } = 0x8401; + public ushort MsgId =>0x8401; /// /// 设置电话本 /// - public override string Description => "设置电话本"; + public string Description => "设置电话本"; /// /// 设置类型 /// @@ -40,7 +40,7 @@ public class JT808_0x8401 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8401 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8401 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8401 jT808_0X8401 = new JT808_0x8401(); jT808_0X8401.SettingTelephoneBook = (JT808SettingTelephoneBook)reader.ReadByte(); @@ -65,7 +65,7 @@ public JT808_0x8401 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8401 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8401 value, IJT808Config config) { writer.WriteByte((byte)value.SettingTelephoneBook); writer.WriteByte((byte)value.JT808ContactProperties.Count); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8500.cs b/src/JT808.Protocol/MessageBody/JT808_0x8500.cs index 38aa9a14..feae513a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8500.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8500.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 车辆控制 /// - public class JT808_0x8500 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8500 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8500 /// - public override ushort MsgId { get; } = 0x8500; + public ushort MsgId => 0x8500; /// /// 车辆控制 /// - public override string Description => "车辆控制"; + public string Description => "车辆控制"; /// /// 控制标志 /// 控制指令标志位数据格式 @@ -90,7 +90,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8500 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8500 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8500 value = new JT808_0x8500(); if(reader.Version== JT808Version.JTT2019) @@ -102,7 +102,11 @@ public JT808_0x8500 Deserialize(ref JT808MessagePackReader reader, IJT808Config var controlTypeId = reader.ReadVirtualUInt16(); if (config.JT808_0x8500_2019_Factory.Map.TryGetValue(controlTypeId, out object instance)) { - value.ControlTypes.Add(JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config)); + var bodyValue = instance.DeserializeExt(ref reader, config); + if(bodyValue != null) + { + value.ControlTypes.Add(bodyValue); + } } else { @@ -122,7 +126,7 @@ public JT808_0x8500 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500 value, IJT808Config config) { if (writer.Version == JT808Version.JTT2019) { @@ -131,7 +135,7 @@ public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500 value, IJT writer.WriteUInt16((ushort)value.ControlTypes.Count); foreach (var item in value.ControlTypes) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item, ref writer, item, config); + item.SerializeExt(ref writer, item, config); } } else diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8500_0x0001.cs b/src/JT808.Protocol/MessageBody/JT808_0x8500_0x0001.cs index b25f3c55..b052496e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8500_0x0001.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8500_0x0001.cs @@ -12,12 +12,12 @@ namespace JT808.Protocol.MessageBody /// /// 控制类型 /// - public class JT808_0x8500_0x0001 : JT808_0x8500_ControlType, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8500_0x0001 : JT808MessagePackFormatter, JT808_0x8500_ControlType, IJT808Analyze { /// /// 0x0001 /// - public override ushort ControlTypeId { get; set; } = 0x0001; + public ushort ControlTypeId { get; set; } = 0x0001; /// /// 控制类型参数 /// @@ -43,7 +43,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8500_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8500_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8500_0x0001 value = new JT808_0x8500_0x0001(); value.ControlTypeId = reader.ReadUInt16(); @@ -56,7 +56,7 @@ public JT808_0x8500_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808 /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500_0x0001 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8500_0x0001 value, IJT808Config config) { writer.WriteUInt16(value.ControlTypeId); writer.WriteByte(value.ControlTypeParameter); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8500_ControlType.cs b/src/JT808.Protocol/MessageBody/JT808_0x8500_ControlType.cs index 7d8e8702..86a3093f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8500_ControlType.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8500_ControlType.cs @@ -8,11 +8,11 @@ namespace JT808.Protocol.MessageBody /// /// 控制类型 /// - public abstract class JT808_0x8500_ControlType : IJT808_2019_Version + public interface JT808_0x8500_ControlType : IJT808_2019_Version { /// /// 控制类型Id /// - public abstract ushort ControlTypeId { get; set; } + ushort ControlTypeId { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8600.cs b/src/JT808.Protocol/MessageBody/JT808_0x8600.cs index acd708da..6bb7ab37 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8600.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8600.cs @@ -16,16 +16,16 @@ namespace JT808.Protocol.MessageBody /// 0x8600 /// 注:本条消息协议支持周期时间范围,如要限制每天的8:30-18:00,起始/结束时间设为:00-00-00-08-30-00/00-00-00-18-00-00,其他以此类推 /// - public class JT808_0x8600 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8600 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8600 /// - public override ushort MsgId { get; } = 0x8600; + public ushort MsgId => 0x8600; /// /// 设置圆形区域 /// - public override string Description => "设置圆形区域"; + public string Description => "设置圆形区域"; /// /// 设置属性 /// @@ -45,7 +45,7 @@ public class JT808_0x8600 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8600 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8600 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8600 jT808_0X8600 = new JT808_0x8600(); jT808_0X8600.SettingAreaProperty = reader.ReadByte(); @@ -91,7 +91,7 @@ public JT808_0x8600 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8600 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8600 value, IJT808Config config) { writer.WriteByte(value.SettingAreaProperty); if (value.AreaItems != null) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8601.cs b/src/JT808.Protocol/MessageBody/JT808_0x8601.cs index e5bcb8a9..0325d421 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8601.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8601.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 删除圆形区域 /// 0x8601 /// - public class JT808_0x8601 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8601 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8601 /// - public override ushort MsgId { get; } = 0x8601; + public ushort MsgId => 0x8601; /// /// 删除圆形区域 /// - public override string Description => "删除圆形区域"; + public string Description => "删除圆形区域"; /// /// 区域数 /// 本条消息中包含的区域数,不超过 125 个,多于 125个建议用多条消息,0 为删除所有圆形区域 @@ -36,7 +36,7 @@ public class JT808_0x8601 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8601 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8601 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8601 jT808_0X8601 = new JT808_0x8601(); jT808_0X8601.AreaCount = reader.ReadByte(); @@ -53,7 +53,7 @@ public JT808_0x8601 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8601 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8601 value, IJT808Config config) { if (value.AreaIds != null) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8602.cs b/src/JT808.Protocol/MessageBody/JT808_0x8602.cs index 725b5e58..32a5e36a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8602.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8602.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody /// 设置矩形区域 /// 0x8602 /// - public class JT808_0x8602 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8602 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8602 /// - public override ushort MsgId { get; } = 0x8602; + public ushort MsgId =>0x8602; /// /// 设置矩形区域 /// - public override string Description => "设置矩形区域"; + public string Description => "设置矩形区域"; /// /// 设置属性 /// @@ -44,7 +44,7 @@ public class JT808_0x8602 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8602 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8602 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8602 jT808_0X8602 = new JT808_0x8602(); jT808_0X8602.SettingAreaProperty = reader.ReadByte(); @@ -91,7 +91,7 @@ public JT808_0x8602 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8602 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8602 value, IJT808Config config) { writer.WriteByte(value.SettingAreaProperty); if (value.AreaItems != null) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8603.cs b/src/JT808.Protocol/MessageBody/JT808_0x8603.cs index 62198c5a..76298a06 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8603.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8603.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 删除矩形区域 /// 0x8603 /// - public class JT808_0x8603 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8603 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// /// - public override ushort MsgId { get; } = 0x8603; + public ushort MsgId => 0x8603; /// /// /// - public override string Description => "删除矩形区域"; + public string Description => "删除矩形区域"; /// /// 区域数 /// 本条消息中包含的区域数,不超过 125 个,多于 125个建议用多条消息,0 为删除所有圆形区域 @@ -36,7 +36,7 @@ public class JT808_0x8603 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8603 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8603 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8603 jT808_0X8603 = new JT808_0x8603(); jT808_0X8603.AreaCount = reader.ReadByte(); @@ -53,7 +53,7 @@ public JT808_0x8603 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8603 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8603 value, IJT808Config config) { if (value.AreaIds != null) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8604.cs b/src/JT808.Protocol/MessageBody/JT808_0x8604.cs index 1b6d658c..da248d7e 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8604.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8604.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody /// 设置多边形区域 /// 0x8604 /// - public class JT808_0x8604 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8604 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8604 /// - public override ushort MsgId { get; } = 0x8604; + public ushort MsgId => 0x8604; /// /// 设置多边形区域 /// - public override string Description => "设置多边形区域"; + public string Description => "设置多边形区域"; /// /// 区域 ID /// @@ -83,7 +83,7 @@ public class JT808_0x8604 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8604 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8604 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8604 jT808_0X8604 = new JT808_0x8604(); jT808_0X8604.AreaId = reader.ReadUInt32(); @@ -127,7 +127,7 @@ public JT808_0x8604 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8604 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8604 value, IJT808Config config) { writer.WriteUInt32(value.AreaId); writer.WriteUInt16(value.AreaProperty); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8605.cs b/src/JT808.Protocol/MessageBody/JT808_0x8605.cs index a5ab486e..f4f53c7c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8605.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8605.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 删除多边形区域 /// 0x8605 /// - public class JT808_0x8605 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8605 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8605 /// - public override ushort MsgId { get; } = 0x8605; + public ushort MsgId => 0x8605; /// /// 删除多边形区域 /// - public override string Description => "删除多边形区域"; + public string Description => "删除多边形区域"; /// /// 区域数 /// 本条消息中包含的区域数,不超过 125 个,多于 125个建议用多条消息,0 为删除所有圆形区域 @@ -36,7 +36,7 @@ public class JT808_0x8605 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8605 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8605 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8605 jT808_0X8605 = new JT808_0x8605(); jT808_0X8605.AreaCount = reader.ReadByte(); @@ -53,7 +53,7 @@ public JT808_0x8605 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8605 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8605 value, IJT808Config config) { if (value.AreaIds != null) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8606.cs b/src/JT808.Protocol/MessageBody/JT808_0x8606.cs index 07ebc4f4..ef1ad19d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8606.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8606.cs @@ -15,16 +15,16 @@ namespace JT808.Protocol.MessageBody /// 设置路线 /// 0x8606 /// - public class JT808_0x8606 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8606 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8606 /// - public override ushort MsgId { get; } = 0x8606; + public ushort MsgId => 0x8606; /// /// 设置路线 /// - public override string Description => "设置路线"; + public string Description => "设置路线"; /// /// 路线 ID /// @@ -66,7 +66,7 @@ public class JT808_0x8606 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8606 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8606 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8606 jT808_0X8606 = new JT808_0x8606(); jT808_0X8606.RouteId = reader.ReadUInt32(); @@ -119,7 +119,7 @@ public JT808_0x8606 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8606 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8606 value, IJT808Config config) { writer.WriteUInt32(value.RouteId); writer.WriteUInt16(value.RouteProperty); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8607.cs b/src/JT808.Protocol/MessageBody/JT808_0x8607.cs index 11cbf12d..b400ae78 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8607.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8607.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 删除路线 /// 0x8607 /// - public class JT808_0x8607 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8607 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8607 /// - public override ushort MsgId { get; } = 0x8607; + public ushort MsgId => 0x8607; /// /// 删除路线 /// - public override string Description => "删除路线"; + public string Description => "删除路线"; /// /// 区域数 /// 本条消息中包含的区域数,不超过 125 个,多于 125个建议用多条消息,0 为删除所有圆形区域 @@ -36,7 +36,7 @@ public class JT808_0x8607 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8607 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8607 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8607 jT808_0X8607 = new JT808_0x8607(); jT808_0X8607.AreaCount = reader.ReadByte(); @@ -53,7 +53,7 @@ public JT808_0x8607 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8607 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8607 value, IJT808Config config) { if (value.AreaIds != null) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8608.cs b/src/JT808.Protocol/MessageBody/JT808_0x8608.cs index 6c1e7545..98c59804 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8608.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8608.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 0x8608 /// 2019版本 /// - public class JT808_0x8608 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8608 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8608 /// - public override ushort MsgId { get; } = 0x8608; + public ushort MsgId => 0x8608; /// /// 查询区域或线路数据 /// - public override string Description => "查询区域或线路数据"; + public string Description => "查询区域或线路数据"; /// /// 查询类型 /// @@ -42,7 +42,7 @@ public class JT808_0x8608 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8608 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8608 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8608 value = new JT808_0x8608(); value.QueryType = reader.ReadByte(); @@ -63,7 +63,7 @@ public JT808_0x8608 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8608 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8608 value, IJT808Config config) { writer.WriteByte(value.QueryType); if(value.Ids!=null && value.Ids.Count > 0) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8700.cs b/src/JT808.Protocol/MessageBody/JT808_0x8700.cs index 6481bacd..7e6a988f 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8700.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8700.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 行驶记录数据采集命令 /// - public class JT808_0x8700 : JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8700 : JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x8700 /// - public override ushort MsgId => 0x8700; + public ushort MsgId => 0x8700; /// /// 行驶记录数据采集命令 /// - public override string Description => "行驶记录数据采集命令"; + public string Description => "行驶记录数据采集命令"; /// /// 命令Id /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8700 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8700 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8700 value = new JT808_0x8700(); value.CommandId = reader.ReadByte(); @@ -68,7 +68,7 @@ public JT808_0x8700 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8700 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8700 value, IJT808Config config) { writer.WriteByte(value.CommandId); if (value.JT808CarDVRDownPackage != default) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8701.cs b/src/JT808.Protocol/MessageBody/JT808_0x8701.cs index 7a1809b4..a21fee6c 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8701.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8701.cs @@ -13,16 +13,16 @@ namespace JT808.Protocol.MessageBody /// /// 行驶记录参数下传命令 /// - public class JT808_0x8701: JT808Bodies, IJT808MessagePackFormatter, IJT808_2019_Version, IJT808Analyze + public class JT808_0x8701: JT808MessagePackFormatter, JT808Bodies, IJT808_2019_Version, IJT808Analyze { /// /// 0x8701 /// - public override ushort MsgId => 0x8701; + public ushort MsgId => 0x8701; /// /// 行驶记录参数下传命令 /// - public override string Description => "行驶记录参数下传命令"; + public string Description => "行驶记录参数下传命令"; /// /// 命令Id /// @@ -54,7 +54,7 @@ public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJ /// /// /// - public JT808_0x8701 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8701 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8701 value = new JT808_0x8701(); value.CommandId = reader.ReadByte(); @@ -67,7 +67,7 @@ public JT808_0x8701 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8701 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8701 value, IJT808Config config) { writer.WriteByte(value.CommandId); JT808CarDVRSerializer.JT808CarDVRDownPackage.Serialize(ref writer, value.JT808CarDVRDownPackage, config); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8702.cs b/src/JT808.Protocol/MessageBody/JT808_0x8702.cs index 9aacbac8..791c709a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8702.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8702.cs @@ -8,14 +8,14 @@ public class JT808_0x8702 : JT808Bodies /// /// 0x8702 /// - public override ushort MsgId { get; } = 0x8702; + public ushort MsgId { get; } = 0x8702; /// /// 上报驾驶员身份信息请求 /// - public override string Description => "上报驾驶员身份信息请求"; + public string Description => "上报驾驶员身份信息请求"; /// /// 跳过数据体序列化 /// - public override bool SkipSerialization { get; set; } = true; + public bool SkipSerialization => true; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8800.cs b/src/JT808.Protocol/MessageBody/JT808_0x8800.cs index 6cc4fc0a..45e47e84 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8800.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8800.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 多媒体数据上传应答 /// 0x8800 /// - public class JT808_0x8800 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8800 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8800 /// - public override ushort MsgId { get; } = 0x8800; + public ushort MsgId => 0x8800; /// /// 多媒体数据上传应答 /// - public override string Description => "多媒体数据上传应答"; + public string Description => "多媒体数据上传应答"; /// /// 多媒体ID /// @@ -40,7 +40,7 @@ public class JT808_0x8800 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8800 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8800 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8800 jT808_0X8800 = new JT808_0x8800(); jT808_0X8800.MultimediaId = reader.ReadUInt32(); @@ -59,7 +59,7 @@ public JT808_0x8800 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8800 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8800 value, IJT808Config config) { writer.WriteUInt32(value.MultimediaId); if (writer.Version == Enums.JT808Version.JTT2011) diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8801.cs b/src/JT808.Protocol/MessageBody/JT808_0x8801.cs index 11b5a43b..b842a7c8 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8801.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8801.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 摄像头立即拍摄命令 /// 0x8801 /// - public class JT808_0x8801 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8801 : JT808MessagePackFormatter, JT808Bodies,IJT808Analyze, IJT808_2019_Version { /// /// 0x8801 /// - public override ushort MsgId { get; } = 0x8801; + public ushort MsgId => 0x8801; /// /// 摄像头立即拍摄命令 /// - public override string Description => "摄像头立即拍摄命令"; + public string Description => "摄像头立即拍摄命令"; /// /// 通道 ID /// @@ -77,7 +77,7 @@ public class JT808_0x8801 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8801 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8801 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8801 jT808_0X8801 = new JT808_0x8801(); jT808_0X8801.ChannelId = reader.ReadByte(); @@ -98,7 +98,7 @@ public JT808_0x8801 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8801 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8801 value, IJT808Config config) { writer.WriteByte(value.ChannelId); writer.WriteUInt16(value.ShootingCommand); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8802.cs b/src/JT808.Protocol/MessageBody/JT808_0x8802.cs index c4177118..6c59c4a6 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8802.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8802.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 存储多媒体数据检索 /// 0x8802 /// - public class JT808_0x8802 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8802 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8802 /// - public override ushort MsgId { get; } = 0x8802; + public ushort MsgId => 0x8802; /// /// 存储多媒体数据检索 /// - public override string Description => "存储多媒体数据检索"; + public string Description => "存储多媒体数据检索"; /// /// 多媒体类型 /// @@ -53,7 +53,7 @@ public class JT808_0x8802 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8802 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8802 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8802 jT808_0X8802 = new JT808_0x8802(); jT808_0X8802.MultimediaType = reader.ReadByte(); @@ -69,7 +69,7 @@ public JT808_0x8802 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8802 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8802 value, IJT808Config config) { writer.WriteByte(value.MultimediaType); writer.WriteByte(value.ChannelId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8803.cs b/src/JT808.Protocol/MessageBody/JT808_0x8803.cs index 41862222..187cee77 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8803.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8803.cs @@ -12,16 +12,16 @@ namespace JT808.Protocol.MessageBody /// 存储多媒体数据上传命令 /// 0x8803 /// - public class JT808_0x8803 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8803 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8803 /// - public override ushort MsgId { get; } = 0x8803; + public ushort MsgId => 0x8803; /// /// 存储多媒体数据上传命令 /// - public override string Description => "存储多媒体数据上传命令"; + public string Description => "存储多媒体数据上传命令"; /// /// 多媒体类型 /// @@ -59,7 +59,7 @@ public class JT808_0x8803 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8803 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8803 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8803 jT808_0X8803 = new JT808_0x8803(); jT808_0X8803.MultimediaType = reader.ReadByte(); @@ -76,7 +76,7 @@ public JT808_0x8803 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8803 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8803 value, IJT808Config config) { writer.WriteByte(value.MultimediaType); writer.WriteByte(value.ChannelId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8804.cs b/src/JT808.Protocol/MessageBody/JT808_0x8804.cs index 88b05965..f97675f3 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8804.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8804.cs @@ -10,16 +10,16 @@ namespace JT808.Protocol.MessageBody /// /// 录音开始命令 /// - public class JT808_0x8804 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8804 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8804 /// - public override ushort MsgId { get; } = 0x8804; + public ushort MsgId => 0x8804; /// /// 录音开始命令 /// - public override string Description => "录音开始命令"; + public string Description => "录音开始命令"; /// /// 录音命令 /// 0:停止录音;0x01:开始录音; @@ -45,7 +45,7 @@ public class JT808_0x8804 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8804 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8804 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8804 jT808_0X8804 = new JT808_0x8804(); jT808_0X8804.RecordCmd = (JT808RecordCmd)reader.ReadByte(); @@ -60,7 +60,7 @@ public JT808_0x8804 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8804 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8804 value, IJT808Config config) { writer.WriteByte((byte)value.RecordCmd); writer.WriteUInt16(value.RecordTime); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8805.cs b/src/JT808.Protocol/MessageBody/JT808_0x8805.cs index 30cf132f..81a1108b 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8805.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8805.cs @@ -10,17 +10,17 @@ namespace JT808.Protocol.MessageBody /// /// 单条存储多媒体数据检索上传命令 /// - public class JT808_0x8805 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8805 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8805 /// - public override ushort MsgId { get; } = 0x8805; + public ushort MsgId => 0x8805; /// /// 单条存储多媒体数据检索上传命令 /// - public override string Description => "单条存储多媒体数据检索上传命令"; + public string Description => "单条存储多媒体数据检索上传命令"; /// /// 多媒体ID /// @@ -36,7 +36,7 @@ public class JT808_0x8805 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8805 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8805 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8805 jT808_0X8805 = new JT808_0x8805(); jT808_0X8805.MultimediaId = reader.ReadUInt32(); @@ -49,7 +49,7 @@ public JT808_0x8805 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8805 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8805 value, IJT808Config config) { writer.WriteUInt32(value.MultimediaId); writer.WriteByte(value.MultimediaDeleted); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8900.cs b/src/JT808.Protocol/MessageBody/JT808_0x8900.cs index bcb70a61..1ae7c3b7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8900.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8900.cs @@ -9,16 +9,16 @@ namespace JT808.Protocol.MessageBody /// /// 数据下行透传 /// - public class JT808_0x8900 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze, IJT808_2019_Version + public class JT808_0x8900 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze, IJT808_2019_Version { /// /// 0x8900 /// - public override ushort MsgId { get; } = 0x8900; + public ushort MsgId => 0x8900; /// /// 数据下行透传 /// - public override string Description => "数据下行透传"; + public string Description => "数据下行透传"; /// /// 透传消息类型 /// 透传消息类型定义见 表 93 @@ -40,13 +40,13 @@ public class JT808_0x8900 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8900 value = new JT808_0x8900(); value.PassthroughType = reader.ReadByte(); if (config.JT808_0x8900_Custom_Factory.Map.TryGetValue(value.PassthroughType, out var instance)) { - value.JT808_0X8900_BodyBase = JT808MessagePackFormatterResolverExtensions.JT808DynamicDeserialize(instance, ref reader, config); + value.JT808_0X8900_BodyBase = instance.DeserializeExt(ref reader, config); } else { @@ -60,19 +60,17 @@ public JT808_0x8900 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8900 value, IJT808Config config) { writer.WriteByte(value.PassthroughType); - if ( value.JT808_0X8900_BodyBase != null ) { - JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize( value.JT808_0X8900_BodyBase, ref writer, value.JT808_0X8900_BodyBase, config ); + value.JT808_0X8900_BodyBase.SerializeExt(ref writer, value.JT808_0X8900_BodyBase, config); } else { writer.WriteArray( value.PassthroughData ); } - } /// /// diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8900_BodyBase.cs b/src/JT808.Protocol/MessageBody/JT808_0x8900_BodyBase.cs index dfcf2630..ae13b9e0 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8900_BodyBase.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8900_BodyBase.cs @@ -3,12 +3,12 @@ /// /// 数据下行透传 /// - public abstract class JT808_0x8900_BodyBase + public interface JT808_0x8900_BodyBase { /// /// 透传消息类型 /// 透传消息类型定义见 表 93 /// - public abstract byte PassthroughType { get; set; } + byte PassthroughType { get; set; } } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8A00.cs b/src/JT808.Protocol/MessageBody/JT808_0x8A00.cs index a114d14a..460f9867 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8A00.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8A00.cs @@ -11,16 +11,16 @@ namespace JT808.Protocol.MessageBody /// 平台RSA公钥 /// 0x8A00 /// - public class JT808_0x8A00 : JT808Bodies, IJT808MessagePackFormatter, IJT808Analyze + public class JT808_0x8A00 : JT808MessagePackFormatter, JT808Bodies, IJT808Analyze { /// /// 0x8A00 /// - public override ushort MsgId { get; } = 0x8A00; + public ushort MsgId => 0x8A00; /// /// 平台RSA公钥 /// - public override string Description => "平台RSA公钥"; + public string Description => "平台RSA公钥"; /// /// e /// 平台 RSA 公钥{e,n}中的 e @@ -37,7 +37,7 @@ public class JT808_0x8A00 : JT808Bodies, IJT808MessagePackFormatter /// /// - public JT808_0x8A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) + public override JT808_0x8A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8A00 jT808_0X8A00 = new JT808_0x8A00(); jT808_0X8A00.E = reader.ReadUInt32(); @@ -50,7 +50,7 @@ public JT808_0x8A00 Deserialize(ref JT808MessagePackReader reader, IJT808Config /// /// /// - public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8A00 value, IJT808Config config) + public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8A00 value, IJT808Config config) { writer.WriteUInt32(value.E); if (value.N.Length != 128)