CSoft.Parser 8.0.10

There is a newer version of this package available.
See the version list below for details.
dotnet add package CSoft.Parser --version 8.0.10                
NuGet\Install-Package CSoft.Parser -Version 8.0.10                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSoft.Parser" Version="8.0.10" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CSoft.Parser --version 8.0.10                
#r "nuget: CSoft.Parser, 8.0.10"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CSoft.Parser as a Cake Addin
#addin nuget:?package=CSoft.Parser&version=8.0.10

// Install CSoft.Parser as a Cake Tool
#tool nuget:?package=CSoft.Parser&version=8.0.10                

Communication

通讯库

用法详见例子

一、为什么要分割数据包

因为通信的时候,接收到的数据是一个连续的数据流。我们需要从中获取到一个完整的数据包。

二、分割一个数据包的几种方式

1.包头和包尾

例子

头:01 02 尾:04 06(以后的例子中的头和尾都用01 02 和 04 06) 一个完整的数据包 01 02 xx xx … xx 04 06

安全性问题

如果对方只发送了包头,然后一直发送垃圾数据,这些数据中不包含包尾。我们的程序无法丢弃这些垃圾数据,这会导致占用内存越来越大,最终导致程序崩溃

2.包尾

例子

一个完整的数据包 xx xx … xx 04 06

安全性问题

如果对方一直发送垃圾数据,这些数据中不包含包尾。我们的程序无法丢弃这些垃圾数据,这会导致占用内存越来越大,最终导致程序崩溃

3.包头和长度

例子

一个完整的数据包 01 02 03 05 07 其中01 02 是包头(TCP可以不带包头),03代表长度(也可以传入指定长度)。比如协议规定,除包头以外,还有长度为3的数据,本例中是03 05 07。

安全性问题

如果对方一直发送垃圾数据,这些数据中不包含包头。我们的程序可以移除这些无效数据,这样不会使内存占用变大。所以推荐使用这种分割数据包的方式

4.时间

这种方式用于串口通信。不会产生垃圾数据占用内存的问题。一定时间内(比如Modbus是200ms)收到的数据作为一个完整的数据包

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CSoft.Parser:

Package Downloads
CSoft.TopPortLib

通讯口使用类库

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 520 11/22/2024
8.0.10 1,736 9/3/2024
8.0.9 2,471 4/29/2024
8.0.8 501 4/10/2024 8.0.8 is deprecated because it is no longer maintained.
8.0.7 347 3/11/2024 8.0.7 is deprecated because it is no longer maintained.
8.0.6 263 2/28/2024 8.0.6 is deprecated because it is no longer maintained.
8.0.5 240 2/4/2024 8.0.5 is deprecated because it is no longer maintained.
8.0.4 194 2/4/2024 8.0.4 is deprecated because it has critical bugs.
8.0.3 648 12/14/2023 8.0.3 is deprecated because it is no longer maintained.
8.0.2 253 12/12/2023 8.0.2 is deprecated because it has critical bugs.
8.0.1 454 12/4/2023 8.0.1 is deprecated because it is no longer maintained.
8.0.0 489 11/15/2023 8.0.0 is deprecated because it is no longer maintained.
7.0.4 886 8/17/2023 7.0.4 is deprecated because it is no longer maintained.
7.0.3 2,648 2/28/2023 7.0.3 is deprecated because it is no longer maintained.
7.0.2 627 2/27/2023 7.0.2 is deprecated because it is no longer maintained.
7.0.1 2,205 2/13/2023 7.0.1 is deprecated because it is no longer maintained.
7.0.0 3,045 11/9/2022 7.0.0 is deprecated because it is no longer maintained.
6.6.0 1,527 10/17/2022 6.6.0 is deprecated because it is no longer maintained.
6.5.0 1,615 10/14/2022 6.5.0 is deprecated because it is no longer maintained.
6.4.0 1,479 10/13/2022 6.4.0 is deprecated because it is no longer maintained.
6.3.0 751 10/13/2022 6.3.0 is deprecated because it is no longer maintained.
6.2.6 1,075 9/30/2022 6.2.6 is deprecated because it is no longer maintained.
6.2.5 769 9/30/2022 6.2.5 is deprecated because it has critical bugs.
6.2.4 922 9/26/2022 6.2.4 is deprecated because it is no longer maintained.
6.2.3 907 9/23/2022 6.2.3 is deprecated because it is no longer maintained.
6.2.2 809 9/23/2022 6.2.2 is deprecated because it has critical bugs.
6.2.1 763 9/22/2022 6.2.1 is deprecated because it is no longer maintained.
6.2.0 1,524 8/19/2022 6.2.0 is deprecated because it is no longer maintained.
6.1.2 795 8/12/2022 6.1.2 is deprecated because it is no longer maintained.
6.1.1 829 5/26/2022 6.1.1 is deprecated because it is no longer maintained.
6.0.9 810 5/19/2022 6.0.9 is deprecated because it is no longer maintained.
6.0.5 772 5/17/2022 6.0.5 is deprecated because it is no longer maintained.
6.0.4 825 5/13/2022 6.0.4 is deprecated because it is no longer maintained.
6.0.3 875 3/15/2022 6.0.3 is deprecated because it is no longer maintained.
6.0.2 796 3/15/2022 6.0.2 is deprecated because it is no longer maintained.
6.0.1 1,019 11/9/2021 6.0.1 is deprecated because it is no longer maintained.
6.0.0 506 11/9/2021 6.0.0 is deprecated because it is no longer maintained.
5.0.7 697 8/18/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 1,459 3/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 735 1/26/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 851 1/22/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 843 1/11/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 692 11/18/2020 5.0.2 is deprecated because it is no longer maintained.
5.0.1 689 11/18/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 536 11/18/2020 5.0.0 is deprecated because it is no longer maintained.
2.0.0 996 10/15/2020 2.0.0 is deprecated because it is no longer maintained.
1.0.0 1,036 6/30/2020 1.0.0 is deprecated because it is no longer maintained and has critical bugs.

更新CSoft.Utils依赖