DoNetDrive.Core
2.7.0
See the version list below for details.
dotnet add package DoNetDrive.Core --version 2.7.0
NuGet\Install-Package DoNetDrive.Core -Version 2.7.0
<PackageReference Include="DoNetDrive.Core" Version="2.7.0" />
<PackageVersion Include="DoNetDrive.Core" Version="2.7.0" />
<PackageReference Include="DoNetDrive.Core" />
paket add DoNetDrive.Core --version 2.7.0
#r "nuget: DoNetDrive.Core, 2.7.0"
#:package DoNetDrive.Core@2.7.0
#addin nuget:?package=DoNetDrive.Core&version=2.7.0
#tool nuget:?package=DoNetDrive.Core&version=2.7.0
DoNetDrive.Core
介绍
用于运行设备命令的基础库,依赖于 Nettty.Buffer ,包含TCP Client 、TCP Server 、UDP 的通讯实现,抽象设备命令和执行步骤。
封装命令收发的核心逻辑
软件架构
基于 netstandard2.0 ;
依赖于此动态库的项目
- DoNetDrive.Protocol 设备协议的抽象
- DoNetDrive.Connector.SerialPort 串口通讯的实现,可用于RS232/485通讯
- DoNetDrive.Protocol.Door 门禁控制板命令库
- DoNetDrive.Protocol.Fingerprint 指纹机/人脸机命令库
- DoNetDrive.Protocol.Fingerprint.Elevator 指纹机/人脸机附加电梯功能命令库
- DoNetDrive.Protocol.Elevator 电梯控制板命令库
- DoNetDrive.Protocol.POS 消费机命令库
- DoNetDrive.Protocol.USB.OfflinePatrol USB巡更棒命令库
- DoNetDrive.Protocol.USB.CardReader USB发卡器命令库
使用说明
var mAllocator = ConnectorAllocator.GetAllocator();
var cmdDtl = CommandDetailFactory.CreateDetail(CommandDetailFactory.ConnectType.TCPClient, "192.168.1.56", 8000,
CommandDetailFactory.ControllerType.Door88, "0000000000000000", "FFFFFFFF");
ReadSN cmd = new ReadSN(cmdDtl);
try
{
await mAllocator.AddCommandAsync(cmd);
var snResult = cmd.getResult() as SN_Result;
Console.WriteLine(snResult.SNBuf);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
//释放
mAllocator.Dispose();
版本记录
ver 2.01.0
增加 async 和 await 的方式操作命令
ver 2.02.0
改进了上个版本使用async 和 await方式时,当连接建立成功,但是发送命令后没有响应,命令超时时,不能正确返回,导致await一直等待的bug
ver 2.03.0
- 删除了 SerialPort 减少了依赖库,如果要使用串口通讯,需要额外添加 DoNetDrive.Connector.SerialPort.dll ,并再分配器的连接器创建工厂中增加SerialPort
代码如下: VB.Net
Dim defFactory As DefaultConnectorFactory = TryCast(Allocator.ConnectorFactory, DefaultConnectorFactory)
defFactory.ConnectorFactoryDictionary.Add(ConnectorType.SerialPort, DoNetDrive.Connector.COM.SerialPortFactory.GetInstance())
- INConnectorDetail 类 增加了 ConnectingCallBlack 回调,再TCPClient 时,发起连接时会调用
- ConnectorAllocator 增加了ConnectorConnectingEvent 事件,再TCPClient 时,发起连接时会调用
ver 2.04.0
解决UDP通讯时由于对方决绝会导致udp的socket套接字意外关闭导致发送数据出错的问题 修复 CommandDetailFactory.vb 中没有移除 串口相关类型导致报错的问题 增加 CommandStatusExtension.vb ,增加判断命令是否成功完成的扩展函数
ver 2.05.0
修改命令发送后的等待发送缓冲区成功的逻辑
ver 2.06.0
修改设置最后发送命令时间的时机
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. 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 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. |
-
.NETStandard 2.0
- DotNetty.Buffers (>= 0.7.0)
- DotNetty.Common (>= 0.7.0)
- DotNetty.Transport (>= 0.7.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on DoNetDrive.Core:
Package | Downloads |
---|---|
DoNetDrive.Protocol
用于运行设备命令的协议解析抽象层,定义了各种产品的协议格式及编解码器 |
|
DoNetDrive.Connector.SerialPort
用于完成 串口 的通讯实现,需要依赖 。DoNetDrive.Core |
|
DoNetDrive.Connector.WindowsBLE
用于基于Win10 1809 以上版本SDK开发的用于蓝牙BLE通讯基础库 |
GitHub repositories
This package is not used by any popular GitHub repositories.