XLucky.Utils
1.7.5
See the version list below for details.
dotnet add package XLucky.Utils --version 1.7.5
NuGet\Install-Package XLucky.Utils -Version 1.7.5
<PackageReference Include="XLucky.Utils" Version="1.7.5" />
<PackageVersion Include="XLucky.Utils" Version="1.7.5" />
<PackageReference Include="XLucky.Utils" />
paket add XLucky.Utils --version 1.7.5
#r "nuget: XLucky.Utils, 1.7.5"
#:package XLucky.Utils@1.7.5
#addin nuget:?package=XLucky.Utils&version=1.7.5
#tool nuget:?package=XLucky.Utils&version=1.7.5
XLucky.Utils - 工业上位机通讯与通用工具库
🔄 维护计划
库维护说明:本项目遵循 "周更小版本,月更大版本" 的迭代节奏,持续优化 工业各种 通讯性能与稳定性以及更多其他新增通讯。注:因个人事务等不可预见因素,更新可能存在轻微延迟,敬请谅解。
📝 最新更新 (v1.7.5)
🚀 Modbus 通讯健壮性与数据体验升级
🛠️ 数据字节序自定义策略
- 灵活的字节交换控制:新增
SetSwapAdjacentBytes配置选项,允许开发者精确控制字符串及数值类型的字节排列。 - 相邻字节对调功能:启用该模式后,数据序列化时将自动执行相邻字节交换(例如
0x01, 0x02, 0x03, 0x04转换为0x02, 0x01, 0x04, 0x03)。 - 场景适配性增强:此功能专门针对特定 PLC 或硬件设备对字节序有特殊要求的通信场景,确保数据解析的准确性。
✨ 核心特性
🔌 高级通讯模块
- 全协议栈支持:原生支持 Serial (RS232/485)、TCP/IP、UDP 及 HTTP/HTTPS 协议。
- 主流 PLC 互联:
- Siemens S7 系列 (S7-200/300/400/1200/1500)
- Modbus RTU/TCP 主从站模式
- OMRON CIP/FINS 协议族
- 工业总线集成:内置 OPC UA 客户端、CAN 总线解析及 Profibus 桥接能力。
- 高可用连接管理:智能心跳检测机制,支持断线自动重连与状态自愈。
🛠️ 通用工具模块
- 数据编解码:提供字节数组操作、BCD 码转换、IEEE754 浮点数处理等工业常用算法。
- 完整性校验:集成 CRC16/CRC32、Checksum 累加和、LRC 纵向冗余校验计算。
- 安全加密套件:支持 AES、DES、RSA 国际标准算法及国密 SM4 算法。
- 结构化日志:高性能日志系统,支持多级别、多输出目标(文件/控制台/网络)。
🚀 性能优化架构
- 连接池技术:实现 TCP 连接复用,降低握手延迟。
- 异步并发模型:基于
Task的全异步非阻塞 IO 操作。 - 内存零拷贝:利用
ArrayPool缓冲池技术,大幅减少 GC 压力,实现高效数据传输。 - 二进制解析加速:针对工业报文优化的快速解析引擎。
📦 安装指南
NuGet Package Manager
Install-Package XLucky.Utils
.NET CLI
dotnet add package XLucky.Utils
📄 许可证
本项目采用 MIT License 开源协议。
Copyright (c) XLucky.Utils Team
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- Newtonsoft.Json (>= 13.0.4)
- System.Net.Http (>= 4.3.4)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
- System.IO.Ports (>= 10.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.