Version | NuGet | MyGet |
---|---|---|
Stable | ||
Preview |
Windows 10+ need update driver with sign
- Window Update
- Setting->Windows Update->Check for Update
- Setting->Windows Update->Advanced Options->Optional Update
- Vyacheslav Frolov - CNCPorts - 10/10/2015 12:00:00 AM - 3.0.0.0
-
Package Manager
Install-Package Hsu.NullModemEmulator
-
.NET CLI
dotnet add package Hsu.NullModemEmulator
-
PackageReference
<PackageReference Include="Hsu.NullModemEmulator" Version="2022.206.16.0" />
NullModemEmulatorManager manager = new();
var list = await manager.ListAsync();
foreach (var item in list)
{
Console.WriteLine(item);
Console.WriteLine(item.A);
Console.WriteLine(item.B);
}
var ret = await manager.AddPairAsync(
new PortBuilder()
.PortName("COM1")
.EmulateBaudRate(true)
,
new PortBuilder()
.PortName("COM2")
.EmulateBaudRate(true)
);
var ret = await manager.ChangeAsync(
1,
PortBusOrder.A,
new PortBuilder()
.PortName("COM11")
.EmulateBaudRate(false)
);
var ret = await manager.RemoveAsync(1);
var ret = await manager.RemoveAllAsync();
var list = await manager.ListFriendlyNameAsync();
foreach (var item in list)
{
Console.WriteLine(item.Bus.FriendlyName);
Console.WriteLine(item.A.FriendlyName);
Console.WriteLine(item.B.FriendlyName);
}