From 1c6cde6696298568414017c4dd3694dc5c38a9b0 Mon Sep 17 00:00:00 2001 From: capfhz Date: Wed, 20 Oct 2021 22:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8F=82=E6=95=B00x8103?= =?UTF-8?q?=E5=8F=8A=E5=90=84=E5=8F=82=E6=95=B0=E9=A1=B9=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=B9=B6=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 + README.md.bak | 175 - .../MessageBody/JT905_0x0001_Test.cs | 3 + .../MessageBody/JT905_0x8001_Test.cs | 8 +- src/JT905.Protocol/Enums/JT905ISUResult.cs | 1 + src/JT905.Protocol/Enums/JT905MsgId.cs | 2 +- .../Internal/JT905_0x8103_Factory.cs | 8 +- src/JT905.Protocol/JT905.Protocol.xml | 4295 ++++++++++++++++- src/JT905.Protocol/JT905Constants.cs | 164 +- .../MessageBody/JT905_0x0001.cs | 1 + .../MessageBody/JT905_0x8001.cs | 12 +- .../MessageBody/JT905_0x8103.cs | 79 +- .../MessageBody/JT905_0x8103_0x0001.cs | 37 +- .../MessageBody/JT905_0x8103_0x0002.cs | 37 +- .../MessageBody/JT905_0x8103_0x0003.cs | 37 +- .../MessageBody/JT905_0x8103_0x0004.cs | 37 +- .../MessageBody/JT905_0x8103_0x0005.cs | 37 +- .../MessageBody/JT905_0x8103_0x0010.cs | 48 +- .../MessageBody/JT905_0x8103_0x0011.cs | 48 +- .../MessageBody/JT905_0x8103_0x0012.cs | 48 +- .../MessageBody/JT905_0x8103_0x0013.cs | 48 +- .../MessageBody/JT905_0x8103_0x0014.cs | 48 +- .../MessageBody/JT905_0x8103_0x0015.cs | 48 +- .../MessageBody/JT905_0x8103_0x0016.cs | 48 +- .../MessageBody/JT905_0x8103_0x0017.cs | 48 +- .../MessageBody/JT905_0x8103_0x0018.cs | 37 +- .../MessageBody/JT905_0x8103_0x0019.cs | 37 +- .../MessageBody/JT905_0x8103_0x001A.cs | 48 +- .../MessageBody/JT905_0x8103_0x001B.cs | 37 +- .../MessageBody/JT905_0x8103_0x001C.cs | 48 +- .../MessageBody/JT905_0x8103_0x001D.cs | 37 +- .../MessageBody/JT905_0x8103_0x0020.cs | 37 +- .../MessageBody/JT905_0x8103_0x0021.cs | 37 +- .../MessageBody/JT905_0x8103_0x0022.cs | 37 +- .../MessageBody/JT905_0x8103_0x0023.cs | 37 +- .../MessageBody/JT905_0x8103_0x0024.cs | 37 +- .../MessageBody/JT905_0x8103_0x0025.cs | 37 +- .../MessageBody/JT905_0x8103_0x0026.cs | 37 +- .../MessageBody/JT905_0x8103_0x0027.cs | 37 +- .../MessageBody/JT905_0x8103_0x0028.cs | 37 +- .../MessageBody/JT905_0x8103_0x0029.cs | 37 +- .../MessageBody/JT905_0x8103_0x002A.cs | 37 +- .../MessageBody/JT905_0x8103_0x002B.cs | 37 +- .../MessageBody/JT905_0x8103_0x002C.cs | 37 +- .../MessageBody/JT905_0x8103_0x002D.cs | 37 +- .../MessageBody/JT905_0x8103_0x002E.cs | 37 +- .../MessageBody/JT905_0x8103_0x002F.cs | 37 +- .../MessageBody/JT905_0x8103_0x0030.cs | 37 +- .../MessageBody/JT905_0x8103_0x0040.cs | 48 +- .../MessageBody/JT905_0x8103_0x0041.cs | 48 +- .../MessageBody/JT905_0x8103_0x0042.cs | 48 +- .../MessageBody/JT905_0x8103_0x0043.cs | 48 +- .../MessageBody/JT905_0x8103_0x0044.cs | 48 +- .../MessageBody/JT905_0x8103_0x0045.cs | 37 +- .../MessageBody/JT905_0x8103_0x0046.cs | 37 +- .../MessageBody/JT905_0x8103_0x0047.cs | 37 +- .../MessageBody/JT905_0x8103_0x0048.cs | 37 +- .../MessageBody/JT905_0x8103_0x0049.cs | 48 +- .../MessageBody/JT905_0x8103_0x004A.cs | 48 +- .../MessageBody/JT905_0x8103_0x004B.cs | 45 +- .../MessageBody/JT905_0x8103_0x0050.cs | 37 +- .../MessageBody/JT905_0x8103_0x0051.cs | 37 +- .../MessageBody/JT905_0x8103_0x0052.cs | 37 +- .../MessageBody/JT905_0x8103_0x0053.cs | 37 +- .../MessageBody/JT905_0x8103_0x0055.cs | 37 +- .../MessageBody/JT905_0x8103_0x0056.cs | 37 +- .../MessageBody/JT905_0x8103_0x0057.cs | 37 +- .../MessageBody/JT905_0x8103_0x0058.cs | 37 +- .../MessageBody/JT905_0x8103_0x0059.cs | 37 +- .../MessageBody/JT905_0x8103_0x005A.cs | 37 +- .../MessageBody/JT905_0x8103_0x0070.cs | 37 +- .../MessageBody/JT905_0x8103_0x0071.cs | 37 +- .../MessageBody/JT905_0x8103_0x0072.cs | 37 +- .../MessageBody/JT905_0x8103_0x0073.cs | 37 +- .../MessageBody/JT905_0x8103_0x0074.cs | 37 +- .../MessageBody/JT905_0x8103_0x0080.cs | 37 +- .../MessageBody/JT905_0x8103_0x0081.cs | 37 +- .../MessageBody/JT905_0x8103_0x0082.cs | 37 +- .../MessageBody/JT905_0x8103_0x0090.cs | 49 +- .../MessageBody/JT905_0x8103_0x0091.cs | 49 +- .../MessageBody/JT905_0x8103_0x0092.cs | 48 +- .../MessageBody/JT905_0x8103_0x0093.cs | 48 +- .../MessageBody/JT905_0x8103_0x0094.cs | 49 +- .../MessageBody/JT905_0x8103_0x00A0.cs | 45 +- .../MessageBody/JT905_0x8103_0x00A1.cs | 45 +- .../MessageBody/JT905_0x8103_0x00A2.cs | 45 +- .../MessageBody/JT905_0x8103_0x00A3.cs | 45 +- .../MessageBody/JT905_0x8103_0x00AF.cs | 43 +- .../MessageBody/JT905_0x8103_0x00B0.cs | 45 +- .../MessageBody/JT905_0x8103_0x00B1.cs | 48 +- .../MessageBody/JT905_0x8103_0x00B2.cs | 48 +- .../MessageBody/JT905_0x8103_0x00B3.cs | 48 +- .../MessageBody/JT905_0x8103_0x00B4.cs | 48 +- .../MessageBody/JT905_0x8103_0x00B5.cs | 37 +- .../MessageBody/JT905_0x8103_BodyBase.cs | 2 +- 95 files changed, 6240 insertions(+), 1889 deletions(-) delete mode 100644 README.md.bak diff --git a/README.md b/README.md index 0cc5b90..05a0dd0 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,9 @@ Assert.Equal(125, ((JT905_0x0200_0x02)jT905_0x0200.BasicLocationAttachData[JT905 | 序号 | 消息ID | 完成情况 | 测试情况 | 消息体名称 | | :---: | :---: | :---: | :---: | :--- | | 1 | 0x0001 | √ | √ | ISU通用应答 | +| 1 | 0x8001 | √ | √ | 中心通用应答 | | 1 | 0x0002 | √ | √ | ISU心跳 | +| 1 | 0x8103 | √ | √ | 设置参数 | | 2 | 0x0200 | √ | √ | 位置信息汇报 | > todo: diff --git a/README.md.bak b/README.md.bak deleted file mode 100644 index b48b659..0000000 --- a/README.md.bak +++ /dev/null @@ -1,175 +0,0 @@ -# JT905协议 - -[![MIT Licence](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/SmallChi/JT905/blob/main/LICENSE)![.NET Core](https://github.com/SmallChi/JT905/workflows/.NET%20Core/badge.svg?branch=main) - -## 前提条件 - -1. 掌握进制转换:二进制转十六进制; -2. 掌握BCD编码、Hex编码; -3. 掌握各种位移、异或; -4. 掌握常用反射; -5. 掌握JObject的用法; -6. 掌握快速ctrl+c、ctrl+v; -7. 掌握Span\的基本用法 -8. 掌握以上装逼技能,就可以开始搬砖了。 - -## JT905数据结构解析 - -### 数据包[JT905Package] - -| 头标识 | 数据头 | 数据体 | 校验码 | 尾标识 | -| :----: | :---------: | :---------: | :----------: | :----: | -| Begin | JT905Header | JT905Bodies |CheckCode | End | -| 7E | - | - | - | 7E | - -### 数据头[JT905Header] - -| 消息ID | 消息体长度 | ISU标识 | 消息流水号 | -| :---: | :---: | :---: |:---: | -| MsgId | DataLength | ISU | MsgNum | - -#### 消息体属性[JT905Bodies] - -> 根据对应消息ID:MsgId - -***注意:数据内容(除去头和尾标识)进行转义判断*** - -转义规则如下: - -1. 若数据内容中有出现字符 0x7e 的,需替换为字符 0x7d 紧跟字符 0x02; -2. 若数据内容中有出现字符 0x7d 的,需替换为字符 0x7d 紧跟字符 0x01; - -反转义的原因:确认JT905协议的TCP消息边界。 - -### 举个栗子1 - -#### 1.组包: - -> MsgId 0x0200:位置信息汇报 - -``` csharp - -JT905Package JT905Package = new JT905Package(); - -JT905Package.Header = new JT905Header -{ - MsgId = Enums.JT905MsgId.位置信息汇报.ToUInt16Value(), - ManualMsgNum = 126, - ISU = "103456789012" -}; - -JT905_0x0200 JT905_0x0200 = new JT905_0x0200 -{ - AlarmFlag = 1, - GPSTime = DateTime.Parse("2021-10-15 21:10:10"), - Lat = 12222222, - Lng = 132444444, - Speed = 60, - Direction = 0, - StatusFlag = 2, - BasicLocationAttachData = new Dictionary() -}; - -JT905_0x0200.BasicLocationAttachData.Add(JT905Constants.JT905_0x0200_0x01, new JT905_0x0200_0x01 -{ - Mileage = 100 -}); - -JT905_0x0200.BasicLocationAttachData.Add(JT905Constants.JT905_0x0200_0x02, new JT905_0x0200_0x02 -{ - Oil = 125 -}); - -JT905Package.Bodies = JT905_0x0200; - -byte[] data = JT905Serializer.Serialize(JT905Package); - -var hex = data.ToHexString(); - -// 输出结果Hex: -// 7E02000023103456789012007D02000000010000000200BA7F0E07E4F11C003C002110152110100104000000640202007D01347E -``` - -#### 2.手动解包: - -``` csharp -1.原包: -7E 02 00 00 23 10 34 56 78 90 12 00 (7D 02) 00 00 00 01 00 00 00 02 00 BA 7F 0E 07 E4 F1 1C 00 3C 00 21 10 15 21 10 10 01 04 00 00 00 64 02 02 00 (7D 01) 34 7E - -2.进行反转义 -7D 02 ->7E -7D 01 ->7D -反转义后 -7E 02 00 00 23 10 34 56 78 90 12 00 7E 00 00 00 01 00 00 00 02 00 BA 7F 0E 07 E4 F1 1C 00 3C 00 21 10 15 21 10 10 01 04 00 00 00 64 02 02 00 7D 34 7E - -3.拆解 -7E --头标识 -02 00 --数据头->消息ID -00 23 --数据头->消息体属性 -10 34 56 78 90 12 --数据头->终端手机号 -00 7E --数据头->消息流水号 -00 00 00 01 --消息体->报警标志 -00 00 00 02 --消息体->状态位标志 -00 BA 7F 0E --消息体->纬度 -07 E4 F1 1C --消息体->经度 -00 3C --消息体->速度 -00 --消息体->方向 -21 10 15 21 10 10 --消息体->GPS时间 -01 --消息体->附加信息->里程 -04 --消息体->附加信息->长度 -00 00 00 64 --消息体->附加信息->数据 -02 --消息体->附加信息->油量 -02 --消息体->附加信息->长度 -00 7D --消息体->附加信息->数据 -34 --检验码 -7E --尾标识 -``` - -#### 3.程序解包: - -``` csharp -//1.转成byte数组 -byte[] bytes = "7E02000023103456789012007D02000000010000000200BA7F0E07E4F11C003C002110152110100104000000640202007D01347E".ToHexBytes(); - -//2.将数组反序列化 -var jT905Package = JT905Serializer.Deserialize(bytes); - -//3.数据包头 -Assert.Equal(Enums.JT905MsgId.位置信息汇报.ToValue(), jT905Package.Header.MsgId); -Assert.Equal(0x23, jT905Package.Header.DataLength); -Assert.Equal(126, jT905Package.Header.MsgNum); -Assert.Equal("103456789012", jT905Package.Header.ISU); - -//4.数据包体 -JT905_0x0200 jT905_0x0200 = (JT905_0x0200)jT905Package.Bodies; -Assert.Equal((uint)1, jT905_0x0200.AlarmFlag); -Assert.Equal(DateTime.Parse("2021-10-15 21:10:10"), jT905_0x0200.GPSTime); -Assert.Equal(12222222, jT905_0x0200.Lat); -Assert.Equal(132444444, jT905_0x0200.Lng); -Assert.Equal(60, jT905_0x0200.Speed); -Assert.Equal(0, jT905_0x0200.Direction); -Assert.Equal((uint)2, jT905_0x0200.StatusFlag); -//4.1.附加信息1 -Assert.Equal(100, ((JT905_0x0200_0x01)jT905_0x0200.BasicLocationAttachData[JT905Constants.JT905_0x0200_0x01]).Mileage); -//4.2.附加信息2 -Assert.Equal(125, ((JT905_0x0200_0x02)jT905_0x0200.BasicLocationAttachData[JT905Constants.JT905_0x0200_0x02]).Oil); -``` - -## NuGet安装 - -| Package Name| Version| Preview Version |Downloads|Remark| -| --- | --- | --- | ---| --- | -| Install-Package JT905 | ![JT905](https://img.shields.io/nuget/v/JT905.svg) | ![JT905](https://img.shields.io/nuget/vpre/JT905.svg)|![JT905](https://img.shields.io/nuget/dt/JT905.svg) |JT905| - -## 使用BenchmarkDotNet性能测试报告(只是玩玩,不能当真) - -> todo: - - -## JT905终端通讯协议消息对照表 - -| 序号 | 消息ID | 完成情况 | 测试情况 | 消息体名称 | -| :---: | :---: | :---: | :---: | :--- | -| 1 | 0x0200 | √ | X | 位置信息汇报 | - -> todo: diff --git a/src/JT905.Protocol.Test/MessageBody/JT905_0x0001_Test.cs b/src/JT905.Protocol.Test/MessageBody/JT905_0x0001_Test.cs index bb9bdba..50daa11 100644 --- a/src/JT905.Protocol.Test/MessageBody/JT905_0x0001_Test.cs +++ b/src/JT905.Protocol.Test/MessageBody/JT905_0x0001_Test.cs @@ -23,6 +23,9 @@ public JT905_0x0001_Test() [Fact] public void Test1() { + System.Int32 i = new int(); + Type type = i.GetType(); + JT905.Protocol.JT905Package package = new JT905Package { Header = new JT905Header { diff --git a/src/JT905.Protocol.Test/MessageBody/JT905_0x8001_Test.cs b/src/JT905.Protocol.Test/MessageBody/JT905_0x8001_Test.cs index 8ff59ef..6f2606a 100644 --- a/src/JT905.Protocol.Test/MessageBody/JT905_0x8001_Test.cs +++ b/src/JT905.Protocol.Test/MessageBody/JT905_0x8001_Test.cs @@ -20,8 +20,8 @@ public void Test1() }, Bodies = new JT905_0x8001 { - ReplyMsgId = Enums.JT905MsgId.浣嶇疆淇℃伅姹囨姤.ToUInt16Value(), - ISUResult = Enums.JT905ISUResult.Success, + AckMsgId = Enums.JT905MsgId.浣嶇疆淇℃伅姹囨姤.ToUInt16Value(), + PlatformResult = Enums.JT905PlatformResult.Success, ReplyMsgNum = 100 } }; @@ -49,9 +49,9 @@ public void Test2() Assert.Equal("12345678900", JT905Package.Header.ISU); JT905_0x8001 JT905Bodies = (JT905_0x8001)JT905Package.Bodies; - Assert.Equal(Enums.JT905MsgId.浣嶇疆淇℃伅姹囨姤.ToUInt16Value(), JT905Bodies.ReplyMsgId); + Assert.Equal(Enums.JT905MsgId.浣嶇疆淇℃伅姹囨姤.ToUInt16Value(), JT905Bodies.AckMsgId); Assert.Equal(100, JT905Bodies.ReplyMsgNum); - Assert.Equal(Enums.JT905ISUResult.Success, JT905Bodies.ISUResult); + Assert.Equal(Enums.JT905PlatformResult.Success, JT905Bodies.PlatformResult); } [Fact] diff --git a/src/JT905.Protocol/Enums/JT905ISUResult.cs b/src/JT905.Protocol/Enums/JT905ISUResult.cs index b32d3cf..18077a0 100644 --- a/src/JT905.Protocol/Enums/JT905ISUResult.cs +++ b/src/JT905.Protocol/Enums/JT905ISUResult.cs @@ -22,4 +22,5 @@ public enum JT905ISUResult :byte /// MessageError = 0x02, } + } diff --git a/src/JT905.Protocol/Enums/JT905MsgId.cs b/src/JT905.Protocol/Enums/JT905MsgId.cs index 2cc02de..c308578 100644 --- a/src/JT905.Protocol/Enums/JT905MsgId.cs +++ b/src/JT905.Protocol/Enums/JT905MsgId.cs @@ -49,7 +49,7 @@ public enum JT905MsgId : ushort /// 璁剧疆缁堢鍙傛暟 /// 0x8103 /// - 璁剧疆缁堢鍙傛暟 = 0x8103, + 璁剧疆鍙傛暟 = 0x8103, /// /// 鏌ヨ缁堢鍙傛暟 /// 0x8104 diff --git a/src/JT905.Protocol/Internal/JT905_0x8103_Factory.cs b/src/JT905.Protocol/Internal/JT905_0x8103_Factory.cs index 071efcb..d9e55bd 100644 --- a/src/JT905.Protocol/Internal/JT905_0x8103_Factory.cs +++ b/src/JT905.Protocol/Internal/JT905_0x8103_Factory.cs @@ -13,6 +13,7 @@ class JT905_0x8103_Factory : IJT905_0x8103_Factory public JT905_0x8103_Factory() { Map = new Dictionary(); + InitMap(Assembly.GetExecutingAssembly()); //Map.Add(JT905Constants.JT905_0x8103_0x0001, new JT905_0x8103_0x0001()); //Map.Add(JT905Constants.JT905_0x8103_0x0002, new JT905_0x8103_0x0002()); //Map.Add(JT905Constants.JT905_0x8103_0x0003, new JT905_0x8103_0x0003()); @@ -100,6 +101,11 @@ public JT905_0x8103_Factory() public IDictionary Map { get; } public void Register(Assembly externalAssembly) + { + InitMap(externalAssembly); + } + + private void InitMap(Assembly externalAssembly) { var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT905_0x8103_BodyBase)).ToList(); foreach (var type in types) @@ -108,7 +114,7 @@ public void Register(Assembly externalAssembly) uint paramId = 0; try { - paramId = (uint)type.GetProperty(nameof(JT905_0x8103_BodyBase.ParamId)).GetValue(instance); + paramId = (ushort)type.GetProperty(nameof(JT905_0x8103_BodyBase.ParamId)).GetValue(instance); } catch { diff --git a/src/JT905.Protocol/JT905.Protocol.xml b/src/JT905.Protocol/JT905.Protocol.xml index a90fdac..4b31fb6 100644 --- a/src/JT905.Protocol/JT905.Protocol.xml +++ b/src/JT905.Protocol/JT905.Protocol.xml @@ -61,24 +61,43 @@ 缁忕含搴﹂敊璇 + + + ISU搴旂瓟缁撴灉 + + + + + 鎴愬姛/纭 + + + + + 澶辫触 + + + + + 娑堟伅鏈夎 + + JT905娑堟伅 - + - 缁堢閫氱敤搴旂瓟 - 0x0001 + ISU閫氱敤搴旂瓟 - + 骞冲彴閫氱敤搴旂瓟 0x8001 - + 缁堢蹇冭烦 0x0002 @@ -114,7 +133,7 @@ 0x0102 - + 璁剧疆缁堢鍙傛暟 0x8103 @@ -492,6 +511,32 @@ 0x0802 + + + 涓婄彮绛惧埌淇℃伅 + 0x0B03 + + + + + 涓績閫氱敤搴旂瓟缁撴灉 + + + + + 鎴愬姛/纭 + + + + + 澶辫触 + + + + + 娑堟伅鏈夎 + + JT905鐗堟湰鍙 @@ -1457,117 +1502,74 @@ + 閲岀▼锛孶INT32锛0. 1km锛屽搴旇溅涓婇噷绋嬭〃璇绘暟 JT905_0x0200_0x01 + 娌归噺锛孶INT16锛0. 1L锛屽搴旇溅涓婃补閲忚〃璇绘暟 JT905_0x0200_0x02 + 娴锋嫈楂樺害锛孖NT16锛屽崟浣嶄负绫(m) JT905_0x0200_0x03 - - - JT905_0x0200_0x04 - - - - - JT905_0x0200_0x05 - - - - - JT905_0x0200_0x06 - - - - - JT905_0x0200_0x07 - - + 瓒呴熸姤璀﹂檮鍔犱俊鎭 JT905_0x0200_0x11 + 杩涘嚭鍖哄煙/璺嚎鎶ヨ闄勫姞淇℃伅 JT905_0x0200_0x12 + 璺琛岄┒鏃堕棿涓嶈冻 / 杩囬暱鎶ヨ闄勫姞淇℃伅 JT905_0x0200_0x13 - JT905_0x0200_0x25 - - - - - JT905_0x0200_0x2A - - - - - JT905_0x0200_0x2B - - - - - JT905_0x0200_0x30 - - - - - JT905_0x0200_0x31 + 绂佽璺琛岄┒鎶ヨ闄勫姞淇℃伅 + JT905_0x0200_0x14 - 缁堢蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹锛坰锛 + ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) - TCP 娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉掞紙s锛 + TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - TCP 娑堟伅閲嶄紶娆℃暟 + TCP娑堟伅閲嶄紶娆℃暟 - UDP 娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉掞紙s锛 + SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - UDP 娑堟伅閲嶄紶娆℃暟 - - - - - SMS 娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉掞紙s锛 - - - - - SMS 娑堟伅閲嶄紶娆℃暟 + SMS娑堟伅閲嶄紶娆℃暟 - 涓绘湇鍔″櫒 APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐广傝嫢缃戠粶鍒跺紡涓 CDMA锛屽垯璇ュ涓篜PP 鎷ㄥ彿鍙风爜 + 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 @@ -1582,12 +1584,12 @@ - 涓绘湇鍔″櫒鍦板潃,IP 鎴栧煙鍚 + 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - 涓绘湇鍔″櫒鍦板潃,IP 鎴栧煙鍚 + 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 @@ -1602,371 +1604,352 @@ - 澶囦唤鏈嶅姟鍣ㄥ湴鍧,IP 鎴栧煙鍚 + 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - 鏈嶅姟鍣 TCP 绔彛 + 涓绘湇鍔″櫒TCP绔彛 - 鏈嶅姟鍣 UDP 绔彛 + 澶囦唤鏈嶅姟鍣═CP绔彛 - 閬撹矾杩愯緭璇 IC 鍗¤璇佷富鏈嶅姟鍣 IP 鍦板潃鎴栧煙鍚 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - 閬撹矾杩愯緭璇 IC 鍗¤璇佷富鏈嶅姟鍣 TCP 绔彛 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 - 閬撹矾杩愯緭璇 IC 鍗¤璇佷富鏈嶅姟鍣 UDP 绔彛 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - 閬撹矾杩愯緭璇 IC 鍗¤璇佸浠芥湇鍔″櫒 IP 鍦板潃鎴栧煙鍚嶏紝绔彛鍚屼富鏈嶅姟鍣 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 - 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃跺拰瀹氳窛姹囨姤 + 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 - 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹 ACC 鐘舵侊紱 1锛氭牴鎹櫥褰曠姸鎬佸拰 ACC 鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁 ACC 鐘舵 + 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 - 椹鹃┒鍛樻湭鐧诲綍姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉掞紙s锛夛紝>0 + 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + + + + + ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹锛坰锛夛紝>0 + 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉掞紙s锛夛紝>0 + 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - 缂虹渷鏃堕棿姹囨姤闂撮殧锛屽崟浣嶄负绉掞紙s锛夛紝>0 + 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - + - 缂虹渷璺濈姹囨姤闂撮殧锛屽崟浣嶄负绫筹紙m锛夛紝>0 + ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - + - 椹鹃┒鍛樻湭鐧诲綍姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫筹紙m锛夛紝>0 + ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - + - 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背锛坢锛夛紝>0 + 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - + - 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫筹紙m锛>0 + 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - + - 鎷愮偣琛ヤ紶瑙掑害灏忎簬180 + 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - + - 鐢靛瓙鍥存爮鍗婂緞锛堥潪娉曚綅绉婚槇鍊硷級锛屽崟浣嶄负绫 + 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - + - 鐢靛瓙鍥存爮鍗婂緞锛堥潪娉曚綅绉婚槇鍊硷級锛屽崟浣嶄负绫 + 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 - 鐩戞帶骞冲彴鐢佃瘽鍙风爜 + 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 - 澶嶄綅鐢佃瘽鍙风爜锛屽彲閲囩敤姝ょ數璇濆彿鐮佹嫧鎵撶粓绔數璇濊缁堢澶嶄綅 + 澶嶄綅鐢佃瘽鍙风爜 - 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜锛屽彲閲囩敤姝ょ數璇濆彿鐮佹嫧鎵撶粓绔數璇濊缁堢鎭㈠鍑哄巶璁剧疆 + 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 - 鐩戞帶骞冲彴 SMS 鐢佃瘽鍙风爜 + 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 - 鎺ユ敹缁堢 SMS 鏂囨湰鎶ヨ鍙风爜 + 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 - 缁堢鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CC ON 鏃惰嚜鍔ㄦ帴鍚紝OFF 鏃舵墜鍔ㄦ帴鍚 + ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 - 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉掞紙s锛夛紝0 涓轰笉鍏佽閫氳瘽锛0xFFFFFFFF 涓轰笉闄愬埗 + 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉掞紙s锛夛紝0 涓轰笉鍏佽閫氳瘽锛0xFFFFFFFF 涓轰笉闄愬埗 + 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - 鐩戝惉鐢佃瘽鍙风爜 + 鐢佃瘽鐭彿闀垮害 - 鐩戠骞冲彴鐗规潈鐭俊鍙风爜 + 鐩戝惉鐢佃瘽鍙风爜 + + + + + ISU璁惧缁存姢瀵嗙爜 + + + + + ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) - 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓 1鍒欑浉搴旀姤璀﹁灞忚斀 + 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 - 鎶ヨ鍙戦佹枃鏈 SMS 寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓 1 鍒欑浉搴旀姤璀︽椂鍙戦佹枃鏈 SMS + 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS - 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1 鍒欑浉搴旀姤璀︽椂鎽勫儚澶存媿鎽 + 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 - 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负 1 鍒欏鐩稿簲鎶ヨ鏃舵媿鐨勭収鐗囪繘琛屽瓨鍌紝鍚﹀垯瀹炴椂涓婁紶 - - - - - 鍏抽敭鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负 1 鍒欏鐩稿簲鎶ヨ涓哄叧閿姤璀 + 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 - 鏈楂橀熷害锛屽崟浣嶄负鍏噷姣忓皬鏃讹紙km/h锛 + 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) - 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹锛坰锛 + 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) - 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉掞紙s锛 + 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉掞紙s锛 + 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) - 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹锛坰锛 + 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) - 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹锛坰锛 - - - - - 瓒呴熸姤璀﹂璀﹀樊鍊硷紝鍗曚綅涓 1/10Km/h - - - - - 鐤插姵椹鹃┒棰勮宸硷紝鍗曚綅涓虹锛坰锛夛紝>0 - - - - - 纰版挒鎶ヨ鍙傛暟璁剧疆 - b7-b0锛 纰版挒鏃堕棿锛屽崟浣 4ms锛 - b15-b8锛氱鎾炲姞閫熷害锛屽崟浣 0.1g锛岃缃寖鍥村湪锛0-79 涔嬮棿锛岄粯璁や负10銆 + 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - + - 渚х炕鎶ヨ鍙傛暟璁剧疆锛 - 渚х炕瑙掑害锛屽崟浣 1 搴︼紝榛樿涓 30 搴 + 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 - + - 瀹氭椂鎷嶇収鎺у埗锛岃 琛 13 + 浜害锛0锝255 - + - 瀹氳窛鎷嶇収鎺у埗锛岃 琛 14 + 瀵规瘮搴︼紝0锝127 - + - 鍥惧儚/瑙嗛璐ㄩ噺锛1-10锛1 鏈濂 + 楗卞拰搴︼紝0锝127 - + - 浜害锛0-255 + 鑹插害锛0锝255 - + - 瀵规瘮搴︼紝0-127 + 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km - + - 楗卞拰搴︼紝0-127 + 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 - + - 鑹插害锛0-255 + 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 - + - 杞﹁締閲岀▼琛ㄨ鏁帮紝1/10km + 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 - + - 杞﹁締鎵鍦ㄧ殑鐪佸煙 ID + 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 - + - 杞﹁締鎵鍦ㄧ殑甯傚煙 ID + 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 - + - 鍏畨浜ら氱鐞嗛儴闂ㄩ鍙戠殑鏈哄姩杞﹀彿鐗 + 鍑虹杞︿紒涓氱畝绉 - + - 杞︾墝棰滆壊锛屾寜鐓 JT/T415-2006 鐨 5.4.12 + 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) - + - GNSS 瀹氫綅妯″紡锛屽畾涔夊涓嬶細 - bit0锛0锛氱鐢 GPS 瀹氫綅锛 1锛氬惎鐢 GPS 瀹氫綅锛 - bit1锛0锛氱鐢ㄥ寳鏂楀畾浣嶏紝 1锛氬惎鐢ㄥ寳鏂楀畾浣嶏紱 - bit2锛0锛氱鐢 GLONASS 瀹氫綅锛 1锛氬惎鐢 GLONASS 瀹氫綅锛 - bit3锛0锛氱鐢 Galileo 瀹氫綅锛 1锛氬惎鐢 Galileo 瀹氫綅銆 + ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) - + - GNSS 娉㈢壒鐜囷紝瀹氫箟濡備笅锛 - 0x00锛4800锛0x01锛9600锛 - 0x02锛19200锛0x03锛38400锛 - 0x04锛57600锛0x05锛115200銆 + ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) - + - GNSS 妯″潡璇︾粏瀹氫綅鏁版嵁杈撳嚭棰戠巼锛屽畾涔夊涓嬶細 - 0x00锛500ms锛0x01锛1000ms锛堥粯璁ゅ硷級锛 - 0x02锛2000ms锛0x03锛3000ms锛 - 0x04锛4000ms銆 + 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) - + - GNSS 妯″潡璇︾粏瀹氫綅鏁版嵁閲囬泦棰戠巼锛屽崟浣嶄负绉掞紝榛樿涓 1銆 + LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - + - GNSS 妯″潡璇︾粏瀹氫綅鏁版嵁涓婁紶鏂瑰紡 - 0x00锛屾湰鍦板瓨鍌紝涓嶄笂浼狅紙榛樿鍊硷級锛 - 0x01锛屾寜鏃堕棿闂撮殧涓婁紶锛 - 0x02锛屾寜璺濈闂撮殧涓婁紶锛 - 0x0B锛屾寜绱鏃堕棿涓婁紶锛岃揪鍒颁紶杈撴椂闂村悗鑷姩鍋滄涓婁紶锛 - 0x0C锛屾寜绱璺濈涓婁紶锛岃揪鍒拌窛绂诲悗鑷姩鍋滄涓婁紶锛 - 0x0D锛屾寜绱鏉℃暟涓婁紶锛岃揪鍒颁笂浼犳潯鏁板悗鑷姩鍋滄涓婁紶銆 + ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) - + - GNSS 妯″潡璇︾粏瀹氫綅鏁版嵁涓婁紶璁剧疆锛 - 涓婁紶鏂瑰紡涓 0x01 鏃讹紝鍗曚綅涓虹锛 - 涓婁紶鏂瑰紡涓 0x02 鏃讹紝鍗曚綅涓虹背锛 - 涓婁紶鏂瑰紡涓 0x0B 鏃讹紝鍗曚綅涓虹锛 - 涓婁紶鏂瑰紡涓 0x0C 鏃讹紝鍗曚綅涓虹背锛 - 涓婁紶鏂瑰紡涓 0x0D 鏃讹紝鍗曚綅涓烘潯銆 + 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP - + - CAN 鎬荤嚎閫氶亾 1 閲囬泦鏃堕棿闂撮殧(ms)锛0 琛ㄧず涓嶉噰闆 + 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - + - CAN 鎬荤嚎閫氶亾 1 涓婁紶鏃堕棿闂撮殧(s)锛0 琛ㄧず涓嶄笂浼 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - + - CAN 鎬荤嚎閫氶亾 2 閲囬泦鏃堕棿闂撮殧(ms)锛0 琛ㄧず涓嶉噰闆 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - + - CAN 鎬荤嚎閫氶亾 2 涓婁紶鏃堕棿闂撮殧(s)锛0 琛ㄧず涓嶄笂浼 + 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - + - CAN 鎬荤嚎 ID 鍗曠嫭閲囬泦璁剧疆锛 - bit63-bit32 琛ㄧず姝 ID 閲囬泦鏃堕棿闂撮殧(ms)锛0 琛ㄧず涓嶉噰闆嗭紱 - bit31 琛ㄧず CAN 閫氶亾鍙凤紝0锛欳AN1锛1锛欳AN2锛 - bit30 琛ㄧず甯х被鍨嬶紝0锛氭爣鍑嗗抚锛1锛氭墿灞曞抚锛 - bit29 琛ㄧず鏁版嵁閲囬泦鏂瑰紡锛0锛氬師濮嬫暟鎹紝1锛氶噰闆嗗尯闂寸殑璁$畻鍊硷紱 - bit28-bit0 琛ㄧず CAN 鎬荤嚎 ID銆 + 瑙嗛鏈嶅姟鍣ㄧ鍙 @@ -2348,6 +2331,64 @@ + + + ISU閫氱敤搴旂瓟 + + + + + 搴旂瓟娴佹按鍙 + 瀵瑰簲鐨勫钩鍙版秷鎭殑娴佹按鍙 + + + + + 搴旂瓟 ID + 瀵瑰簲鐨勫钩鍙版秷鎭殑 ID + + + + + + 缁撴灉 + 0锛氭垚鍔/纭锛1锛氬け璐ワ紱2锛氭秷鎭湁璇紱 + + + + + 0x0100瑙f瀽 + + + + + + + + 0x0100鍙嶅簭鍒楀寲 + + + + + + + + 0x0100搴忓垪鍖 + + + + + + + + ISU蹇冭烦 + + + + + 璺宠繃鏁版嵁浣撳簭鍒楀寲 + + 浣嶇疆淇℃伅姹囨姤 @@ -2709,20 +2750,69 @@ - + 瑙f瀽涓婄彮绛惧埌淇℃伅 + 0x0B03 + + JT905娑堟伅璇诲彇鍣 + UTF-8 缂栫爜 JSON 鍦ㄤ笉浣跨敤缂撳瓨鐨勬儏鍐典笅鎸夐『搴忓啓鍏ユ枃鏈 + JT905鎺ュ彛閰嶇疆 + + + + 鍙嶅簭鍒楀寲111 + + + + + + + + 涓績閫氱敤搴旂瓟 + + + + + 搴旂瓟娴佹按鍙 + 瀵瑰簲鐨勫钩鍙版秷鎭殑娴佹按鍙 + + + + + 搴旂瓟 ID + 瀵瑰簲鐨勫钩鍙版秷鎭殑 ID + + + + + + 缁撴灉 + 0锛氭垚鍔/纭锛1锛氬け璐ワ紱2锛氭秷鎭湁璇紱 + + + + + 0x0100瑙f瀽 - + - 鍙嶅簭鍒楀寲11 + 0x0100鍙嶅簭鍒楀寲 + + + 0x0100搴忓垪鍖 + + + + + 璁剧疆缁堢鍙傛暟 @@ -2755,7 +2845,7 @@ - + 0x8103鍙嶅簭鍒楀寲 @@ -2763,7 +2853,7 @@ - + 0x8103搴忓垪鍖 @@ -2771,100 +2861,3790 @@ - + 0x8103瑙f瀽鎴怞SON - + - 缁堢鍙傛暟璁剧疆 + ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + 0x8103_=0x0001 - + + + Int32 + System.Int32 + 0x0001 + + + - 鍙傛暟 ID + 鏁版嵁闀垮害 + 4 byte - + - 鍙傛暟闀垮害 + ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) - + - 鑷畾涔夌粓绔弬鏁拌缃 + 瑙f瀽鏁版嵁 + ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0001 + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 - + - 鍙傛暟 ID + 娑堟伅鍙嶅簭鍒楀寲 + ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0001 + + + - + + - 鍙傛暟闀垮害 + TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_=0x0002 - + + + Int32 + System.Int32 + 0x0002 + + + - JT905娑堟伅璇诲彇鍣 + 鏁版嵁闀垮害 + 4 byte - + - 璇诲彇buffer + TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - + - 鍘熸暟鎹 + 瑙f瀽鏁版嵁 + TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0002 + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 - + - 璇诲彇鍒扮殑鏁伴噺 + 娑堟伅鍙嶅簭鍒楀寲 + TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0002 + + + - + + - JT905鐗堟湰鍙 + TCP娑堟伅閲嶄紶娆℃暟 + 0x8103_=0x0003 - + + + Int32 + System.Int32 + 0x0003 + + + - 鏄惁杩涜瑙g爜鎿嶄綔 - 鑻ヨ繘琛岃В鐮佹搷浣滐紝鍒欏搴旂殑鏄竴涓甯哥殑鍖 - 鑻ヤ笉杩涜瑙g爜鎿嶄綔锛屽垯瀵瑰簲鐨勬槸涓涓潪姝e父鐨勫寘锛堝ご閮ㄥ寘锛屾暟鎹綋鍖呯瓑绛夛級 - 涓昏鐢ㄦ潵涓娆℃ц鍙栨墍鏈夋暟鎹綋鍐呭鎿嶄綔 + 鏁版嵁闀垮害 + 4 byte - + - 瑙g爜锛堣浆涔夎繕鍘燂級,璁$畻鏍¢獙鍜 + TCP娑堟伅閲嶄紶娆℃暟 - - 榛樿JT905Version.JTT2014 - + - 鍦ㄨВ鐮佺殑鏃跺欐妸鏍¢獙鍜屼篃璁$畻鍑烘潵锛岄伩鍏嶅湪寰幆涓娆¤繘琛屾牎楠 + 瑙f瀽鏁版嵁 + TCP娑堟伅閲嶄紶娆℃暟 + 0x8103_0x0003 - + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 - + - 鍦ㄨВ鐮佺殑鏃跺欐妸鏍¢獙鍜屼篃璁$畻鍑烘潵锛岄伩鍏嶅湪寰幆涓娆¤繘琛屾牎楠 + 娑堟伅鍙嶅簭鍒楀寲 + TCP娑堟伅閲嶄紶娆℃暟 + 0x8103_0x0003 + + - + + - 璁$畻鐨勬牎楠岀爜 + SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_=0x0004 - + + + Int32 + System.Int32 + 0x0004 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0004 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0004 + + + + + + + + + SMS娑堟伅閲嶄紶娆℃暟 + 0x8103_=0x0005 + + + + + Int32 + System.Int32 + 0x0005 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + SMS娑堟伅閲嶄紶娆℃暟 + + + + + 瑙f瀽鏁版嵁 + SMS娑堟伅閲嶄紶娆℃暟 + 0x8103_0x0005 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + SMS娑堟伅閲嶄紶娆℃暟 + 0x8103_0x0005 + + + + + + + + + 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_=0x0010 + + + + + AnsiString + System.String + 0x0010 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + + + + + 瑙f瀽鏁版嵁 + 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x0010 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x0010 + + + + + + + + + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_=0x0011 + + + + + AnsiString + System.String + 0x0011 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + + + + + 瑙f瀽鏁版嵁 + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x0011 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x0011 + + + + + + + + + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_=0x0012 + + + + + AnsiString + System.String + 0x0012 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + + + + + 瑙f瀽鏁版嵁 + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x0012 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x0012 + + + + + + + + + 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_=0x0013 + + + + + AnsiString + System.String + 0x0013 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + + + + + 瑙f瀽鏁版嵁 + 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_0x0013 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_0x0013 + + + + + + + + + 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_=0x0014 + + + + + AnsiString + System.String + 0x0014 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + + + + + 瑙f瀽鏁版嵁 + 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x0014 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x0014 + + + + + + + + + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_=0x0015 + + + + + AnsiString + System.String + 0x0015 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + + + + + 瑙f瀽鏁版嵁 + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x0015 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x0015 + + + + + + + + + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_=0x0016 + + + + + AnsiString + System.String + 0x0016 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + + + + + 瑙f瀽鏁版嵁 + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x0016 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x0016 + + + + + + + + + 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_=0x0017 + + + + + AnsiString + System.String + 0x0017 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + + + + + 瑙f瀽鏁版嵁 + 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x0017 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x0017 + + + + + + + + + 涓绘湇鍔″櫒TCP绔彛 + 0x8103_=0x0018 + + + + + Int32 + System.Int32 + 0x0018 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓绘湇鍔″櫒TCP绔彛 + + + + + 瑙f瀽鏁版嵁 + 涓绘湇鍔″櫒TCP绔彛 + 0x8103_0x0018 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓绘湇鍔″櫒TCP绔彛 + 0x8103_0x0018 + + + + + + + + + 澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_=0x0019 + + + + + Int32 + System.Int32 + 0x0019 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶囦唤鏈嶅姟鍣═CP绔彛 + + + + + 瑙f瀽鏁版嵁 + 澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_0x0019 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_0x0019 + + + + + + + + + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_=0x001A + + + + + AnsiString + System.String + 0x001A + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + + + + + 瑙f瀽鏁版嵁 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_0x001A + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + 0x8103_0x001A + + + + + + + + + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + 0x8103_=0x001B + + + + + Int32 + System.Int32 + 0x001B + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + + + + + 瑙f瀽鏁版嵁 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + 0x8103_0x001B + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + 0x8103_0x001B + + + + + + + + + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_=0x001C + + + + + AnsiString + System.String + 0x001C + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + + + + + 瑙f瀽鏁版嵁 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x001C + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x001C + + + + + + + + + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_=0x001D + + + + + Int32 + System.Int32 + 0x001D + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + + + + + 瑙f瀽鏁版嵁 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_0x001D + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + 0x8103_0x001D + + + + + + + + + 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + 0x8103_=0x0020 + + + + + Int32 + System.Int32 + 0x0020 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + + + + + 瑙f瀽鏁版嵁 + 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + 0x8103_0x0020 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + 0x8103_0x0020 + + + + + + + + + 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + 0x8103_=0x0021 + + + + + Int32 + System.Int32 + 0x0021 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + + + + + 瑙f瀽鏁版嵁 + 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + 0x8103_0x0021 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + 0x8103_0x0021 + + + + + + + + + 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_=0x0022 + + + + + Int32 + System.Int32 + 0x0022 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + + + + + 瑙f瀽鏁版嵁 + 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0022 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0022 + + + + + + + + + ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x0023 + + + + + Int32 + System.Int32 + 0x0023 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0023 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0023 + + + + + + + + + ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x0024 + + + + + Int32 + System.Int32 + 0x0024 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0024 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0024 + + + + + + + + + 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x0025 + + + + + Int32 + System.Int32 + 0x0025 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0025 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0025 + + + + + + + + + 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x0026 + + + + + Int32 + System.Int32 + 0x0026 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0026 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0026 + + + + + + + + + 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_=0x0027 + + + + + Int32 + System.Int32 + 0x0027 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + + + + + 瑙f瀽鏁版嵁 + 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0027 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + 0x8103_0x0027 + + + + + + + + + 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x0028 + + + + + Int32 + System.Int32 + 0x0028 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0028 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x0028 + + + + + + + + + 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_=0x0029 + + + + + Int32 + System.Int32 + 0x0029 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + + + + + 瑙f瀽鏁版嵁 + 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_0x0029 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_0x0029 + + + + + + + + + ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_=0x002A + + + + + Int32 + System.Int32 + 0x002A + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + + + + + 瑙f瀽鏁版嵁 + ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002A + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002A + + + + + + + + + ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_=0x002B + + + + + Int32 + System.Int32 + 0x002B + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + + + + + 瑙f瀽鏁版嵁 + ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002B + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002B + + + + + + + + + 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_=0x002C + + + + + Int32 + System.Int32 + 0x002C + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + + + + + 瑙f瀽鏁版嵁 + 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002C + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002C + + + + + + + + + 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_=0x002D + + + + + Int32 + System.Int32 + 0x002D + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + + + + + 瑙f瀽鏁版嵁 + 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002D + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002D + + + + + + + + + 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_=0x002E + + + + + Int32 + System.Int32 + 0x002E + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + + + + + 瑙f瀽鏁版嵁 + 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_0x002E + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + 0x8103_0x002E + + + + + + + + + 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_=0x002F + + + + + Int32 + System.Int32 + 0x002F + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + + + + + 瑙f瀽鏁版嵁 + 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002F + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + 0x8103_0x002F + + + + + + + + + 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + 0x8103_=0x0030 + + + + + Int32 + System.Int32 + 0x0030 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + + + + + 瑙f瀽鏁版嵁 + 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + 0x8103_0x0030 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + 0x8103_0x0030 + + + + + + + + + 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + 0x8103_=0x0040 + + + + + AnsiString + System.String + 0x0040 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + 0x8103_0x0040 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + 0x8103_0x0040 + + + + + + + + + 澶嶄綅鐢佃瘽鍙风爜 + 0x8103_=0x0041 + + + + + AnsiString + System.String + 0x0041 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 澶嶄綅鐢佃瘽鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 澶嶄綅鐢佃瘽鍙风爜 + 0x8103_0x0041 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 澶嶄綅鐢佃瘽鍙风爜 + 0x8103_0x0041 + + + + + + + + + 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + 0x8103_=0x0042 + + + + + AnsiString + System.String + 0x0042 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + 0x8103_0x0042 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + 0x8103_0x0042 + + + + + + + + + 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + 0x8103_=0x0043 + + + + + AnsiString + System.String + 0x0043 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + 0x8103_0x0043 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + 0x8103_0x0043 + + + + + + + + + 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + 0x8103_=0x0044 + + + + + AnsiString + System.String + 0x0044 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + 0x8103_0x0044 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + 0x8103_0x0044 + + + + + + + + + ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + 0x8103_=0x0045 + + + + + Int32 + System.Int32 + 0x0045 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + + + + + 瑙f瀽鏁版嵁 + ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + 0x8103_0x0045 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + 0x8103_0x0045 + + + + + + + + + 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_=0x0046 + + + + + Int32 + System.Int32 + 0x0046 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0046 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0046 + + + + + + + + + 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_=0x0047 + + + + + Int32 + System.Int32 + 0x0047 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0047 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x0047 + + + + + + + + + 鐢佃瘽鐭彿闀垮害 + 0x8103_=0x0048 + + + + + Int32 + System.Int32 + 0x0048 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鐢佃瘽鐭彿闀垮害 + + + + + 瑙f瀽鏁版嵁 + 鐢佃瘽鐭彿闀垮害 + 0x8103_0x0048 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鐢佃瘽鐭彿闀垮害 + 0x8103_0x0048 + + + + + + + + + 鐩戝惉鐢佃瘽鍙风爜 + 0x8103_=0x0049 + + + + + AnsiString + System.String + 0x0049 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鐩戝惉鐢佃瘽鍙风爜 + + + + + 瑙f瀽鏁版嵁 + 鐩戝惉鐢佃瘽鍙风爜 + 0x8103_0x0049 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鐩戝惉鐢佃瘽鍙风爜 + 0x8103_0x0049 + + + + + + + + + ISU璁惧缁存姢瀵嗙爜 + 0x8103_=0x004A + + + + + AnsiString + System.String + 0x004A + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ISU璁惧缁存姢瀵嗙爜 + + + + + 瑙f瀽鏁版嵁 + ISU璁惧缁存姢瀵嗙爜 + 0x8103_0x004A + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ISU璁惧缁存姢瀵嗙爜 + 0x8103_0x004A + + + + + + + + + ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + 0x8103_=0x004B + + + + + Byte + System.Byte + 0x004B + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + + + + + 瑙f瀽鏁版嵁 + ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + 0x8103_0x004B + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + 0x8103_0x004B + + + + + + + + + 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + 0x8103_=0x0050 + + + + + Int32 + System.Int32 + 0x0050 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + + + + + 瑙f瀽鏁版嵁 + 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + 0x8103_0x0050 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + 0x8103_0x0050 + + + + + + + + + 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + 0x8103_=0x0051 + + + + + Int32 + System.Int32 + 0x0051 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + + + + + 瑙f瀽鏁版嵁 + 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + 0x8103_0x0051 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + 0x8103_0x0051 + + + + + + + + + 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + 0x8103_=0x0052 + + + + + Int32 + System.Int32 + 0x0052 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + + + + + 瑙f瀽鏁版嵁 + 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + 0x8103_0x0052 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + 0x8103_0x0052 + + + + + + + + + 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + 0x8103_=0x0053 + + + + + Int32 + System.Int32 + 0x0053 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + + + + + 瑙f瀽鏁版嵁 + 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + 0x8103_0x0053 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + 0x8103_0x0053 + + + + + + + + + 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + 0x8103_=0x0055 + + + + + Int32 + System.Int32 + 0x0055 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + + + + + 瑙f瀽鏁版嵁 + 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + 0x8103_0x0055 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + 0x8103_0x0055 + + + + + + + + + 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + 0x8103_=0x0056 + + + + + Int32 + System.Int32 + 0x0056 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + + + + + 瑙f瀽鏁版嵁 + 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0056 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0056 + + + + + + + + + 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_=0x0057 + + + + + Int32 + System.Int32 + 0x0057 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_0x0057 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_0x0057 + + + + + + + + + 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + 0x8103_=0x0058 + + + + + Int32 + System.Int32 + 0x0058 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + + + + + 瑙f瀽鏁版嵁 + 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0058 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0058 + + + + + + + + + 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + 0x8103_=0x0059 + + + + + Int32 + System.Int32 + 0x0059 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + + + + + 瑙f瀽鏁版嵁 + 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0059 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + 0x8103_0x0059 + + + + + + + + + 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_=0x005A + + + + + Int32 + System.Int32 + 0x005A + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_0x005A + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + 0x8103_0x005A + + + + + + + + + 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + 0x8103_=0x0070 + + + + + Int32 + System.Int32 + 0x0070 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + + + + + 瑙f瀽鏁版嵁 + 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + 0x8103_0x0070 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + 0x8103_0x0070 + + + + + + + + + 浜害锛0锝255 + 0x8103_=0x0071 + + + + + Int32 + System.Int32 + 0x0071 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 浜害锛0锝255 + + + + + 瑙f瀽鏁版嵁 + 浜害锛0锝255 + 0x8103_0x0071 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 浜害锛0锝255 + 0x8103_0x0071 + + + + + + + + + 瀵规瘮搴︼紝0锝127 + 0x8103_=0x0072 + + + + + Int32 + System.Int32 + 0x0072 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瀵规瘮搴︼紝0锝127 + + + + + 瑙f瀽鏁版嵁 + 瀵规瘮搴︼紝0锝127 + 0x8103_0x0072 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瀵规瘮搴︼紝0锝127 + 0x8103_0x0072 + + + + + + + + + 楗卞拰搴︼紝0锝127 + 0x8103_=0x0073 + + + + + Int32 + System.Int32 + 0x0073 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 楗卞拰搴︼紝0锝127 + + + + + 瑙f瀽鏁版嵁 + 楗卞拰搴︼紝0锝127 + 0x8103_0x0073 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 楗卞拰搴︼紝0锝127 + 0x8103_0x0073 + + + + + + + + + 鑹插害锛0锝255 + 0x8103_=0x0074 + + + + + Int32 + System.Int32 + 0x0074 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鑹插害锛0锝255 + + + + + 瑙f瀽鏁版嵁 + 鑹插害锛0锝255 + 0x8103_0x0074 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鑹插害锛0锝255 + 0x8103_0x0074 + + + + + + + + + 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + 0x8103_=0x0080 + + + + + Int32 + System.Int32 + 0x0080 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + + + + + 瑙f瀽鏁版嵁 + 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + 0x8103_0x0080 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + 0x8103_0x0080 + + + + + + + + + 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + 0x8103_=0x0081 + + + + + Int32 + System.Int32 + 0x0081 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + + + + + 瑙f瀽鏁版嵁 + 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + 0x8103_0x0081 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + 0x8103_0x0081 + + + + + + + + + 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + 0x8103_=0x0082 + + + + + Int32 + System.Int32 + 0x0082 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + + + + + 瑙f瀽鏁版嵁 + 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + 0x8103_0x0082 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + 0x8103_0x0082 + + + + + + + + + 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + 0x8103_=0x0090 + + + + + Binary + System.Byte[] + 0x0090 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + + + + + 瑙f瀽鏁版嵁 + 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + 0x8103_0x0090 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + 0x8103_0x0090 + + + + + + + + + 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + 0x8103_=0x0091 + + + + + Binary + System.Byte[] + 0x0091 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + + + + + 瑙f瀽鏁版嵁 + 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + 0x8103_0x0091 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + 0x8103_0x0091 + + + + + + + + + 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + 0x8103_=0x0092 + + + + + AnsiString + System.String + 0x0092 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + + + + + 瑙f瀽鏁版嵁 + 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + 0x8103_0x0092 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + 0x8103_0x0092 + + + + + + + + + 鍑虹杞︿紒涓氱畝绉 + 0x8103_=0x0093 + + + + + AnsiString + System.String + 0x0093 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鍑虹杞︿紒涓氱畝绉 + + + + + 瑙f瀽鏁版嵁 + 鍑虹杞︿紒涓氱畝绉 + 0x8103_0x0093 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鍑虹杞︿紒涓氱畝绉 + 0x8103_0x0093 + + + + + + + + + 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + 0x8103_=0x0094 + + + + + Binary + System.Byte[] + 0x0094 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + + + + + 瑙f瀽鏁版嵁 + 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + 0x8103_0x0094 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + 0x8103_0x0094 + + + + + + + + + ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + 0x8103_=0x00A0 + + + + + Byte + System.Byte + 0x00A0 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + + + + + 瑙f瀽鏁版嵁 + ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + 0x8103_0x00A0 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + 0x8103_0x00A0 + + + + + + + + + ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + 0x8103_=0x00A1 + + + + + Byte + System.Byte + 0x00A1 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + + + + + 瑙f瀽鏁版嵁 + ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + 0x8103_0x00A1 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + 0x8103_0x00A1 + + + + + + + + + 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + 0x8103_=0x00A2 + + + + + Byte + System.Byte + 0x00A2 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + 0x8103_0x00A2 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + 0x8103_0x00A2 + + + + + + + + + LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_=0x00A3 + + + + + Byte + System.Byte + 0x00A3 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x00A3 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + 0x8103_0x00A3 + + + + + + + + + ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_=0x00AF + + + + + Int16 + System.Int16 + 0x00AF + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + + + + + 瑙f瀽鏁版嵁 + ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x00AF + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + 0x8103_0x00AF + + + + + + + + + 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + 0x8103_=0x00B0 + + + + + Byte + System.Byte + 0x00B0 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + 0x8103_0x00B0 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + 0x8103_0x00B0 + + + + + + + + + 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_=0x00B1 + + + + + AnsiString + System.String + 0x00B1 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x00B1 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + 0x8103_0x00B1 + + + + + + + + + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_=0x00B2 + + + + + AnsiString + System.String + 0x00B2 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x00B2 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + 0x8103_0x00B2 + + + + + + + + + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_=0x00B3 + + + + + AnsiString + System.String + 0x00B3 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x00B3 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + 0x8103_0x00B3 + + + + + + + + + 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_=0x00B4 + + + + + AnsiString + System.String + 0x00B4 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x00B4 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + 0x8103_0x00B4 + + + + + + + + + 瑙嗛鏈嶅姟鍣ㄧ鍙 + 0x8103_=0x00B5 + + + + + Int32 + System.Int32 + 0x00B5 + + + + + 鏁版嵁闀垮害 + 4 byte + + + + + 瑙嗛鏈嶅姟鍣ㄧ鍙 + + + + + 瑙f瀽鏁版嵁 + 瑙嗛鏈嶅姟鍣ㄧ鍙 + 0x8103_0x00B5 + + JT905娑堟伅璇诲彇鍣 + 娑堟伅鍐欏叆 + JT905鎺ュ彛閰嶇疆 + + + + 娑堟伅鍙嶅簭鍒楀寲 + 瑙嗛鏈嶅姟鍣ㄧ鍙 + 0x8103_0x00B5 + + + + + + + + + 缁堢鍙傛暟璁剧疆 + + + + + 鍙傛暟 ID + + + + + 鍙傛暟闀垮害 + + + + + 鑷畾涔夌粓绔弬鏁拌缃 + + + + + 鍙傛暟 ID + + + + + 鍙傛暟闀垮害 + + + + + JT905娑堟伅璇诲彇鍣 + + + + + 璇诲彇buffer + + + + + 鍘熸暟鎹 + + + + + 璇诲彇鍒扮殑鏁伴噺 + + + + + JT905鐗堟湰鍙 + + + + + 鏄惁杩涜瑙g爜鎿嶄綔 + 鑻ヨ繘琛岃В鐮佹搷浣滐紝鍒欏搴旂殑鏄竴涓甯哥殑鍖 + 鑻ヤ笉杩涜瑙g爜鎿嶄綔锛屽垯瀵瑰簲鐨勬槸涓涓潪姝e父鐨勫寘锛堝ご閮ㄥ寘锛屾暟鎹綋鍖呯瓑绛夛級 + 涓昏鐢ㄦ潵涓娆℃ц鍙栨墍鏈夋暟鎹綋鍐呭鎿嶄綔 + + + + + 瑙g爜锛堣浆涔夎繕鍘燂級,璁$畻鏍¢獙鍜 + + + 榛樿JT905Version.JTT2014 + + + + 鍦ㄨВ鐮佺殑鏃跺欐妸鏍¢獙鍜屼篃璁$畻鍑烘潵锛岄伩鍏嶅湪寰幆涓娆¤繘琛屾牎楠 + + + + + + 鍦ㄨВ鐮佺殑鏃跺欐妸鏍¢獙鍜屼篃璁$畻鍑烘潵锛岄伩鍏嶅湪寰幆涓娆¤繘琛屾牎楠 + + + + + + 璁$畻鐨勬牎楠岀爜 + + + 瀹為檯鑾峰彇鐨勬牎楠岀爜 @@ -3362,6 +7142,13 @@ + + + 鍐欏叆鍏釜瀛楄妭鐨勬棩鏈熺被鍨,yyyyMMddHHmm + + + + 鍐欏叆鍏釜瀛楄妭鐨勫彲绌烘棩鏈熺被鍨,yyMMddHHmmss diff --git a/src/JT905.Protocol/JT905Constants.cs b/src/JT905.Protocol/JT905Constants.cs index ef1cec2..622ecd1 100644 --- a/src/JT905.Protocol/JT905Constants.cs +++ b/src/JT905.Protocol/JT905Constants.cs @@ -70,331 +70,331 @@ static JT905Constants() /// /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0001 = 0x0001; + public const ushort JT905_0x8103_0x0001 = 0x0001; /// /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0002 = 0x0002; + public const ushort JT905_0x8103_0x0002 = 0x0002; /// /// TCP娑堟伅閲嶄紶娆℃暟 /// - public const uint JT905_0x8103_0x0003 = 0x0003; + public const ushort JT905_0x8103_0x0003 = 0x0003; /// /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0004 = 0x0004; + public const ushort JT905_0x8103_0x0004 = 0x0004; /// /// SMS娑堟伅閲嶄紶娆℃暟 /// - public const uint JT905_0x8103_0x0005 = 0x0005; + public const ushort JT905_0x8103_0x0005 = 0x0005; /// /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public const uint JT905_0x8103_0x0010 = 0x0010; + public const ushort JT905_0x8103_0x0010 = 0x0010; /// /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public const uint JT905_0x8103_0x0011 = 0x0011; + public const ushort JT905_0x8103_0x0011 = 0x0011; /// /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 /// - public const uint JT905_0x8103_0x0012 = 0x0012; + public const ushort JT905_0x8103_0x0012 = 0x0012; /// /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 /// - public const uint JT905_0x8103_0x0013 = 0x0013; + public const ushort JT905_0x8103_0x0013 = 0x0013; /// /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public const uint JT905_0x8103_0x0014 = 0x0014; + public const ushort JT905_0x8103_0x0014 = 0x0014; /// /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public const uint JT905_0x8103_0x0015 = 0x0015; + public const ushort JT905_0x8103_0x0015 = 0x0015; /// /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 /// - public const uint JT905_0x8103_0x0016 = 0x0016; + public const ushort JT905_0x8103_0x0016 = 0x0016; /// /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public const uint JT905_0x8103_0x0017 = 0x0017; + public const ushort JT905_0x8103_0x0017 = 0x0017; /// /// 涓绘湇鍔″櫒TCP绔彛 /// - public const uint JT905_0x8103_0x0018 = 0x0018; + public const ushort JT905_0x8103_0x0018 = 0x0018; /// /// 澶囦唤鏈嶅姟鍣═CP绔彛 /// - public const uint JT905_0x8103_0x0019 = 0x0019; + public const ushort JT905_0x8103_0x0019 = 0x0019; /// /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 /// - public const uint JT905_0x8103_0x001A = 0x001A; + public const ushort JT905_0x8103_0x001A = 0x001A; /// /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 /// - public const uint JT905_0x8103_0x001B = 0x001B; + public const ushort JT905_0x8103_0x001B = 0x001B; /// /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public const uint JT905_0x8103_0x001C = 0x001C; + public const ushort JT905_0x8103_0x001C = 0x001C; /// /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 /// - public const uint JT905_0x8103_0x001D = 0x001D; + public const ushort JT905_0x8103_0x001D = 0x001D; /// /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 /// - public const uint JT905_0x8103_0x0020 = 0x0020; + public const ushort JT905_0x8103_0x0020 = 0x0020; /// /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 /// - public const uint JT905_0x8103_0x0021 = 0x0021; + public const ushort JT905_0x8103_0x0021 = 0x0021; /// /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0022 = 0x0022; + public const ushort JT905_0x8103_0x0022 = 0x0022; /// /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0023 = 0x0023; + public const ushort JT905_0x8103_0x0023 = 0x0023; /// /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0024 = 0x0024; + public const ushort JT905_0x8103_0x0024 = 0x0024; /// /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0025 = 0x0025; + public const ushort JT905_0x8103_0x0025 = 0x0025; /// /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0026 = 0x0026; + public const ushort JT905_0x8103_0x0026 = 0x0026; /// /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0027 = 0x0027; + public const ushort JT905_0x8103_0x0027 = 0x0027; /// /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0028 = 0x0028; + public const ushort JT905_0x8103_0x0028 = 0x0028; /// /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) /// - public const uint JT905_0x8103_0x0029 = 0x0029; + public const ushort JT905_0x8103_0x0029 = 0x0029; /// /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// - public const uint JT905_0x8103_0x002A = 0x002A; + public const ushort JT905_0x8103_0x002A = 0x002A; /// /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// - public const uint JT905_0x8103_0x002B = 0x002B; + public const ushort JT905_0x8103_0x002B = 0x002B; /// /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// - public const uint JT905_0x8103_0x002C = 0x002C; + public const ushort JT905_0x8103_0x002C = 0x002C; /// /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// - public const uint JT905_0x8103_0x002D = 0x002D; + public const ushort JT905_0x8103_0x002D = 0x002D; /// /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) /// - public const uint JT905_0x8103_0x002E = 0x002E; + public const ushort JT905_0x8103_0x002E = 0x002E; /// /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// - public const uint JT905_0x8103_0x002F = 0x002F; + public const ushort JT905_0x8103_0x002F = 0x002F; /// /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 /// - public const uint JT905_0x8103_0x0030 = 0x0030; + public const ushort JT905_0x8103_0x0030 = 0x0030; /// /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 /// - public const uint JT905_0x8103_0x0040 = 0x0040; + public const ushort JT905_0x8103_0x0040 = 0x0040; /// /// 澶嶄綅鐢佃瘽鍙风爜 /// - public const uint JT905_0x8103_0x0041 = 0x0041; + public const ushort JT905_0x8103_0x0041 = 0x0041; /// /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 /// - public const uint JT905_0x8103_0x0042 = 0x0042; + public const ushort JT905_0x8103_0x0042 = 0x0042; /// /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 /// - public const uint JT905_0x8103_0x0043 = 0x0043; + public const ushort JT905_0x8103_0x0043 = 0x0043; /// /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 /// - public const uint JT905_0x8103_0x0044 = 0x0044; + public const ushort JT905_0x8103_0x0044 = 0x0044; /// /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 /// - public const uint JT905_0x8103_0x0045 = 0x0045; + public const ushort JT905_0x8103_0x0045 = 0x0045; /// /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0046 = 0x0046; + public const ushort JT905_0x8103_0x0046 = 0x0046; /// /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0047 = 0x0047; + public const ushort JT905_0x8103_0x0047 = 0x0047; /// /// 鐢佃瘽鐭彿闀垮害 /// - public const uint JT905_0x8103_0x0048 = 0x0048; + public const ushort JT905_0x8103_0x0048 = 0x0048; /// /// 鐩戝惉鐢佃瘽鍙风爜 /// - public const uint JT905_0x8103_0x0049 = 0x0049; + public const ushort JT905_0x8103_0x0049 = 0x0049; /// /// ISU璁惧缁存姢瀵嗙爜 /// - public const uint JT905_0x8103_0x004A = 0x004A; + public const ushort JT905_0x8103_0x004A = 0x004A; /// /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) /// - public const uint JT905_0x8103_0x004B = 0x004B; + public const ushort JT905_0x8103_0x004B = 0x004B; /// /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 /// - public const uint JT905_0x8103_0x0050 = 0x0050; + public const ushort JT905_0x8103_0x0050 = 0x0050; /// /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS /// - public const uint JT905_0x8103_0x0051 = 0x0051; + public const ushort JT905_0x8103_0x0051 = 0x0051; /// /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 /// - public const uint JT905_0x8103_0x0052 = 0x0052; + public const ushort JT905_0x8103_0x0052 = 0x0052; /// /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 /// - public const uint JT905_0x8103_0x0053 = 0x0053; + public const ushort JT905_0x8103_0x0053 = 0x0053; /// /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) /// - public const uint JT905_0x8103_0x0055 = 0x0055; + public const ushort JT905_0x8103_0x0055 = 0x0055; /// /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0056 = 0x0056; + public const ushort JT905_0x8103_0x0056 = 0x0056; /// /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x0057 = 0x0057; + public const ushort JT905_0x8103_0x0057 = 0x0057; /// /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0058 = 0x0058; + public const ushort JT905_0x8103_0x0058 = 0x0058; /// /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) /// - public const uint JT905_0x8103_0x0059 = 0x0059; + public const ushort JT905_0x8103_0x0059 = 0x0059; /// /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x005A = 0x005A; + public const ushort JT905_0x8103_0x005A = 0x005A; /// /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 /// - public const uint JT905_0x8103_0x0070 = 0x0070; + public const ushort JT905_0x8103_0x0070 = 0x0070; /// /// 浜害锛0锝255 /// - public const uint JT905_0x8103_0x0071 = 0x0071; + public const ushort JT905_0x8103_0x0071 = 0x0071; /// /// 瀵规瘮搴︼紝0锝127 /// - public const uint JT905_0x8103_0x0072 = 0x0072; + public const ushort JT905_0x8103_0x0072 = 0x0072; /// /// 楗卞拰搴︼紝0锝127 /// - public const uint JT905_0x8103_0x0073 = 0x0073; + public const ushort JT905_0x8103_0x0073 = 0x0073; /// /// 鑹插害锛0锝255 /// - public const uint JT905_0x8103_0x0074 = 0x0074; + public const ushort JT905_0x8103_0x0074 = 0x0074; /// /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km /// - public const uint JT905_0x8103_0x0080 = 0x0080; + public const ushort JT905_0x8103_0x0080 = 0x0080; /// /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 /// - public const uint JT905_0x8103_0x0081 = 0x0081; + public const ushort JT905_0x8103_0x0081 = 0x0081; /// /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 /// - public const uint JT905_0x8103_0x0082 = 0x0082; + public const ushort JT905_0x8103_0x0082 = 0x0082; /// /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 /// - public const uint JT905_0x8103_0x0090 = 0x0090; + public const ushort JT905_0x8103_0x0090 = 0x0090; /// /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 /// - public const uint JT905_0x8103_0x0091 = 0x0091; + public const ushort JT905_0x8103_0x0091 = 0x0091; /// /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 /// - public const uint JT905_0x8103_0x0092 = 0x0092; + public const ushort JT905_0x8103_0x0092 = 0x0092; /// /// 鍑虹杞︿紒涓氱畝绉 /// - public const uint JT905_0x8103_0x0093 = 0x0093; + public const ushort JT905_0x8103_0x0093 = 0x0093; /// /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) /// - public const uint JT905_0x8103_0x0094 = 0x0094; + public const ushort JT905_0x8103_0x0094 = 0x0094; /// /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) /// - public const uint JT905_0x8103_0x00A0 = 0x00A0; + public const ushort JT905_0x8103_0x00A0 = 0x00A0; /// /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) /// - public const uint JT905_0x8103_0x00A1 = 0x00A1; + public const ushort JT905_0x8103_0x00A1 = 0x00A1; /// /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x00A2 = 0x00A2; + public const ushort JT905_0x8103_0x00A2 = 0x00A2; /// /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x00A3 = 0x00A3; + public const ushort JT905_0x8103_0x00A3 = 0x00A3; /// /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) /// - public const uint JT905_0x8103_0x00AF = 0x00AF; + public const ushort JT905_0x8103_0x00AF = 0x00AF; /// /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP /// - public const uint JT905_0x8103_0x00B0 = 0x00B0; + public const ushort JT905_0x8103_0x00B0 = 0x00B0; /// /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public const uint JT905_0x8103_0x00B1 = 0x00B1; + public const ushort JT905_0x8103_0x00B1 = 0x00B1; /// /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public const uint JT905_0x8103_0x00B2 = 0x00B2; + public const ushort JT905_0x8103_0x00B2 = 0x00B2; /// /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 /// - public const uint JT905_0x8103_0x00B3 = 0x00B3; + public const ushort JT905_0x8103_0x00B3 = 0x00B3; /// /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public const uint JT905_0x8103_0x00B4 = 0x00B4; + public const ushort JT905_0x8103_0x00B4 = 0x00B4; /// /// 瑙嗛鏈嶅姟鍣ㄧ鍙 /// - public const uint JT905_0x8103_0x00B5 = 0x00B5; + public const ushort JT905_0x8103_0x00B5 = 0x00B5; #endregion } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x0001.cs b/src/JT905.Protocol/MessageBody/JT905_0x0001.cs index 1c86d80..cf29e1a 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x0001.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x0001.cs @@ -43,6 +43,7 @@ public class JT905_0x0001 : JT905Bodies, IJT905MessagePackFormatter /// - public ushort ReplyMsgId { get; set; } + public ushort AckMsgId { get; set; } /// /// 缁撴灉 /// 0锛氭垚鍔/纭锛1锛氬け璐ワ紱2锛氭秷鎭湁璇紱 /// - public JT905ISUResult ISUResult { get; set; } + public JT905PlatformResult PlatformResult { get; set; } /// /// 0x0100瑙f瀽 /// @@ -60,8 +60,8 @@ public JT905_0x8001 Deserialize(ref JT905MessagePackReader reader, IJT905Config { JT905_0x8001 jT905_0X8001 = new JT905_0x8001(); jT905_0X8001.ReplyMsgNum = reader.ReadUInt16(); - jT905_0X8001.ReplyMsgId = reader.ReadUInt16(); - jT905_0X8001.ISUResult = (JT905ISUResult)reader.ReadByte(); + jT905_0X8001.AckMsgId = reader.ReadUInt16(); + jT905_0X8001.PlatformResult = (JT905PlatformResult)reader.ReadByte(); return jT905_0X8001; } /// @@ -73,8 +73,8 @@ public JT905_0x8001 Deserialize(ref JT905MessagePackReader reader, IJT905Config public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8001 value, IJT905Config config) { writer.WriteUInt16(value.ReplyMsgNum); - writer.WriteUInt16(value.ReplyMsgId); - writer.WriteByte((byte)value.ISUResult); + writer.WriteUInt16(value.AckMsgId); + writer.WriteByte((byte)value.PlatformResult); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103.cs index 4f42a60..3fe2545 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103.cs @@ -46,7 +46,7 @@ internal byte ParamCount /// public List CustomParamList { get; set; } /// - /// + /// 0x8103鍙嶅簭鍒楀寲 /// /// /// @@ -54,10 +54,36 @@ internal byte ParamCount public JT905_0x8103 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { //todo:Deserialize - return default; + JT905_0x8103 value = new JT905_0x8103() + { + ParamList = new List(), + CustomParamList = new List() + }; + //1.鍙傛暟鎬绘暟 + var paramCount = reader.ReadByte(); + //2.閬嶅巻鎵鏈夌殑鍙傛暟 + try + { + for (int i = 0; i < paramCount; i++) + { + var paramId = reader.ReadVirtualUInt16();//鍙傛暟ID + if (config.JT905_0X8103_Factory.Map.TryGetValue(paramId, out object instance)) + { + dynamic attachImpl = JT905MessagePackFormatterResolverExtensions.JT905DynamicDeserialize(instance, ref reader, config); + value.ParamList.Add(attachImpl); + } + else if (config.JT905_0X8103_Factory.Map.TryGetValue(paramId, out object customInstance)) + { + dynamic attachImpl = JT905MessagePackFormatterResolverExtensions.JT905DynamicDeserialize(customInstance, ref reader, config); + value.CustomParamList.Add(attachImpl); + } + } + } + catch { } + return value; } /// - /// + /// 0x8103搴忓垪鍖 /// /// /// @@ -65,9 +91,26 @@ public JT905_0x8103 Deserialize(ref JT905MessagePackReader reader, IJT905Config public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103 value, IJT905Config config) { //todo:Serialize + writer.WriteByte(value.ParamCount); + try + { + foreach (var item in value.ParamList) + { + JT905MessagePackFormatterResolverExtensions.JT905DynamicSerialize(item, ref writer, item, config); + } + if (value.CustomParamList != null) + { + foreach (var item in value.CustomParamList) + { + JT905MessagePackFormatterResolverExtensions.JT905DynamicSerialize(item, ref writer, item, config); + } + } + } + catch { } + } /// - /// + /// 0x8103瑙f瀽鎴怞SON /// /// /// @@ -75,6 +118,34 @@ public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103 value, IJT public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { //todo:Analyze + var paramCount = reader.ReadByte();//鍙傛暟鎬绘暟 + writer.WriteNumber($"[{paramCount.ReadNumber()}]鍙傛暟鎬绘暟", paramCount); + try + { + writer.WriteStartArray("鍙傛暟椤"); + for (int i = 0; i < paramCount; i++) + { + var paramId = reader.ReadVirtualUInt16();//鍙傛暟ID + if (config.JT905_0X8103_Factory.Map.TryGetValue(paramId, out object instance)) + { + writer.WriteStartObject(); + instance.Analyze(ref reader, writer, config); + writer.WriteEndObject(); + } + else if (config.JT905_0X8103_Factory.Map.TryGetValue(paramId, out object customInstance)) + { + writer.WriteStartObject(); + customInstance.Analyze(ref reader, writer, config); + writer.WriteEndObject(); + } + } + writer.WriteEndArray(); + } + catch (Exception ex) + { + + writer.WriteString($"寮傚父淇℃伅", ex.StackTrace); + } } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0001.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0001.cs index 7343f04..4af2570 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0001.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0001.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0001 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0001 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0001; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0001; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0001 /// 瑙f瀽鏁版嵁 + /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0001 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0001 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0001 JT905_0x8103_0x0001 = new JT905_0x8103_0x0001(); - JT905_0x8103_0x0001.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0001.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0001.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0001.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0001.ParamId); + JT905_0x8103_0x0001.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0001.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0001.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0001.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0001.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0001.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0001.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0001.ParamValue); + JT905_0x8103_0x0001.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0001.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0001.ParamValue); + } /// - /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0001 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0001 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0001 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0001 JT905_0x8103_0x0001 = new JT905_0x8103_0x0001(); - JT905_0x8103_0x0001.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0001.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0001.ParamLength = reader.ReadByte(); JT905_0x8103_0x0001.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0001; } /// - /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0001 /// 娑堟伅搴忓垪鍖 + /// ISU蹇冭烦鍙戦侀棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0001 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0001 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0002.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0002.cs index f9447b6..614dfec 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0002.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0002.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0002 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0002 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0002; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0002; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0002 /// 瑙f瀽鏁版嵁 + /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0002 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0002 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0002 JT905_0x8103_0x0002 = new JT905_0x8103_0x0002(); - JT905_0x8103_0x0002.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0002.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0002.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0002.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0002.ParamId); + JT905_0x8103_0x0002.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0002.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0002.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0002.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0002.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0002.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0002.ParamValue.ReadNumber()}]鍙傛暟鍊糩TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0002.ParamValue); + JT905_0x8103_0x0002.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0002.ParamValue.ReadNumber()}]鍙傛暟鍊糩TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0002.ParamValue); + } /// - /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0002 /// 娑堟伅鍙嶅簭鍒楀寲 + /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0002 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0002 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0002 JT905_0x8103_0x0002 = new JT905_0x8103_0x0002(); - JT905_0x8103_0x0002.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0002.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0002.ParamLength = reader.ReadByte(); JT905_0x8103_0x0002.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0002; } /// - /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0002 /// 娑堟伅搴忓垪鍖 + /// TCP娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0002 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0002 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0003.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0003.cs index be0e1da..c420f64 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0003.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0003.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0003 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0003 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0003; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0003; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// TCP娑堟伅閲嶄紶娆℃暟 /// public uint ParamValue { get; set; } + /// - /// TCP娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0003 /// 瑙f瀽鏁版嵁 + /// TCP娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0003 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0003 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0003 JT905_0x8103_0x0003 = new JT905_0x8103_0x0003(); - JT905_0x8103_0x0003.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0003.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0003.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0003.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0003.ParamId); + JT905_0x8103_0x0003.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0003.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0003.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0003.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0003.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0003.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0003.ParamValue.ReadNumber()}]鍙傛暟鍊糩TCP娑堟伅閲嶄紶娆℃暟]", JT905_0x8103_0x0003.ParamValue); + JT905_0x8103_0x0003.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0003.ParamValue.ReadNumber()}]鍙傛暟鍊糩TCP娑堟伅閲嶄紶娆℃暟]", JT905_0x8103_0x0003.ParamValue); + } /// - /// TCP娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0003 /// 娑堟伅鍙嶅簭鍒楀寲 + /// TCP娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0003 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0003 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0003 JT905_0x8103_0x0003 = new JT905_0x8103_0x0003(); - JT905_0x8103_0x0003.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0003.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0003.ParamLength = reader.ReadByte(); JT905_0x8103_0x0003.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0003; } /// - /// TCP娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0003 /// 娑堟伅搴忓垪鍖 + /// TCP娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0003 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0003 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0004.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0004.cs index 1b96e10..e6e7e2a 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0004.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0004.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0004 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0004 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0004; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0004; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0004 /// 瑙f瀽鏁版嵁 + /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0004 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0004 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0004 JT905_0x8103_0x0004 = new JT905_0x8103_0x0004(); - JT905_0x8103_0x0004.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0004.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0004.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0004.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0004.ParamId); + JT905_0x8103_0x0004.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0004.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0004.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0004.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0004.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0004.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0004.ParamValue.ReadNumber()}]鍙傛暟鍊糩SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0004.ParamValue); + JT905_0x8103_0x0004.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0004.ParamValue.ReadNumber()}]鍙傛暟鍊糩SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0004.ParamValue); + } /// - /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0004 /// 娑堟伅鍙嶅簭鍒楀寲 + /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0004 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0004 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0004 JT905_0x8103_0x0004 = new JT905_0x8103_0x0004(); - JT905_0x8103_0x0004.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0004.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0004.ParamLength = reader.ReadByte(); JT905_0x8103_0x0004.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0004; } /// - /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0004 /// 娑堟伅搴忓垪鍖 + /// SMS娑堟伅搴旂瓟瓒呮椂鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0004 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0004 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0005.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0005.cs index 715c3c8..bbe18d2 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0005.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0005.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0005 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0005 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0005; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0005; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// SMS娑堟伅閲嶄紶娆℃暟 /// public uint ParamValue { get; set; } + /// - /// SMS娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0005 /// 瑙f瀽鏁版嵁 + /// SMS娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0005 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0005 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0005 JT905_0x8103_0x0005 = new JT905_0x8103_0x0005(); - JT905_0x8103_0x0005.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0005.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0005.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0005.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0005.ParamId); + JT905_0x8103_0x0005.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0005.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0005.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0005.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0005.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0005.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0005.ParamValue.ReadNumber()}]鍙傛暟鍊糩SMS娑堟伅閲嶄紶娆℃暟]", JT905_0x8103_0x0005.ParamValue); + JT905_0x8103_0x0005.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0005.ParamValue.ReadNumber()}]鍙傛暟鍊糩SMS娑堟伅閲嶄紶娆℃暟]", JT905_0x8103_0x0005.ParamValue); + } /// - /// SMS娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0005 /// 娑堟伅鍙嶅簭鍒楀寲 + /// SMS娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0005 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0005 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0005 JT905_0x8103_0x0005 = new JT905_0x8103_0x0005(); - JT905_0x8103_0x0005.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0005.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0005.ParamLength = reader.ReadByte(); JT905_0x8103_0x0005.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0005; } /// - /// SMS娑堟伅閲嶄紶娆℃暟 - /// 0x8103_0x0005 /// 娑堟伅搴忓垪鍖 + /// SMS娑堟伅閲嶄紶娆℃暟 + /// 0x8103_0x0005 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0005 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0010.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0010.cs index d6ab2ad..1019a1c 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0010.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0010.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0010 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0010 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0010; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0010; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0010 /// 瑙f瀽鏁版嵁 + /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0010 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0010 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0010 JT905_0x8103_0x0010 = new JT905_0x8103_0x0010(); - JT905_0x8103_0x0010.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0010.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0010.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0010.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0010.ParamId); + JT905_0x8103_0x0010.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0010.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0010.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0010.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0010.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0010.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0010.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x0010.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0010.ParamLength); + JT905_0x8103_0x0010.ParamValue = reader.ReadString(JT905_0x8103_0x0010.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x0010.ParamValue); + } /// - /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0010 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0010 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0010 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0010 JT905_0x8103_0x0010 = new JT905_0x8103_0x0010(); - JT905_0x8103_0x0010.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0010.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0010.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0010.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0010.ParamValue = reader.ReadString(JT905_0x8103_0x0010.ParamLength); + return JT905_0x8103_0x0010; } /// - /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0010 /// 娑堟伅搴忓垪鍖 + /// 涓绘湇鍔″櫒APN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0010 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0010 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0011.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0011.cs index e9bdb3e..a3d4189 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0011.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0011.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0011 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0011 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0011; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0011; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0011 /// 瑙f瀽鏁版嵁 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0011 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0011 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0011 JT905_0x8103_0x0011 = new JT905_0x8103_0x0011(); - JT905_0x8103_0x0011.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0011.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0011.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0011.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0011.ParamId); + JT905_0x8103_0x0011.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0011.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0011.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0011.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0011.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0011.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0011.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x0011.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0011.ParamLength); + JT905_0x8103_0x0011.ParamValue = reader.ReadString(JT905_0x8103_0x0011.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x0011.ParamValue); + } /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0011 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0011 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0011 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0011 JT905_0x8103_0x0011 = new JT905_0x8103_0x0011(); - JT905_0x8103_0x0011.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0011.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0011.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0011.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0011.ParamValue = reader.ReadString(JT905_0x8103_0x0011.ParamLength); + return JT905_0x8103_0x0011; } /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0011 /// 娑堟伅搴忓垪鍖 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0011 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0011 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0012.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0012.cs index 3f2d8f6..c7d58a8 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0012.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0012.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0012 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0012 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0012; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0012; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0012 /// 瑙f瀽鏁版嵁 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0012 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0012 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0012 JT905_0x8103_0x0012 = new JT905_0x8103_0x0012(); - JT905_0x8103_0x0012.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0012.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0012.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0012.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0012.ParamId); + JT905_0x8103_0x0012.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0012.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0012.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0012.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0012.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0012.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0012.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x0012.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0012.ParamLength); + JT905_0x8103_0x0012.ParamValue = reader.ReadString(JT905_0x8103_0x0012.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x0012.ParamValue); + } /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0012 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0012 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0012 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0012 JT905_0x8103_0x0012 = new JT905_0x8103_0x0012(); - JT905_0x8103_0x0012.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0012.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0012.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0012.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0012.ParamValue = reader.ReadString(JT905_0x8103_0x0012.ParamLength); + return JT905_0x8103_0x0012; } /// - /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0012 /// 娑堟伅搴忓垪鍖 + /// 涓绘湇鍔″櫒鏃犵嚎閫氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0012 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0012 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0013.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0013.cs index deac9da..f8ddf12 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0013.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0013.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0013 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0013 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0013; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0013; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x0013 /// 瑙f瀽鏁版嵁 + /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x0013 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0013 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0013 JT905_0x8103_0x0013 = new JT905_0x8103_0x0013(); - JT905_0x8103_0x0013.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0013.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0013.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0013.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0013.ParamId); + JT905_0x8103_0x0013.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0013.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0013.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0013.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0013.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0013.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0013.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚峕", JT905_0x8103_0x0013.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0013.ParamLength); + JT905_0x8103_0x0013.ParamValue = reader.ReadString(JT905_0x8103_0x0013.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚峕", JT905_0x8103_0x0013.ParamValue); + } /// - /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x0013 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x0013 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0013 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0013 JT905_0x8103_0x0013 = new JT905_0x8103_0x0013(); - JT905_0x8103_0x0013.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0013.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0013.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0013.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0013.ParamValue = reader.ReadString(JT905_0x8103_0x0013.ParamLength); + return JT905_0x8103_0x0013; } /// - /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x0013 /// 娑堟伅搴忓垪鍖 + /// 涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x0013 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0013 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0014.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0014.cs index 701e181..5de97a1 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0014.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0014.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0014 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0014 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0014; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0014; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0014 /// 瑙f瀽鏁版嵁 + /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0014 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0014 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0014 JT905_0x8103_0x0014 = new JT905_0x8103_0x0014(); - JT905_0x8103_0x0014.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0014.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0014.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0014.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0014.ParamId); + JT905_0x8103_0x0014.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0014.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0014.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0014.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0014.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0014.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0014.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x0014.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0014.ParamLength); + JT905_0x8103_0x0014.ParamValue = reader.ReadString(JT905_0x8103_0x0014.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x0014.ParamValue); + } /// - /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0014 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0014 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0014 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0014 JT905_0x8103_0x0014 = new JT905_0x8103_0x0014(); - JT905_0x8103_0x0014.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0014.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0014.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0014.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0014.ParamValue = reader.ReadString(JT905_0x8103_0x0014.ParamLength); + return JT905_0x8103_0x0014; } /// - /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x0014 /// 娑堟伅搴忓垪鍖 + /// 澶囦唤鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x0014 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0014 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0015.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0015.cs index 3ec0d5b..f17c884 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0015.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0015.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0015 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0015 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0015; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0015; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0015 /// 瑙f瀽鏁版嵁 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0015 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0015 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0015 JT905_0x8103_0x0015 = new JT905_0x8103_0x0015(); - JT905_0x8103_0x0015.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0015.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0015.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0015.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0015.ParamId); + JT905_0x8103_0x0015.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0015.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0015.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0015.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0015.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0015.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0015.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x0015.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0015.ParamLength); + JT905_0x8103_0x0015.ParamValue = reader.ReadString(JT905_0x8103_0x0015.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x0015.ParamValue); + } /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0015 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0015 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0015 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0015 JT905_0x8103_0x0015 = new JT905_0x8103_0x0015(); - JT905_0x8103_0x0015.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0015.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0015.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0015.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0015.ParamValue = reader.ReadString(JT905_0x8103_0x0015.ParamLength); + return JT905_0x8103_0x0015; } /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x0015 /// 娑堟伅搴忓垪鍖 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x0015 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0015 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0016.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0016.cs index 4a41187..4d59687 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0016.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0016.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0016 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0016 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0016; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0016; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0016 /// 瑙f瀽鏁版嵁 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0016 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0016 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0016 JT905_0x8103_0x0016 = new JT905_0x8103_0x0016(); - JT905_0x8103_0x0016.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0016.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0016.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0016.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0016.ParamId); + JT905_0x8103_0x0016.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0016.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0016.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0016.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0016.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0016.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0016.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x0016.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0016.ParamLength); + JT905_0x8103_0x0016.ParamValue = reader.ReadString(JT905_0x8103_0x0016.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x0016.ParamValue); + } /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0016 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0016 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0016 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0016 JT905_0x8103_0x0016 = new JT905_0x8103_0x0016(); - JT905_0x8103_0x0016.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0016.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0016.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0016.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0016.ParamValue = reader.ReadString(JT905_0x8103_0x0016.ParamLength); + return JT905_0x8103_0x0016; } /// - /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x0016 /// 娑堟伅搴忓垪鍖 + /// 澶囦唤鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x0016 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0016 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0017.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0017.cs index b27b786..e96572e 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0017.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0017.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0017 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0017 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0017; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0017; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x0017 /// 瑙f瀽鏁版嵁 + /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x0017 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0017 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0017 JT905_0x8103_0x0017 = new JT905_0x8103_0x0017(); - JT905_0x8103_0x0017.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0017.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0017.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0017.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0017.ParamId); + JT905_0x8103_0x0017.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0017.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0017.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0017.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0017.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0017.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0017.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x0017.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0017.ParamLength); + JT905_0x8103_0x0017.ParamValue = reader.ReadString(JT905_0x8103_0x0017.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x0017.ParamValue); + } /// - /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x0017 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x0017 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0017 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0017 JT905_0x8103_0x0017 = new JT905_0x8103_0x0017(); - JT905_0x8103_0x0017.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0017.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0017.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0017.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0017.ParamValue = reader.ReadString(JT905_0x8103_0x0017.ParamLength); + return JT905_0x8103_0x0017; } /// - /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x0017 /// 娑堟伅搴忓垪鍖 + /// 澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x0017 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0017 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0018.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0018.cs index 6f32735..e4098f1 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0018.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0018.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0018 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0018 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0018; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0018; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 涓绘湇鍔″櫒TCP绔彛 /// public uint ParamValue { get; set; } + /// - /// 涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x0018 /// 瑙f瀽鏁版嵁 + /// 涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x0018 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0018 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0018 JT905_0x8103_0x0018 = new JT905_0x8103_0x0018(); - JT905_0x8103_0x0018.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0018.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0018.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0018.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0018.ParamId); + JT905_0x8103_0x0018.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0018.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0018.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0018.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0018.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0018.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0018.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒TCP绔彛]", JT905_0x8103_0x0018.ParamValue); + JT905_0x8103_0x0018.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0018.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓绘湇鍔″櫒TCP绔彛]", JT905_0x8103_0x0018.ParamValue); + } /// - /// 涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x0018 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x0018 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0018 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0018 JT905_0x8103_0x0018 = new JT905_0x8103_0x0018(); - JT905_0x8103_0x0018.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0018.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0018.ParamLength = reader.ReadByte(); JT905_0x8103_0x0018.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0018; } /// - /// 涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x0018 /// 娑堟伅搴忓垪鍖 + /// 涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x0018 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0018 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0019.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0019.cs index a4ac200..369a754 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0019.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0019.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0019 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0019 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0019; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0019; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 澶囦唤鏈嶅姟鍣═CP绔彛 /// public uint ParamValue { get; set; } + /// - /// 澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x0019 /// 瑙f瀽鏁版嵁 + /// 澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x0019 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0019 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0019 JT905_0x8103_0x0019 = new JT905_0x8103_0x0019(); - JT905_0x8103_0x0019.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0019.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0019.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0019.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0019.ParamId); + JT905_0x8103_0x0019.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0019.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0019.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0019.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0019.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0019.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0019.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣═CP绔彛]", JT905_0x8103_0x0019.ParamValue); + JT905_0x8103_0x0019.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0019.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶囦唤鏈嶅姟鍣═CP绔彛]", JT905_0x8103_0x0019.ParamValue); + } /// - /// 澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x0019 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x0019 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0019 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0019 JT905_0x8103_0x0019 = new JT905_0x8103_0x0019(); - JT905_0x8103_0x0019.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0019.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0019.ParamLength = reader.ReadByte(); JT905_0x8103_0x0019.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0019; } /// - /// 澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x0019 /// 娑堟伅搴忓垪鍖 + /// 澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x0019 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0019 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001A.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001A.cs index c3bf76d..a305584 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001A.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001A.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x001A : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x001A /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001A; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001A; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x001A /// 瑙f瀽鏁版嵁 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x001A /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x001A : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x001A JT905_0x8103_0x001A = new JT905_0x8103_0x001A(); - JT905_0x8103_0x001A.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x001A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001A.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x001A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001A.ParamId); + JT905_0x8103_0x001A.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x001A.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x001A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001A.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x001A.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x001A.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x001A.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚峕", JT905_0x8103_0x001A.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x001A.ParamLength); + JT905_0x8103_0x001A.ParamValue = reader.ReadString(JT905_0x8103_0x001A.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚峕", JT905_0x8103_0x001A.ParamValue); + } /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x001A /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x001A /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x001A Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x001A JT905_0x8103_0x001A = new JT905_0x8103_0x001A(); - JT905_0x8103_0x001A.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x001A.ParamId = reader.ReadUInt16(); JT905_0x8103_0x001A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001A.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x001A.ParamValue = reader.ReadString(JT905_0x8103_0x001A.ParamLength); + return JT905_0x8103_0x001A; } /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 - /// 0x8103_0x001A /// 娑堟伅搴忓垪鍖 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒鍦板潃锛孖P鎴栧煙鍚 + /// 0x8103_0x001A /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x001A value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001B.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001B.cs index 126e5b3..58e9891 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001B.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001B.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x001B : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x001B /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001B; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001B; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 /// public uint ParamValue { get; set; } + /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x001B /// 瑙f瀽鏁版嵁 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x001B /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x001B : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x001B JT905_0x8103_0x001B = new JT905_0x8103_0x001B(); - JT905_0x8103_0x001B.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x001B.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001B.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x001B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001B.ParamId); + JT905_0x8103_0x001B.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x001B.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x001B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001B.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x001B.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x001B.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x001B.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛]", JT905_0x8103_0x001B.ParamValue); + JT905_0x8103_0x001B.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x001B.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛]", JT905_0x8103_0x001B.ParamValue); + } /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x001B /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x001B /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x001B Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x001B JT905_0x8103_0x001B = new JT905_0x8103_0x001B(); - JT905_0x8103_0x001B.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x001B.ParamId = reader.ReadUInt16(); JT905_0x8103_0x001B.ParamLength = reader.ReadByte(); JT905_0x8103_0x001B.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x001B; } /// - /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 - /// 0x8103_0x001B /// 娑堟伅搴忓垪鍖 + /// 涓鍗¢氭垨鏀粯骞冲彴涓绘湇鍔″櫒TCP绔彛 + /// 0x8103_0x001B /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x001B value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001C.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001C.cs index 1536fd4..f0b39e4 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001C.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001C.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x001C : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x001C /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001C; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001C; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x001C /// 瑙f瀽鏁版嵁 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x001C /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x001C : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x001C JT905_0x8103_0x001C = new JT905_0x8103_0x001C(); - JT905_0x8103_0x001C.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x001C.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001C.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x001C.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001C.ParamId); + JT905_0x8103_0x001C.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x001C.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x001C.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001C.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x001C.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x001C.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x001C.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x001C.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x001C.ParamLength); + JT905_0x8103_0x001C.ParamValue = reader.ReadString(JT905_0x8103_0x001C.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x001C.ParamValue); + } /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x001C /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x001C /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x001C Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x001C JT905_0x8103_0x001C = new JT905_0x8103_0x001C(); - JT905_0x8103_0x001C.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x001C.ParamId = reader.ReadUInt16(); JT905_0x8103_0x001C.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001C.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x001C.ParamValue = reader.ReadString(JT905_0x8103_0x001C.ParamLength); + return JT905_0x8103_0x001C; } /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x001C /// 娑堟伅搴忓垪鍖 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x001C /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x001C value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001D.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001D.cs index 559a526..9cdb143 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001D.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x001D.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x001D : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x001D /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001D; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x001D; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 /// public uint ParamValue { get; set; } + /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x001D /// 瑙f瀽鏁版嵁 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x001D /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x001D : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x001D JT905_0x8103_0x001D = new JT905_0x8103_0x001D(); - JT905_0x8103_0x001D.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x001D.ParamLength = reader.ReadByte(); - JT905_0x8103_0x001D.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x001D.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001D.ParamId); + JT905_0x8103_0x001D.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x001D.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x001D.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x001D.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x001D.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x001D.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x001D.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛]", JT905_0x8103_0x001D.ParamValue); + JT905_0x8103_0x001D.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x001D.ParamValue.ReadNumber()}]鍙傛暟鍊糩涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛]", JT905_0x8103_0x001D.ParamValue); + } /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x001D /// 娑堟伅鍙嶅簭鍒楀寲 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x001D /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x001D Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x001D JT905_0x8103_0x001D = new JT905_0x8103_0x001D(); - JT905_0x8103_0x001D.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x001D.ParamId = reader.ReadUInt16(); JT905_0x8103_0x001D.ParamLength = reader.ReadByte(); JT905_0x8103_0x001D.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x001D; } /// - /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 - /// 0x8103_0x001D /// 娑堟伅搴忓垪鍖 + /// 涓鍗¢氭垨鏀粯骞冲彴澶囦唤鏈嶅姟鍣═CP绔彛 + /// 0x8103_0x001D /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x001D value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0020.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0020.cs index 368291a..56ef278 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0020.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0020.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0020 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0020 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0020; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0020; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 /// public uint ParamValue { get; set; } + /// - /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 - /// 0x8103_0x0020 /// 瑙f瀽鏁版嵁 + /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + /// 0x8103_0x0020 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0020 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0020 JT905_0x8103_0x0020 = new JT905_0x8103_0x0020(); - JT905_0x8103_0x0020.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0020.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0020.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0020.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0020.ParamId); + JT905_0x8103_0x0020.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0020.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0020.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0020.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0020.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0020.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0020.ParamValue.ReadNumber()}]鍙傛暟鍊糩浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤]", JT905_0x8103_0x0020.ParamValue); + JT905_0x8103_0x0020.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0020.ParamValue.ReadNumber()}]鍙傛暟鍊糩浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤]", JT905_0x8103_0x0020.ParamValue); + } /// - /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 - /// 0x8103_0x0020 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + /// 0x8103_0x0020 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0020 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0020 JT905_0x8103_0x0020 = new JT905_0x8103_0x0020(); - JT905_0x8103_0x0020.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0020.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0020.ParamLength = reader.ReadByte(); JT905_0x8103_0x0020.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0020; } /// - /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 - /// 0x8103_0x0020 /// 娑堟伅搴忓垪鍖 + /// 浣嶇疆姹囨姤绛栫暐锛0锛氬畾鏃舵眹鎶ワ紱1锛氬畾璺濇眹鎶ワ紱2锛氬畾鏃+瀹氳窛姹囨姤 + /// 0x8103_0x0020 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0020 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0021.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0021.cs index f030bfd..73aec97 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0021.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0021.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0021 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0021 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0021; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0021; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 /// public uint ParamValue { get; set; } + /// - /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 - /// 0x8103_0x0021 /// 瑙f瀽鏁版嵁 + /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + /// 0x8103_0x0021 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0021 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0021 JT905_0x8103_0x0021 = new JT905_0x8103_0x0021(); - JT905_0x8103_0x0021.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0021.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0021.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0021.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0021.ParamId); + JT905_0x8103_0x0021.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0021.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0021.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0021.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0021.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0021.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0021.ParamValue.ReadNumber()}]鍙傛暟鍊糩浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬乚", JT905_0x8103_0x0021.ParamValue); + JT905_0x8103_0x0021.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0021.ParamValue.ReadNumber()}]鍙傛暟鍊糩浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬乚", JT905_0x8103_0x0021.ParamValue); + } /// - /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 - /// 0x8103_0x0021 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + /// 0x8103_0x0021 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0021 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0021 JT905_0x8103_0x0021 = new JT905_0x8103_0x0021(); - JT905_0x8103_0x0021.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0021.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0021.ParamLength = reader.ReadByte(); JT905_0x8103_0x0021.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0021; } /// - /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 - /// 0x8103_0x0021 /// 娑堟伅搴忓垪鍖 + /// 浣嶇疆姹囨姤鏂规锛0锛氭牴鎹瓵CC鐘舵侊紱1锛氭牴鎹┖閲嶈溅鐘舵侊紱2锛氭牴鎹櫥褰曠姸鎬+ACC鐘舵侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁ACC鐘舵侊紱3锛氭牴鎹櫥褰曠姸鎬+绌洪噸杞︾姸鎬侊紝鍏堝垽鏂櫥褰曠姸鎬侊紝鑻ョ櫥褰曞啀鏍规嵁绌洪噸杞︾姸鎬 + /// 0x8103_0x0021 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0021 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0022.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0022.cs index d297015..efafd80 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0022.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0022.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0022 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0022 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0022; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0022; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0022 /// 瑙f瀽鏁版嵁 + /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0022 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0022 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0022 JT905_0x8103_0x0022 = new JT905_0x8103_0x0022(); - JT905_0x8103_0x0022.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0022.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0022.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0022.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0022.ParamId); + JT905_0x8103_0x0022.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0022.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0022.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0022.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0022.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0022.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0022.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0022.ParamValue); + JT905_0x8103_0x0022.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0022.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0022.ParamValue); + } /// - /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0022 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0022 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0022 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0022 JT905_0x8103_0x0022 = new JT905_0x8103_0x0022(); - JT905_0x8103_0x0022.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0022.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0022.ParamLength = reader.ReadByte(); JT905_0x8103_0x0022.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0022; } /// - /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0022 /// 娑堟伅搴忓垪鍖 + /// 鏈櫥褰曟眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0022 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0022 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0023.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0023.cs index 2cea0d9..7b81ef0 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0023.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0023.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0023 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0023 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0023; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0023; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0023 /// 瑙f瀽鏁版嵁 + /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0023 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0023 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0023 JT905_0x8103_0x0023 = new JT905_0x8103_0x0023(); - JT905_0x8103_0x0023.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0023.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0023.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0023.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0023.ParamId); + JT905_0x8103_0x0023.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0023.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0023.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0023.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0023.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0023.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0023.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0023.ParamValue); + JT905_0x8103_0x0023.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0023.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0023.ParamValue); + } /// - /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0023 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0023 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0023 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0023 JT905_0x8103_0x0023 = new JT905_0x8103_0x0023(); - JT905_0x8103_0x0023.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0023.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0023.ParamLength = reader.ReadByte(); JT905_0x8103_0x0023.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0023; } /// - /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0023 /// 娑堟伅搴忓垪鍖 + /// ACCOFF姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0023 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0023 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0024.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0024.cs index 6ea490a..0f170f8 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0024.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0024.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0024 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0024 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0024; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0024; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0024 /// 瑙f瀽鏁版嵁 + /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0024 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0024 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0024 JT905_0x8103_0x0024 = new JT905_0x8103_0x0024(); - JT905_0x8103_0x0024.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0024.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0024.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0024.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0024.ParamId); + JT905_0x8103_0x0024.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0024.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0024.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0024.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0024.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0024.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0024.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0024.ParamValue); + JT905_0x8103_0x0024.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0024.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0024.ParamValue); + } /// - /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0024 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0024 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0024 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0024 JT905_0x8103_0x0024 = new JT905_0x8103_0x0024(); - JT905_0x8103_0x0024.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0024.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0024.ParamLength = reader.ReadByte(); JT905_0x8103_0x0024.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0024; } /// - /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0024 /// 娑堟伅搴忓垪鍖 + /// ACCON姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0024 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0024 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0025.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0025.cs index 35d225f..a57ce8f 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0025.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0025.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0025 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0025 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0025; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0025; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0025 /// 瑙f瀽鏁版嵁 + /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0025 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0025 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0025 JT905_0x8103_0x0025 = new JT905_0x8103_0x0025(); - JT905_0x8103_0x0025.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0025.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0025.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0025.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0025.ParamId); + JT905_0x8103_0x0025.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0025.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0025.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0025.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0025.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0025.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0025.ParamValue.ReadNumber()}]鍙傛暟鍊糩绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0025.ParamValue); + JT905_0x8103_0x0025.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0025.ParamValue.ReadNumber()}]鍙傛暟鍊糩绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0025.ParamValue); + } /// - /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0025 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0025 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0025 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0025 JT905_0x8103_0x0025 = new JT905_0x8103_0x0025(); - JT905_0x8103_0x0025.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0025.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0025.ParamLength = reader.ReadByte(); JT905_0x8103_0x0025.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0025; } /// - /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0025 /// 娑堟伅搴忓垪鍖 + /// 绌鸿溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0025 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0025 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0026.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0026.cs index b7f8f13..8d28b6d 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0026.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0026.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0026 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0026 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0026; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0026; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0026 /// 瑙f瀽鏁版嵁 + /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0026 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0026 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0026 JT905_0x8103_0x0026 = new JT905_0x8103_0x0026(); - JT905_0x8103_0x0026.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0026.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0026.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0026.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0026.ParamId); + JT905_0x8103_0x0026.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0026.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0026.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0026.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0026.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0026.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0026.ParamValue.ReadNumber()}]鍙傛暟鍊糩閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0026.ParamValue); + JT905_0x8103_0x0026.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0026.ParamValue.ReadNumber()}]鍙傛暟鍊糩閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0026.ParamValue); + } /// - /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0026 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0026 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0026 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0026 JT905_0x8103_0x0026 = new JT905_0x8103_0x0026(); - JT905_0x8103_0x0026.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0026.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0026.ParamLength = reader.ReadByte(); JT905_0x8103_0x0026.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0026; } /// - /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0026 /// 娑堟伅搴忓垪鍖 + /// 閲嶈溅姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0026 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0026 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0027.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0027.cs index 7a5a5ef..e9c318c 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0027.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0027.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0027 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0027 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0027; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0027; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0027 /// 瑙f瀽鏁版嵁 + /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0027 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0027 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0027 JT905_0x8103_0x0027 = new JT905_0x8103_0x0027(); - JT905_0x8103_0x0027.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0027.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0027.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0027.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0027.ParamId); + JT905_0x8103_0x0027.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0027.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0027.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0027.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0027.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0027.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0027.ParamValue.ReadNumber()}]鍙傛暟鍊糩浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0027.ParamValue); + JT905_0x8103_0x0027.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0027.ParamValue.ReadNumber()}]鍙傛暟鍊糩浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0027.ParamValue); + } /// - /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0027 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0027 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0027 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0027 JT905_0x8103_0x0027 = new JT905_0x8103_0x0027(); - JT905_0x8103_0x0027.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0027.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0027.ParamLength = reader.ReadByte(); JT905_0x8103_0x0027.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0027; } /// - /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) - /// 0x8103_0x0027 /// 娑堟伅搴忓垪鍖 + /// 浼戠湢鏃舵眹鎶ユ椂闂撮棿闅旓紝鍗曚綅涓虹(s) + /// 0x8103_0x0027 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0027 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0028.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0028.cs index 46fc35e..c470b5d 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0028.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0028.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0028 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0028 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0028; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0028; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0028 /// 瑙f瀽鏁版嵁 + /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0028 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0028 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0028 JT905_0x8103_0x0028 = new JT905_0x8103_0x0028(); - JT905_0x8103_0x0028.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0028.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0028.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0028.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0028.ParamId); + JT905_0x8103_0x0028.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0028.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0028.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0028.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0028.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0028.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0028.ParamValue.ReadNumber()}]鍙傛暟鍊糩绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0028.ParamValue); + JT905_0x8103_0x0028.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0028.ParamValue.ReadNumber()}]鍙傛暟鍊糩绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0028.ParamValue); + } /// - /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0028 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0028 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0028 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0028 JT905_0x8103_0x0028 = new JT905_0x8103_0x0028(); - JT905_0x8103_0x0028.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0028.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0028.ParamLength = reader.ReadByte(); JT905_0x8103_0x0028.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0028; } /// - /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x0028 /// 娑堟伅搴忓垪鍖 + /// 绱фユ姤璀︽椂姹囨姤鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x0028 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0028 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0029.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0029.cs index e2455d9..245d3d0 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0029.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0029.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0029 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0029 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0029; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0029; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) /// public uint ParamValue { get; set; } + /// - /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x0029 /// 瑙f瀽鏁版嵁 + /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x0029 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0029 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0029 JT905_0x8103_0x0029 = new JT905_0x8103_0x0029(); - JT905_0x8103_0x0029.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0029.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0029.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0029.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0029.ParamId); + JT905_0x8103_0x0029.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0029.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0029.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0029.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0029.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0029.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0029.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m)]", JT905_0x8103_0x0029.ParamValue); + JT905_0x8103_0x0029.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0029.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m)]", JT905_0x8103_0x0029.ParamValue); + } /// - /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x0029 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x0029 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0029 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0029 JT905_0x8103_0x0029 = new JT905_0x8103_0x0029(); - JT905_0x8103_0x0029.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0029.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0029.ParamLength = reader.ReadByte(); JT905_0x8103_0x0029.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0029; } /// - /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x0029 /// 娑堟伅搴忓垪鍖 + /// 鏈櫥褰曟眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x0029 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0029 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002A.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002A.cs index 8da15be..dbaa8b9 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002A.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002A.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002A : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002A /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002A; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002A; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// public uint ParamValue { get; set; } + /// - /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002A /// 瑙f瀽鏁版嵁 + /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002A /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002A : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002A JT905_0x8103_0x002A = new JT905_0x8103_0x002A(); - JT905_0x8103_0x002A.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002A.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002A.ParamId); + JT905_0x8103_0x002A.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002A.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002A.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002A.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002A.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002A.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002A.ParamValue); + JT905_0x8103_0x002A.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002A.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002A.ParamValue); + } /// - /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002A /// 娑堟伅鍙嶅簭鍒楀寲 + /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002A /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002A Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002A JT905_0x8103_0x002A = new JT905_0x8103_0x002A(); - JT905_0x8103_0x002A.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002A.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002A.ParamLength = reader.ReadByte(); JT905_0x8103_0x002A.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002A; } /// - /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002A /// 娑堟伅搴忓垪鍖 + /// ACCOFF姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002A /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002A value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002B.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002B.cs index 24acfef..477624e 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002B.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002B.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002B : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002B /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002B; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002B; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// public uint ParamValue { get; set; } + /// - /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002B /// 瑙f瀽鏁版嵁 + /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002B /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002B : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002B JT905_0x8103_0x002B = new JT905_0x8103_0x002B(); - JT905_0x8103_0x002B.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002B.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002B.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002B.ParamId); + JT905_0x8103_0x002B.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002B.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002B.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002B.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002B.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002B.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002B.ParamValue); + JT905_0x8103_0x002B.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002B.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002B.ParamValue); + } /// - /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002B /// 娑堟伅鍙嶅簭鍒楀寲 + /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002B /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002B Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002B JT905_0x8103_0x002B = new JT905_0x8103_0x002B(); - JT905_0x8103_0x002B.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002B.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002B.ParamLength = reader.ReadByte(); JT905_0x8103_0x002B.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002B; } /// - /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002B /// 娑堟伅搴忓垪鍖 + /// ACCON姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002B /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002B value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002C.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002C.cs index 4ba43f0..154cb8d 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002C.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002C.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002C : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002C /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002C; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002C; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// public uint ParamValue { get; set; } + /// - /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002C /// 瑙f瀽鏁版嵁 + /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002C /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002C : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002C JT905_0x8103_0x002C = new JT905_0x8103_0x002C(); - JT905_0x8103_0x002C.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002C.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002C.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002C.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002C.ParamId); + JT905_0x8103_0x002C.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002C.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002C.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002C.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002C.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002C.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002C.ParamValue.ReadNumber()}]鍙傛暟鍊糩绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002C.ParamValue); + JT905_0x8103_0x002C.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002C.ParamValue.ReadNumber()}]鍙傛暟鍊糩绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002C.ParamValue); + } /// - /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002C /// 娑堟伅鍙嶅簭鍒楀寲 + /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002C /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002C Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002C JT905_0x8103_0x002C = new JT905_0x8103_0x002C(); - JT905_0x8103_0x002C.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002C.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002C.ParamLength = reader.ReadByte(); JT905_0x8103_0x002C.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002C; } /// - /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002C /// 娑堟伅搴忓垪鍖 + /// 绌鸿溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002C /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002C value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002D.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002D.cs index 8e5ba32..dff84b9 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002D.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002D.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002D : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002D /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002D; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002D; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// public uint ParamValue { get; set; } + /// - /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002D /// 瑙f瀽鏁版嵁 + /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002D /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002D : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002D JT905_0x8103_0x002D = new JT905_0x8103_0x002D(); - JT905_0x8103_0x002D.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002D.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002D.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002D.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002D.ParamId); + JT905_0x8103_0x002D.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002D.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002D.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002D.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002D.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002D.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002D.ParamValue.ReadNumber()}]鍙傛暟鍊糩閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002D.ParamValue); + JT905_0x8103_0x002D.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002D.ParamValue.ReadNumber()}]鍙傛暟鍊糩閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002D.ParamValue); + } /// - /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002D /// 娑堟伅鍙嶅簭鍒楀寲 + /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002D /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002D Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002D JT905_0x8103_0x002D = new JT905_0x8103_0x002D(); - JT905_0x8103_0x002D.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002D.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002D.ParamLength = reader.ReadByte(); JT905_0x8103_0x002D.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002D; } /// - /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002D /// 娑堟伅搴忓垪鍖 + /// 閲嶈溅姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002D /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002D value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002E.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002E.cs index 8d1705e..6e11633 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002E.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002E.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002E : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002E /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002E; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002E; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) /// public uint ParamValue { get; set; } + /// - /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x002E /// 瑙f瀽鏁版嵁 + /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x002E /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002E : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002E JT905_0x8103_0x002E = new JT905_0x8103_0x002E(); - JT905_0x8103_0x002E.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002E.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002E.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002E.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002E.ParamId); + JT905_0x8103_0x002E.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002E.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002E.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002E.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002E.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002E.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002E.ParamValue.ReadNumber()}]鍙傛暟鍊糩浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m)]", JT905_0x8103_0x002E.ParamValue); + JT905_0x8103_0x002E.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002E.ParamValue.ReadNumber()}]鍙傛暟鍊糩浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m)]", JT905_0x8103_0x002E.ParamValue); + } /// - /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x002E /// 娑堟伅鍙嶅簭鍒楀寲 + /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x002E /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002E Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002E JT905_0x8103_0x002E = new JT905_0x8103_0x002E(); - JT905_0x8103_0x002E.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002E.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002E.ParamLength = reader.ReadByte(); JT905_0x8103_0x002E.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002E; } /// - /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) - /// 0x8103_0x002E /// 娑堟伅搴忓垪鍖 + /// 浼戠湢鏃舵眹鎶ヨ窛绂婚棿闅旓紝鍗曚綅涓虹背(m) + /// 0x8103_0x002E /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002E value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002F.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002F.cs index d872522..c3c608d 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002F.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x002F.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x002F : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x002F /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002F; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x002F; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) /// public uint ParamValue { get; set; } + /// - /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002F /// 瑙f瀽鏁版嵁 + /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002F /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x002F : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x002F JT905_0x8103_0x002F = new JT905_0x8103_0x002F(); - JT905_0x8103_0x002F.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x002F.ParamLength = reader.ReadByte(); - JT905_0x8103_0x002F.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x002F.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002F.ParamId); + JT905_0x8103_0x002F.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x002F.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x002F.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x002F.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x002F.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x002F.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x002F.ParamValue.ReadNumber()}]鍙傛暟鍊糩绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002F.ParamValue); + JT905_0x8103_0x002F.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x002F.ParamValue.ReadNumber()}]鍙傛暟鍊糩绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m)]", JT905_0x8103_0x002F.ParamValue); + } /// - /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002F /// 娑堟伅鍙嶅簭鍒楀寲 + /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002F /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x002F Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x002F JT905_0x8103_0x002F = new JT905_0x8103_0x002F(); - JT905_0x8103_0x002F.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x002F.ParamId = reader.ReadUInt16(); JT905_0x8103_0x002F.ParamLength = reader.ReadByte(); JT905_0x8103_0x002F.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x002F; } /// - /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) - /// 0x8103_0x002F /// 娑堟伅搴忓垪鍖 + /// 绱фユ姤璀︽椂姹囨姤璺濈闂撮殧锛屽崟浣嶄负绫(m) + /// 0x8103_0x002F /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x002F value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0030.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0030.cs index acdd5ed..cea07db 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0030.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0030.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0030 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0030 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0030; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0030; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 /// public uint ParamValue { get; set; } + /// - /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 - /// 0x8103_0x0030 /// 瑙f瀽鏁版嵁 + /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + /// 0x8103_0x0030 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0030 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0030 JT905_0x8103_0x0030 = new JT905_0x8103_0x0030(); - JT905_0x8103_0x0030.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0030.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0030.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0030.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0030.ParamId); + JT905_0x8103_0x0030.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0030.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0030.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0030.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0030.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0030.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0030.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎷愮偣琛ヤ紶瑙掑害锛岋工180掳]", JT905_0x8103_0x0030.ParamValue); + JT905_0x8103_0x0030.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0030.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎷愮偣琛ヤ紶瑙掑害锛岋工180掳]", JT905_0x8103_0x0030.ParamValue); + } /// - /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 - /// 0x8103_0x0030 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + /// 0x8103_0x0030 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0030 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0030 JT905_0x8103_0x0030 = new JT905_0x8103_0x0030(); - JT905_0x8103_0x0030.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0030.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0030.ParamLength = reader.ReadByte(); JT905_0x8103_0x0030.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0030; } /// - /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 - /// 0x8103_0x0030 /// 娑堟伅搴忓垪鍖 + /// 鎷愮偣琛ヤ紶瑙掑害锛岋工180掳 + /// 0x8103_0x0030 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0030 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0040.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0040.cs index 3445f68..588f241 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0040.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0040.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0040 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0040 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0040; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0040; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 - /// 0x8103_0x0040 /// 瑙f瀽鏁版嵁 + /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + /// 0x8103_0x0040 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0040 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0040 JT905_0x8103_0x0040 = new JT905_0x8103_0x0040(); - JT905_0x8103_0x0040.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0040.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0040.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0040.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0040.ParamId); + JT905_0x8103_0x0040.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0040.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0040.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0040.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0040.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0040.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0040.ParamValue.ReadNumber()}]鍙傛暟鍊糩鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜]", JT905_0x8103_0x0040.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0040.ParamLength); + JT905_0x8103_0x0040.ParamValue = reader.ReadString(JT905_0x8103_0x0040.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜]", JT905_0x8103_0x0040.ParamValue); + } /// - /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 - /// 0x8103_0x0040 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + /// 0x8103_0x0040 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0040 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0040 JT905_0x8103_0x0040 = new JT905_0x8103_0x0040(); - JT905_0x8103_0x0040.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0040.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0040.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0040.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0040.ParamValue = reader.ReadString(JT905_0x8103_0x0040.ParamLength); + return JT905_0x8103_0x0040; } /// - /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 - /// 0x8103_0x0040 /// 娑堟伅搴忓垪鍖 + /// 鐩戞帶鎸囨尌涓績鐢佃瘽鍙风爜 + /// 0x8103_0x0040 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0040 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0041.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0041.cs index d3fe695..9af7099 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0041.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0041.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0041 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0041 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0041; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0041; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 澶嶄綅鐢佃瘽鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 澶嶄綅鐢佃瘽鍙风爜 - /// 0x8103_0x0041 /// 瑙f瀽鏁版嵁 + /// 澶嶄綅鐢佃瘽鍙风爜 + /// 0x8103_0x0041 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0041 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0041 JT905_0x8103_0x0041 = new JT905_0x8103_0x0041(); - JT905_0x8103_0x0041.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0041.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0041.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0041.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0041.ParamId); + JT905_0x8103_0x0041.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0041.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0041.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0041.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0041.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0041.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0041.ParamValue.ReadNumber()}]鍙傛暟鍊糩澶嶄綅鐢佃瘽鍙风爜]", JT905_0x8103_0x0041.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0041.ParamLength); + JT905_0x8103_0x0041.ParamValue = reader.ReadString(JT905_0x8103_0x0041.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩澶嶄綅鐢佃瘽鍙风爜]", JT905_0x8103_0x0041.ParamValue); + } /// - /// 澶嶄綅鐢佃瘽鍙风爜 - /// 0x8103_0x0041 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 澶嶄綅鐢佃瘽鍙风爜 + /// 0x8103_0x0041 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0041 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0041 JT905_0x8103_0x0041 = new JT905_0x8103_0x0041(); - JT905_0x8103_0x0041.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0041.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0041.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0041.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0041.ParamValue = reader.ReadString(JT905_0x8103_0x0041.ParamLength); + return JT905_0x8103_0x0041; } /// - /// 澶嶄綅鐢佃瘽鍙风爜 - /// 0x8103_0x0041 /// 娑堟伅搴忓垪鍖 + /// 澶嶄綅鐢佃瘽鍙风爜 + /// 0x8103_0x0041 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0041 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0042.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0042.cs index 175786b..132bc54 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0042.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0042.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0042 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0042 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0042; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0042; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 - /// 0x8103_0x0042 /// 瑙f瀽鏁版嵁 + /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + /// 0x8103_0x0042 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0042 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0042 JT905_0x8103_0x0042 = new JT905_0x8103_0x0042(); - JT905_0x8103_0x0042.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0042.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0042.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0042.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0042.ParamId); + JT905_0x8103_0x0042.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0042.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0042.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0042.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0042.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0042.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0042.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜]", JT905_0x8103_0x0042.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0042.ParamLength); + JT905_0x8103_0x0042.ParamValue = reader.ReadString(JT905_0x8103_0x0042.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜]", JT905_0x8103_0x0042.ParamValue); + } /// - /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 - /// 0x8103_0x0042 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + /// 0x8103_0x0042 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0042 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0042 JT905_0x8103_0x0042 = new JT905_0x8103_0x0042(); - JT905_0x8103_0x0042.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0042.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0042.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0042.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0042.ParamValue = reader.ReadString(JT905_0x8103_0x0042.ParamLength); + return JT905_0x8103_0x0042; } /// - /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 - /// 0x8103_0x0042 /// 娑堟伅搴忓垪鍖 + /// 鎭㈠鍑哄巶璁剧疆鐢佃瘽鍙风爜 + /// 0x8103_0x0042 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0042 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0043.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0043.cs index f30e889..c4806e7 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0043.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0043.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0043 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0043 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0043; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0043; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 - /// 0x8103_0x0043 /// 瑙f瀽鏁版嵁 + /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + /// 0x8103_0x0043 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0043 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0043 JT905_0x8103_0x0043 = new JT905_0x8103_0x0043(); - JT905_0x8103_0x0043.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0043.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0043.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0043.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0043.ParamId); + JT905_0x8103_0x0043.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0043.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0043.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0043.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0043.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0043.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0043.ParamValue.ReadNumber()}]鍙傛暟鍊糩鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜]", JT905_0x8103_0x0043.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0043.ParamLength); + JT905_0x8103_0x0043.ParamValue = reader.ReadString(JT905_0x8103_0x0043.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜]", JT905_0x8103_0x0043.ParamValue); + } /// - /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 - /// 0x8103_0x0043 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + /// 0x8103_0x0043 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0043 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0043 JT905_0x8103_0x0043 = new JT905_0x8103_0x0043(); - JT905_0x8103_0x0043.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0043.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0043.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0043.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0043.ParamValue = reader.ReadString(JT905_0x8103_0x0043.ParamLength); + return JT905_0x8103_0x0043; } /// - /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 - /// 0x8103_0x0043 /// 娑堟伅搴忓垪鍖 + /// 鐩戞帶鎸囨尌涓績SMS鐢佃瘽鍙风爜 + /// 0x8103_0x0043 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0043 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0044.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0044.cs index c9df824..3e774ea 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0044.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0044.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0044 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0044 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0044; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0044; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 - /// 0x8103_0x0044 /// 瑙f瀽鏁版嵁 + /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + /// 0x8103_0x0044 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0044 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0044 JT905_0x8103_0x0044 = new JT905_0x8103_0x0044(); - JT905_0x8103_0x0044.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0044.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0044.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0044.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0044.ParamId); + JT905_0x8103_0x0044.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0044.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0044.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0044.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0044.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0044.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0044.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜]", JT905_0x8103_0x0044.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0044.ParamLength); + JT905_0x8103_0x0044.ParamValue = reader.ReadString(JT905_0x8103_0x0044.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜]", JT905_0x8103_0x0044.ParamValue); + } /// - /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 - /// 0x8103_0x0044 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + /// 0x8103_0x0044 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0044 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0044 JT905_0x8103_0x0044 = new JT905_0x8103_0x0044(); - JT905_0x8103_0x0044.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0044.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0044.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0044.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0044.ParamValue = reader.ReadString(JT905_0x8103_0x0044.ParamLength); + return JT905_0x8103_0x0044; } /// - /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 - /// 0x8103_0x0044 /// 娑堟伅搴忓垪鍖 + /// 鎺ユ敹ISUSMS鏂囨湰鎶ヨ鍙风爜 + /// 0x8103_0x0044 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0044 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0045.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0045.cs index e60f9b7..ee07ed7 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0045.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0045.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0045 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0045 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0045; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0045; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 /// public uint ParamValue { get; set; } + /// - /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 - /// 0x8103_0x0045 /// 瑙f瀽鏁版嵁 + /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + /// 0x8103_0x0045 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0045 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0045 JT905_0x8103_0x0045 = new JT905_0x8103_0x0045(); - JT905_0x8103_0x0045.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0045.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0045.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0045.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0045.ParamId); + JT905_0x8103_0x0045.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0045.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0045.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0045.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0045.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0045.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0045.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚琞", JT905_0x8103_0x0045.ParamValue); + JT905_0x8103_0x0045.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0045.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚琞", JT905_0x8103_0x0045.ParamValue); + } /// - /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 - /// 0x8103_0x0045 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + /// 0x8103_0x0045 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0045 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0045 JT905_0x8103_0x0045 = new JT905_0x8103_0x0045(); - JT905_0x8103_0x0045.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0045.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0045.ParamLength = reader.ReadByte(); JT905_0x8103_0x0045.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0045; } /// - /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 - /// 0x8103_0x0045 /// 娑堟伅搴忓垪鍖 + /// ISU鐢佃瘽鎺ュ惉绛栫暐锛0锛氳嚜鍔ㄦ帴鍚紱1锛欰CCON鏃惰嚜鍔ㄦ帴鍚紝OFF鏃舵墜鍔ㄦ帴鍚 + /// 0x8103_0x0045 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0045 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0046.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0046.cs index 02b17bd..94e0cde 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0046.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0046.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0046 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0046 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0046; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0046; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0046 /// 瑙f瀽鏁版嵁 + /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0046 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0046 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0046 JT905_0x8103_0x0046 = new JT905_0x8103_0x0046(); - JT905_0x8103_0x0046.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0046.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0046.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0046.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0046.ParamId); + JT905_0x8103_0x0046.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0046.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0046.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0046.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0046.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0046.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0046.ParamValue.ReadNumber()}]鍙傛暟鍊糩姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0046.ParamValue); + JT905_0x8103_0x0046.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0046.ParamValue.ReadNumber()}]鍙傛暟鍊糩姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0046.ParamValue); + } /// - /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0046 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0046 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0046 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0046 JT905_0x8103_0x0046 = new JT905_0x8103_0x0046(); - JT905_0x8103_0x0046.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0046.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0046.ParamLength = reader.ReadByte(); JT905_0x8103_0x0046.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0046; } /// - /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0046 /// 娑堟伅搴忓垪鍖 + /// 姣忔鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0046 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0046 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0047.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0047.cs index 2fddcb1..60dbc62 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0047.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0047.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0047 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0047 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0047; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0047; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0047 /// 瑙f瀽鏁版嵁 + /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0047 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0047 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0047 JT905_0x8103_0x0047 = new JT905_0x8103_0x0047(); - JT905_0x8103_0x0047.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0047.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0047.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0047.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0047.ParamId); + JT905_0x8103_0x0047.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0047.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0047.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0047.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0047.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0047.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0047.ParamValue.ReadNumber()}]鍙傛暟鍊糩褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0047.ParamValue); + JT905_0x8103_0x0047.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0047.ParamValue.ReadNumber()}]鍙傛暟鍊糩褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0047.ParamValue); + } /// - /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0047 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0047 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0047 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0047 JT905_0x8103_0x0047 = new JT905_0x8103_0x0047(); - JT905_0x8103_0x0047.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0047.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0047.ParamLength = reader.ReadByte(); JT905_0x8103_0x0047.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0047; } /// - /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x0047 /// 娑堟伅搴忓垪鍖 + /// 褰撴湀鏈闀块氳瘽鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x0047 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0047 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0048.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0048.cs index f866af0..97ec8f0 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0048.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0048.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0048 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0048 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0048; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0048; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鐢佃瘽鐭彿闀垮害 /// public uint ParamValue { get; set; } + /// - /// 鐢佃瘽鐭彿闀垮害 - /// 0x8103_0x0048 /// 瑙f瀽鏁版嵁 + /// 鐢佃瘽鐭彿闀垮害 + /// 0x8103_0x0048 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0048 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0048 JT905_0x8103_0x0048 = new JT905_0x8103_0x0048(); - JT905_0x8103_0x0048.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0048.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0048.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0048.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0048.ParamId); + JT905_0x8103_0x0048.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0048.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0048.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0048.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0048.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0048.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0048.ParamValue.ReadNumber()}]鍙傛暟鍊糩鐢佃瘽鐭彿闀垮害]", JT905_0x8103_0x0048.ParamValue); + JT905_0x8103_0x0048.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0048.ParamValue.ReadNumber()}]鍙傛暟鍊糩鐢佃瘽鐭彿闀垮害]", JT905_0x8103_0x0048.ParamValue); + } /// - /// 鐢佃瘽鐭彿闀垮害 - /// 0x8103_0x0048 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鐢佃瘽鐭彿闀垮害 + /// 0x8103_0x0048 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0048 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0048 JT905_0x8103_0x0048 = new JT905_0x8103_0x0048(); - JT905_0x8103_0x0048.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0048.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0048.ParamLength = reader.ReadByte(); JT905_0x8103_0x0048.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0048; } /// - /// 鐢佃瘽鐭彿闀垮害 - /// 0x8103_0x0048 /// 娑堟伅搴忓垪鍖 + /// 鐢佃瘽鐭彿闀垮害 + /// 0x8103_0x0048 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0048 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0049.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0049.cs index 9e1de26..dc77ac9 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0049.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0049.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0049 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0049 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0049; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0049; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鐩戝惉鐢佃瘽鍙风爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鐩戝惉鐢佃瘽鍙风爜 - /// 0x8103_0x0049 /// 瑙f瀽鏁版嵁 + /// 鐩戝惉鐢佃瘽鍙风爜 + /// 0x8103_0x0049 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0049 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0049 JT905_0x8103_0x0049 = new JT905_0x8103_0x0049(); - JT905_0x8103_0x0049.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0049.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0049.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0049.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0049.ParamId); + JT905_0x8103_0x0049.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0049.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0049.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0049.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0049.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0049.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0049.ParamValue.ReadNumber()}]鍙傛暟鍊糩鐩戝惉鐢佃瘽鍙风爜]", JT905_0x8103_0x0049.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0049.ParamLength); + JT905_0x8103_0x0049.ParamValue = reader.ReadString(JT905_0x8103_0x0049.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鐩戝惉鐢佃瘽鍙风爜]", JT905_0x8103_0x0049.ParamValue); + } /// - /// 鐩戝惉鐢佃瘽鍙风爜 - /// 0x8103_0x0049 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鐩戝惉鐢佃瘽鍙风爜 + /// 0x8103_0x0049 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0049 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0049 JT905_0x8103_0x0049 = new JT905_0x8103_0x0049(); - JT905_0x8103_0x0049.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0049.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0049.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0049.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0049.ParamValue = reader.ReadString(JT905_0x8103_0x0049.ParamLength); + return JT905_0x8103_0x0049; } /// - /// 鐩戝惉鐢佃瘽鍙风爜 - /// 0x8103_0x0049 /// 娑堟伅搴忓垪鍖 + /// 鐩戝惉鐢佃瘽鍙风爜 + /// 0x8103_0x0049 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0049 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004A.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004A.cs index caef452..b636d8e 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004A.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004A.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x004A : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x004A /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x004A; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x004A; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// ISU璁惧缁存姢瀵嗙爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// ISU璁惧缁存姢瀵嗙爜 - /// 0x8103_0x004A /// 瑙f瀽鏁版嵁 + /// ISU璁惧缁存姢瀵嗙爜 + /// 0x8103_0x004A /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x004A : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x004A JT905_0x8103_0x004A = new JT905_0x8103_0x004A(); - JT905_0x8103_0x004A.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x004A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x004A.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x004A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x004A.ParamId); + JT905_0x8103_0x004A.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x004A.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x004A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x004A.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x004A.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x004A.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x004A.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU璁惧缁存姢瀵嗙爜]", JT905_0x8103_0x004A.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x004A.ParamLength); + JT905_0x8103_0x004A.ParamValue = reader.ReadString(JT905_0x8103_0x004A.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩ISU璁惧缁存姢瀵嗙爜]", JT905_0x8103_0x004A.ParamValue); + } /// - /// ISU璁惧缁存姢瀵嗙爜 - /// 0x8103_0x004A /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU璁惧缁存姢瀵嗙爜 + /// 0x8103_0x004A /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x004A Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x004A JT905_0x8103_0x004A = new JT905_0x8103_0x004A(); - JT905_0x8103_0x004A.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x004A.ParamId = reader.ReadUInt16(); JT905_0x8103_0x004A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x004A.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x004A.ParamValue = reader.ReadString(JT905_0x8103_0x004A.ParamLength); + return JT905_0x8103_0x004A; } /// - /// ISU璁惧缁存姢瀵嗙爜 - /// 0x8103_0x004A /// 娑堟伅搴忓垪鍖 + /// ISU璁惧缁存姢瀵嗙爜 + /// 0x8103_0x004A /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x004A value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004B.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004B.cs index 43997eb..54bc955 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004B.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x004B.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x004B : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x004B /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x004B; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x004B; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) - /// 0x8103_0x004B /// 瑙f瀽鏁版嵁 + /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + /// 0x8103_0x004B /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x004B : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x004B JT905_0x8103_0x004B = new JT905_0x8103_0x004B(); - JT905_0x8103_0x004B.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x004B.ParamLength = reader.ReadByte(); - JT905_0x8103_0x004B.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x004B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x004B.ParamId); + JT905_0x8103_0x004B.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x004B.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x004B.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x004B.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x004B.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x004B.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x004B.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂)]", JT905_0x8103_0x004B.ParamValue); + JT905_0x8103_0x004B.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x004B.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂)]", JT905_0x8103_0x004B.ParamValue); + } /// - /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) - /// 0x8103_0x004B /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + /// 0x8103_0x004B /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x004B Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x004B JT905_0x8103_0x004B = new JT905_0x8103_0x004B(); - JT905_0x8103_0x004B.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x004B.ParamId = reader.ReadUInt16(); JT905_0x8103_0x004B.ParamLength = reader.ReadByte(); - JT905_0x8103_0x004B.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x004B.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x004B; } /// - /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) - /// 0x8103_0x004B /// 娑堟伅搴忓垪鍖 + /// ISU鐨勮闊虫挱鎶ラ煶閲忔帶鍒讹細0锝9(0涓洪潤闊筹紝9涓烘渶楂) + /// 0x8103_0x004B /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x004B value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0050.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0050.cs index f4d0afe..c13a030 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0050.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0050.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0050 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0050 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0050; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0050; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 /// public uint ParamValue { get; set; } + /// - /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 - /// 0x8103_0x0050 /// 瑙f瀽鏁版嵁 + /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + /// 0x8103_0x0050 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0050 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0050 JT905_0x8103_0x0050 = new JT905_0x8103_0x0050(); - JT905_0x8103_0x0050.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0050.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0050.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0050.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0050.ParamId); + JT905_0x8103_0x0050.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0050.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0050.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0050.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0050.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0050.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0050.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄絔", JT905_0x8103_0x0050.ParamValue); + JT905_0x8103_0x0050.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0050.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄絔", JT905_0x8103_0x0050.ParamValue); + } /// - /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 - /// 0x8103_0x0050 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + /// 0x8103_0x0050 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0050 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0050 JT905_0x8103_0x0050 = new JT905_0x8103_0x0050(); - JT905_0x8103_0x0050.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0050.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0050.ParamLength = reader.ReadByte(); JT905_0x8103_0x0050.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0050; } /// - /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 - /// 0x8103_0x0050 /// 娑堟伅搴忓垪鍖 + /// 鎶ヨ灞忚斀瀛楋紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ琚睆钄 + /// 0x8103_0x0050 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0050 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0051.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0051.cs index 5345f55..060b3f0 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0051.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0051.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0051 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0051 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0051; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0051; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS /// public uint ParamValue { get; set; } + /// - /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS - /// 0x8103_0x0051 /// 瑙f瀽鏁版嵁 + /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + /// 0x8103_0x0051 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0051 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0051 JT905_0x8103_0x0051 = new JT905_0x8103_0x0051(); - JT905_0x8103_0x0051.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0051.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0051.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0051.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0051.ParamId); + JT905_0x8103_0x0051.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0051.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0051.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0051.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0051.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0051.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0051.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS]", JT905_0x8103_0x0051.ParamValue); + JT905_0x8103_0x0051.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0051.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS]", JT905_0x8103_0x0051.ParamValue); + } /// - /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS - /// 0x8103_0x0051 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + /// 0x8103_0x0051 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0051 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0051 JT905_0x8103_0x0051 = new JT905_0x8103_0x0051(); - JT905_0x8103_0x0051.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0051.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0051.ParamLength = reader.ReadByte(); JT905_0x8103_0x0051.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0051; } /// - /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS - /// 0x8103_0x0051 /// 娑堟伅搴忓垪鍖 + /// 鎶ヨ鍙戦佹枃鏈琒MS寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃跺彂閫佹枃鏈琒MS + /// 0x8103_0x0051 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0051 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0052.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0052.cs index dc2ecdf..414a131 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0052.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0052.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0052 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0052 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0052; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0052; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 /// public uint ParamValue { get; set; } + /// - /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 - /// 0x8103_0x0052 /// 瑙f瀽鏁版嵁 + /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + /// 0x8103_0x0052 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0052 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0052 JT905_0x8103_0x0052 = new JT905_0x8103_0x0052(); - JT905_0x8103_0x0052.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0052.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0052.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0052.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0052.ParamId); + JT905_0x8103_0x0052.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0052.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0052.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0052.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0052.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0052.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0052.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚]", JT905_0x8103_0x0052.ParamValue); + JT905_0x8103_0x0052.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0052.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚]", JT905_0x8103_0x0052.ParamValue); + } /// - /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 - /// 0x8103_0x0052 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + /// 0x8103_0x0052 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0052 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0052 JT905_0x8103_0x0052 = new JT905_0x8103_0x0052(); - JT905_0x8103_0x0052.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0052.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0052.ParamLength = reader.ReadByte(); JT905_0x8103_0x0052.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0052; } /// - /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 - /// 0x8103_0x0052 /// 娑堟伅搴忓垪鍖 + /// 鎶ヨ鎷嶆憚寮鍏筹紝涓庝綅缃俊鎭眹鎶ユ秷鎭腑鐨勬姤璀︽爣蹇楃浉瀵瑰簲锛岀浉搴斾綅涓1锛屽垯鐩稿簲鎶ヨ鏃舵憚鍍忓ご鎷嶆憚 + /// 0x8103_0x0052 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0052 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0053.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0053.cs index a728926..8238494 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0053.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0053.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0053 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0053 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0053; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0053; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 /// public uint ParamValue { get; set; } + /// - /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 - /// 0x8103_0x0053 /// 瑙f瀽鏁版嵁 + /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + /// 0x8103_0x0053 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0053 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0053 JT905_0x8103_0x0053 = new JT905_0x8103_0x0053(); - JT905_0x8103_0x0053.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0053.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0053.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0053.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0053.ParamId); + JT905_0x8103_0x0053.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0053.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0053.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0053.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0053.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0053.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0053.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼燷", JT905_0x8103_0x0053.ParamValue); + JT905_0x8103_0x0053.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0053.ParamValue.ReadNumber()}]鍙傛暟鍊糩鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼燷", JT905_0x8103_0x0053.ParamValue); + } /// - /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 - /// 0x8103_0x0053 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + /// 0x8103_0x0053 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0053 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0053 JT905_0x8103_0x0053 = new JT905_0x8103_0x0053(); - JT905_0x8103_0x0053.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0053.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0053.ParamLength = reader.ReadByte(); JT905_0x8103_0x0053.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0053; } /// - /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 - /// 0x8103_0x0053 /// 娑堟伅搴忓垪鍖 + /// 鎶ヨ鎷嶆憚瀛樺偍鏍囧織锛屼笌浣嶇疆淇℃伅姹囨姤娑堟伅涓殑鎶ヨ鏍囧織鐩稿搴旓紝鐩稿簲浣嶄负1锛屽垯瀵圭浉搴旀姤璀︽椂鎷嶇殑鐓х墖杩涜瀛樺偍锛屽惁鍒欏疄鏃朵笂浼 + /// 0x8103_0x0053 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0053 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0055.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0055.cs index baaf5f9..666d810 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0055.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0055.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0055 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0055 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0055; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0055; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) /// public uint ParamValue { get; set; } + /// - /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) - /// 0x8103_0x0055 /// 瑙f瀽鏁版嵁 + /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + /// 0x8103_0x0055 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0055 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0055 JT905_0x8103_0x0055 = new JT905_0x8103_0x0055(); - JT905_0x8103_0x0055.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0055.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0055.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0055.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0055.ParamId); + JT905_0x8103_0x0055.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0055.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0055.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0055.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0055.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0055.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0055.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h)]", JT905_0x8103_0x0055.ParamValue); + JT905_0x8103_0x0055.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0055.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h)]", JT905_0x8103_0x0055.ParamValue); + } /// - /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) - /// 0x8103_0x0055 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + /// 0x8103_0x0055 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0055 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0055 JT905_0x8103_0x0055 = new JT905_0x8103_0x0055(); - JT905_0x8103_0x0055.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0055.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0055.ParamLength = reader.ReadByte(); JT905_0x8103_0x0055.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0055; } /// - /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) - /// 0x8103_0x0055 /// 娑堟伅搴忓垪鍖 + /// 鏈楂橀熷害锛屽崟浣嶄负鍗冪背姣忓皬鏃(km/h) + /// 0x8103_0x0055 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0055 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0056.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0056.cs index 6fe71e5..77e1164 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0056.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0056.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0056 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0056 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0056; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0056; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0056 /// 瑙f瀽鏁版嵁 + /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0056 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0056 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0056 JT905_0x8103_0x0056 = new JT905_0x8103_0x0056(); - JT905_0x8103_0x0056.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0056.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0056.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0056.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0056.ParamId); + JT905_0x8103_0x0056.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0056.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0056.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0056.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0056.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0056.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0056.ParamValue.ReadNumber()}]鍙傛暟鍊糩瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0056.ParamValue); + JT905_0x8103_0x0056.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0056.ParamValue.ReadNumber()}]鍙傛暟鍊糩瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0056.ParamValue); + } /// - /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0056 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0056 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0056 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0056 JT905_0x8103_0x0056 = new JT905_0x8103_0x0056(); - JT905_0x8103_0x0056.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0056.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0056.ParamLength = reader.ReadByte(); JT905_0x8103_0x0056.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0056; } /// - /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0056 /// 娑堟伅搴忓垪鍖 + /// 瓒呴熸寔缁椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0056 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0056 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0057.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0057.cs index 5218241..72a4608 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0057.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0057.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0057 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0057 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0057; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0057; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x0057 /// 瑙f瀽鏁版嵁 + /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x0057 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0057 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0057 JT905_0x8103_0x0057 = new JT905_0x8103_0x0057(); - JT905_0x8103_0x0057.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0057.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0057.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0057.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0057.ParamId); + JT905_0x8103_0x0057.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0057.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0057.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0057.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0057.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0057.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0057.ParamValue.ReadNumber()}]鍙傛暟鍊糩杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0057.ParamValue); + JT905_0x8103_0x0057.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0057.ParamValue.ReadNumber()}]鍙傛暟鍊糩杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x0057.ParamValue); + } /// - /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x0057 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x0057 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0057 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0057 JT905_0x8103_0x0057 = new JT905_0x8103_0x0057(); - JT905_0x8103_0x0057.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0057.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0057.ParamLength = reader.ReadByte(); JT905_0x8103_0x0057.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0057; } /// - /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x0057 /// 娑堟伅搴忓垪鍖 + /// 杩炵画椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x0057 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0057 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0058.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0058.cs index 6a4119b..6506bd5 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0058.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0058.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0058 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0058 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0058; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0058; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0058 /// 瑙f瀽鏁版嵁 + /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0058 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0058 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0058 JT905_0x8103_0x0058 = new JT905_0x8103_0x0058(); - JT905_0x8103_0x0058.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0058.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0058.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0058.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0058.ParamId); + JT905_0x8103_0x0058.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0058.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0058.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0058.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0058.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0058.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0058.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0058.ParamValue); + JT905_0x8103_0x0058.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0058.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0058.ParamValue); + } /// - /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0058 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0058 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0058 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0058 JT905_0x8103_0x0058 = new JT905_0x8103_0x0058(); - JT905_0x8103_0x0058.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0058.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0058.ParamLength = reader.ReadByte(); JT905_0x8103_0x0058.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0058; } /// - /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0058 /// 娑堟伅搴忓垪鍖 + /// 鏈灏忎紤鎭椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0058 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0058 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0059.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0059.cs index 912a6c1..ab7f4d8 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0059.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0059.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0059 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0059 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0059; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0059; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) /// public uint ParamValue { get; set; } + /// - /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0059 /// 瑙f瀽鏁版嵁 + /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0059 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0059 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0059 JT905_0x8103_0x0059 = new JT905_0x8103_0x0059(); - JT905_0x8103_0x0059.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0059.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0059.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0059.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0059.ParamId); + JT905_0x8103_0x0059.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0059.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0059.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0059.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0059.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0059.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0059.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0059.ParamValue); + JT905_0x8103_0x0059.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0059.ParamValue.ReadNumber()}]鍙傛暟鍊糩鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s)]", JT905_0x8103_0x0059.ParamValue); + } /// - /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0059 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0059 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0059 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0059 JT905_0x8103_0x0059 = new JT905_0x8103_0x0059(); - JT905_0x8103_0x0059.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0059.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0059.ParamLength = reader.ReadByte(); JT905_0x8103_0x0059.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0059; } /// - /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) - /// 0x8103_0x0059 /// 娑堟伅搴忓垪鍖 + /// 鏈闀垮仠杞︽椂闂达紝鍗曚綅涓虹(s) + /// 0x8103_0x0059 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0059 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x005A.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x005A.cs index 514c56a..3efec3c 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x005A.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x005A.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x005A : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x005A /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x005A; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x005A; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) /// public uint ParamValue { get; set; } + /// - /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x005A /// 瑙f瀽鏁版嵁 + /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x005A /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x005A : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x005A JT905_0x8103_0x005A = new JT905_0x8103_0x005A(); - JT905_0x8103_0x005A.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x005A.ParamLength = reader.ReadByte(); - JT905_0x8103_0x005A.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x005A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x005A.ParamId); + JT905_0x8103_0x005A.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x005A.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x005A.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x005A.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x005A.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x005A.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x005A.ParamValue.ReadNumber()}]鍙傛暟鍊糩褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x005A.ParamValue); + JT905_0x8103_0x005A.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x005A.ParamValue.ReadNumber()}]鍙傛暟鍊糩褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x005A.ParamValue); + } /// - /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x005A /// 娑堟伅鍙嶅簭鍒楀寲 + /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x005A /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x005A Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x005A JT905_0x8103_0x005A = new JT905_0x8103_0x005A(); - JT905_0x8103_0x005A.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x005A.ParamId = reader.ReadUInt16(); JT905_0x8103_0x005A.ParamLength = reader.ReadByte(); JT905_0x8103_0x005A.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x005A; } /// - /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) - /// 0x8103_0x005A /// 娑堟伅搴忓垪鍖 + /// 褰撳ぉ绱椹鹃┒鏃堕棿闂ㄩ檺锛屽崟浣嶄负绉(s) + /// 0x8103_0x005A /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x005A value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0070.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0070.cs index f40ff6c..7b3d706 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0070.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0070.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0070 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0070 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0070; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0070; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 /// public uint ParamValue { get; set; } + /// - /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 - /// 0x8103_0x0070 /// 瑙f瀽鏁版嵁 + /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + /// 0x8103_0x0070 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0070 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0070 JT905_0x8103_0x0070 = new JT905_0x8103_0x0070(); - JT905_0x8103_0x0070.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0070.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0070.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0070.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0070.ParamId); + JT905_0x8103_0x0070.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0070.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0070.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0070.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0070.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0070.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0070.ParamValue.ReadNumber()}]鍙傛暟鍊糩鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂絔", JT905_0x8103_0x0070.ParamValue); + JT905_0x8103_0x0070.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0070.ParamValue.ReadNumber()}]鍙傛暟鍊糩鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂絔", JT905_0x8103_0x0070.ParamValue); + } /// - /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 - /// 0x8103_0x0070 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + /// 0x8103_0x0070 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0070 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0070 JT905_0x8103_0x0070 = new JT905_0x8103_0x0070(); - JT905_0x8103_0x0070.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0070.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0070.ParamLength = reader.ReadByte(); JT905_0x8103_0x0070.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0070; } /// - /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 - /// 0x8103_0x0070 /// 娑堟伅搴忓垪鍖 + /// 鍥惧儚/瑙嗛璐ㄩ噺锛1锝10锛1鏈濂 + /// 0x8103_0x0070 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0070 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0071.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0071.cs index 81f5e9f..c7af2b0 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0071.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0071.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0071 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0071 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0071; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0071; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 浜害锛0锝255 /// public uint ParamValue { get; set; } + /// - /// 浜害锛0锝255 - /// 0x8103_0x0071 /// 瑙f瀽鏁版嵁 + /// 浜害锛0锝255 + /// 0x8103_0x0071 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0071 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0071 JT905_0x8103_0x0071 = new JT905_0x8103_0x0071(); - JT905_0x8103_0x0071.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0071.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0071.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0071.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0071.ParamId); + JT905_0x8103_0x0071.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0071.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0071.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0071.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0071.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0071.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0071.ParamValue.ReadNumber()}]鍙傛暟鍊糩浜害锛0锝255]", JT905_0x8103_0x0071.ParamValue); + JT905_0x8103_0x0071.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0071.ParamValue.ReadNumber()}]鍙傛暟鍊糩浜害锛0锝255]", JT905_0x8103_0x0071.ParamValue); + } /// - /// 浜害锛0锝255 - /// 0x8103_0x0071 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 浜害锛0锝255 + /// 0x8103_0x0071 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0071 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0071 JT905_0x8103_0x0071 = new JT905_0x8103_0x0071(); - JT905_0x8103_0x0071.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0071.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0071.ParamLength = reader.ReadByte(); JT905_0x8103_0x0071.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0071; } /// - /// 浜害锛0锝255 - /// 0x8103_0x0071 /// 娑堟伅搴忓垪鍖 + /// 浜害锛0锝255 + /// 0x8103_0x0071 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0071 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0072.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0072.cs index 2d2d1cd..43deffd 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0072.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0072.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0072 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0072 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0072; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0072; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 瀵规瘮搴︼紝0锝127 /// public uint ParamValue { get; set; } + /// - /// 瀵规瘮搴︼紝0锝127 - /// 0x8103_0x0072 /// 瑙f瀽鏁版嵁 + /// 瀵规瘮搴︼紝0锝127 + /// 0x8103_0x0072 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0072 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0072 JT905_0x8103_0x0072 = new JT905_0x8103_0x0072(); - JT905_0x8103_0x0072.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0072.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0072.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0072.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0072.ParamId); + JT905_0x8103_0x0072.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0072.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0072.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0072.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0072.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0072.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0072.ParamValue.ReadNumber()}]鍙傛暟鍊糩瀵规瘮搴︼紝0锝127]", JT905_0x8103_0x0072.ParamValue); + JT905_0x8103_0x0072.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0072.ParamValue.ReadNumber()}]鍙傛暟鍊糩瀵规瘮搴︼紝0锝127]", JT905_0x8103_0x0072.ParamValue); + } /// - /// 瀵规瘮搴︼紝0锝127 - /// 0x8103_0x0072 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瀵规瘮搴︼紝0锝127 + /// 0x8103_0x0072 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0072 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0072 JT905_0x8103_0x0072 = new JT905_0x8103_0x0072(); - JT905_0x8103_0x0072.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0072.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0072.ParamLength = reader.ReadByte(); JT905_0x8103_0x0072.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0072; } /// - /// 瀵规瘮搴︼紝0锝127 - /// 0x8103_0x0072 /// 娑堟伅搴忓垪鍖 + /// 瀵规瘮搴︼紝0锝127 + /// 0x8103_0x0072 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0072 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0073.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0073.cs index f2c0569..d822713 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0073.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0073.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0073 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0073 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0073; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0073; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 楗卞拰搴︼紝0锝127 /// public uint ParamValue { get; set; } + /// - /// 楗卞拰搴︼紝0锝127 - /// 0x8103_0x0073 /// 瑙f瀽鏁版嵁 + /// 楗卞拰搴︼紝0锝127 + /// 0x8103_0x0073 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0073 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0073 JT905_0x8103_0x0073 = new JT905_0x8103_0x0073(); - JT905_0x8103_0x0073.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0073.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0073.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0073.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0073.ParamId); + JT905_0x8103_0x0073.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0073.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0073.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0073.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0073.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0073.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0073.ParamValue.ReadNumber()}]鍙傛暟鍊糩楗卞拰搴︼紝0锝127]", JT905_0x8103_0x0073.ParamValue); + JT905_0x8103_0x0073.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0073.ParamValue.ReadNumber()}]鍙傛暟鍊糩楗卞拰搴︼紝0锝127]", JT905_0x8103_0x0073.ParamValue); + } /// - /// 楗卞拰搴︼紝0锝127 - /// 0x8103_0x0073 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 楗卞拰搴︼紝0锝127 + /// 0x8103_0x0073 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0073 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0073 JT905_0x8103_0x0073 = new JT905_0x8103_0x0073(); - JT905_0x8103_0x0073.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0073.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0073.ParamLength = reader.ReadByte(); JT905_0x8103_0x0073.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0073; } /// - /// 楗卞拰搴︼紝0锝127 - /// 0x8103_0x0073 /// 娑堟伅搴忓垪鍖 + /// 楗卞拰搴︼紝0锝127 + /// 0x8103_0x0073 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0073 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0074.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0074.cs index 066f56e..049dd98 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0074.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0074.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0074 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0074 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0074; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0074; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 鑹插害锛0锝255 /// public uint ParamValue { get; set; } + /// - /// 鑹插害锛0锝255 - /// 0x8103_0x0074 /// 瑙f瀽鏁版嵁 + /// 鑹插害锛0锝255 + /// 0x8103_0x0074 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0074 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0074 JT905_0x8103_0x0074 = new JT905_0x8103_0x0074(); - JT905_0x8103_0x0074.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0074.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0074.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0074.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0074.ParamId); + JT905_0x8103_0x0074.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0074.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0074.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0074.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0074.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0074.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0074.ParamValue.ReadNumber()}]鍙傛暟鍊糩鑹插害锛0锝255]", JT905_0x8103_0x0074.ParamValue); + JT905_0x8103_0x0074.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0074.ParamValue.ReadNumber()}]鍙傛暟鍊糩鑹插害锛0锝255]", JT905_0x8103_0x0074.ParamValue); + } /// - /// 鑹插害锛0锝255 - /// 0x8103_0x0074 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鑹插害锛0锝255 + /// 0x8103_0x0074 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0074 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0074 JT905_0x8103_0x0074 = new JT905_0x8103_0x0074(); - JT905_0x8103_0x0074.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0074.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0074.ParamLength = reader.ReadByte(); JT905_0x8103_0x0074.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0074; } /// - /// 鑹插害锛0锝255 - /// 0x8103_0x0074 /// 娑堟伅搴忓垪鍖 + /// 鑹插害锛0锝255 + /// 0x8103_0x0074 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0074 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0080.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0080.cs index 6b99407..b13a2f8 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0080.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0080.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0080 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0080 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0080; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0080; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km /// public uint ParamValue { get; set; } + /// - /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km - /// 0x8103_0x0080 /// 瑙f瀽鏁版嵁 + /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + /// 0x8103_0x0080 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0080 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0080 JT905_0x8103_0x0080 = new JT905_0x8103_0x0080(); - JT905_0x8103_0x0080.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0080.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0080.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0080.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0080.ParamId); + JT905_0x8103_0x0080.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0080.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0080.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0080.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0080.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0080.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0080.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km]", JT905_0x8103_0x0080.ParamValue); + JT905_0x8103_0x0080.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0080.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km]", JT905_0x8103_0x0080.ParamValue); + } /// - /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km - /// 0x8103_0x0080 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + /// 0x8103_0x0080 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0080 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0080 JT905_0x8103_0x0080 = new JT905_0x8103_0x0080(); - JT905_0x8103_0x0080.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0080.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0080.ParamLength = reader.ReadByte(); JT905_0x8103_0x0080.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0080; } /// - /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km - /// 0x8103_0x0080 /// 娑堟伅搴忓垪鍖 + /// 杞﹁締閲岀▼琛ㄨ鏁帮紝0.1km + /// 0x8103_0x0080 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0080 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0081.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0081.cs index 4c3377e..8930332 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0081.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0081.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0081 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0081 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0081; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0081; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 /// public uint ParamValue { get; set; } + /// - /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 - /// 0x8103_0x0081 /// 瑙f瀽鏁版嵁 + /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + /// 0x8103_0x0081 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0081 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0081 JT905_0x8103_0x0081 = new JT905_0x8103_0x0081(); - JT905_0x8103_0x0081.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0081.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0081.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0081.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0081.ParamId); + JT905_0x8103_0x0081.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0081.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0081.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0081.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0081.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0081.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0081.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255]", JT905_0x8103_0x0081.ParamValue); + JT905_0x8103_0x0081.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0081.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255]", JT905_0x8103_0x0081.ParamValue); + } /// - /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 - /// 0x8103_0x0081 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + /// 0x8103_0x0081 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0081 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0081 JT905_0x8103_0x0081 = new JT905_0x8103_0x0081(); - JT905_0x8103_0x0081.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0081.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0081.ParamLength = reader.ReadByte(); JT905_0x8103_0x0081.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0081; } /// - /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 - /// 0x8103_0x0081 /// 娑堟伅搴忓垪鍖 + /// 杞﹁締鎵鍦ㄧ殑鐪佸煙ID锛1锝255 + /// 0x8103_0x0081 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0081 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0082.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0082.cs index fd13f79..3e91b54 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0082.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0082.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0082 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x0082 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0082; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0082; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 /// public uint ParamValue { get; set; } + /// - /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 - /// 0x8103_0x0082 /// 瑙f瀽鏁版嵁 + /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + /// 0x8103_0x0082 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x0082 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0082 JT905_0x8103_0x0082 = new JT905_0x8103_0x0082(); - JT905_0x8103_0x0082.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0082.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0082.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0082.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0082.ParamId); + JT905_0x8103_0x0082.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0082.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0082.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0082.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0082.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0082.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0082.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255]", JT905_0x8103_0x0082.ParamValue); + JT905_0x8103_0x0082.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x0082.ParamValue.ReadNumber()}]鍙傛暟鍊糩杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255]", JT905_0x8103_0x0082.ParamValue); + } /// - /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 - /// 0x8103_0x0082 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + /// 0x8103_0x0082 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0082 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0082 JT905_0x8103_0x0082 = new JT905_0x8103_0x0082(); - JT905_0x8103_0x0082.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0082.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0082.ParamLength = reader.ReadByte(); JT905_0x8103_0x0082.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x0082; } /// - /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 - /// 0x8103_0x0082 /// 娑堟伅搴忓垪鍖 + /// 杞﹁締鎵鍦ㄧ殑甯傚煙ID锛1锝255 + /// 0x8103_0x0082 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0082 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0090.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0090.cs index c4b8598..d440761 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0090.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0090.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0090 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Binary + ///System.Byte[] /// 0x0090 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0090; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0090; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0090 /// 瑙f瀽鏁版嵁 + /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0090 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0090 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0090 JT905_0x8103_0x0090 = new JT905_0x8103_0x0090(); - JT905_0x8103_0x0090.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0090.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0090.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0090.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0090.ParamId); + JT905_0x8103_0x0090.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0090.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0090.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0090.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0090.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0090.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0090.ParamValue.ReadNumber()}]鍙傛暟鍊糩璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗]", JT905_0x8103_0x0090.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0090.ParamLength); + JT905_0x8103_0x0090.ParamValue = reader.ReadString(JT905_0x8103_0x0090.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗]", JT905_0x8103_0x0090.ParamValue); + } /// - /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0090 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0090 /// /// /// @@ -53,23 +59,28 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0090 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0090 JT905_0x8103_0x0090 = new JT905_0x8103_0x0090(); - JT905_0x8103_0x0090.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0090.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0090.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0090.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0090.ParamValue = reader.ReadASCII(JT905_0x8103_0x0090.ParamLength); + return JT905_0x8103_0x0090; } /// - /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0090 /// 娑堟伅搴忓垪鍖 + /// 璁′环鍣ㄨ惀杩愭鏁伴檺鍒讹紝0锝9999锛0琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0090 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0090 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); + //writer.WriteBCD(value.ParamValue,value.ParamLength); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0091.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0091.cs index d460f8d..df7d0e3 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0091.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0091.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0091 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Binary + ///System.Byte[] /// 0x0091 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0091; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0091; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0091 /// 瑙f瀽鏁版嵁 + /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0091 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0091 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0091 JT905_0x8103_0x0091 = new JT905_0x8103_0x0091(); - JT905_0x8103_0x0091.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0091.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0091.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0091.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0091.ParamId); + JT905_0x8103_0x0091.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0091.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0091.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0091.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0091.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0091.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0091.ParamValue.ReadNumber()}]鍙傛暟鍊糩璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗]", JT905_0x8103_0x0091.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0091.ParamLength); + JT905_0x8103_0x0091.ParamValue = reader.ReadString(JT905_0x8103_0x0091.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗]", JT905_0x8103_0x0091.ParamValue); + } /// - /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0091 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0091 /// /// /// @@ -53,23 +59,28 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0091 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0091 JT905_0x8103_0x0091 = new JT905_0x8103_0x0091(); - JT905_0x8103_0x0091.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0091.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0091.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0091.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0091.ParamValue = reader.ReadASCII(JT905_0x8103_0x0091.ParamLength); + return JT905_0x8103_0x0091; } /// - /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 - /// 0x8103_0x0091 /// 娑堟伅搴忓垪鍖 + /// 璁′环鍣ㄨ惀杩愭椂闂撮檺鍒讹紝YYYYMMDDhh锛0000000000琛ㄧず涓嶅仛闄愬埗 + /// 0x8103_0x0091 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0091 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); + //writer.WriteBCD(value.ParamValue,value.ParamLength); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0092.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0092.cs index ba912a8..15f2013 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0092.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0092.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0092 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0092 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0092; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0092; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 - /// 0x8103_0x0092 /// 瑙f瀽鏁版嵁 + /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + /// 0x8103_0x0092 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0092 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0092 JT905_0x8103_0x0092 = new JT905_0x8103_0x0092(); - JT905_0x8103_0x0092.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0092.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0092.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0092.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0092.ParamId); + JT905_0x8103_0x0092.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0092.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0092.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0092.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0092.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0092.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0092.ParamValue.ReadNumber()}]鍙傛暟鍊糩鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙穄", JT905_0x8103_0x0092.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0092.ParamLength); + JT905_0x8103_0x0092.ParamValue = reader.ReadString(JT905_0x8103_0x0092.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙穄", JT905_0x8103_0x0092.ParamValue); + } /// - /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 - /// 0x8103_0x0092 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + /// 0x8103_0x0092 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0092 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0092 JT905_0x8103_0x0092 = new JT905_0x8103_0x0092(); - JT905_0x8103_0x0092.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0092.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0092.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0092.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0092.ParamValue = reader.ReadString(JT905_0x8103_0x0092.ParamLength); + return JT905_0x8103_0x0092; } /// - /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 - /// 0x8103_0x0092 /// 娑堟伅搴忓垪鍖 + /// 鍑虹杞︿紒涓氳惀杩愯鍙瘉鍙 + /// 0x8103_0x0092 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0092 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0093.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0093.cs index 99810c9..e4d7def 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0093.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0093.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0093 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x0093 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0093; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0093; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鍑虹杞︿紒涓氱畝绉 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鍑虹杞︿紒涓氱畝绉 - /// 0x8103_0x0093 /// 瑙f瀽鏁版嵁 + /// 鍑虹杞︿紒涓氱畝绉 + /// 0x8103_0x0093 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0093 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0093 JT905_0x8103_0x0093 = new JT905_0x8103_0x0093(); - JT905_0x8103_0x0093.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0093.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0093.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0093.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0093.ParamId); + JT905_0x8103_0x0093.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0093.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0093.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0093.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0093.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0093.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0093.ParamValue.ReadNumber()}]鍙傛暟鍊糩鍑虹杞︿紒涓氱畝绉癩", JT905_0x8103_0x0093.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0093.ParamLength); + JT905_0x8103_0x0093.ParamValue = reader.ReadString(JT905_0x8103_0x0093.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鍑虹杞︿紒涓氱畝绉癩", JT905_0x8103_0x0093.ParamValue); + } /// - /// 鍑虹杞︿紒涓氱畝绉 - /// 0x8103_0x0093 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鍑虹杞︿紒涓氱畝绉 + /// 0x8103_0x0093 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0093 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0093 JT905_0x8103_0x0093 = new JT905_0x8103_0x0093(); - JT905_0x8103_0x0093.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0093.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0093.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0093.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0093.ParamValue = reader.ReadString(JT905_0x8103_0x0093.ParamLength); + return JT905_0x8103_0x0093; } /// - /// 鍑虹杞︿紒涓氱畝绉 - /// 0x8103_0x0093 /// 娑堟伅搴忓垪鍖 + /// 鍑虹杞︿紒涓氱畝绉 + /// 0x8103_0x0093 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0093 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0094.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0094.cs index 9d9351d..17a205e 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0094.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x0094.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x0094 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Binary + ///System.Byte[] /// 0x0094 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0094; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x0094; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) - /// 0x8103_0x0094 /// 瑙f瀽鏁版嵁 + /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + /// 0x8103_0x0094 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x0094 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x0094 JT905_0x8103_0x0094 = new JT905_0x8103_0x0094(); - JT905_0x8103_0x0094.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x0094.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0094.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x0094.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0094.ParamId); + JT905_0x8103_0x0094.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x0094.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x0094.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x0094.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x0094.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x0094.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x0094.ParamValue.ReadNumber()}]鍙傛暟鍊糩鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛)]", JT905_0x8103_0x0094.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x0094.ParamLength); + JT905_0x8103_0x0094.ParamValue = reader.ReadString(JT905_0x8103_0x0094.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛)]", JT905_0x8103_0x0094.ParamValue); + } /// - /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) - /// 0x8103_0x0094 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + /// 0x8103_0x0094 /// /// /// @@ -53,23 +59,28 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x0094 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x0094 JT905_0x8103_0x0094 = new JT905_0x8103_0x0094(); - JT905_0x8103_0x0094.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x0094.ParamId = reader.ReadUInt16(); JT905_0x8103_0x0094.ParamLength = reader.ReadByte(); - JT905_0x8103_0x0094.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x0094.ParamValue = reader.ReadASCII(JT905_0x8103_0x0094.ParamLength); + return JT905_0x8103_0x0094; } /// - /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) - /// 0x8103_0x0094 /// 娑堟伅搴忓垪鍖 + /// 鍑虹杞﹁溅鐗屽彿鐮(涓嶅寘鎷眽瀛) + /// 0x8103_0x0094 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x0094 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); + //writer.WriteBCD(value.ParamValue,value.ParamLength); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A0.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A0.cs index e60323e..402167d 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A0.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A0.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00A0 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x00A0 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A0; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A0; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) - /// 0x8103_0x00A0 /// 瑙f瀽鏁版嵁 + /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + /// 0x8103_0x00A0 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00A0 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00A0 JT905_0x8103_0x00A0 = new JT905_0x8103_0x00A0(); - JT905_0x8103_0x00A0.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00A0.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A0.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00A0.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A0.ParamId); + JT905_0x8103_0x00A0.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00A0.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A0.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A0.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00A0.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00A0.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00A0.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊)]", JT905_0x8103_0x00A0.ParamValue); + JT905_0x8103_0x00A0.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A0.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊)]", JT905_0x8103_0x00A0.ParamValue); + } /// - /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) - /// 0x8103_0x00A0 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + /// 0x8103_0x00A0 /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00A0 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00A0 JT905_0x8103_0x00A0 = new JT905_0x8103_0x00A0(); - JT905_0x8103_0x00A0.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00A0.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00A0.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A0.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00A0.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x00A0; } /// - /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) - /// 0x8103_0x00A0 /// 娑堟伅搴忓垪鍖 + /// ISU褰曢煶妯″紡(0x01锛氬叏绋嬪綍闊筹紱0x02锛氱炕鐗屽綍闊) + /// 0x8103_0x00A0 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00A0 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A1.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A1.cs index 475a256..0c90c74 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A1.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A1.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00A1 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x00A1 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A1; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A1; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) - /// 0x8103_0x00A1 /// 瑙f瀽鏁版嵁 + /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + /// 0x8103_0x00A1 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00A1 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00A1 JT905_0x8103_0x00A1 = new JT905_0x8103_0x00A1(); - JT905_0x8103_0x00A1.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00A1.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A1.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00A1.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A1.ParamId); + JT905_0x8103_0x00A1.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00A1.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A1.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A1.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00A1.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00A1.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00A1.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min)]", JT905_0x8103_0x00A1.ParamValue); + JT905_0x8103_0x00A1.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A1.ParamValue.ReadNumber()}]鍙傛暟鍊糩ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min)]", JT905_0x8103_0x00A1.ParamValue); + } /// - /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) - /// 0x8103_0x00A1 /// 娑堟伅鍙嶅簭鍒楀寲 + /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + /// 0x8103_0x00A1 /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00A1 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00A1 JT905_0x8103_0x00A1 = new JT905_0x8103_0x00A1(); - JT905_0x8103_0x00A1.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00A1.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00A1.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A1.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00A1.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x00A1; } /// - /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) - /// 0x8103_0x00A1 /// 娑堟伅搴忓垪鍖 + /// ISU褰曢煶鏂囦欢鏈澶ф椂闀匡紝1锝255锛屽崟浣嶄负鍒嗛挓(min) + /// 0x8103_0x00A1 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00A1 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A2.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A2.cs index 49dcf6d..a51d7ad 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A2.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A2.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00A2 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x00A2 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A2; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A2; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A2 /// 瑙f瀽鏁版嵁 + /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A2 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00A2 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00A2 JT905_0x8103_0x00A2 = new JT905_0x8103_0x00A2(); - JT905_0x8103_0x00A2.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00A2.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A2.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00A2.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A2.ParamId); + JT905_0x8103_0x00A2.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00A2.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A2.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A2.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00A2.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00A2.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00A2.ParamValue.ReadNumber()}]鍙傛暟鍊糩娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00A2.ParamValue); + JT905_0x8103_0x00A2.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A2.ParamValue.ReadNumber()}]鍙傛暟鍊糩娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00A2.ParamValue); + } /// - /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A2 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A2 /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00A2 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00A2 JT905_0x8103_0x00A2 = new JT905_0x8103_0x00A2(); - JT905_0x8103_0x00A2.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00A2.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00A2.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A2.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00A2.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x00A2; } /// - /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A2 /// 娑堟伅搴忓垪鍖 + /// 娑叉櫠(LCD)蹇冭烦鏃堕棿闂撮殧锛1锝60锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A2 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00A2 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A3.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A3.cs index 5994065..5a2a754 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A3.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00A3.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00A3 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x00A3 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A3; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00A3; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A3 /// 瑙f瀽鏁版嵁 + /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A3 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00A3 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00A3 JT905_0x8103_0x00A3 = new JT905_0x8103_0x00A3(); - JT905_0x8103_0x00A3.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00A3.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A3.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00A3.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A3.ParamId); + JT905_0x8103_0x00A3.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00A3.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A3.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00A3.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00A3.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00A3.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00A3.ParamValue.ReadNumber()}]鍙傛暟鍊糩LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00A3.ParamValue); + JT905_0x8103_0x00A3.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00A3.ParamValue.ReadNumber()}]鍙傛暟鍊糩LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00A3.ParamValue); + } /// - /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A3 /// 娑堟伅鍙嶅簭鍒楀寲 + /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A3 /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00A3 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00A3 JT905_0x8103_0x00A3 = new JT905_0x8103_0x00A3(); - JT905_0x8103_0x00A3.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00A3.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00A3.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00A3.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00A3.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x00A3; } /// - /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) - /// 0x8103_0x00A3 /// 娑堟伅搴忓垪鍖 + /// LED蹇冭烦鏃堕棿闂撮殧锛屽崟浣嶄负绉(s) + /// 0x8103_0x00A3 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00A3 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00AF.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00AF.cs index eb78680..b84d30e 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00AF.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00AF.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00AF : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int16 + ///System.Int16 /// 0x00AF /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00AF; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00AF; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 2; + /// /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) /// - public uint ParamValue { get; set; } + public ushort ParamValue { get; set; } + /// - /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x00AF /// 瑙f瀽鏁版嵁 + /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x00AF /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00AF : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00AF JT905_0x8103_0x00AF = new JT905_0x8103_0x00AF(); - JT905_0x8103_0x00AF.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00AF.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00AF.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00AF.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00AF.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00AF.ParamId); + JT905_0x8103_0x00AF.ParamValue = reader.ReadUInt16(); + writer.WriteNumber($"[{JT905_0x8103_0x00AF.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00AF.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00AF.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00AF.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00AF.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00AF.ParamValue); + writer.WriteNumber($"[{JT905_0x8103_0x00AF.ParamValue.ReadNumber()}]鍙傛暟鍊糩ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s)]", JT905_0x8103_0x00AF.ParamValue); + } /// - /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x00AF /// 娑堟伅鍙嶅簭鍒楀寲 + /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x00AF /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00AF Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00AF JT905_0x8103_0x00AF = new JT905_0x8103_0x00AF(); - JT905_0x8103_0x00AF.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00AF.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00AF.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00AF.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00AF.ParamValue = reader.ReadUInt16(); + return JT905_0x8103_0x00AF; } /// - /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) - /// 0x8103_0x00AF /// 娑堟伅搴忓垪鍖 + /// ACCOFF鍚庤繘鍏ヤ紤鐪犳ā寮忕殑鏃堕棿锛屽崟浣嶄负绉(s) + /// 0x8103_0x00AF /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00AF value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteUInt16(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B0.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B0.cs index 8a600d4..0d2a941 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B0.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B0.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B0 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Byte + ///System.Byte /// 0x00B0 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B0; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B0; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } = 1; + /// /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP /// - public uint ParamValue { get; set; } + public byte ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP - /// 0x8103_0x00B0 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + /// 0x8103_0x00B0 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00B0 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B0 JT905_0x8103_0x00B0 = new JT905_0x8103_0x00B0(); - JT905_0x8103_0x00B0.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B0.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B0.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B0.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B0.ParamId); + JT905_0x8103_0x00B0.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B0.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B0.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B0.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B0.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B0.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B0.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP]", JT905_0x8103_0x00B0.ParamValue); + JT905_0x8103_0x00B0.ParamValue = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B0.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP]", JT905_0x8103_0x00B0.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP - /// 0x8103_0x00B0 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + /// 0x8103_0x00B0 /// /// /// @@ -53,23 +58,25 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B0 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B0 JT905_0x8103_0x00B0 = new JT905_0x8103_0x00B0(); - JT905_0x8103_0x00B0.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B0.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B0.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B0.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00B0.ParamValue = reader.ReadByte(); + return JT905_0x8103_0x00B0; } /// - /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP - /// 0x8103_0x00B0 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ㄥ崗璁ā寮忥紝0x00锛歍CP锛0x01锛歎DP + /// 0x8103_0x00B0 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B0 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); + writer.WriteByte(value.ParamValue); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B1.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B1.cs index 4454dba..f092934 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B1.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B1.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B1 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x00B1 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B1; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B1; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x00B1 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x00B1 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x00B1 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B1 JT905_0x8103_0x00B1 = new JT905_0x8103_0x00B1(); - JT905_0x8103_0x00B1.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B1.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B1.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B1.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B1.ParamId); + JT905_0x8103_0x00B1.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B1.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B1.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B1.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B1.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B1.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B1.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x00B1.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x00B1.ParamLength); + JT905_0x8103_0x00B1.ParamValue = reader.ReadString(JT905_0x8103_0x00B1.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐筣", JT905_0x8103_0x00B1.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x00B1 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x00B1 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B1 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B1 JT905_0x8103_0x00B1 = new JT905_0x8103_0x00B1(); - JT905_0x8103_0x00B1.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B1.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B1.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B1.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00B1.ParamValue = reader.ReadString(JT905_0x8103_0x00B1.ParamLength); + return JT905_0x8103_0x00B1; } /// - /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 - /// 0x8103_0x00B1 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ˋPN锛屾棤绾块氫俊鎷ㄥ彿璁块棶鐐 + /// 0x8103_0x00B1 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B1 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B2.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B2.cs index bac080f..fb92bb7 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B2.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B2.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B2 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x00B2 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B2; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B2; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x00B2 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x00B2 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x00B2 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B2 JT905_0x8103_0x00B2 = new JT905_0x8103_0x00B2(); - JT905_0x8103_0x00B2.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B2.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B2.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B2.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B2.ParamId); + JT905_0x8103_0x00B2.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B2.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B2.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B2.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B2.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B2.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B2.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x00B2.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x00B2.ParamLength); + JT905_0x8103_0x00B2.ParamValue = reader.ReadString(JT905_0x8103_0x00B2.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚峕", JT905_0x8103_0x00B2.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x00B2 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x00B2 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B2 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B2 JT905_0x8103_0x00B2 = new JT905_0x8103_0x00B2(); - JT905_0x8103_0x00B2.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B2.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B2.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B2.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00B2.ParamValue = reader.ReadString(JT905_0x8103_0x00B2.ParamLength); + return JT905_0x8103_0x00B2; } /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 - /// 0x8103_0x00B2 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿鐢ㄦ埛鍚 + /// 0x8103_0x00B2 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B2 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B3.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B3.cs index 607aa44..b472bba 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B3.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B3.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B3 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x00B3 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B3; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B3; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x00B3 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x00B3 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x00B3 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B3 JT905_0x8103_0x00B3 = new JT905_0x8103_0x00B3(); - JT905_0x8103_0x00B3.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B3.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B3.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B3.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B3.ParamId); + JT905_0x8103_0x00B3.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B3.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B3.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B3.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B3.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B3.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B3.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x00B3.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x00B3.ParamLength); + JT905_0x8103_0x00B3.ParamValue = reader.ReadString(JT905_0x8103_0x00B3.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜]", JT905_0x8103_0x00B3.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x00B3 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x00B3 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B3 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B3 JT905_0x8103_0x00B3 = new JT905_0x8103_0x00B3(); - JT905_0x8103_0x00B3.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B3.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B3.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B3.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00B3.ParamValue = reader.ReadString(JT905_0x8103_0x00B3.ParamLength); + return JT905_0x8103_0x00B3; } /// - /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 - /// 0x8103_0x00B3 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ㄦ棤绾块氫俊鎷ㄥ彿瀵嗙爜 + /// 0x8103_0x00B3 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B3 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B4.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B4.cs index d8b80aa..ea88d7b 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B4.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B4.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B4 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///AnsiString + ///System.String /// 0x00B4 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B4; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B4; /// /// 鏁版嵁闀垮害 /// 4 byte /// - public override byte ParamLength { get; set; } = 4; + public override byte ParamLength { get; set; } + /// /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 /// - public uint ParamValue { get; set; } + public string ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x00B4 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x00B4 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,19 @@ public class JT905_0x8103_0x00B4 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B4 JT905_0x8103_0x00B4 = new JT905_0x8103_0x00B4(); - JT905_0x8103_0x00B4.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B4.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B4.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B4.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B4.ParamId); + JT905_0x8103_0x00B4.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B4.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B4.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B4.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B4.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B4.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B4.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x00B4.ParamValue); + var paramValue = reader.ReadVirtualArray(JT905_0x8103_0x00B4.ParamLength); + JT905_0x8103_0x00B4.ParamValue = reader.ReadString(JT905_0x8103_0x00B4.ParamLength); + writer.WriteString($"[{paramValue.ToArray().ToHexString()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚峕", JT905_0x8103_0x00B4.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x00B4 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x00B4 /// /// /// @@ -53,23 +59,27 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B4 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B4 JT905_0x8103_0x00B4 = new JT905_0x8103_0x00B4(); - JT905_0x8103_0x00B4.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B4.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B4.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B4.ParamValue = reader.ReadUInt32(); + JT905_0x8103_0x00B4.ParamValue = reader.ReadString(JT905_0x8103_0x00B4.ParamLength); + return JT905_0x8103_0x00B4; } /// - /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 - /// 0x8103_0x00B4 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ㄥ湴鍧锛孖P鎴栧煙鍚 + /// 0x8103_0x00B4 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B4 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); - writer.WriteUInt32(value.ParamValue); + + writer.WriteUInt16(value.ParamId); + writer.Skip(1, out int skipPosition); + writer.WriteString(value.ParamValue); + int length = writer.GetCurrentPosition() - skipPosition - 1; + writer.WriteByteReturn((byte)length, skipPosition); } } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B5.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B5.cs index c4fd018..6bca591 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B5.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_0x00B5.cs @@ -12,22 +12,26 @@ namespace JT905.Protocol.MessageBody public class JT905_0x8103_0x00B5 : JT905_0x8103_BodyBase, IJT905MessagePackFormatter, IJT905Analyze { /// + ///Int32 + ///System.Int32 /// 0x00B5 /// - public override uint ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B5; + public override ushort ParamId { get; set; } = JT905Constants.JT905_0x8103_0x00B5; /// /// 鏁版嵁闀垮害 /// 4 byte /// public override byte ParamLength { get; set; } = 4; + /// /// 瑙嗛鏈嶅姟鍣ㄧ鍙 /// public uint ParamValue { get; set; } + /// - /// 瑙嗛鏈嶅姟鍣ㄧ鍙 - /// 0x8103_0x00B5 /// 瑙f瀽鏁版嵁 + /// 瑙嗛鏈嶅姟鍣ㄧ鍙 + /// 0x8103_0x00B5 /// /// JT905娑堟伅璇诲彇鍣 /// 娑堟伅鍐欏叆 @@ -35,17 +39,18 @@ public class JT905_0x8103_0x00B5 : JT905_0x8103_BodyBase, IJT905MessagePackForma public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJT905Config config) { JT905_0x8103_0x00B5 JT905_0x8103_0x00B5 = new JT905_0x8103_0x00B5(); - JT905_0x8103_0x00B5.ParamId = reader.ReadUInt32(); - JT905_0x8103_0x00B5.ParamLength = reader.ReadByte(); - JT905_0x8103_0x00B5.ParamValue = reader.ReadUInt32(); - writer.WriteNumber($"[{ JT905_0x8103_0x00B5.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B5.ParamId); + JT905_0x8103_0x00B5.ParamId = reader.ReadUInt16(); + JT905_0x8103_0x00B5.ParamLength = reader.ReadByte(); + writer.WriteNumber($"[{JT905_0x8103_0x00B5.ParamId.ReadNumber()}]鍙傛暟ID", JT905_0x8103_0x00B5.ParamId); writer.WriteNumber($"[{JT905_0x8103_0x00B5.ParamLength.ReadNumber()}]鍙傛暟闀垮害", JT905_0x8103_0x00B5.ParamLength); - writer.WriteNumber($"[{ JT905_0x8103_0x00B5.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄧ鍙", JT905_0x8103_0x00B5.ParamValue); + JT905_0x8103_0x00B5.ParamValue = reader.ReadUInt32(); + writer.WriteNumber($"[{JT905_0x8103_0x00B5.ParamValue.ReadNumber()}]鍙傛暟鍊糩瑙嗛鏈嶅姟鍣ㄧ鍙", JT905_0x8103_0x00B5.ParamValue); + } /// - /// 瑙嗛鏈嶅姟鍣ㄧ鍙 - /// 0x8103_0x00B5 /// 娑堟伅鍙嶅簭鍒楀寲 + /// 瑙嗛鏈嶅姟鍣ㄧ鍙 + /// 0x8103_0x00B5 /// /// /// @@ -53,22 +58,24 @@ public void Analyze(ref JT905MessagePackReader reader, Utf8JsonWriter writer, IJ public JT905_0x8103_0x00B5 Deserialize(ref JT905MessagePackReader reader, IJT905Config config) { JT905_0x8103_0x00B5 JT905_0x8103_0x00B5 = new JT905_0x8103_0x00B5(); - JT905_0x8103_0x00B5.ParamId = reader.ReadUInt32(); + JT905_0x8103_0x00B5.ParamId = reader.ReadUInt16(); JT905_0x8103_0x00B5.ParamLength = reader.ReadByte(); JT905_0x8103_0x00B5.ParamValue = reader.ReadUInt32(); + return JT905_0x8103_0x00B5; } /// - /// 瑙嗛鏈嶅姟鍣ㄧ鍙 - /// 0x8103_0x00B5 /// 娑堟伅搴忓垪鍖 + /// 瑙嗛鏈嶅姟鍣ㄧ鍙 + /// 0x8103_0x00B5 /// /// /// public void Serialize(ref JT905MessagePackWriter writer, JT905_0x8103_0x00B5 value, IJT905Config config) { - writer.WriteUInt32(value.ParamId); - writer.WriteByte(value.ParamLength); + + writer.WriteUInt16(value.ParamId); + writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } diff --git a/src/JT905.Protocol/MessageBody/JT905_0x8103_BodyBase.cs b/src/JT905.Protocol/MessageBody/JT905_0x8103_BodyBase.cs index 08d3e2b..b654a75 100644 --- a/src/JT905.Protocol/MessageBody/JT905_0x8103_BodyBase.cs +++ b/src/JT905.Protocol/MessageBody/JT905_0x8103_BodyBase.cs @@ -8,7 +8,7 @@ public abstract class JT905_0x8103_BodyBase /// /// 鍙傛暟 ID /// - public abstract uint ParamId { get; set; } + public abstract ushort ParamId { get; set; } /// /// 鍙傛暟闀垮害