From a76f57ae77bc3cf1ec8405c771133c72e0a52ff6 Mon Sep 17 00:00:00 2001 From: "SmallChi(Koike)" <564952747@qq.com> Date: Wed, 2 Mar 2022 09:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=88=86=E5=8C=85=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- src/JT808.Protocol.Test/Simples/Demo5.cs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3d942fa..eef678e 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,8 @@ JT808Serializer DT2JT808Serializer = new JT808Serializer(DT2JT808Config); 3. 当N包数据上来,延续步骤2的方式。 -> 普及知识点:一般行业分包是按256的整数倍,太多不行,太少也不行,必须刚刚好。 +> 普及知识点1:由于消息体长度最大为10bit也就是1023的字节,所以这边就有个硬性条件不能超过最大长度 +> 普及知识点2:一般行业分包是按256的整数倍,太多不行,太少也不行,必须刚刚好。 [可以参考Simples的Demo5](https://github.com/SmallChi/JT808/blob/master/src/JT808.Protocol.Test/Simples/Demo5.cs) @@ -513,7 +514,7 @@ Platform=AnyCpu Server=False Toolchain=.NET 6.0 ## 使用方法 -```dotnet +```csharp IServiceCollection serviceDescriptors1 = new ServiceCollection(); serviceDescriptors1.AddJT808Configure() .AddJT1078Configure(); diff --git a/src/JT808.Protocol.Test/Simples/Demo5.cs b/src/JT808.Protocol.Test/Simples/Demo5.cs index 2a2ee54..a614e38 100644 --- a/src/JT808.Protocol.Test/Simples/Demo5.cs +++ b/src/JT808.Protocol.Test/Simples/Demo5.cs @@ -26,9 +26,9 @@ namespace JT808.Protocol.Test.Simples [Fact] public void Test1() { - + //注意:不能超过消息体长度的10bit,也就是最大长度为1023个字节 //1.首先了解行业的分包策略 - //一般行业分包是按256的整数倍,太多不行,太少也不行,必须刚刚好 + //一般行业分包是按256的整数倍,太多不行,太少也不行,必须刚刚好, //例:这边以256的3倍进行处理 var quotient = 6935 / (256 * 3); var remainder = 6935 % (256 * 3);