Nmodbus开源库


Nmodbus的开源库,已经用到项目上,可以用!
资源截图
代码片段和文件信息
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

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      225280  2009-04-14 10:00  sourceliblog4netCompactframeworklog4net.dll
     文件     1188664  2009-04-14 10:00  sourceliblog4netCompactframeworklog4net.xml
     文件      270336  2009-04-14 10:00  sourceliblog4netlog4net.dll
     文件     1365508  2009-04-14 10:00  sourceliblog4netlog4net.xml
     文件       19456  2009-04-19 23:22  sourcelibUnmeCompactframeworkUnme.Common.dll
     文件       14860  2009-04-19 23:22  sourcelibUnmeCompactframeworkUnme.Common.xml
     文件       21504  2009-04-07 14:01  sourcelibUnmeUnme.Common.dll
     文件       17026  2009-04-07 14:01  sourcelibUnmeUnme.Common.xml
     文件        4608  2009-04-02 11:35  sourcelibUnmeUnme.MbUnit.framework.Extensions.dll
     文件      202048  2009-04-02 11:35  sourcelibFTD2XX.dll
     文件         548  2009-05-02 20:27  sourcesrcFtdAdapterPropertiesAssemblyInfo.cs
     文件        4719  2009-04-05 10:15  sourcesrcFtdAdapterFtdAdapter.csproj
     文件        3648  2009-04-05 15:43  sourcesrcFtdAdapterFtdDeviceInfo.cs
     文件        2431  2009-04-05 10:29  sourcesrcFtdAdapterFtdEnums.cs
     文件       12803  2009-04-29 12:11  sourcesrcFtdAdapterFtdUsbPort.cs
     文件        2075  2009-04-05 10:16  sourcesrcFtdAdapterNativeMethods.cs
     文件        3145  2009-04-02 13:50  sourcesrcFtdAdapterResources.Designer.cs
     文件        5926  2009-04-02 13:50  sourcesrcFtdAdapterResources.resx
     文件        4777  2009-04-14 14:21  sourcesrcModbusDataDataStore.cs
     文件        1920  2009-04-02 12:13  sourcesrcModbusDataDataStoreEventArgs.cs
     文件        1756  2009-04-07 14:05  sourcesrcModbusDataDataStoreFactory.cs
     文件        2097  2009-04-02 11:35  sourcesrcModbusDataDiscreteCollection.cs
     文件         568  2009-04-02 12:34  sourcesrcModbusDataIModbusMessageDataCollection.cs
     文件        3991  2009-04-02 11:35  sourcesrcModbusDataModbusDataCollection.cs
     文件         466  2009-04-02 11:35  sourcesrcModbusDataModbusDataType.cs
     文件        2144  2009-04-02 11:35  sourcesrcModbusDataRegisterCollection.cs
     文件        4408  2009-04-02 11:35  sourcesrcModbusDeviceIModbusMaster.cs
     文件         813  2009-04-02 11:35  sourcesrcModbusDeviceIModbusSerialMaster.cs
     文件        1090  2009-04-19 19:59  sourcesrcModbusDeviceModbusDevice.cs
     文件        6500  2009-04-29 12:11  sourcesrcModbusDeviceModbusIpMaster.cs
     文件        8970  2009-04-29 12:11  sourcesrcModbusDeviceModbusMaster.cs
............此处省略187个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)