资源简介
针对MODBUSTCP的由C#编写的一个类库,NMODBUS,可以直接调用API,来实现MODBUS在TCP上的传输,十分简单。
(还有些类库源码)
代码片段和文件信息
namespace FtdAdapter
{
///
/// Provides information about an attached FTDI USB device.
///
public struct FtdDeviceInfo
{
private readonly uint _flags;
private readonly uint _id;
private readonly string _serialNumber;
private readonly uint _type;
private readonly uint _locationId;
private readonly string _description;
internal FtdDeviceInfo(uint flags uint type uint id uint locationId string serialNumber string description)
{
_flags = flags;
_type = type;
_id = id;
_locationId = locationId;
_serialNumber = serialNumber;
_description = description;
}
///
/// Complete device ID comprising Vendor ID and Product ID.
///
public uint Id
{
get { return _id; }
}
///
/// Vendor ID.
///
public uint VendorId
{
get { return (_id >> 16) & 0xFFFF; }
}
///
/// Product ID
///
public uint ProductId
{
get { return _id & 0xFFFF; }
}
///
/// Serial number of device.
///
public string SerialNumber
{
get { return _serialNumber; }
}
///
/// Device flags.
///
public uint Flags
{
get { return _flags; }
}
///
/// Device type.
///
public uint Type
{
get { return _type; }
}
///
/// LocID
///
public uint LocationId
{
get { return _locationId; }
}
///
/// Description of device.
///
public string Description
{
get { return _description; }
}
///
/// Gets a value indicating if the device is already open.
///
public bool IsOpen
{
get { return (_flags & 0x01) != 0; }
}
///
/// Implements the operator ==.
///
/// The left.
/// The right.
/// The result of the operator.
public static bool operator ==(FtdDeviceInfo left FtdDeviceInfo right)
{
return left.Equals(right);
}
///
/// Implements the operator !=.
///
/// The left.
/// The right.
/// The result of the operator.
public static bool operator !=(FtdDeviceInfo left FtdDeviceInfo right)
{
return !left.Equals(right);
}
///
/// Indicates whether this instance and a specified object are equal.
///
/// Another object to compare to.
///
/// true if and this instance are the same type and represent the same value; otherwise false.
///
public override bool Equals(object obj)
{
if (!(obj is FtdDeviceInfo))
return false;
FtdDeviceInfo other = (FtdDeviceInfo) obj
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1156323 2016-03-24 17:45 ModBus协议中文版.pdf
文件 825235 2016-03-22 20:33 nmodbus_api_manual_v1.2_cht.pdf
文件 17811 2016-03-22 17:46 NModbus类库使用.docx
....... 202048 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\bin\net\FTD2XX.dll
....... 28672 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\bin\net\FtdAdapter.dll
....... 270336 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\bin\net\log4net.dll
....... 86016 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\bin\net\Modbus.dll
....... 8704 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\bin\net\Modbus.Extensions.dll
....... 21504 2009-04-07 14:01 NModbus_net-3.5_1.11.0.0-source\bin\net\Unme.Common.dll
....... 225280 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\bin\netcf\log4net.dll
....... 77824 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\bin\netcf\Modbus.dll
....... 8704 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\bin\netcf\Modbus.Extensions.dll
....... 19456 2009-04-19 23:22 NModbus_net-3.5_1.11.0.0-source\bin\netcf\Unme.Common.dll
....... 325959 2009-05-02 20:28 NModbus_net-3.5_1.11.0.0-source\NModbus_net-3.5.chm
....... 1633 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\README.txt
....... 202048 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\source\lib\FTD2XX.dll
....... 225280 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\source\lib\log4net\Compactfr
....... 1188664 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\source\lib\log4net\Compactfr
....... 270336 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\source\lib\log4net\log4net.dll
....... 1365508 2009-04-14 10:00 NModbus_net-3.5_1.11.0.0-source\source\lib\log4net\log4net.xm
....... 19456 2009-04-19 23:22 NModbus_net-3.5_1.11.0.0-source\source\lib\Unme\Compactfr
....... 14860 2009-04-19 23:22 NModbus_net-3.5_1.11.0.0-source\source\lib\Unme\Compactfr
....... 21504 2009-04-07 14:01 NModbus_net-3.5_1.11.0.0-source\source\lib\Unme\Unme.Common.dll
....... 17026 2009-04-07 14:01 NModbus_net-3.5_1.11.0.0-source\source\lib\Unme\Unme.Common.xm
....... 4608 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\source\lib\Unme\Unme.MbUnit.fr
....... 11458 2009-05-02 20:27 NModbus_net-3.5_1.11.0.0-source\source\NModbus.build
....... 3785 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\source\NModbus.shfbproj
....... 160 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\source\NModbusPublic.snk
文件 202048 2009-04-02 11:35 NModbus_net-3.5_1.11.0.0-source\source\src\FtdAdapter\bin\Debug\FTD2XX.dll
文件 18944 2016-03-23 09:49 NModbus_net-3.5_1.11.0.0-source\source\src\FtdAdapter\bin\Debug\FtdAdapter.dll
............此处省略419个文件信息
- 上一篇:Kinect开发变脸游戏
- 下一篇:C#连接mysql数据库dll
相关资源
- NModbusAPI说明文档中文的 实用
- NModbus说明文档API 中文英文+chm
- nmodbus官方例程 包括dllvb.net与C#
- C#使用ModbusTcp协议与西门子1200PLC通讯
- NMODBUS PDF
- C# 2015最新版NMODBUS4.0源码支持TCP/IPRT
- C#ModbusTCP客户端
- NModbu官方VB C# 全
- Nmodbus TCP 初版 实现 winform
- NModbus RTU 成果初版 C# WINFROM
- NModbus 用C#实现的modbus协议源码
- NModbus4 Modbus是一个C#实现Modbus协议。
- ModbusTcpMasterPro和ModbusTcpSlavePro
- Nmodbus
- ModbusTCP 连接、写入、读取
评论
共有 条评论