From d9410691dcf2b3b6c474385e65570d83329b19f7 Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Tue, 9 Feb 2021 22:15:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8C=87=E4=BB=A4=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.editorconfig | 10 + .../MessageBody/JT808_0x0608Test.cs | 2 +- src/JT808.Protocol.Test/Simples/Demo4.cs | 21 +- src/JT808.Protocol.sln | 1 + .../Enums/JT808CameraResolutionType.cs | 2 +- .../Enums/JT808CarDVRCommandID.cs | 87 +- .../Enums/JT808DrivenRouteType.cs | 6 + .../Enums/JT808EncryptMethod.cs | 9 + .../Enums/JT808EventItemCoding.cs | 12 + .../Enums/JT808ICCardReadResult.cs | 15 + src/JT808.Protocol/Enums/JT808ICCardStatus.cs | 6 + .../Enums/JT808MultimediaCodingFormat.cs | 15 + .../Enums/JT808MultimediaDeleted.cs | 6 + .../Enums/JT808MultimediaType.cs | 9 + .../Enums/JT808PhoneNumberType.cs | 12 +- src/JT808.Protocol/Enums/JT808RecordCmd.cs | 6 + src/JT808.Protocol/Enums/JT808RecordSave.cs | 6 + .../Enums/JT808SettingProperty.cs | 9 + .../Enums/JT808SettingTelephoneBook.cs | 12 + src/JT808.Protocol/Enums/JT808Status.cs | 63 + .../Extensions/JT808PackageExtensions.cs | 66 +- .../Interfaces/IJT808_CarDVR_Down_Factory.cs | 8 + .../Interfaces/IJT808_CarDVR_Down_Package.cs | 3 + .../Interfaces/IJT808_CarDVR_Up_Factory.cs | 8 + .../Interfaces/IJT808_CarDVR_Up_Package.cs | 3 + .../Internal/JT808_0x8103_Factory.cs | 2 +- .../Internal/JT808_CarDVR_Down_Factory.cs | 17 +- src/JT808.Protocol/JT808.Protocol.csproj | 1 + src/JT808.Protocol/JT808.Protocol.xml | 2165 ++++++++++++++++- src/JT808.Protocol/JT808CarDVRUpPackage.cs | 8 +- src/JT808.Protocol/JT808Serializer.cs | 106 +- .../CarDVR/JT808_CarDVR_Down_0x00.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x01.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x02.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x03.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x04.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x05.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x06.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x07.cs | 11 +- .../CarDVR/JT808_CarDVR_Down_0x08.cs | 31 +- .../CarDVR/JT808_CarDVR_Down_0x09.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x10.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x11.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x12.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x13.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x14.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x15.cs | 32 +- .../CarDVR/JT808_CarDVR_Down_0x82.cs | 27 +- .../CarDVR/JT808_CarDVR_Down_0x83.cs | 29 +- .../CarDVR/JT808_CarDVR_Down_0x84.cs | 39 +- .../CarDVR/JT808_CarDVR_Down_0xC2.cs | 29 +- .../CarDVR/JT808_CarDVR_Down_0xC3.cs | 28 +- .../CarDVR/JT808_CarDVR_Down_0xC4.cs | 31 +- .../CarDVR/JT808_CarDVR_Down_0xE0.cs | 10 +- .../CarDVR/JT808_CarDVR_Down_0xE1.cs | 29 +- .../CarDVR/JT808_CarDVR_Down_0xE2.cs | 13 +- .../CarDVR/JT808_CarDVR_Down_0xE3.cs | 12 +- .../CarDVR/JT808_CarDVR_Down_0xE4.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0x00.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x01.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x02.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x03.cs | 30 +- .../CarDVR/JT808_CarDVR_Up_0x04.cs | 28 +- .../CarDVR/JT808_CarDVR_Up_0x05.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x06.cs | 38 +- .../CarDVR/JT808_CarDVR_Up_0x07.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x08.cs | 28 +- .../CarDVR/JT808_CarDVR_Up_0x09.cs | 27 +- .../CarDVR/JT808_CarDVR_Up_0x10.cs | 30 +- .../CarDVR/JT808_CarDVR_Up_0x11.cs | 28 +- .../CarDVR/JT808_CarDVR_Up_0x12.cs | 31 +- .../CarDVR/JT808_CarDVR_Up_0x13.cs | 30 +- .../CarDVR/JT808_CarDVR_Up_0x14.cs | 28 +- .../CarDVR/JT808_CarDVR_Up_0x15.cs | 31 +- .../CarDVR/JT808_CarDVR_Up_0x82.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0x83.cs | 11 +- .../CarDVR/JT808_CarDVR_Up_0x84.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0xC2.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0xC3.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0xC4.cs | 9 + .../CarDVR/JT808_CarDVR_Up_0xE0.cs | 9 + .../CarDVR/JT808_CarDVR_Up_0xE1.cs | 12 +- .../CarDVR/JT808_CarDVR_Up_0xE2.cs | 10 +- .../CarDVR/JT808_CarDVR_Up_0xE3.cs | 12 +- .../CarDVR/JT808_CarDVR_Up_0xE4.cs | 9 + .../MessageBody/JT808_0x0200.cs | 6 +- .../MessageBody/JT808_0x0704.cs | 2 +- .../MessageBody/JT808_0x8103.cs | 4 +- .../MessageBody/JT808_0x8103_0x0095.cs | 21 +- .../MessageBody/JT808_0x8103_0x0100.cs | 7 +- .../MessageBody/JT808_0x8302.cs | 2 +- 91 files changed, 3562 insertions(+), 352 deletions(-) create mode 100644 src/.editorconfig diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 0000000..1d944d8 --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,10 @@ +[*.{cs,vb}] + +# IDE0017: 简化对象初始化 +dotnet_diagnostic.IDE0017.severity = none + +# IDE0028: 简化集合初始化 +dotnet_diagnostic.IDE0028.severity = none + +# IDE0059: 不需要赋值 +dotnet_diagnostic.IDE0059.severity = none diff --git a/src/JT808.Protocol.Test/MessageBody/JT808_0x0608Test.cs b/src/JT808.Protocol.Test/MessageBody/JT808_0x0608Test.cs index f465451..20ff459 100644 --- a/src/JT808.Protocol.Test/MessageBody/JT808_0x0608Test.cs +++ b/src/JT808.Protocol.Test/MessageBody/JT808_0x0608Test.cs @@ -10,7 +10,7 @@ namespace JT808.Protocol.Test.MessageBody { public class JT808_0x0608Test { - JT808Serializer JT808Serializer = new JT808Serializer(); + readonly JT808Serializer JT808Serializer = new JT808Serializer(); [Fact] public void Test1() diff --git a/src/JT808.Protocol.Test/Simples/Demo4.cs b/src/JT808.Protocol.Test/Simples/Demo4.cs index 1d303f7..6186636 100644 --- a/src/JT808.Protocol.Test/Simples/Demo4.cs +++ b/src/JT808.Protocol.Test/Simples/Demo4.cs @@ -22,7 +22,7 @@ namespace JT808.Protocol.Test.Simples { } - private Dictionary cache = new Dictionary + private readonly Dictionary cache = new Dictionary { { "123456789012",DeviceType.DT1 }, { "123456789013",DeviceType.DT2 } @@ -84,7 +84,7 @@ namespace JT808.Protocol.Test.Simples public class JT808_0x0200_DT1_0x81_ExtDataProcessor : IExtDataProcessor { - private JT808_0x0200_DT1_0x81 jT808_0X0200_DT1_0X81; + private readonly JT808_0x0200_DT1_0x81 jT808_0X0200_DT1_0X81; public JT808_0x0200_DT1_0x81_ExtDataProcessor(JT808_0x0200_DT1_0x81 jT808_0X0200_DT1_0X81) { this.jT808_0X0200_DT1_0X81 = jT808_0X0200_DT1_0X81; @@ -99,7 +99,7 @@ namespace JT808.Protocol.Test.Simples public class JT808_0x0200_DT1_0x82_ExtDataProcessor : IExtDataProcessor { - private JT808_0x0200_DT1_0x82 jT808_0X0200_DT1_0X82; + private readonly JT808_0x0200_DT1_0x82 jT808_0X0200_DT1_0X82; public JT808_0x0200_DT1_0x82_ExtDataProcessor(JT808_0x0200_DT1_0x82 jT808_0X0200_DT1_0X82) { this.jT808_0X0200_DT1_0X82 = jT808_0X0200_DT1_0X82; @@ -112,7 +112,7 @@ namespace JT808.Protocol.Test.Simples public class JT808_0x0200_DT2_0x81_ExtDataProcessor : IExtDataProcessor { - private JT808_0x0200_DT2_0x81 jT808_0X0200_DT2_0X81; + private readonly JT808_0x0200_DT2_0x81 jT808_0X0200_DT2_0X81; public JT808_0x0200_DT2_0x81_ExtDataProcessor(JT808_0x0200_DT2_0x81 jT808_0X0200_DT2_0X81) { this.jT808_0X0200_DT2_0X81 = jT808_0X0200_DT2_0X81; @@ -128,15 +128,12 @@ namespace JT808.Protocol.Test.Simples { public static DeviceTypeBase Create(DeviceType deviceType, Dictionary jT808CustomLocationAttachData) { - switch (deviceType) + return deviceType switch { - case DeviceType.DT1: - return new DeviceType1(jT808CustomLocationAttachData); - case DeviceType.DT2: - return new DeviceType2(jT808CustomLocationAttachData); - default: - return default; - } + DeviceType.DT1 => new DeviceType1(jT808CustomLocationAttachData), + DeviceType.DT2 => new DeviceType2(jT808CustomLocationAttachData), + _ => default, + }; } } diff --git a/src/JT808.Protocol.sln b/src/JT808.Protocol.sln index 99977ef..bcc480f 100644 --- a/src/JT808.Protocol.sln +++ b/src/JT808.Protocol.sln @@ -9,6 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Test", "JT80 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E6296ADE-B239-4A4B-ACDA-B80C0A61399B}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig ..\README.md = ..\README.md EndProjectSection EndProject diff --git a/src/JT808.Protocol/Enums/JT808CameraResolutionType.cs b/src/JT808.Protocol/Enums/JT808CameraResolutionType.cs index 049684a..115efba 100644 --- a/src/JT808.Protocol/Enums/JT808CameraResolutionType.cs +++ b/src/JT808.Protocol/Enums/JT808CameraResolutionType.cs @@ -40,6 +40,6 @@ namespace JT808.Protocol.Enums /// /// x704_576_D1 /// - x704_576_D1 = 0x07, + x704_576_D1 = 0x08, } } diff --git a/src/JT808.Protocol/Enums/JT808CarDVRCommandID.cs b/src/JT808.Protocol/Enums/JT808CarDVRCommandID.cs index 02d532d..ab0ab17 100644 --- a/src/JT808.Protocol/Enums/JT808CarDVRCommandID.cs +++ b/src/JT808.Protocol/Enums/JT808CarDVRCommandID.cs @@ -9,34 +9,113 @@ namespace JT808.Protocol.Enums /// public enum JT808CarDVRCommandID:byte { - 采集记录仪执行标准版本=0x00, + /// + /// 采集记录仪执行标准版本 + /// + 采集记录仪执行标准版本 = 0x00, + /// + /// 采集当前驾驶人信息 + /// 采集当前驾驶人信息 = 0x01, + /// + /// 采集记录仪实时时间 + /// 采集记录仪实时时间 = 0x02, + /// + /// 采集累计行驶里程 + /// 采集累计行驶里程 = 0x03, + /// + /// 采集记录仪脉冲系数 + /// 采集记录仪脉冲系数 = 0x04, + /// + /// 采集车辆信息 + /// 采集车辆信息 = 0x05, + /// + /// 采集记录仪状态信号配置信息 + /// 采集记录仪状态信号配置信息 = 0x06, + /// + /// 采集记录仪唯一性编号 + /// 采集记录仪唯一性编号 = 0x07, + /// + /// 采集指定的行驶速度记录 + /// 采集指定的行驶速度记录 = 0x08, + /// + /// 采集指定的位置信息记录 + /// 采集指定的位置信息记录 = 0x09, + /// + /// 采集指定的事故疑点记录 + /// 采集指定的事故疑点记录 = 0x10, + /// + /// 采集指定的超时驾驶记录 + /// 采集指定的超时驾驶记录 = 0x11, + /// + /// 采集指定的驾驶人身份记录 + /// 采集指定的驾驶人身份记录 = 0x12, + /// + /// 采集指定的外部供电记录 + /// 采集指定的外部供电记录 = 0x13, + /// + /// 采集指定的参数修改记录 + /// 采集指定的参数修改记录 = 0x14, + /// + /// 采集指定的速度状态日志 + /// 采集指定的速度状态日志 = 0x15, - - 设置车辆信息= 0x82, + /// + /// 设置车辆信息 + /// + 设置车辆信息 = 0x82, + /// + /// 设置记录仪初次安装日期 + /// 设置记录仪初次安装日期 = 0x83, + /// + /// 设置状态量配置信息 + /// 设置状态量配置信息 = 0x84, + /// + /// 设置记录仪时间 + /// 设置记录仪时间 = 0xC2, + /// + /// 设置记录仪脉冲系数 + /// 设置记录仪脉冲系数 = 0xC3, + /// + /// 设置初始里程 + /// 设置初始里程 = 0xC4, - + /// + /// 进入或保持检定状态 + /// 进入或保持检定状态 = 0xE0, + /// + /// 进入里程误差测量 + /// 进入里程误差测量 = 0xE1, + /// + /// 进入脉冲系数误差测量 + /// 进入脉冲系数误差测量 = 0xE2, + /// + /// 进入实时时间误差测量 + /// 进入实时时间误差测量 = 0xE3, + /// + /// 返回正常工作状态 + /// 返回正常工作状态 = 0xE4, } } diff --git a/src/JT808.Protocol/Enums/JT808DrivenRouteType.cs b/src/JT808.Protocol/Enums/JT808DrivenRouteType.cs index 33a3024..0ff8c8f 100644 --- a/src/JT808.Protocol/Enums/JT808DrivenRouteType.cs +++ b/src/JT808.Protocol/Enums/JT808DrivenRouteType.cs @@ -5,7 +5,13 @@ /// public enum JT808DrivenRouteType { + /// + /// 不足 + /// 不足 = 0, + /// + /// 过长 + /// 过长 = 1 } } diff --git a/src/JT808.Protocol/Enums/JT808EncryptMethod.cs b/src/JT808.Protocol/Enums/JT808EncryptMethod.cs index aaf53c4..b2139ee 100644 --- a/src/JT808.Protocol/Enums/JT808EncryptMethod.cs +++ b/src/JT808.Protocol/Enums/JT808EncryptMethod.cs @@ -1,8 +1,17 @@ namespace JT808.Protocol.Enums { + /// + /// JT808加密选项 + /// public enum JT808EncryptMethod { + /// + /// 未加密 + /// None, + /// + /// RSA加密 + /// RSA } } diff --git a/src/JT808.Protocol/Enums/JT808EventItemCoding.cs b/src/JT808.Protocol/Enums/JT808EventItemCoding.cs index be3f626..25aaff8 100644 --- a/src/JT808.Protocol/Enums/JT808EventItemCoding.cs +++ b/src/JT808.Protocol/Enums/JT808EventItemCoding.cs @@ -5,9 +5,21 @@ /// public enum JT808EventItemCoding : byte { + /// + /// 平台下发指令 + /// 平台下发指令 = 0x00, + /// + /// 定时动作 + /// 定时动作 = 0x01, + /// + /// 抢劫报警触发 + /// 抢劫报警触发 = 0x02, + /// + /// 碰撞侧翻报警触发 + /// 碰撞侧翻报警触发 = 0x03 } } diff --git a/src/JT808.Protocol/Enums/JT808ICCardReadResult.cs b/src/JT808.Protocol/Enums/JT808ICCardReadResult.cs index afe9010..e097658 100644 --- a/src/JT808.Protocol/Enums/JT808ICCardReadResult.cs +++ b/src/JT808.Protocol/Enums/JT808ICCardReadResult.cs @@ -5,10 +5,25 @@ /// public enum JT808ICCardReadResult : byte { + /// + /// IC卡读卡成功 + /// IC卡读卡成功 = 0x00, + /// + /// 读卡失败_原因为卡片密钥认证未通过 + /// 读卡失败_原因为卡片密钥认证未通过 = 0x01, + /// + /// 读卡失败_原因为卡片已被锁定 + /// 读卡失败_原因为卡片已被锁定 = 0x02, + /// + /// 读卡失败_原因为卡片被拔出 + /// 读卡失败_原因为卡片被拔出 = 0x03, + /// + /// 读卡失败_原因为数据校验错误 + /// 读卡失败_原因为数据校验错误 = 0x04, } } diff --git a/src/JT808.Protocol/Enums/JT808ICCardStatus.cs b/src/JT808.Protocol/Enums/JT808ICCardStatus.cs index 9b246d3..8d927c3 100644 --- a/src/JT808.Protocol/Enums/JT808ICCardStatus.cs +++ b/src/JT808.Protocol/Enums/JT808ICCardStatus.cs @@ -5,7 +5,13 @@ /// public enum JT808ICCardStatus : byte { + /// + /// 从业资格证IC卡插入_驾驶员上班 + /// 从业资格证IC卡插入_驾驶员上班 = 0x01, + /// + /// 从业资格证IC卡拔出_驾驶员下班 + /// 从业资格证IC卡拔出_驾驶员下班 = 0x02 } } diff --git a/src/JT808.Protocol/Enums/JT808MultimediaCodingFormat.cs b/src/JT808.Protocol/Enums/JT808MultimediaCodingFormat.cs index 1d27d6e..4e0f27e 100644 --- a/src/JT808.Protocol/Enums/JT808MultimediaCodingFormat.cs +++ b/src/JT808.Protocol/Enums/JT808MultimediaCodingFormat.cs @@ -5,10 +5,25 @@ /// public enum JT808MultimediaCodingFormat : byte { + /// + /// JPEG + /// JPEG = 0x00, + /// + /// TIF + /// TIF = 0x01, + /// + /// MP3 + /// MP3 = 0x02, + /// + /// WAV + /// WAV = 0x03, + /// + /// WMV + /// WMV = 0x04 } } diff --git a/src/JT808.Protocol/Enums/JT808MultimediaDeleted.cs b/src/JT808.Protocol/Enums/JT808MultimediaDeleted.cs index a350ca6..1113dc8 100644 --- a/src/JT808.Protocol/Enums/JT808MultimediaDeleted.cs +++ b/src/JT808.Protocol/Enums/JT808MultimediaDeleted.cs @@ -6,7 +6,13 @@ /// public enum JT808MultimediaDeleted : byte { + /// + /// 保留 + /// 保留 = 0, + /// + /// 删除 + /// 删除 = 1 } } diff --git a/src/JT808.Protocol/Enums/JT808MultimediaType.cs b/src/JT808.Protocol/Enums/JT808MultimediaType.cs index 9bd9959..f2c49c9 100644 --- a/src/JT808.Protocol/Enums/JT808MultimediaType.cs +++ b/src/JT808.Protocol/Enums/JT808MultimediaType.cs @@ -5,8 +5,17 @@ /// public enum JT808MultimediaType : byte { + /// + /// 图像 + /// 图像 = 0x00, + /// + /// 音频 + /// 音频 = 0x01, + /// + /// 视频 + /// 视频 = 0x02 } } diff --git a/src/JT808.Protocol/Enums/JT808PhoneNumberType.cs b/src/JT808.Protocol/Enums/JT808PhoneNumberType.cs index 4f2bb9d..908128b 100644 --- a/src/JT808.Protocol/Enums/JT808PhoneNumberType.cs +++ b/src/JT808.Protocol/Enums/JT808PhoneNumberType.cs @@ -10,9 +10,17 @@ /// public enum JT808PhoneNumberType { + /// + /// 大陆 + /// 大陆 = 11, - 香港 = 8, - 澳门 = 8, + /// + /// 香港|澳门 + /// + 香港_澳门 = 8, + /// + /// 台湾 + /// 台湾 = 10 } } diff --git a/src/JT808.Protocol/Enums/JT808RecordCmd.cs b/src/JT808.Protocol/Enums/JT808RecordCmd.cs index 689a3f4..c62dc44 100644 --- a/src/JT808.Protocol/Enums/JT808RecordCmd.cs +++ b/src/JT808.Protocol/Enums/JT808RecordCmd.cs @@ -5,7 +5,13 @@ /// public enum JT808RecordCmd : byte { + /// + /// 停止录音 + /// 停止录音 = 0x00, + /// + /// 停止录音 + /// 开始录音 = 0x01 } } diff --git a/src/JT808.Protocol/Enums/JT808RecordSave.cs b/src/JT808.Protocol/Enums/JT808RecordSave.cs index 1b7cdfa..ee640d9 100644 --- a/src/JT808.Protocol/Enums/JT808RecordSave.cs +++ b/src/JT808.Protocol/Enums/JT808RecordSave.cs @@ -5,7 +5,13 @@ /// public enum JT808RecordSave : byte { + /// + /// 实时上传 + /// 实时上传 = 0, + /// + /// 保存 + /// 保存 = 1 } } diff --git a/src/JT808.Protocol/Enums/JT808SettingProperty.cs b/src/JT808.Protocol/Enums/JT808SettingProperty.cs index 4c7a39c..779cf7c 100644 --- a/src/JT808.Protocol/Enums/JT808SettingProperty.cs +++ b/src/JT808.Protocol/Enums/JT808SettingProperty.cs @@ -5,8 +5,17 @@ /// public enum JT808SettingProperty : byte { + /// + /// 更新区域 + /// 更新区域 = 0x00, + /// + /// 追加区域 + /// 追加区域 = 0x01, + /// + /// 修改区域 + /// 修改区域 = 0x02 } } diff --git a/src/JT808.Protocol/Enums/JT808SettingTelephoneBook.cs b/src/JT808.Protocol/Enums/JT808SettingTelephoneBook.cs index 22fadea..d7fb971 100644 --- a/src/JT808.Protocol/Enums/JT808SettingTelephoneBook.cs +++ b/src/JT808.Protocol/Enums/JT808SettingTelephoneBook.cs @@ -5,9 +5,21 @@ /// public enum JT808SettingTelephoneBook : byte { + /// + /// 删除终端上所有存储的联系人 + /// 删除终端上所有存储的联系人 = 0, + /// + /// 更新电话本_删除终端中已有全部联系人并追加消息中的联系人 + /// 更新电话本_删除终端中已有全部联系人并追加消息中的联系人 = 1, + /// + /// 追加电话本 + /// 追加电话本 = 2, + /// + /// 修改电话本_以联系人为索引 + /// 修改电话本_以联系人为索引 = 3 } } diff --git a/src/JT808.Protocol/Enums/JT808Status.cs b/src/JT808.Protocol/Enums/JT808Status.cs index ce6cf47..6d60afd 100644 --- a/src/JT808.Protocol/Enums/JT808Status.cs +++ b/src/JT808.Protocol/Enums/JT808Status.cs @@ -2,31 +2,94 @@ namespace JT808.Protocol.Enums { + /// + /// JT808车辆状态位 + /// [Flags] public enum JT808Status : uint { + /// + /// ACC开 + /// ACC开 = 1, + /// + /// 定位 + /// 定位 = 2, + /// + /// 南纬 + /// 南纬 = 4, + /// + /// 西经 + /// 西经 = 8, + /// + /// 停运状态 + /// 停运状态 = 16, + /// + /// 经纬度已经保密插件加密 + /// 经纬度已经保密插件加密 = 32, //保留 = 64, //保留 = 128, + /// + /// 半载 + /// 半载 = 256, //保留 = 512, + /// + /// 满载 + /// 满载 = 768, + /// + /// 车辆油路断开 + /// 车辆油路断开 = 1024, + /// + /// 车辆电路断开 + /// 车辆电路断开 = 2048, + /// + /// 车门加锁 + /// 车门加锁 = 4096, + /// + /// 前门开 + /// 前门开 = 8192, + /// + /// 中门开 + /// 中门开 = 16384, + /// + /// 后门开 + /// 后门开 = 32768, + /// + /// 驾驶席门开 + /// 驾驶席门开 = 65536, + /// + /// 自定义 + /// 自定义 = 131072, + /// + /// 使用GPS卫星进行定位 + /// 使用GPS卫星进行定位 = 262144, + /// + /// 使用北斗卫星进行定位 + /// 使用北斗卫星进行定位 = 524288, + /// + /// 使用GLONASS卫星进行定位 + /// 使用GLONASS卫星进行定位 = 1048576, + /// + /// 使用Galileo卫星进行定位 + /// 使用Galileo卫星进行定位 = 2097152 } } diff --git a/src/JT808.Protocol/Extensions/JT808PackageExtensions.cs b/src/JT808.Protocol/Extensions/JT808PackageExtensions.cs index 2aed936..6003e68 100644 --- a/src/JT808.Protocol/Extensions/JT808PackageExtensions.cs +++ b/src/JT808.Protocol/Extensions/JT808PackageExtensions.cs @@ -2,8 +2,19 @@ namespace JT808.Protocol.Extensions { + /// + /// JT808创建包扩展 + /// public static partial class JT808PackageExtensions { + /// + /// 根据消息Id创建包 + /// + /// + /// + /// + /// + /// public static JT808Package Create(this JT808MsgId msgId, string terminalPhoneNo, TJT808Bodies bodies) where TJT808Bodies : JT808Bodies { @@ -18,7 +29,12 @@ namespace JT808.Protocol.Extensions }; return jT808Package; } - + /// + /// 根据消息Id创建包 + /// + /// + /// + /// public static JT808Package Create(this JT808MsgId msgId, string terminalPhoneNo) { JT808Package jT808Package = new JT808Package @@ -31,7 +47,14 @@ namespace JT808.Protocol.Extensions }; return jT808Package; } - + /// + /// 根据自定义消息Id创建包 + /// + /// + /// + /// + /// + /// public static JT808Package CreateCustomMsgId(this ushort msgId, string terminalPhoneNo, TJT808Bodies bodies) where TJT808Bodies : JT808Bodies { @@ -46,7 +69,12 @@ namespace JT808.Protocol.Extensions }; return jT808Package; } - + /// + /// 根据自定义消息Id创建包 + /// + /// + /// + /// public static JT808Package CreateCustomMsgId(this ushort msgId, string terminalPhoneNo) { JT808Package jT808Package = new JT808Package @@ -59,7 +87,14 @@ namespace JT808.Protocol.Extensions }; return jT808Package; } - + /// + /// 根据消息Id创建2019版本包 + /// + /// + /// + /// + /// + /// public static JT808Package Create2019(this JT808MsgId msgId, string terminalPhoneNo, TJT808Bodies bodies) where TJT808Bodies : JT808Bodies { @@ -75,7 +110,12 @@ namespace JT808.Protocol.Extensions jT808Package.Header.MessageBodyProperty.VersionFlag = true; return jT808Package; } - + /// + /// 根据消息Id创建2019版本包 + /// + /// + /// + /// public static JT808Package Create2019(this JT808MsgId msgId, string terminalPhoneNo) { JT808Package jT808Package = new JT808Package @@ -89,7 +129,14 @@ namespace JT808.Protocol.Extensions jT808Package.Header.MessageBodyProperty.VersionFlag = true; return jT808Package; } - + /// + /// 根据自定义消息Id创建2019版本包 + /// + /// + /// + /// + /// + /// public static JT808Package CreateCustomMsgId2019(this ushort msgId, string terminalPhoneNo, TJT808Bodies bodies) where TJT808Bodies : JT808Bodies { @@ -105,7 +152,12 @@ namespace JT808.Protocol.Extensions jT808Package.Header.MessageBodyProperty.VersionFlag = true; return jT808Package; } - + /// + /// 根据自定义消息Id创建2019版本包 + /// + /// + /// + /// public static JT808Package CreateCustomMsgId2019(this ushort msgId, string terminalPhoneNo) { JT808Package jT808Package = new JT808Package diff --git a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Factory.cs b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Factory.cs index a36e2bb..53880c6 100644 --- a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Factory.cs +++ b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Factory.cs @@ -9,7 +9,15 @@ namespace JT808.Protocol.Interfaces /// public interface IJT808_CarDVR_Down_Factory : IJT808ExternalRegister { + /// + /// + /// IDictionary Map { get; } + /// + /// + /// + /// + /// IJT808_CarDVR_Down_Factory SetMap() where TJT808CarDVRDownBodies : JT808CarDVRDownBodies; } } diff --git a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Package.cs b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Package.cs index fbc4582..7c1fc52 100644 --- a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Package.cs +++ b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Down_Package.cs @@ -4,6 +4,9 @@ using System.Text; namespace JT808.Protocol.Interfaces { + /// + /// + /// public interface IJT808_CarDVR_Down_Package { } diff --git a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Factory.cs b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Factory.cs index 2263f43..3f29f66 100644 --- a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Factory.cs +++ b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Factory.cs @@ -9,7 +9,15 @@ namespace JT808.Protocol.Interfaces /// public interface IJT808_CarDVR_Up_Factory : IJT808ExternalRegister { + /// + /// + /// IDictionary Map { get; } + /// + /// + /// + /// + /// IJT808_CarDVR_Up_Factory SetMap() where TJT808CarDVRUpBodies : JT808CarDVRUpBodies; } } diff --git a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Package.cs b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Package.cs index d821b4a..79103da 100644 --- a/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Package.cs +++ b/src/JT808.Protocol/Interfaces/IJT808_CarDVR_Up_Package.cs @@ -4,6 +4,9 @@ using System.Text; namespace JT808.Protocol.Interfaces { + /// + /// + /// public interface IJT808_CarDVR_Up_Package { } diff --git a/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs index 28afaa7..d94bf56 100644 --- a/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x8103_Factory.cs @@ -110,7 +110,7 @@ namespace JT808.Protocol.Interfaces { paramId = (uint)type.GetProperty(nameof(JT808_0x8103_BodyBase.ParamId)).GetValue(instance); } - catch (Exception ex) + catch { continue; } diff --git a/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs b/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs index 925fc1f..9d04000 100644 --- a/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_CarDVR_Down_Factory.cs @@ -11,13 +11,22 @@ namespace JT808.Protocol.Interfaces /// public class JT808_CarDVR_Down_Factory:IJT808_CarDVR_Down_Factory { + /// + /// + /// public IDictionary Map { get; } - + /// + /// + /// public JT808_CarDVR_Down_Factory() { Map = new Dictionary(); Register(Assembly.GetExecutingAssembly()); } + /// + /// + /// + /// public void Register(Assembly externalAssembly) { var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808CarDVRDownBodies)).ToList(); @@ -35,7 +44,11 @@ namespace JT808.Protocol.Interfaces } } } - + /// + /// + /// + /// + /// public IJT808_CarDVR_Down_Factory SetMap() where TJT808CarDVRDownBodies : JT808CarDVRDownBodies { Type type = typeof(TJT808CarDVRDownBodies); diff --git a/src/JT808.Protocol/JT808.Protocol.csproj b/src/JT808.Protocol/JT808.Protocol.csproj index 7f4c55c..8b78df3 100644 --- a/src/JT808.Protocol/JT808.Protocol.csproj +++ b/src/JT808.Protocol/JT808.Protocol.csproj @@ -37,6 +37,7 @@ True + diff --git a/src/JT808.Protocol/JT808.Protocol.xml b/src/JT808.Protocol/JT808.Protocol.xml index 55a08f4..3bc4fd4 100644 --- a/src/JT808.Protocol/JT808.Protocol.xml +++ b/src/JT808.Protocol/JT808.Protocol.xml @@ -318,6 +318,141 @@ 行车记录仪命令字 + + + 采集记录仪执行标准版本 + + + + + 采集当前驾驶人信息 + + + + + 采集记录仪实时时间 + + + + + 采集累计行驶里程 + + + + + 采集记录仪脉冲系数 + + + + + 采集车辆信息 + + + + + 采集记录仪状态信号配置信息 + + + + + 采集记录仪唯一性编号 + + + + + 采集指定的行驶速度记录 + + + + + 采集指定的位置信息记录 + + + + + 采集指定的事故疑点记录 + + + + + 采集指定的超时驾驶记录 + + + + + 采集指定的驾驶人身份记录 + + + + + 采集指定的外部供电记录 + + + + + 采集指定的参数修改记录 + + + + + 采集指定的速度状态日志 + + + + + 设置车辆信息 + + + + + 设置记录仪初次安装日期 + + + + + 设置状态量配置信息 + + + + + 设置记录仪时间 + + + + + 设置记录仪脉冲系数 + + + + + 设置初始里程 + + + + + 进入或保持检定状态 + + + + + 进入里程误差测量 + + + + + 进入脉冲系数误差测量 + + + + + 进入实时时间误差测量 + + + + + 返回正常工作状态 + + 方向类型 @@ -338,6 +473,31 @@ 路线行驶返回结果 + + + 不足 + + + + + 过长 + + + + + JT808加密选项 + + + + + 未加密 + + + + + RSA加密 + + 异常错误码 @@ -394,6 +554,26 @@ 事件项编码 + + + 平台下发指令 + + + + + 定时动作 + + + + + 抢劫报警触发 + + + + + 碰撞侧翻报警触发 + + 事件设置类型 @@ -429,11 +609,46 @@ IC 卡读取结果 + + + IC卡读卡成功 + + + + + 读卡失败_原因为卡片密钥认证未通过 + + + + + 读卡失败_原因为卡片已被锁定 + + + + + 读卡失败_原因为卡片被拔出 + + + + + 读卡失败_原因为数据校验错误 + + 插拔状态 + + + 从业资格证IC卡插入_驾驶员上班 + + + + + 从业资格证IC卡拔出_驾驶员下班 + + 信息设置类型 @@ -895,17 +1110,67 @@ 多媒体格式编码 + + + JPEG + + + + + TIF + + + + + MP3 + + + + + WAV + + + + + WMV + + 删除标志 单条存储多媒体数据检索上传命令 + + + 保留 + + + + + 删除 + + 多媒体类型 + + + 图像 + + + + + 音频 + + + + + 视频 + + 大陆11位 补0 @@ -916,6 +1181,21 @@ 假如是其他地方打来要改成打 +886912345678 + + + 大陆 + + + + + 香港|澳门 + + + + + 台湾 + + 返回结果 @@ -981,144 +1261,304 @@ 录音命令 - + - 保存标志 + 停止录音 - + - 设置属性 + 停止录音 - + - 设置电话本 设置类型 + 保存标志 - + - 电话本联系人标志 + 实时上传 - + - 呼入 + 保存 - + - 呼出 + 设置属性 - + - 呼入_呼出 + 更新区域 - + - 终端注册返回结果 + 追加区域 - + - 成功 + 修改区域 - + - 车辆已被注册 + 设置电话本 设置类型 - + - 数据库中无该车辆 + 删除终端上所有存储的联系人 - + - 终端已被注册 + 更新电话本_删除终端中已有全部联系人并追加消息中的联系人 - + - 数据库中无该终端 + 追加电话本 - + - 通用应答返回 + 修改电话本_以联系人为索引 - + - 成功/确认 + JT808车辆状态位 - + - 失败 + ACC开 - + - 消息有误 + 定位 - + - 不支持 + 南纬 - + - 升级结果 + 西经 - + - 成功 + 停运状态 - + - 失败 + 经纬度已经保密插件加密 - + - 取消 + 半载 - + - 升级类型 + 满载 - + - 终端 + 车辆油路断开 - + - 道路运输证IC卡读卡器 + 车辆电路断开 - + - 北斗卫星定位模块 + 车门加锁 - + - JT808版本号 + 前门开 - + - 2013 + 中门开 + + + + + 后门开 + + + + + 驾驶席门开 + + + + + 自定义 + + + + + 使用GPS卫星进行定位 + + + + + 使用北斗卫星进行定位 + + + + + 使用GLONASS卫星进行定位 + + + + + 使用Galileo卫星进行定位 + + + + + 电话本联系人标志 + + + + + 呼入 + + + + + 呼出 + + + + + 呼入_呼出 + + + + + 终端注册返回结果 + + + + + 成功 + + + + + 车辆已被注册 + + + + + 数据库中无该车辆 + + + + + 终端已被注册 + + + + + 数据库中无该终端 + + + + + 通用应答返回 + + + + + 成功/确认 + + + + + 失败 + + + + + 消息有误 + + + + + 不支持 + + + + + 升级结果 + + + + + 成功 + + + + + 失败 + + + + + 取消 + + + + + 升级类型 + + + + + 终端 + + + + + 道路运输证IC卡读卡器 + + + + + 北斗卫星定位模块 + + + + + JT808版本号 + + + + + 2013 @@ -1458,11 +1898,86 @@ + + JT808创建包扩展 + todo:source-generators正式发布以后将T4模板换掉 https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/ + + + 根据消息Id创建包 + + + + + + + + + + 根据消息Id创建包 + + + + + + + + 根据自定义消息Id创建包 + + + + + + + + + + 根据自定义消息Id创建包 + + + + + + + + 根据消息Id创建2019版本包 + + + + + + + + + + 根据消息Id创建2019版本包 + + + + + + + + 根据自定义消息Id创建2019版本包 + + + + + + + + + + 根据自定义消息Id创建2019版本包 + + + + + 0x0001 - 终端通用应答 @@ -3673,16 +4188,73 @@ 记录仪工厂 + + + + + + + + + + + + + + + + + 记录仪工厂 + + + + + + + + + + + + + + + + + 记录仪工厂 + + + + + + + + + + + + + + + + + + + + + + + 记录仪工厂 @@ -5231,22 +5803,82 @@ 返回:记录仪执行标准的年号及修改单号 - + - 机动车驾驶证号码 - 返回:当前驾驶人的机动车驾驶证号码 + 0x00 - + - 采集记录仪实时时间 - 返回:实时时间 + 采集记录仪执行标准版本 - + - 采集累计行驶里程 - 返回:实时时间、安装时的初始里程及安装后的累计行驶里程 + + + + + + 机动车驾驶证号码 + 返回:当前驾驶人的机动车驾驶证号码 + + + + + 0x01 + + + + + 采集机动车驾驶证号码 + + + + + + + + + + 采集记录仪实时时间 + 返回:实时时间 + + + + + 0x02 + + + + + 实时时间 + + + + + + + + + + 采集累计行驶里程 + 返回:实时时间、安装时的初始里程及安装后的累计行驶里程 + + + + + 0x03 + + + + + 实时时间、安装时的初始里程及安装后的累计行驶里程 + + + + + @@ -5255,24 +5887,84 @@ 返回:实时时间及设定的脉冲系数 + + + 0x04 + + + + + 实时时间及设定的脉冲系数 + + + + + + + 采集车辆信息 返回:车辆识别代号、机动车号牌号码和机动车号牌分类 + + + 0x05 + + + + + 车辆识别代号、机动车号牌号码和机动车号牌分类 + + + + + + + 采集记录仪状态信号配置信息 返回:状态信号配置信息 + + + 0x06 + + + + + 状态信号配置信息 + + + + + + + 采集记录仪唯一性编号 返回:唯一性编号及初次安装日期 + + + 0x07 + + + + + 唯一性编号及初次安装日期 + + + + + + + 采集指定的行驶速度记录 @@ -5280,6 +5972,11 @@ 如在指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x08 + + 开始时间 @@ -5295,6 +5992,35 @@ 最大单位数据块个数 + + + 符合条件的行驶速度记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的位置信息记录 @@ -5302,6 +6028,16 @@ 指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x09 + + + + + 符合条件的位置信息记录 + + 开始时间 @@ -5317,6 +6053,30 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的事故疑点记录 @@ -5324,6 +6084,16 @@ 指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x10 + + + + + 符合条件的事故疑点记录 + + 开始时间 @@ -5339,12 +6109,46 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的超时驾驶记录 返回:符合条件的超时驾驶记录 + + + 0x11 + + + + + 符合条件的超时驾驶记录 + + 开始时间 @@ -5360,12 +6164,46 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的驾驶人身份记录 返回:符合条件的驾驶人登录退出记录 + + + 0x12 + + + + + 符合条件的驾驶人登录退出记录 + + 开始时间 @@ -5381,12 +6219,46 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的外部供电记录 返回:符合条件的供电记录 + + + 0x13 + + + + + 符合条件的供电记录 + + 开始时间 @@ -5402,12 +6274,46 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的参数修改记录 返回:符合条件的参数修改记录 + + + 0x14 + + + + + 符合条件的参数修改记录 + + 开始时间 @@ -5423,12 +6329,46 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的速度状态日志 返回:符合条件的速度状态日志 + + + 0x15 + + + + + 符合条件的速度状态日志 + + 开始时间 @@ -5444,12 +6384,41 @@ 最大单位数据块个数 + + + + + + + + + + + + + + + + + + + + + + + + 设置车辆信息 返回:车辆信息 + + + 0x82 + + 车辆识别代号 @@ -5467,23 +6436,91 @@ 后 4 个字节为备用字 + + + 车辆信息 + + + + + + + + + + + + + + + + + + + + + + + + + + 设置记录仪初次安装日期 返回:初次安装日期 + + + 0x83 + + 实时时间 + + + 初次安装日期 + + + + + + + + + + + + + + + + + + + + + + + + + + 设置状态量配置信息 返回:状态量配置信息 + + + 0x84 + + 实时时间 @@ -5497,7 +6534,17 @@ - + D0 + + + + + D1 + + + + + D2 @@ -5530,23 +6577,91 @@ 10个字节,未使用或不足时,补0 + + + 状态量配置信息 + + + + + + + + + + + + + + + + + + + + + + + + + + 设置记录仪时间 返回:北京时间的日期、时钟 + + + 0xC2 + + 实时时间 + + + 北京时间的日期、时钟 + + + + + + + + + + + + + 北京时间的日期、时钟 + + + + + + + + + + + + + 设置记录仪脉冲系数 返回:记录仪脉冲系数 + + + 0xC3 + + 当前时间 @@ -5557,12 +6672,46 @@ 脉冲系数 + + + 记录仪脉冲系数 + + + + + + + + + + + + + + + + + + + + + + + + + + 设置初始里程 返回:记录仪初次安装时车辆已行驶的总里程 + + + 0xC4 + + 实时时间 @@ -5583,18 +6732,67 @@ 累计里程 + + + 车辆识别代号、机动车号牌号码和机动车号牌分类 + + + + + + + + + + + + + + + + + + + + + + + + + + 进入或保持检定状态 返回:进入或保持检定状态 + + + 0xE0 + + + + + 进入或保持检定状态 + + + + + + + 进入里程误差测量 返回:通过 DB9 的 7 脚接收标准速度脉冲测量信号(TTL 电平) + + + 0xE1 + + 记录仪唯一性编号 @@ -5621,30 +6819,109 @@ 状态信号 + + + 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) + + + + + + + + + + + + + + + + + + + + + + + + + + 进入脉冲系数误差测量 返回:通过 DB9 的 7 脚输出车速传感器信号(TTL 电平) + + + 0xE2 + + + + + 通过DB9的7脚输出车速传感器信号(TTL 电平) + + + + + + + 进入实时时间误差测量 返回:通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平) + + + 0xE3 + + + + + 通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平) + + + + + + + 返回正常工作状态 返回:返回正常工作状态 + + + 0xE4 + + + + + 返回正常工作状态 + + + + + + + 采集记录仪执行标准版本 返回:记录仪执行标准的年号及修改单号 + + + 0x00 + + 记录仪执行标准年号后 2 位 BCD 码 @@ -5657,28 +6934,125 @@ 无修改单或无应答则默认为 00H + + + 记录仪执行标准的年号及修改单号 + + + + + + + + + + + + + + + + + + + + + + + + + + 机动车驾驶证号码 返回:当前驾驶人的机动车驾驶证号码 + + + 0x01 + + 机动车驾驶证号码 机动车驾驶证号码为 15 位时,后 3 位以 00H 补齐。驾驶人身份未知时以 00H 表示 + + + 当前驾驶人的机动车驾驶证号码 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集记录仪实时时间 返回:实时时间 - + + + 0x02 + + + + + 实时时间 + + + + + 实时时间 + + + + + + + + + + + + + + + + + + + - 实时时间 + + + + @@ -5686,6 +7060,11 @@ 返回:实时时间、安装时的初始里程及安装后的累计行驶里程 + + + 0x03 + + 实时时间 @@ -5706,12 +7085,46 @@ 累计里程 + + + 实时时间、安装时的初始里程及安装后的累计行驶里程 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集记录仪脉冲系数 返回:实时时间及设定的脉冲系数 + + + 0x04 + + 当前时间 @@ -5722,12 +7135,46 @@ 脉冲系数 + + + 实时时间及设定的脉冲系数 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集车辆信息 返回:车辆识别代号、机动车号牌号码和机动车号牌分类 + + + 0x05 + + 车辆识别代号 @@ -5745,12 +7192,46 @@ 后 4 个字节为备用字 + + + 车辆识别代号、机动车号牌号码和机动车号牌分类 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集记录仪状态信号配置信息 返回:状态信号配置信息 + + + 0x06 + + 实时时间 @@ -5764,7 +7245,17 @@ - + D0 + + + + + D1 + + + + + D2 @@ -5797,12 +7288,46 @@ 10个字节,未使用或不足时,补0 + + + 状态信号配置信息 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集记录仪唯一性编号 返回:唯一性编号及初次安装日期 + + + 0x07 + + 生产厂 CCC 认证代码 7字节 @@ -5828,6 +7353,35 @@ 备用 5字节 + + + 唯一性编号及初次安装日期 + + + + + + + + + + + + + + + + + + + + + + + + + + 采集指定的行驶速度记录 @@ -5835,11 +7389,45 @@ 如在指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x08 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的行驶速度记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 单位分钟行驶速度记录数据块格式 @@ -5879,11 +7467,45 @@ 指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x09 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的位置信息记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 指定的结束时间之前最近的每 小时的位置信息记录 @@ -5933,11 +7555,45 @@ 指定的时间范围内无数据记录,则本数据块数据为空 + + + 0x10 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的事故疑点记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 指定的结束时间之前最近的每条事故疑点记录 @@ -5996,10 +7652,44 @@ 返回:符合条件的超时驾驶记录 - + + + 0x11 + + + + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + + + 符合条件的超时驾驶记录 + + + + + + + + + + + + + + + + + + + - 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + + @@ -6057,11 +7747,45 @@ 返回:符合条件的驾驶人登录退出记录 + + + 0x12 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的驾驶人登录退出记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 单位驾驶人身份记录数据块格式 @@ -6088,11 +7812,45 @@ 返回:符合条件的供电记录 + + + 0x13 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的供电记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 单位记录仪外部供电记录数据块格式 @@ -6114,11 +7872,45 @@ 返回:符合条件的参数修改记录 + + + 0x14 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的参数修改记录 + + + + + + + + + + + + + + + + + + + + + + + + + + 单位参数修改记录数据块格式 @@ -6140,11 +7932,45 @@ 返回:符合条件的速度状态日志 + + + 0x15 + + 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) + + + 符合条件的速度状态日志 + + + + + + + + + + + + + + + + + + + + + + + + + + 单位速度状态日志数据块格式 @@ -6191,36 +8017,126 @@ 返回:车辆信息 + + + 0x82 + + + + + 车辆信息 + + + + + + + 设置记录仪初次安装日期 返回:初次安装日期 + + + 0x83 + + + + + 初次安装日期 + + + + + + + 设置状态量配置信息 返回:状态量配置信息 + + + 0x84 + + + + + 状态量配置信息 + + + + + + + 设置记录仪时间 返回:北京时间的日期、时钟 + + + 0xC2 + + + + + 北京时间的日期、时钟 + + + + + + + 设置记录仪脉冲系数 返回:记录仪脉冲系数 + + + 0xC3 + + + + + 记录仪脉冲系数 + + + + + + + 设置初始里程 返回:记录仪初次安装时车辆已行驶的总里程 + + + 0xC4 + + + + + 车辆识别代号、机动车号牌号码和机动车号牌分类 + + + + + + + 进入或保持检定状态 @@ -6228,30 +8144,105 @@ 在检定状态下,检定装置以不大于2秒的时间间隔发送包含本命令字的命令帧,记录仪在6秒内未收到该命令帧,则自动返回正常工作状态。 + + + 0xE0 + + + + + 进入或保持检定状态 + + + + + + + 进入里程误差测量 返回:通过 DB9 的 7 脚接收标准速度脉冲测量信号(TTL 电平) + + + 0xE1 + + + + + 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) + + + + + + + 进入脉冲系数误差测量 返回:通过 DB9 的 7 脚输出车速传感器信号(TTL 电平) + + + 0xE2 + + + + + 通过DB9的7脚输出车速传感器信号(TTL 电平) + + + + + + + 进入实时时间误差测量 返回:通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平) + + + 0xE3 + + + + + 通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平) + + + + + + + 返回正常工作状态 返回:返回正常工作状态 + + + 0xE4 + + + + + 返回正常工作状态 + + + + + + + 终端通用应答 @@ -12687,6 +14678,30 @@ 上传方式为 0x0D 时,单位为条。 + + + + + + + + + + + + + + + + + + + + + + + + CAN 总线通道 1 采集时间间隔(ms),0 表示不采集 @@ -12723,6 +14738,14 @@ + + + + + + + + CAN 总线通道 1 上传时间间隔(s),0 表示不上传 diff --git a/src/JT808.Protocol/JT808CarDVRUpPackage.cs b/src/JT808.Protocol/JT808CarDVRUpPackage.cs index 07ef21e..05e4091 100644 --- a/src/JT808.Protocol/JT808CarDVRUpPackage.cs +++ b/src/JT808.Protocol/JT808CarDVRUpPackage.cs @@ -73,9 +73,9 @@ namespace JT808.Protocol writer.WriteEndObject(); } } - var carDVRCheckCode = reader.ReadCarDVRCheckCode(currentPosition); + var (CalculateXorCheckCode, RealXorCheckCode) = reader.ReadCarDVRCheckCode(currentPosition); value.CheckCode = reader.ReadByte(); - if (carDVRCheckCode.RealXorCheckCode != carDVRCheckCode.CalculateXorCheckCode) + if (RealXorCheckCode != CalculateXorCheckCode) { writer.WriteString($"[{value.CheckCode.ReadNumber()}]校验位错误", $"{reader.RealCheckXorCode}!={reader.CalculateCheckXorCode}"); } @@ -108,10 +108,10 @@ namespace JT808.Protocol value.Bodies = attachImpl; } } - var carDVRCheckCode = reader.ReadCarDVRCheckCode(currentPosition); + var (CalculateXorCheckCode, RealXorCheckCode) = reader.ReadCarDVRCheckCode(currentPosition); if (!config.SkipCarDVRCRCCode) { - if (carDVRCheckCode.RealXorCheckCode != carDVRCheckCode.CalculateXorCheckCode) + if (RealXorCheckCode != CalculateXorCheckCode) throw new JT808Exception(JT808ErrorCode.CarDVRCheckCodeNotEqual, $"{reader.RealCheckXorCode}!={reader.CalculateCheckXorCode}"); } value.CheckCode = reader.ReadByte(); diff --git a/src/JT808.Protocol/JT808Serializer.cs b/src/JT808.Protocol/JT808Serializer.cs index 0b08b4b..b60d028 100644 --- a/src/JT808.Protocol/JT808Serializer.cs +++ b/src/JT808.Protocol/JT808Serializer.cs @@ -244,14 +244,12 @@ namespace JT808.Protocol { JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); jT808MessagePackReader.Decode(buffer); - using(MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - jT808Package.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - utf8JsonWriter.Flush(); - string value = Encoding.UTF8.GetString(memoryStream.ToArray()); - return value; - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + jT808Package.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + utf8JsonWriter.Flush(); + string value = Encoding.UTF8.GetString(memoryStream.ToArray()); + return value; } finally { @@ -276,16 +274,14 @@ namespace JT808.Protocol if (CheckPackageType(typeof(T))) jT808MessagePackReader.Decode(buffer); var analyze = jT808Config.GetAnalyze(); - using (MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteStartObject(); - analyze.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteEndObject(); - utf8JsonWriter.Flush(); - string value = Encoding.UTF8.GetString(memoryStream.ToArray()); - return value; - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteStartObject(); + analyze.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteEndObject(); + utf8JsonWriter.Flush(); + string value = Encoding.UTF8.GetString(memoryStream.ToArray()); + return value; } finally { @@ -311,21 +307,19 @@ namespace JT808.Protocol { if (jT808Config.FormatterFactory.FormatterDict.TryGetValue(msgHandle.GetType().GUID, out object instance)) { - using (MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); - utf8JsonWriter.WriteStartObject(); - instance.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - utf8JsonWriter.WriteEndObject(); - utf8JsonWriter.Flush(); - string value = Encoding.UTF8.GetString(memoryStream.ToArray()); - return value; - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); + utf8JsonWriter.WriteStartObject(); + instance.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + utf8JsonWriter.WriteEndObject(); + utf8JsonWriter.Flush(); + string value = Encoding.UTF8.GetString(memoryStream.ToArray()); + return value; } - return $"未找到对应的0x{msgid.ToString("X2")}消息数据体类型"; + return $"未找到对应的0x{msgid:X2}消息数据体类型"; } - return $"未找到对应的0x{msgid.ToString("X2")}消息数据体类型"; + return $"未找到对应的0x{msgid:X2}消息数据体类型"; } finally { @@ -351,20 +345,18 @@ namespace JT808.Protocol { if (jT808Config.FormatterFactory.FormatterDict.TryGetValue(msgHandle.GetType().GUID, out object instance)) { - using (MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); - utf8JsonWriter.WriteStartObject(); - instance.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - utf8JsonWriter.WriteEndObject(); - utf8JsonWriter.Flush(); - return memoryStream.ToArray(); - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); + utf8JsonWriter.WriteStartObject(); + instance.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + utf8JsonWriter.WriteEndObject(); + utf8JsonWriter.Flush(); + return memoryStream.ToArray(); } - return Encoding.UTF8.GetBytes($"未找到对应的0x{msgid.ToString("X2")}消息数据体类型"); + return Encoding.UTF8.GetBytes($"未找到对应的0x{msgid:X2}消息数据体类型"); } - return Encoding.UTF8.GetBytes($"未找到对应的0x{msgid.ToString("X2")}消息数据体类型"); + return Encoding.UTF8.GetBytes($"未找到对应的0x{msgid:X2}消息数据体类型"); } finally { @@ -386,13 +378,11 @@ namespace JT808.Protocol { JT808MessagePackReader jT808MessagePackReader = new JT808MessagePackReader(bytes, version); jT808MessagePackReader.Decode(buffer); - using (MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - jT808Package.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - utf8JsonWriter.Flush(); - return memoryStream.ToArray(); - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + jT808Package.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + utf8JsonWriter.Flush(); + return memoryStream.ToArray(); } finally { @@ -417,15 +407,13 @@ namespace JT808.Protocol if (CheckPackageType(typeof(T))) jT808MessagePackReader.Decode(buffer); var analyze = jT808Config.GetAnalyze(); - using (MemoryStream memoryStream = new MemoryStream()) - using (Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options)) - { - if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteStartObject(); - analyze.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); - if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteEndObject(); - utf8JsonWriter.Flush(); - return memoryStream.ToArray(); - } + using MemoryStream memoryStream = new MemoryStream(); + using Utf8JsonWriter utf8JsonWriter = new Utf8JsonWriter(memoryStream, options); + if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteStartObject(); + analyze.Analyze(ref jT808MessagePackReader, utf8JsonWriter, jT808Config); + if (!CheckPackageType(typeof(T))) utf8JsonWriter.WriteEndObject(); + utf8JsonWriter.Flush(); + return memoryStream.ToArray(); } finally { diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs index a39a1fd..9a86454 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x00.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x00 : JT808CarDVRDownBodies { + /// + /// 0x00 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪执行标准版本.ToByteValue(); - + /// + /// 采集记录仪执行标准版本 + /// public override string Description => "采集记录仪执行标准版本"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs index cc8672b..627794f 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x01.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x01 : JT808CarDVRDownBodies { + /// + /// 0x01 + /// public override byte CommandId => JT808CarDVRCommandID.采集当前驾驶人信息.ToByteValue(); - + /// + /// 采集机动车驾驶证号码 + /// public override string Description => "采集机动车驾驶证号码"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs index a9f1d33..ed8e48c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x02.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x02 : JT808CarDVRDownBodies { + /// + /// 0x02 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪实时时间.ToByteValue(); - + /// + /// 实时时间 + /// public override string Description => "实时时间"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs index 99c0cea..363df05 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x03.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x03 : JT808CarDVRDownBodies { + /// + /// 0x03 + /// public override byte CommandId => JT808CarDVRCommandID.采集累计行驶里程.ToByteValue(); - + /// + /// 实时时间、安装时的初始里程及安装后的累计行驶里程 + /// public override string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs index e9271b2..3f23c51 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x04.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x04 : JT808CarDVRDownBodies { + /// + /// 0x04 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪脉冲系数.ToByteValue(); - + /// + /// 实时时间及设定的脉冲系数 + /// public override string Description => "实时时间及设定的脉冲系数"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs index dabaa2d..0d0d001 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x05.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x05 : JT808CarDVRDownBodies { + /// + /// 0x05 + /// public override byte CommandId => JT808CarDVRCommandID.采集车辆信息.ToByteValue(); - + /// + /// 车辆识别代号、机动车号牌号码和机动车号牌分类 + /// public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs index bb0f80d..6dac6a9 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x06.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x06 : JT808CarDVRDownBodies { + /// + /// 0x06 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪状态信号配置信息.ToByteValue(); - + /// + /// 状态信号配置信息 + /// public override string Description => "状态信号配置信息"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs index 8b36dec..867dada 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x07.cs @@ -16,10 +16,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x07 : JT808CarDVRDownBodies { + /// + /// 0x07 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪唯一性编号.ToByteValue(); - + /// + /// 唯一性编号及初次安装日期 + /// public override string Description => "唯一性编号及初次安装日期"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs index 898b41e..14b1fcb 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x08.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x08 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x08 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的行驶速度记录.ToByteValue(); /// /// 开始时间 @@ -30,15 +33,28 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } + /// + /// 符合条件的行驶速度记录 + /// public override string Description => "符合条件的行驶速度记录"; - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x08 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x08 value = new JT808_CarDVR_Down_0x08(); @@ -47,14 +63,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x08 value = new JT808_CarDVR_Down_0x08(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs index 892b4ef..2e5b614 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x09.cs @@ -17,8 +17,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x09 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x09 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的位置信息记录.ToByteValue(); - + /// + /// 符合条件的位置信息记录 + /// public override string Description => "符合条件的位置信息记录"; /// /// 开始时间 @@ -32,14 +37,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x09 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x09 value = new JT808_CarDVR_Down_0x09(); @@ -48,14 +63,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x09 value = new JT808_CarDVR_Down_0x09(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs index 9a46241..8a8022c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x10.cs @@ -17,8 +17,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x10 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x10 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的事故疑点记录.ToByteValue(); - + /// + /// 符合条件的事故疑点记录 + /// public override string Description => "符合条件的事故疑点记录"; /// /// 开始时间 @@ -32,14 +37,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x10 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x10 value = new JT808_CarDVR_Down_0x10(); @@ -48,14 +63,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x10 value = new JT808_CarDVR_Down_0x10(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs index 344fc1f..57af7e1 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x11.cs @@ -16,8 +16,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x11 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x11 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的超时驾驶记录.ToByteValue(); - + /// + /// 符合条件的超时驾驶记录 + /// public override string Description => "符合条件的超时驾驶记录"; /// /// 开始时间 @@ -31,14 +36,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x11 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x11 value = new JT808_CarDVR_Down_0x11(); @@ -47,14 +62,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x11 value = new JT808_CarDVR_Down_0x11(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs index 13e6003..62fe324 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x12.cs @@ -16,8 +16,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x12 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x12 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的驾驶人身份记录.ToByteValue(); - + /// + /// 符合条件的驾驶人登录退出记录 + /// public override string Description => "符合条件的驾驶人登录退出记录"; /// /// 开始时间 @@ -31,14 +36,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x12 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x12 value = new JT808_CarDVR_Down_0x12(); @@ -47,14 +62,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x12 value = new JT808_CarDVR_Down_0x12(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs index 6b5fa4b..35646c8 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x13.cs @@ -16,8 +16,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x13 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x13 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的外部供电记录.ToByteValue(); - + /// + /// 符合条件的供电记录 + /// public override string Description => "符合条件的供电记录"; /// /// 开始时间 @@ -31,14 +36,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x13 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x13 value = new JT808_CarDVR_Down_0x13(); @@ -47,14 +62,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x13 value = new JT808_CarDVR_Down_0x13(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs index 38746fd..4f82eab 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x14.cs @@ -16,8 +16,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x14 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x14 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的参数修改记录.ToByteValue(); - + /// + /// 符合条件的参数修改记录 + /// public override string Description => "符合条件的参数修改记录"; /// /// 开始时间 @@ -31,14 +36,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x14 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x14 value = new JT808_CarDVR_Down_0x14(); @@ -47,14 +62,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x14 value = new JT808_CarDVR_Down_0x14(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs index d957a1a..d0ab8d9 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x15.cs @@ -16,8 +16,13 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x15 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x15 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的速度状态日志.ToByteValue(); - + /// + /// 符合条件的速度状态日志 + /// public override string Description => "符合条件的速度状态日志"; /// /// 开始时间 @@ -31,14 +36,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 最大单位数据块个数 /// public ushort Count { get; set; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x15 value, IJT808Config config) { writer.WriteDateTime6(value.StartTime); writer.WriteDateTime6(value.EndTime); writer.WriteUInt16(value.Count); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x15 value = new JT808_CarDVR_Down_0x15(); @@ -47,14 +62,19 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Count = reader.ReadUInt16(); return value; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x15 value = new JT808_CarDVR_Down_0x15(); value.StartTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.StartTime.ToString("yyMMddHHmmss")}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.StartTime:yyMMddHHmmss}]开始时间", value.StartTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.Count = reader.ReadUInt16(); writer.WriteNumber($"[{value.Count.ReadNumber()}]最大单位数据块个数", value.Count); } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs index b853d56..ee54762 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x82.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x82 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x82 + /// public override byte CommandId => JT808CarDVRCommandID.设置车辆信息.ToByteValue(); /// /// 车辆识别代号 @@ -32,8 +35,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 后 4 个字节为备用字 /// public string VehicleType { get; set; } + /// + /// 车辆信息 + /// public override string Description => "车辆信息"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x82 value = new JT808_CarDVR_Down_0x82(); @@ -47,7 +58,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.VehicleType = reader.ReadString(10); writer.WriteString($"[{vehicleTypeHex.ToArray().ToHexString()}]机动车号牌分类", value.VehicleType); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x82 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); @@ -60,7 +76,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteString(value.VehicleType); writer.Skip(10 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x82 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x82 value = new JT808_CarDVR_Down_0x82(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs index f8283af..9147110 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x83.cs @@ -17,25 +17,46 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x83 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x83 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪初次安装日期.ToByteValue(); /// /// 实时时间 /// public DateTime RealTime { get; set; } + /// + /// 初次安装日期 + /// public override string Description => "初次安装日期"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x83 value = new JT808_CarDVR_Down_0x83(); value.RealTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]初次安装日期", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]初次安装日期", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x83 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x83 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x83 value = new JT808_CarDVR_Down_0x83(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs index b702617..8669823 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0x84.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0x84 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x84 + /// public override byte CommandId => JT808CarDVRCommandID.设置状态量配置信息.ToByteValue(); /// /// 实时时间 @@ -28,12 +31,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public byte SignalOperate { get; set; } /// - /// + /// D0 /// public string D0 { get; set; } - + /// + /// D1 + /// public string D1 { get; set; } - + /// + /// D2 + /// public string D2 { get; set; } /// /// 近光 D3 @@ -60,13 +67,21 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 10个字节,未使用或不足时,补0 /// public string Brake { get; set; } + /// + /// 状态量配置信息 + /// public override string Description => "状态量配置信息"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0x84 value = new JT808_CarDVR_Down_0x84(); value.RealTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]实时时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]实时时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); value.SignalOperate = reader.ReadByte(); writer.WriteNumber($"[{value.SignalOperate.ReadNumber()}]信号个数", value.SignalOperate); var display = reader.ReadVirtualArray(10); @@ -94,7 +109,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Brake = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]制动", value.Brake); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0x84 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); @@ -124,7 +144,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteString(value.Brake); writer.Skip(10 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0x84 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0x84 value = new JT808_CarDVR_Down_0x84(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs index 5c71a0a..c27c412 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC2.cs @@ -17,26 +17,47 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xC2 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0xC2 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪时间.ToByteValue(); /// /// 实时时间 /// public DateTime RealTime { get; set; } + /// + /// 北京时间的日期、时钟 + /// public override string Description => "北京时间的日期、时钟"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0xC2 value = new JT808_CarDVR_Down_0xC2(); value.RealTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]实时时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]实时时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); } - + /// + /// 北京时间的日期、时钟 + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC2 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0xC2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC2 value = new JT808_CarDVR_Down_0xC2(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs index 4f018ab..395751e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC3.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xC3 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0xC3 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪脉冲系数.ToByteValue(); /// /// 当前时间 @@ -26,25 +29,44 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 脉冲系数 /// public ushort PulseCoefficient { get; set; } + /// + /// 记录仪脉冲系数 + /// public override string Description => "记录仪脉冲系数"; + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0xC3 value = new JT808_CarDVR_Down_0xC3(); value.RealTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]当前时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]当前时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); value.PulseCoefficient = reader.ReadUInt16(); writer.WriteNumber($"[{value.PulseCoefficient.ReadNumber()}]脉冲系数", value.PulseCoefficient); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC3 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); writer.WriteUInt16(value.PulseCoefficient); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0xC3 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC3 value = new JT808_CarDVR_Down_0xC3(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs index 3feeb1a..afe9655 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xC4.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xC4 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0xC4 + /// public override byte CommandId => JT808CarDVRCommandID.设置初始里程.ToByteValue(); /// /// 实时时间 @@ -34,21 +37,34 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 累计里程 /// public string TotalMilage { get; set; } + /// + /// 车辆识别代号、机动车号牌号码和机动车号牌分类 + /// public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0xC4 value = new JT808_CarDVR_Down_0xC4(); value.RealTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]当前时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]当前时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); value.FirstInstallTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.FirstInstallTime.ToString("yyMMddHHmmss")}]初次安装时间", value.FirstInstallTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.FirstInstallTime:yyMMddHHmmss}]初次安装时间", value.FirstInstallTime.ToString("yyyy-MM-dd HH:mm:ss")); value.FirstMileage = reader.ReadBCD(8); writer.WriteString($"[{value.FirstMileage}]初始里程", value.FirstMileage); value.TotalMilage = reader.ReadBCD(8); writer.WriteString($"[{value.TotalMilage}]累计里程", value.TotalMilage); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xC4 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); @@ -56,7 +72,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteBCD(value.FirstMileage, 8); writer.WriteBCD(value.TotalMilage, 8); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0xC4 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xC4 value = new JT808_CarDVR_Down_0xC4(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs index 219d426..0479b33 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE0.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xE0 : JT808CarDVRDownBodies { + /// + /// 0xE0 + /// public override byte CommandId => JT808CarDVRCommandID.进入或保持检定状态.ToByteValue(); - + /// + /// 进入或保持检定状态 + /// public override string Description => "进入或保持检定状态"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs index 287d29c..51efa7f 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE1.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xE1 : JT808CarDVRDownBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0xE1 + /// public override byte CommandId => JT808CarDVRCommandID.进入里程误差测量.ToByteValue(); /// /// 记录仪唯一性编号 @@ -39,8 +42,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 状态信号 /// public byte StatusSignal { get; set; } - public override string Description => "通过 DB9 的 7 脚接收标准速度脉冲测量信号(TTL 电平)"; - + /// + /// 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) + /// + public override string Description => "通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Down_0xE1 value = new JT808_CarDVR_Down_0xE1(); @@ -56,7 +67,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.StatusSignal = reader.ReadByte(); writer.WriteNumber($"[{value.StatusSignal.ReadNumber()}]状态信号", value.StatusSignal); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Down_0xE1 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); @@ -67,7 +83,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteUInt32(value.TotalMileage); writer.WriteByte(value.StatusSignal); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Down_0xE1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Down_0xE1 value = new JT808_CarDVR_Down_0xE1(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs index 4054967..bdd2839 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE2.cs @@ -17,10 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xE2 : JT808CarDVRDownBodies { + /// + /// 0xE2 + /// public override byte CommandId => JT808CarDVRCommandID.进入脉冲系数误差测量.ToByteValue(); - - public override string Description => "通过 DB9 的 7 脚输出车速传感器信号(TTL 电平)"; - + /// + /// 通过DB9的7脚输出车速传感器信号(TTL 电平) + /// + public override string Description => "通过DB9的7脚输出车速传感器信号(TTL 电平)"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs index 40103d9..df772f5 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE3.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xE3 : JT808CarDVRDownBodies { + /// + /// 0xE3 + /// public override byte CommandId => JT808CarDVRCommandID.进入实时时间误差测量.ToByteValue(); - - public override string Description => "通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平)"; + /// + /// 通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平) + /// + public override string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs index 8b08766..734170c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Down_0xE4.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Down_0xE4 : JT808CarDVRDownBodies { + /// + /// 0xE4 + /// public override byte CommandId => JT808CarDVRCommandID.返回正常工作状态.ToByteValue(); + /// + /// 返回正常工作状态 + /// public override string Description => "返回正常工作状态"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs index 307f67b..a4d234b 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x00.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x00 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x00 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪执行标准版本.ToByteValue(); /// /// 记录仪执行标准年号后 2 位 BCD 码 @@ -28,8 +31,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 无修改单或无应答则默认为 00H /// public byte ModifyNumber { get; set; } + /// + /// 记录仪执行标准的年号及修改单号 + /// public override string Description => "记录仪执行标准的年号及修改单号"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x00 value = new JT808_CarDVR_Up_0x00(); @@ -38,13 +49,23 @@ namespace JT808.Protocol.MessageBody.CarDVR value.ModifyNumber = reader.ReadByte(); writer.WriteNumber($"[{value.ModifyNumber.ReadNumber()}]修改单号", value.ModifyNumber); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x00 value, IJT808Config config) { writer.WriteBCD(value.StandardYear, 2); writer.WriteByte(value.ModifyNumber); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x00 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x00 value = new JT808_CarDVR_Up_0x00(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs index ea48799..7f992df 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x01.cs @@ -17,14 +17,25 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x01 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x01 + /// public override byte CommandId => JT808CarDVRCommandID.采集当前驾驶人信息.ToByteValue(); /// /// 机动车驾驶证号码 /// 机动车驾驶证号码为 15 位时,后 3 位以 00H 补齐。驾驶人身份未知时以 00H 表示 /// public string DriverLicenseNo { get; set; } + /// + /// 当前驾驶人的机动车驾驶证号码 + /// public override string Description => "当前驾驶人的机动车驾驶证号码"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x01 value = new JT808_CarDVR_Up_0x01(); @@ -32,14 +43,24 @@ namespace JT808.Protocol.MessageBody.CarDVR value.DriverLicenseNo = reader.ReadASCII(18); writer.WriteString($"[{hex.ToArray().ToHexString()}]当前驾驶人的机动车驾驶证号码", value.DriverLicenseNo); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x01 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); writer.WriteASCII(value.DriverLicenseNo); writer.Skip(18 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x01 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x01 value = new JT808_CarDVR_Up_0x01(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs index c83c36a..75512fc 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x02.cs @@ -17,13 +17,24 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x02 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x02 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪实时时间.ToByteValue(); /// /// 实时时间 /// public DateTime RealTime { get; set; } + /// + /// 实时时间 + /// public override string Description => "实时时间"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x02 value = new JT808_CarDVR_Up_0x02(); @@ -31,12 +42,22 @@ namespace JT808.Protocol.MessageBody.CarDVR value.RealTime = reader.ReadDateTime6(); writer.WriteString($"[{hex.ToArray().ToHexString()}]实时时间", value.RealTime); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x02 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x02 value = new JT808_CarDVR_Up_0x02(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs index fbbed3a..6fc627d 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x03.cs @@ -4,9 +4,6 @@ using JT808.Protocol.Formatters; using JT808.Protocol.Interfaces; using JT808.Protocol.MessagePack; using System; -using System.Buffers.Binary; -using System.Collections.Generic; -using System.Text; using System.Text.Json; namespace JT808.Protocol.MessageBody.CarDVR @@ -17,6 +14,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x03 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x03 + /// public override byte CommandId => JT808CarDVRCommandID.采集累计行驶里程.ToByteValue(); /// /// 实时时间 @@ -34,8 +34,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 累计里程 /// public string TotalMilage { get; set; } + /// + /// 实时时间、安装时的初始里程及安装后的累计行驶里程 + /// public override string Description => "实时时间、安装时的初始里程及安装后的累计行驶里程"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x03 value = new JT808_CarDVR_Up_0x03(); @@ -52,7 +60,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.TotalMilage = reader.ReadBCD(8); writer.WriteString($"[{hex.ToArray().ToHexString()}]累计里程", value.TotalMilage); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x03 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); @@ -60,7 +73,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteBCD(value.FirstMileage, 8); writer.WriteBCD(value.TotalMilage, 8); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x03 value = new JT808_CarDVR_Up_0x03(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs index 2df78dc..5c638d7 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x04.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x04 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x04 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪脉冲系数.ToByteValue(); /// /// 当前时间 @@ -26,9 +29,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 脉冲系数 /// public ushort PulseCoefficient { get; set; } - + /// + /// 实时时间及设定的脉冲系数 + /// public override string Description => "实时时间及设定的脉冲系数"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x04 value = new JT808_CarDVR_Up_0x04(); @@ -38,13 +48,23 @@ namespace JT808.Protocol.MessageBody.CarDVR value.PulseCoefficient = reader.ReadUInt16(); writer.WriteNumber($"[{value.PulseCoefficient.ReadNumber()}]脉冲系数",value.PulseCoefficient); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x04 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); writer.WriteUInt16(value.PulseCoefficient); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x04 value = new JT808_CarDVR_Up_0x04(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs index b1abb38..1cad2fb 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x05.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x05 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x05 + /// public override byte CommandId => JT808CarDVRCommandID.采集车辆信息.ToByteValue(); /// /// 车辆识别代号 @@ -32,8 +35,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 后 4 个字节为备用字 /// public string VehicleType { get; set; } + /// + /// 车辆识别代号、机动车号牌号码和机动车号牌分类 + /// public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x05 value = new JT808_CarDVR_Up_0x05(); @@ -47,7 +58,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.VehicleType = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]机动车号牌分类", value.VehicleType); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x05 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); @@ -60,7 +76,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteString(value.VehicleType); writer.Skip(10 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x05 value = new JT808_CarDVR_Up_0x05(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs index 2f00c90..86072a6 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x06.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x06 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x06 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪状态信号配置信息.ToByteValue(); /// /// 实时时间 @@ -28,12 +31,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public byte SignalOperate { get; set; } /// - /// + /// D0 /// public string D0 { get; set; } - + /// + /// D1 + /// public string D1 { get; set; } - + /// + /// D2 + /// public string D2 { get; set; } /// /// 近光 D3 @@ -60,9 +67,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 10个字节,未使用或不足时,补0 /// public string Brake { get; set; } - + /// + /// 状态信号配置信息 + /// public override string Description => "状态信号配置信息"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x06 value = new JT808_CarDVR_Up_0x06(); @@ -96,7 +110,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Brake = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]制动", value.Brake); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x06 value, IJT808Config config) { writer.WriteDateTime6(value.RealTime); @@ -126,7 +145,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteString(value.Brake); writer.Skip(10 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x06 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x06 value = new JT808_CarDVR_Up_0x06(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs index dfc17ba..17ca541 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x07.cs @@ -17,6 +17,9 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x07 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x07 + /// public override byte CommandId => JT808CarDVRCommandID.采集记录仪唯一性编号.ToByteValue(); /// /// 生产厂 CCC 认证代码 7字节 @@ -38,8 +41,16 @@ namespace JT808.Protocol.MessageBody.CarDVR /// 备用 5字节 /// public string Reversed { get; set; } + /// + /// 唯一性编号及初次安装日期 + /// public override string Description => "唯一性编号及初次安装日期"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_CarDVR_Up_0x07 value = new JT808_CarDVR_Up_0x07(); @@ -59,7 +70,12 @@ namespace JT808.Protocol.MessageBody.CarDVR value.Reversed = reader.ReadString(5); writer.WriteString($"[{hex.ToArray().ToHexString()}]备用", value.Reversed); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x07 value, IJT808Config config) { var currentPosition = writer.GetCurrentPosition(); @@ -76,7 +92,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteString(value.Reversed); writer.Skip(5 - (writer.GetCurrentPosition() - currentPosition), out var _); } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x07 value = new JT808_CarDVR_Up_0x07(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs index 74db22c..12ed814 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x08.cs @@ -18,16 +18,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x08 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x08 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的行驶速度记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x08_SpeedPerMinutes { get; set; } + /// + /// 符合条件的行驶速度记录 + /// public override string Description => "符合条件的行驶速度记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x08 value = new JT808_CarDVR_Up_0x08(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 126;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -54,7 +64,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } writer.WriteEndArray(); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x08 value, IJT808Config config) { foreach (var speedPerMinute in value.JT808_CarDVR_Up_0x08_SpeedPerMinutes) @@ -74,7 +89,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x08 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x08 value = new JT808_CarDVR_Up_0x08(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs index 976c93c..209add5 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x09.cs @@ -18,16 +18,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x09 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x09 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的位置信息记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x09_PositionPerHours { get; set; } + /// + /// 符合条件的位置信息记录 + /// public override string Description => "符合条件的位置信息记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x09 value = new JT808_CarDVR_Up_0x09(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 666;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -57,6 +67,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } writer.WriteEndArray(); } + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x09 value, IJT808Config config) { foreach (var positionPerHour in value.JT808_CarDVR_Up_0x09_PositionPerHours) @@ -80,7 +96,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x09 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x09 value = new JT808_CarDVR_Up_0x09(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs index cc7c793..5e86a52 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x10.cs @@ -19,16 +19,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x10 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x10 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的事故疑点记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x10_AccidentSuspectins { get; set; } + /// + /// 符合条件的事故疑点记录 + /// public override string Description => "符合条件的事故疑点记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x10 value = new JT808_CarDVR_Up_0x10(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 234;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -50,7 +60,7 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteStartObject("行驶结束时的速度"); } else { - writer.WriteStartObject($"行驶结束时间前 { (j * 0.2).ToString("F1")} 秒时的速度"); + writer.WriteStartObject($"行驶结束时间前 { j * 0.2:F1} 秒时的速度"); } jT808_CarDVR_Up_0X10_DrivingStatus.Speed = reader.ReadByte(); writer.WriteNumber($"[{ jT808_CarDVR_Up_0X10_DrivingStatus.Speed.ReadNumber()}]速度", jT808_CarDVR_Up_0X10_DrivingStatus.Speed); @@ -69,7 +79,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } writer.WriteEndArray(); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x10 value, IJT808Config config) { foreach (var accidentSuspectin in value.JT808_CarDVR_Up_0x10_AccidentSuspectins) @@ -96,7 +111,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteInt16(accidentSuspectin.Height); } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x10 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x10 value = new JT808_CarDVR_Up_0x10(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs index 89d1c86..df03b96 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x11.cs @@ -17,16 +17,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x11 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x11 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的超时驾驶记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x11_DriveOverTimes{ get; set; } + /// + /// 符合条件的超时驾驶记录 + /// public override string Description => "符合条件的超时驾驶记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x11 value = new JT808_CarDVR_Up_0x11(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 50;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -64,7 +74,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } writer.WriteEndArray(); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x11 value, IJT808Config config) { foreach (var driveOverTime in value.JT808_CarDVR_Up_0x11_DriveOverTimes) @@ -82,7 +97,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteInt16(driveOverTime.EndHeight); } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x11 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x11 value = new JT808_CarDVR_Up_0x11(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs index 666f2cd..02b61fc 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x12.cs @@ -17,16 +17,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x12 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x12 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的驾驶人身份记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x12_DriveLogins { get; set; } + /// + /// 符合条件的驾驶人登录退出记录 + /// public override string Description => "符合条件的驾驶人登录退出记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x12 value = new JT808_CarDVR_Up_0x12(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 25;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -46,7 +56,8 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteEndObject(); } writer.WriteEndArray(); - string LoginTypeDisplay(byte loginType){ + + static string LoginTypeDisplay(byte loginType){ if (loginType == 1) { return "登录"; @@ -60,7 +71,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x12 value, IJT808Config config) { foreach (var driveLogin in value.JT808_CarDVR_Up_0x12_DriveLogins) @@ -72,7 +88,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteByte(driveLogin.LoginType); } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x12 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x12 value = new JT808_CarDVR_Up_0x12(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs index 55404ca..590813b 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x13.cs @@ -17,16 +17,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x13 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x13 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的外部供电记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x13_ExternalPowerSupplys { get; set; } + /// + /// 符合条件的供电记录 + /// public override string Description => "符合条件的供电记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x13 value = new JT808_CarDVR_Up_0x13(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 7;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -43,7 +53,8 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteEndObject(); } writer.WriteEndArray(); - string EventTypeDisplay(byte eventType) { + + static string EventTypeDisplay(byte eventType) { if (eventType == 1) { return "供电"; @@ -53,6 +64,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x13 value, IJT808Config config) { foreach (var externalPowerSupply in value.JT808_CarDVR_Up_0x13_ExternalPowerSupplys) @@ -61,7 +78,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteByte(externalPowerSupply.EventType); } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x13 value = new JT808_CarDVR_Up_0x13(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs index 700d0ae..4fa8311 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x14.cs @@ -17,16 +17,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x14 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x14 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的参数修改记录.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x14_ParameterModifys { get; set; } + /// + /// 符合条件的参数修改记录 + /// public override string Description => "符合条件的参数修改记录"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x14 value = new JT808_CarDVR_Up_0x14(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 7;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -44,7 +54,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } writer.WriteEndArray(); } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x14 value, IJT808Config config) { foreach (var parameterModify in value.JT808_CarDVR_Up_0x14_ParameterModifys) @@ -53,7 +68,12 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteByte(parameterModify.EventType); } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x14 value = new JT808_CarDVR_Up_0x14(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs index 638286d..371c353 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x15.cs @@ -17,16 +17,26 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x15 : JT808CarDVRUpBodies, IJT808MessagePackFormatter, IJT808Analyze { + /// + /// 0x15 + /// public override byte CommandId => JT808CarDVRCommandID.采集指定的速度状态日志.ToByteValue(); /// /// 请求发送指定的时间范围内 N 个单位数据块的数据(N≥1) /// public List JT808_CarDVR_Up_0x15_SpeedStatusLogs { get; set; } + /// + /// 符合条件的速度状态日志 + /// public override string Description => "符合条件的速度状态日志"; - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { - JT808_CarDVR_Up_0x15 value = new JT808_CarDVR_Up_0x15(); writer.WriteStartArray("请求发送指定的时间范围内 N 个单位数据块的数据"); var count = (reader.ReadCurrentRemainContentLength() - 1) / 133;//记录块个数, -1 去掉校验位 for (int i = 0; i < count; i++) @@ -68,7 +78,8 @@ namespace JT808.Protocol.MessageBody.CarDVR writer.WriteEndObject(); } writer.WriteEndArray(); - string SpeedStatusDisplay(byte speedStatus) { + + static string SpeedStatusDisplay(byte speedStatus) { if (speedStatus == 0x01) { return "正常"; @@ -82,7 +93,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_CarDVR_Up_0x15 value, IJT808Config config) { foreach (var speedStatusLog in value.JT808_CarDVR_Up_0x15_SpeedStatusLogs) @@ -104,7 +120,12 @@ namespace JT808.Protocol.MessageBody.CarDVR } } } - + /// + /// + /// + /// + /// + /// public JT808_CarDVR_Up_0x15 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x15 value = new JT808_CarDVR_Up_0x15(); diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs index 57ff9a1..d94c1a5 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x82.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x82 : JT808CarDVRUpBodies { + /// + /// 0x82 + /// public override byte CommandId => JT808CarDVRCommandID.设置车辆信息.ToByteValue(); - + /// + /// 车辆信息 + /// public override string Description => "车辆信息"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs index 4ec9e87..317d928 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x83.cs @@ -17,10 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x83 : JT808CarDVRUpBodies { + /// + /// 0x83 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪初次安装日期.ToByteValue(); - + /// + /// 初次安装日期 + /// public override string Description => "初次安装日期"; - + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs index 20cc505..bdc41f3 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0x84.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0x84 : JT808CarDVRUpBodies { + /// + /// 0x84 + /// public override byte CommandId => JT808CarDVRCommandID.设置状态量配置信息.ToByteValue(); - + /// + /// 状态量配置信息 + /// public override string Description => "状态量配置信息"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs index b68eae9..c336605 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC2.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xC2 : JT808CarDVRUpBodies { + /// + /// 0xC2 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪时间.ToByteValue(); - + /// + /// 北京时间的日期、时钟 + /// public override string Description => "北京时间的日期、时钟"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs index 02d740a..e168d7e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC3.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xC3 : JT808CarDVRUpBodies { + /// + /// 0xC3 + /// public override byte CommandId => JT808CarDVRCommandID.设置记录仪脉冲系数.ToByteValue(); - + /// + /// 记录仪脉冲系数 + /// public override string Description => "记录仪脉冲系数"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs index 4d27f49..a0f439c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xC4.cs @@ -17,8 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xC4 : JT808CarDVRUpBodies { + /// + /// 0xC4 + /// public override byte CommandId => JT808CarDVRCommandID.设置初始里程.ToByteValue(); + /// + /// 车辆识别代号、机动车号牌号码和机动车号牌分类 + /// public override string Description => "车辆识别代号、机动车号牌号码和机动车号牌分类"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs index a9dbdd2..b823071 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE0.cs @@ -18,8 +18,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xE0 : JT808CarDVRUpBodies { + /// + /// 0xE0 + /// public override byte CommandId => JT808CarDVRCommandID.进入或保持检定状态.ToByteValue(); + /// + /// 进入或保持检定状态 + /// public override string Description => "进入或保持检定状态"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs index e98e644..d09d1ee 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE1.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xE1 : JT808CarDVRUpBodies { + /// + /// 0xE1 + /// public override byte CommandId => JT808CarDVRCommandID.进入里程误差测量.ToByteValue(); - - public override string Description => "通过 DB9 的 7 脚接收标准速度脉冲测量信号(TTL 电平)"; + /// + /// 通过DB9的7脚接收标准速度脉冲测量信号(TTL 电平) + /// + public override string Description => "通过 DB9的7脚接收标准速度脉冲测量信号(TTL 电平)"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs index c342dfc..f8164f1 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE2.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xE2 : JT808CarDVRUpBodies { + /// + /// 0xE2 + /// public override byte CommandId => JT808CarDVRCommandID.进入脉冲系数误差测量.ToByteValue(); - + /// + /// 通过DB9的7脚输出车速传感器信号(TTL 电平) + /// public override string Description => "通过 DB9 的 7 脚输出车速传感器信号(TTL 电平)"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs index fd991d6..102681e 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE3.cs @@ -17,9 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xE3 : JT808CarDVRUpBodies { + /// + /// 0xE3 + /// public override byte CommandId => JT808CarDVRCommandID.进入实时时间误差测量.ToByteValue(); - - public override string Description => "通过 DB9 的 7 脚输出实时时钟的秒脉冲信号(TTL 电平)"; + /// + /// 通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平) + /// + public override string Description => "通过DB9的7脚输出实时时钟的秒脉冲信号(TTL 电平)"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs index b509a98..470cc7c 100644 --- a/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs +++ b/src/JT808.Protocol/MessageBody/CarDVR/JT808_CarDVR_Up_0xE4.cs @@ -17,8 +17,17 @@ namespace JT808.Protocol.MessageBody.CarDVR /// public class JT808_CarDVR_Up_0xE4 : JT808CarDVRUpBodies { + /// + /// 0xE4 + /// public override byte CommandId => JT808CarDVRCommandID.返回正常工作状态.ToByteValue(); + /// + /// 返回正常工作状态 + /// public override string Description => "返回正常工作状态"; + /// + /// + /// public override bool SkipSerialization { get; set; } = true; } } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0200.cs b/src/JT808.Protocol/MessageBody/JT808_0x0200.cs index cac7adb..44210b5 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0200.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0200.cs @@ -207,7 +207,7 @@ namespace JT808.Protocol.MessageBody { JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(item.Value, ref writer, item.Value, config); } - catch(Exception ex) + catch { } @@ -357,7 +357,7 @@ namespace JT808.Protocol.MessageBody value.Direction = reader.ReadUInt16(); writer.WriteNumber($"[{value.Direction.ReadNumber()}]方向", value.Direction); value.GPSTime = reader.ReadDateTime6(); - writer.WriteString($"[{value.GPSTime.ToString("yyMMddHHmmss")}]定位时间", value.GPSTime.ToString("yyyy-MM-dd HH:mm:ss")); + writer.WriteString($"[{value.GPSTime:yyMMddHHmmss}]定位时间", value.GPSTime.ToString("yyyy-MM-dd HH:mm:ss")); // 位置附加信息 writer.WriteStartArray("附加信息列表"); while (reader.ReadCurrentRemainContentLength() > 0) @@ -402,7 +402,7 @@ namespace JT808.Protocol.MessageBody writer.WriteString($"未知附加信息", reader.ReadArray(reader.ReaderCount - 2, attachLen + 2).ToArray().ToHexString()); reader.Skip(attachLen); } - catch (Exception ex) + catch { throw; } diff --git a/src/JT808.Protocol/MessageBody/JT808_0x0704.cs b/src/JT808.Protocol/MessageBody/JT808_0x0704.cs index 18026e4..115cebb 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x0704.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x0704.cs @@ -116,7 +116,7 @@ namespace JT808.Protocol.MessageBody jT808_0X0704.Count = reader.ReadUInt16(); writer.WriteNumber($"[{jT808_0X0704.Count.ReadNumber()}]数据项个数", jT808_0X0704.Count); jT808_0X0704.LocationType = (JT808_0x0704.BatchLocationType)reader.ReadByte(); - writer.WriteNumber($"[{((byte)jT808_0X0704.LocationType).ReadNumber()}]位置数据类型-{jT808_0X0704.LocationType.ToString()}", (byte)jT808_0X0704.LocationType); + writer.WriteNumber($"[{((byte)jT808_0X0704.LocationType).ReadNumber()}]位置数据类型-{jT808_0X0704.LocationType}", (byte)jT808_0X0704.LocationType); writer.WriteStartArray("位置汇报数据集合"); for (int i = 0; i < jT808_0X0704.Count; i++) { diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103.cs index b59e0a3..0b3b28d 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103.cs @@ -77,7 +77,7 @@ namespace JT808.Protocol.MessageBody } } } - catch (Exception ex) + catch { } @@ -106,7 +106,7 @@ namespace JT808.Protocol.MessageBody } } } - catch (Exception ex) { } + catch { } } /// /// diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs index e0d23f9..97b859a 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0095.cs @@ -35,7 +35,12 @@ namespace JT808.Protocol.MessageBody /// 上传方式为 0x0D 时,单位为条。 /// public uint ParamValue { get; set; } - + /// + /// + /// + /// + /// + /// public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x8103_0x0095 jT808_0x8103_0x0095 = new JT808_0x8103_0x0095(); @@ -46,7 +51,12 @@ namespace JT808.Protocol.MessageBody writer.WriteNumber($"[{jT808_0x8103_0x0095.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0095.ParamLength); writer.WriteNumber($"[{ jT808_0x8103_0x0095.ParamValue.ReadNumber()}]参数值[GNSS模块详细定位数据上传设置]", jT808_0x8103_0x0095.ParamValue); } - + /// + /// + /// + /// + /// + /// public JT808_0x8103_0x0095 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0095 jT808_0x8103_0x0095 = new JT808_0x8103_0x0095(); @@ -55,7 +65,12 @@ namespace JT808.Protocol.MessageBody jT808_0x8103_0x0095.ParamValue = reader.ReadUInt32(); return jT808_0x8103_0x0095; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0095 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs index 3ef265f..f7c49f7 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8103_0x0100.cs @@ -54,7 +54,12 @@ namespace JT808.Protocol.MessageBody jT808_0x8103_0x0100.ParamValue = reader.ReadUInt32(); return jT808_0x8103_0x0100; } - + /// + /// + /// + /// + /// + /// public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0100 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); diff --git a/src/JT808.Protocol/MessageBody/JT808_0x8302.cs b/src/JT808.Protocol/MessageBody/JT808_0x8302.cs index f8130ff..73a17ba 100644 --- a/src/JT808.Protocol/MessageBody/JT808_0x8302.cs +++ b/src/JT808.Protocol/MessageBody/JT808_0x8302.cs @@ -84,7 +84,7 @@ namespace JT808.Protocol.MessageBody answer.Content = reader.ReadString(answer.ContentLength); jT808_0X8302.Answers.Add(answer); } - catch (Exception ex) + catch { break; }