ZLGCanComm 0.0.0.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ZLGCanComm --version 0.0.0.6
NuGet\Install-Package ZLGCanComm -Version 0.0.0.6
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="ZLGCanComm" Version="0.0.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZLGCanComm" Version="0.0.0.6" />
<PackageReference Include="ZLGCanComm" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZLGCanComm --version 0.0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZLGCanComm, 0.0.0.6"
#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.
#:package ZLGCanComm@0.0.0.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZLGCanComm&version=0.0.0.6
#tool nuget:?package=ZLGCanComm&version=0.0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ZLGCan设备的通讯库
编译时,必须配置为X86
当前仅能连接TCP、USBCan1类型的设备
具体环境安装请自行查看官方文档 https://manual.zlg.cn/web/#/152/5332
使用例子
using System.Diagnostics;
using ZLGCanComm.Devices;
using ZLGCanComm.Extensions;
using ZLGCanComm.Structs;
//必须设置为X86!!!
TcpCanDevice tcpCanDevice = new TcpCanDevice("192.168.1.123", "4001");
//连接设备
var connected = tcpCanDevice.TryConnect();
if (!connected)
{
//检查设备是否连接、CanIndex是否设置正确。ip端口是否正确!!
Debugger.Break();
return;
}
//读取设备信息
tcpCanDevice.TryReadMessage(out var canObject);
Console.WriteLine(canObject.Id);
Console.WriteLine(canObject.Data);
//监听设备
tcpCanDevice.RegisterListener(Listener);
canObject.Data = new byte[8];
//写入设备
tcpCanDevice.TryWriteMessage(canObject.Id, canObject.Data);
//如果不用必须Disposable当前实例
tcpCanDevice.Dispose();
void Listener(CanObject canObject)
{
Console.WriteLine(canObject.Id);
Console.WriteLine(canObject.Data);
}
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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.