CSoft.TopPortLib
5.1.2
See the version list below for details.
dotnet add package CSoft.TopPortLib --version 5.1.2
NuGet\Install-Package CSoft.TopPortLib -Version 5.1.2
<PackageReference Include="CSoft.TopPortLib" Version="5.1.2" />
paket add CSoft.TopPortLib --version 5.1.2
#r "nuget: CSoft.TopPortLib, 5.1.2"
// Install CSoft.TopPortLib as a Cake Addin #addin nuget:?package=CSoft.TopPortLib&version=5.1.2 // Install CSoft.TopPortLib as a Cake Tool #tool nuget:?package=CSoft.TopPortLib&version=5.1.2
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 | Versions 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 was computed. 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 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- CSoft.Communication (>= 5.0.7)
- CSoft.Crow (>= 5.0.6)
- CSoft.Parser (>= 5.0.6)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on CSoft.TopPortLib:
Package | Downloads |
---|---|
CSoft.Protocol.ProtocolInterface
协议接口 |
|
FTIRSpectrometerCore
基于设备私有网络应用层通信协议开发为傅里叶红外光谱产品服务的配套模块库 |
|
GalaxySmartDeviceCore
如果银河系有旋律,星星一定是发光的IoT设备。做可信赖的智慧工业物联网的生态型伙伴,听一听宇宙终极乐章。 |
|
CSoft.Communication.Bluetooth
Package Description |
|
FTIRSpectrometerBusiness
傅里叶红外光谱商用库是为傅里叶红外光谱产品服务的配套模块,基于设备私有网络应用层通信协议开发。它提供了一组功能强大的接口和工具,方便用户对傅里叶红外光谱产品进行操作和控制,具有高度可定制、高效稳定、易于使用、灵活可扩展等特点。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
9.4.0 | 135 | 9 days ago | |
9.3.0 | 209 | 14 days ago | |
9.2.0 | 78 | 14 days ago | |
9.1.0 | 449 | a month ago | |
9.0.0 | 213 | 2 months ago | |
8.3.1 | 1,874 | 4 months ago | |
8.3.0 | 735 | 6 months ago | |
8.2.9 | 226 | 7 months ago | |
8.2.8 | 173 | 7 months ago | |
8.2.7 | 389 | 7 months ago | |
8.2.6 | 238 | 7 months ago | |
8.2.5 | 155 | 7 months ago | |
8.2.4 | 146 | 7 months ago | |
8.2.3 | 156 | 7 months ago | |
8.2.2-pre | 106 | 7 months ago | |
8.2.1-pre | 112 | 7 months ago | |
8.2.0 | 149 | 7 months ago | |
8.1.7 | 201 | 7 months ago | |
8.1.6 | 718 | 8 months ago | |
8.1.5 | 186 | 8 months ago | |
8.1.3 | 292 | 9 months ago | |
8.1.2 | 231 | 9 months ago | |
8.1.1 | 187 | 10 months ago | |
8.1.0 | 243 | 3/11/2024 | |
8.0.9 | 221 | 2/28/2024 | |
8.0.8 | 196 | 2/4/2024 | |
8.0.7 | 156 | 2/4/2024 | |
8.0.6 | 382 | 12/28/2023 | |
8.0.5 | 163 | 12/28/2023 | |
8.0.4 | 229 | 12/20/2023 | |
8.0.3 | 208 | 12/14/2023 | |
8.0.2 | 191 | 12/12/2023 | |
8.0.1 | 402 | 12/4/2023 | |
8.0.0 | 451 | 11/15/2023 | |
7.0.6 | 341 | 9/19/2023 | |
7.0.5 | 584 | 8/28/2023 | |
7.0.4 | 203 | 8/17/2023 | |
7.0.3 | 2,501 | 2/28/2023 | |
7.0.2 | 529 | 2/27/2023 | |
7.0.1 | 2,080 | 2/13/2023 | |
7.0.0 | 2,827 | 11/9/2022 | |
6.6.2 | 482 | 10/24/2022 | |
6.6.1 | 788 | 10/17/2022 | |
6.6.0 | 459 | 10/17/2022 | |
6.5.2 | 486 | 10/15/2022 | |
6.5.1 | 589 | 10/15/2022 | |
6.5.0 | 760 | 10/14/2022 | |
6.4.3 | 469 | 10/14/2022 | |
6.4.2 | 483 | 10/14/2022 | |
6.4.1 | 482 | 10/13/2022 | |
6.4.0 | 471 | 10/13/2022 | |
6.3.0 | 493 | 10/13/2022 | |
6.2.6 | 776 | 9/30/2022 | |
6.2.5 | 460 | 9/30/2022 | |
6.2.4 | 645 | 9/26/2022 | |
6.2.3 | 638 | 9/23/2022 | |
6.2.2 | 550 | 9/23/2022 | |
6.2.1 | 533 | 9/22/2022 | |
6.2.0 | 1,221 | 8/19/2022 | |
6.1.2 | 523 | 8/12/2022 | |
6.1.1 | 516 | 5/26/2022 | |
6.0.9 | 538 | 5/19/2022 | |
6.0.5 | 500 | 5/17/2022 | |
6.0.4 | 512 | 5/13/2022 | |
6.0.3 | 543 | 3/15/2022 | |
6.0.2 | 486 | 3/15/2022 | |
6.0.1 | 658 | 11/9/2021 | |
5.1.4 | 509 | 8/18/2021 | |
5.1.3 | 538 | 7/8/2021 | |
5.1.2 | 491 | 7/8/2021 | |
5.1.1 | 414 | 7/8/2021 | |
5.1.0 | 625 | 7/7/2021 | |
5.0.9 | 526 | 7/7/2021 | |
5.0.8 | 597 | 3/11/2021 | |
5.0.7 | 579 | 1/26/2021 | |
5.0.6 | 482 | 1/23/2021 | |
5.0.5 | 527 | 1/22/2021 | |
5.0.4 | 520 | 1/11/2021 | |
5.0.3 | 485 | 1/11/2021 | |
5.0.2 | 553 | 11/18/2020 | |
5.0.1 | 610 | 11/18/2020 | |
1.0.2 | 557 | 11/18/2020 | |
1.0.1 | 559 | 10/12/2020 | |
1.0.0 | 646 | 6/30/2020 |
通讯口使用类库