FtdAdapter Namespace

NModbus
FtdAdapter Namespace
Namespaces ► FtdAdapter
.NET wrapper for Future Device Technologies USB driver. This assembly contains unsafe code and must be run with full trust.
Declaration Syntax
C# Visual Basic Visual C++
namespace FtdAdapter
Namespace FtdAdapter
namespace FtdAdapter
Types
All Types Classes Structures Enumerations
Icon | Type | Description
 | FtdDeviceInfo | Provides information about an attached FTDI USB device.
 | FtdFlowControl | Specifies the flow control used on the UsbPort object.
 | FtdParity | Specifies the parity used on the UsbPort object.
 | FtdStopBits | Specifies the number of stop bits used on the UsbPort object.
 | FtdUsbPort | Wrapper class for the FTD2XX USB resource.


FtdDeviceInfo Structure

FtdDeviceInfo Structure
Namespaces ► FtdAdapter ► FtdDeviceInfo
Provides information about an attached FTDI USB device.
Declaration Syntax
C# Visual Basic Visual C++
public struct FtdDeviceInfo
Public Structure FtdDeviceInfo
public value class FtdDeviceInfo
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Description | Description of device.
 | Equality(FtdDeviceInfo, FtdDeviceInfo) | Implements the operator ==.
 | Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object).)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | Flags | Device flags.
 | GetHashCode()()() | Returns the hash code for this instance. (Overrides ValueType.GetHashCode()()().)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Id | Complete device ID, comprising Vendor ID and Product ID.
 | Inequality(FtdDeviceInfo, FtdDeviceInfo) | Implements the operator !=.
 | IsOpen | Gets a value indicating if the device is already open.
 | LocationId | LocID
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ProductId | Product ID
 | SerialNumber | Serial number of device.
 | ToString()()() | Returns the fully qualified type name of this instance. (Inherited from ValueType.)
 | Type | Device type.
 | VendorId | Vendor ID.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Description Property

Description Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Description
Description of device.
Declaration Syntax
C# Visual Basic Visual C++
public string Description { get; }
Public ReadOnly Property Description As String
public:
property String^ Description {
    String^ get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Equality Operator

Equality Operator
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Equality(FtdDeviceInfo, FtdDeviceInfo)
Implements the operator ==.
Declaration Syntax
C# Visual Basic Visual C++
public static bool operator ==(
    FtdDeviceInfo left,
    FtdDeviceInfo right
)
Public Shared Operator = ( _
    left As FtdDeviceInfo, _
    right As FtdDeviceInfo _
) As Boolean
public:
static bool operator ==(
    FtdDeviceInfo left,
    FtdDeviceInfo right
)
Parameters
left (FtdDeviceInfo)
The left.
right (FtdDeviceInfo)
The right.
Return Value
The result of the operator.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Equals Method (obj)

Equals Method (obj)
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Equals(
    Object obj
)
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
public:
virtual bool Equals(
    Object^ obj
) override
Parameters
obj (Object)
Another object to compare to.
Return Value
true if obj and this instance are the same type and represent the same value; otherwise, false.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Flags Property

Flags Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Flags
Device flags.
Declaration Syntax
C# Visual Basic Visual C++
public uint Flags { get; }
Public ReadOnly Property Flags As UInteger
public:
property unsigned int Flags {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


GetHashCode Method

GetHashCode Method
Namespaces ► FtdAdapter ► FtdDeviceInfo ► GetHashCode()()()
Returns the hash code for this instance.
Declaration Syntax
C# Visual Basic Visual C++
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
public:
virtual int GetHashCode() override
Return Value
A 32-bit signed integer that is the hash code for this instance.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Id Property

Id Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Id
Complete device ID, comprising Vendor ID and Product ID.
Declaration Syntax
C# Visual Basic Visual C++
public uint Id { get; }
Public ReadOnly Property Id As UInteger
public:
property unsigned int Id {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Inequality Operator

Inequality Operator
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Inequality(FtdDeviceInfo, FtdDeviceInfo)
Implements the operator !=.
Declaration Syntax
C# Visual Basic Visual C++
public static bool operator !=(
    FtdDeviceInfo left,
    FtdDeviceInfo right
)
Public Shared Operator <> ( _
    left As FtdDeviceInfo, _
    right As FtdDeviceInfo _
) As Boolean
public:
static bool operator !=(
    FtdDeviceInfo left,
    FtdDeviceInfo right
)
Parameters
left (FtdDeviceInfo)
The left.
right (FtdDeviceInfo)
The right.
Return Value
The result of the operator.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


IsOpen Property

IsOpen Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► IsOpen
Gets a value indicating if the device is already open.
Declaration Syntax
C# Visual Basic Visual C++
public bool IsOpen { get; }
Public ReadOnly Property IsOpen As Boolean
public:
property bool IsOpen {
    bool get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


LocationId Property

LocationId Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► LocationId
LocID
Declaration Syntax
C# Visual Basic Visual C++
public uint LocationId { get; }
Public ReadOnly Property LocationId As UInteger
public:
property unsigned int LocationId {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


ProductId Property

ProductId Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► ProductId
Product ID
Declaration Syntax
C# Visual Basic Visual C++
public uint ProductId { get; }
Public ReadOnly Property ProductId As UInteger
public:
property unsigned int ProductId {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


SerialNumber Property

SerialNumber Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► SerialNumber
Serial number of device.
Declaration Syntax
C# Visual Basic Visual C++
public string SerialNumber { get; }
Public ReadOnly Property SerialNumber As String
public:
property String^ SerialNumber {
    String^ get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Type Property

Type Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► Type
Device type.
Declaration Syntax
C# Visual Basic Visual C++
public uint Type { get; }
Public ReadOnly Property Type As UInteger
public:
property unsigned int Type {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


VendorId Property

VendorId Property
Namespaces ► FtdAdapter ► FtdDeviceInfo ► VendorId
Vendor ID.
Declaration Syntax
C# Visual Basic Visual C++
public uint VendorId { get; }
Public ReadOnly Property VendorId As UInteger
public:
property unsigned int VendorId {
    unsigned int get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


FtdFlowControl Enumeration

FtdFlowControl Enumeration
Namespaces ► FtdAdapter ► FtdFlowControl
Specifies the flow control used on the UsbPort object.
Declaration Syntax
C# Visual Basic Visual C++
public enum FtdFlowControl
Public Enumeration FtdFlowControl
public enum class FtdFlowControl
Members
Member | Description
None | No flow control is used
RtsCts | RTS CTS are used for flow control
DtrDsr | DTR DSR are used for flow control
XonXoff | XON XOFF are used for flow control

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


FtdParity Enumeration

FtdParity Enumeration
Namespaces ► FtdAdapter ► FtdParity
Specifies the parity used on the UsbPort object.
Declaration Syntax
C# Visual Basic Visual C++
public enum FtdParity
Public Enumeration FtdParity
public enum class FtdParity
Members
Member | Description
None | No parity check occurs.
Odd | Sets the parity bit so that the count of bits set is an odd number.
Even | Sets the parity bit so that the count of bits set is an even number.
Mark | Leaves the parity bit set to 1.
Space | Leaves the parity bit set to 0.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


FtdStopBits Enumeration

FtdStopBits Enumeration
Namespaces ► FtdAdapter ► FtdStopBits
Specifies the number of stop bits used on the UsbPort object.
Declaration Syntax
C# Visual Basic Visual C++
public enum FtdStopBits
Public Enumeration FtdStopBits
public enum class FtdStopBits
Members
Member | Description
One | One stop bit is used.
OnePointFive | 1.5 stop bits are used.
Two | Two stop bits are used.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


FtdUsbPort Class

FtdUsbPort Class
Namespaces ► FtdAdapter ► FtdUsbPort
Wrapper class for the FTD2XX USB resource.
Declaration Syntax
C# Visual Basic Visual C++
public class FtdUsbPort : IStreamResource, IDisposable
Public Class FtdUsbPort _
    Implements IStreamResource, IDisposable
public ref class FtdUsbPort : IStreamResource,
    IDisposable
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | FtdUsbPort()()() | Initializes a new instance of the FtdUsbPort class.
 | BaudRate | Gets or sets the serial baud rate.
 | Close()()() | Closes the port connection.
 | DataBits | Gets or sets the standard length of data bits per byte.
 | DiscardInBuffer()()() | Purges the receive buffer.
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetDeviceCount()()() | Returns the number of D2XX devices connected to the system.
 | GetDeviceInfo(UInt32) | Gets the device info at the specified device index.
 | GetDeviceInfos()()() | Gets an array of the currently connected device's device info.
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | InfiniteTimeout | Indicates that no time-out should occur.
 | IsOpen | Gets a value indicating the open or closed status of the UsbPort object.
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OpenByDescription(String) | Opens the device by description.
 | OpenByIndex(UInt32) | Opens the device by index.
 | OpenByLocationId(UInt32) | Opens the device by location id.
 | OpenBySerialNumber(String) | Opens the device by serial number.
 | Parity | Gets or sets the parity-checking protocol.
 | Read(array<Byte>[]()[], Int32, Int32) | Reads a number of bytes from the UsbPort input buffer and writes those bytes into a byte array at the specified offset.
 | ReadTimeout | Gets or sets the number of milliseconds before a time-out occurs when a read operation does not finish.
 | SetFlowControl(FtdFlowControl, Byte, Byte) | Set flow control.
 | StopBits | Gets or sets the standard number of stopbits per byte.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Write(array<Byte>[]()[], Int32, Int32) | Writes a specified number of bytes to the port from an output buffer, starting at the specified offset.
 | WriteTimeout | Gets or sets the number of milliseconds before a time-out occurs when a write operation does not finish.
Inheritance Hierarchy
Object
FtdUsbPort

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


FtdUsbPort Constructor

FtdUsbPort Constructor
Namespaces ► FtdAdapter ► FtdUsbPort ► FtdUsbPort()()()
Initializes a new instance of the FtdUsbPort class.
Declaration Syntax
C# Visual Basic Visual C++
public FtdUsbPort()
Public Sub New
public:
FtdUsbPort()

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


BaudRate Property

BaudRate Property
Namespaces ► FtdAdapter ► FtdUsbPort ► BaudRate
Gets or sets the serial baud rate.
Declaration Syntax
C# Visual Basic Visual C++
public int BaudRate { get; set; }
Public Property BaudRate As Integer
public:
property int BaudRate {
    int get ();
    void set (int value);
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Close Method

Close Method
Namespaces ► FtdAdapter ► FtdUsbPort ► Close()()()
Closes the port connection.
Declaration Syntax
C# Visual Basic Visual C++
public void Close()
Public Sub Close
public:
void Close()

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


DataBits Property

DataBits Property
Namespaces ► FtdAdapter ► FtdUsbPort ► DataBits
Gets or sets the standard length of data bits per byte.
Declaration Syntax
C# Visual Basic Visual C++
public int DataBits { get; set; }
Public Property DataBits As Integer
public:
property int DataBits {
    int get ();
    void set (int value);
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


DiscardInBuffer Method

DiscardInBuffer Method
Namespaces ► FtdAdapter ► FtdUsbPort ► DiscardInBuffer()()()
Purges the receive buffer.
Declaration Syntax
C# Visual Basic Visual C++
public void DiscardInBuffer()
Public Sub DiscardInBuffer
public:
virtual void DiscardInBuffer() sealed

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Dispose Method

Dispose Method
Namespaces ► FtdAdapter ► FtdUsbPort ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Dispose Method

Dispose Method
Namespaces ► FtdAdapter ► FtdUsbPort ► Dispose()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration Syntax
C# Visual Basic Visual C++
public void Dispose()
Public Sub Dispose
public:
virtual void Dispose() sealed

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Dispose Method (disposing)

Dispose Method (disposing)
Namespaces ► FtdAdapter ► FtdUsbPort ► Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void Dispose(
    bool disposing
)
Protected Overridable Sub Dispose ( _
    disposing As Boolean _
)
protected:
virtual void Dispose(
    bool disposing
)
Parameters
disposing (Boolean)
true to release both managed and unmanaged resources; false to release only unmanaged resources.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


GetDeviceCount Method

GetDeviceCount Method
Namespaces ► FtdAdapter ► FtdUsbPort ► GetDeviceCount()()()
Returns the number of D2XX devices connected to the system.
Declaration Syntax
C# Visual Basic Visual C++
public static int GetDeviceCount()
Public Shared Function GetDeviceCount As Integer
public:
static int GetDeviceCount()

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


GetDeviceInfo Method (index)

GetDeviceInfo Method (index)
Namespaces ► FtdAdapter ► FtdUsbPort ► GetDeviceInfo(UInt32)
Gets the device info at the specified device index.
Declaration Syntax
C# Visual Basic Visual C++
public static FtdDeviceInfo GetDeviceInfo(
    uint index
)
Public Shared Function GetDeviceInfo ( _
    index As UInteger _
) As FtdDeviceInfo
public:
static FtdDeviceInfo GetDeviceInfo(
    unsigned int index
)
Parameters
index (UInt32)
Index of the device.
Return Value
An FtdDeviceInfo instance.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


GetDeviceInfos Method

GetDeviceInfos Method
Namespaces ► FtdAdapter ► FtdUsbPort ► GetDeviceInfos()()()
Gets an array of the currently connected device's device info.
Declaration Syntax
C# Visual Basic Visual C++
public static FtdDeviceInfo[] GetDeviceInfos()
Public Shared Function GetDeviceInfos As FtdDeviceInfo()
public:
static array<FtdDeviceInfo>^ GetDeviceInfos()
Return Value
An array of FtdDeviceInfo objects.
Exceptions
Exception | Condition
IOException |

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


InfiniteTimeout Property

InfiniteTimeout Property
Namespaces ► FtdAdapter ► FtdUsbPort ► InfiniteTimeout
Indicates that no time-out should occur.
Declaration Syntax
C# Visual Basic Visual C++
public int InfiniteTimeout { get; }
Public ReadOnly Property InfiniteTimeout As Integer
public:
virtual property int InfiniteTimeout {
    int get () sealed;
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


IsOpen Property

IsOpen Property
Namespaces ► FtdAdapter ► FtdUsbPort ► IsOpen
Gets a value indicating the open or closed status of the UsbPort object.
Declaration Syntax
C# Visual Basic Visual C++
public bool IsOpen { get; }
Public ReadOnly Property IsOpen As Boolean
public:
property bool IsOpen {
    bool get ();
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


OpenByDescription Method (description)

OpenByDescription Method (description)
Namespaces ► FtdAdapter ► FtdUsbPort ► OpenByDescription(String)
Opens the device by description.
Declaration Syntax
C# Visual Basic Visual C++
public void OpenByDescription(
    string description
)
Public Sub OpenByDescription ( _
    description As String _
)
public:
void OpenByDescription(
    String^ description
)
Parameters
description (String)
The description.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


OpenByIndex Method (index)

OpenByIndex Method (index)
Namespaces ► FtdAdapter ► FtdUsbPort ► OpenByIndex(UInt32)
Opens the device by index.
Declaration Syntax
C# Visual Basic Visual C++
public void OpenByIndex(
    uint index
)
Public Sub OpenByIndex ( _
    index As UInteger _
)
public:
void OpenByIndex(
    unsigned int index
)
Parameters
index (UInt32)
Must be 0 if only one device is attached. For multiple devices 1, 2 etc.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


OpenByLocationId Method (locationId)

OpenByLocationId Method (locationId)
Namespaces ► FtdAdapter ► FtdUsbPort ► OpenByLocationId(UInt32)
Opens the device by location id.
Declaration Syntax
C# Visual Basic Visual C++
public void OpenByLocationId(
    uint locationId
)
Public Sub OpenByLocationId ( _
    locationId As UInteger _
)
public:
void OpenByLocationId(
    unsigned int locationId
)
Parameters
locationId (UInt32)
The location id.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


OpenBySerialNumber Method (serialNumber)

OpenBySerialNumber Method (serialNumber)
Namespaces ► FtdAdapter ► FtdUsbPort ► OpenBySerialNumber(String)
Opens the device by serial number.
Declaration Syntax
C# Visual Basic Visual C++
public void OpenBySerialNumber(
    string serialNumber
)
Public Sub OpenBySerialNumber ( _
    serialNumber As String _
)
public:
void OpenBySerialNumber(
    String^ serialNumber
)
Parameters
serialNumber (String)
The serial number.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Parity Property

Parity Property
Namespaces ► FtdAdapter ► FtdUsbPort ► Parity
Gets or sets the parity-checking protocol.
Declaration Syntax
C# Visual Basic Visual C++
public FtdParity Parity { get; set; }
Public Property Parity As FtdParity
public:
property FtdParity Parity {
    FtdParity get ();
    void set (FtdParity value);
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Read Method (buffer, offset, count)

Read Method (buffer, offset, count)
Namespaces ► FtdAdapter ► FtdUsbPort ► Read(array<Byte>[]()[], Int32, Int32)
Reads a number of bytes from the UsbPort input buffer and writes those bytes into a byte array at the specified offset.
Declaration Syntax
C# Visual Basic Visual C++
public int Read(
    byte[] buffer,
    int offset,
    int count
)
Public Function Read ( _
    buffer As Byte(), _
    offset As Integer, _
    count As Integer _
) As Integer
public:
virtual int Read(
    array<unsigned char>^ buffer,
    int offset,
    int count
) sealed
Parameters
buffer (array< Byte >[]()[])
The byte array to write the input to.
offset (Int32)
The offset in the buffer array to begin writing.
count (Int32)
The number of bytes to read.
Return Value
The number of bytes read.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


ReadTimeout Property

ReadTimeout Property
Namespaces ► FtdAdapter ► FtdUsbPort ► ReadTimeout
Gets or sets the number of milliseconds before a time-out occurs when a read operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
public int ReadTimeout { get; set; }
Public Property ReadTimeout As Integer
public:
virtual property int ReadTimeout {
    int get () sealed;
    void set (int value) sealed;
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


SetFlowControl Method (flowControl, xOn, xOff)

SetFlowControl Method (flowControl, xOn, xOff)
Namespaces ► FtdAdapter ► FtdUsbPort ► SetFlowControl(FtdFlowControl, Byte, Byte)
Set flow control.
Declaration Syntax
C# Visual Basic Visual C++
public void SetFlowControl(
    FtdFlowControl flowControl,
    byte xOn,
    byte xOff
)
Public Sub SetFlowControl ( _
    flowControl As FtdFlowControl, _
    xOn As Byte, _
    xOff As Byte _
)
public:
void SetFlowControl(
    FtdFlowControl flowControl,
    unsigned char xOn,
    unsigned char xOff
)
Parameters
flowControl (FtdFlowControl)
Type of flow control
xOn (Byte)
XON symbol
xOff (Byte)
XOFF symbol

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


StopBits Property

StopBits Property
Namespaces ► FtdAdapter ► FtdUsbPort ► StopBits
Gets or sets the standard number of stopbits per byte.
Declaration Syntax
C# Visual Basic Visual C++
public FtdStopBits StopBits { get; set; }
Public Property StopBits As FtdStopBits
public:
property FtdStopBits StopBits {
    FtdStopBits get ();
    void set (FtdStopBits value);
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Write Method (buffer, offset, count)

Write Method (buffer, offset, count)
Namespaces ► FtdAdapter ► FtdUsbPort ► Write(array<Byte>[]()[], Int32, Int32)
Writes a specified number of bytes to the port from an output buffer, starting at the specified offset.
Declaration Syntax
C# Visual Basic Visual C++
public void Write(
    byte[] buffer,
    int offset,
    int count
)
Public Sub Write ( _
    buffer As Byte(), _
    offset As Integer, _
    count As Integer _
)
public:
virtual void Write(
    array<unsigned char>^ buffer,
    int offset,
    int count
) sealed
Parameters
buffer (array< Byte >[]()[])
The byte array that contains the data to write to the port.
offset (Int32)
The offset in the buffer array to begin writing.
count (Int32)
The number of bytes to write.

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


WriteTimeout Property

WriteTimeout Property
Namespaces ► FtdAdapter ► FtdUsbPort ► WriteTimeout
Gets or sets the number of milliseconds before a time-out occurs when a write operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
public int WriteTimeout { get; set; }
Public Property WriteTimeout As Integer
public:
virtual property int WriteTimeout {
    int get () sealed;
    void set (int value) sealed;
}

Assembly: FtdAdapter (Module: FtdAdapter) Version: 1.11.0.0 (1.11.0.0)


Modbus Namespace

Modbus Namespace
Namespaces ► Modbus
Modbus.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus
Namespace Modbus
namespace Modbus
Types
All Types Classes
Icon | Type | Description
 | SlaveException | Represents slave errors that occur during communication.


SlaveException Class

SlaveException Class
Namespaces ► Modbus ► SlaveException
Represents slave errors that occur during communication.
Declaration Syntax
C# Visual Basic Visual C++
[SerializableAttribute]
public class SlaveException : Exception
<SerializableAttribute> _
Public Class SlaveException _
    Inherits Exception
[SerializableAttribute]
public ref class SlaveException : public Exception
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | SlaveException()()() | Initializes a new instance of the SlaveException class.
 | SlaveException(String) | Initializes a new instance of the SlaveException class.
 | SlaveException(String, Exception) | Initializes a new instance of the SlaveException class.
 | SlaveException(SerializationInfo, StreamingContext) | Initializes a new instance of the SlaveException class.
 | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | FunctionCode | Gets the response function code that caused the exception to occur, or 0.
 | GetBaseException()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)
 | GetType()()() | Gets the runtime type of the current instance. (Inherited from Exception.)
 | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
 | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
 | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets a message that describes the current exception. (Overrides Exception.Message.)
 | SlaveAddress | Gets the slave address, or 0.
 | SlaveExceptionCode | Gets the slave exception code, or 0.
 | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
 | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
 | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
 | ToString()()() | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Inheritance Hierarchy
Object
 | Exception
 |  | SlaveException

Assembly: Modbus (Module: Modbus) Version: 1.11.0.0 (1.11.0.0)


SlaveException Constructor

SlaveException Constructor
Namespaces ► Modbus ► SlaveException ► SlaveException()()()
Members
Icon | Member | Description
 | SlaveException()()() | Initializes a new instance of the SlaveException class.
 | SlaveException(String) | Initializes a new instance of the SlaveException class.
 | SlaveException(String, Exception) | Initializes a new instance of the SlaveException class.
 | SlaveException(SerializationInfo, StreamingContext) | Initializes a new instance of the SlaveException class.


SlaveException Constructor

SlaveException Constructor
Namespaces ► Modbus ► SlaveException ► SlaveException()()()
Initializes a new instance of the SlaveException class.
Declaration Syntax
C# Visual Basic Visual C++
public SlaveException()
Public Sub New
public:
SlaveException()


SlaveException Constructor (info, context)

SlaveException Constructor (info, context)
Namespaces ► Modbus ► SlaveException ► SlaveException(SerializationInfo, StreamingContext)
Initializes a new instance of the SlaveException class.
Declaration Syntax
C# Visual Basic Visual C++
protected SlaveException(
    SerializationInfo info,
    StreamingContext context
)
Protected Sub New ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
protected:
SlaveException(
    SerializationInfo^ info,
    StreamingContext context
)
Parameters
info (SerializationInfo)
The SerializationInfo that holds the serialized object data about the exception being thrown.
context (StreamingContext)
The StreamingContext that contains contextual information about the source or destination.
Exceptions
Exception | Condition
SerializationException | The class name is null or HResult is zero (0).
ArgumentNullException | The info parameter is null.


SlaveException Constructor (message)

SlaveException Constructor (message)
Namespaces ► Modbus ► SlaveException ► SlaveException(String)
Initializes a new instance of the SlaveException class.
Declaration Syntax
C# Visual Basic Visual C++
public SlaveException(
    string message
)
Public Sub New ( _
    message As String _
)
public:
SlaveException(
    String^ message
)
Parameters
message (String)
The message.


SlaveException Constructor (message, innerException)

SlaveException Constructor (message, innerException)
Namespaces ► Modbus ► SlaveException ► SlaveException(String, Exception)
Initializes a new instance of the SlaveException class.
Declaration Syntax
C# Visual Basic Visual C++
public SlaveException(
    string message,
    Exception innerException
)
Public Sub New ( _
    message As String, _
    innerException As Exception _
)
public:
SlaveException(
    String^ message,
    Exception^ innerException
)
Parameters
message (String)
The message.
innerException (Exception)
The inner exception.


FunctionCode Property

FunctionCode Property
Namespaces ► Modbus ► SlaveException ► FunctionCode
Gets the response function code that caused the exception to occur, or 0.
Declaration Syntax
C# Visual Basic Visual C++
public byte FunctionCode { get; }
Public ReadOnly Property FunctionCode As Byte
public:
property unsigned char FunctionCode {
    unsigned char get ();
}
Value
The function code.


GetObjectData Method (info, context)

GetObjectData Method (info, context)
Namespaces ► Modbus ► SlaveException ► GetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the exception.
Declaration Syntax
C# Visual Basic Visual C++
public override void GetObjectData(
    SerializationInfo info,
    StreamingContext context
)
Public Overrides Sub GetObjectData ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
public:
virtual void GetObjectData(
    SerializationInfo^ info,
    StreamingContext context
) override
Parameters
info (SerializationInfo)
The SerializationInfo that holds the serialized object data about the exception being thrown.
context (StreamingContext)
The StreamingContext that contains contextual information about the source or destination.
Exceptions
Exception | Condition
ArgumentNullException | The info parameter is a null reference (Nothing in Visual Basic).


Message Property

Message Property
Namespaces ► Modbus ► SlaveException ► Message
Gets a message that describes the current exception.
Declaration Syntax
C# Visual Basic Visual C++
public override string Message { get; }
Public Overrides ReadOnly Property Message As String
public:
virtual property String^ Message {
    String^ get () override;
}
Value
Return Value
The error message that explains the reason for the exception, or an empty string("").


SlaveAddress Property

SlaveAddress Property
Namespaces ► Modbus ► SlaveException ► SlaveAddress
Gets the slave address, or 0.
Declaration Syntax
C# Visual Basic Visual C++
public byte SlaveAddress { get; }
Public ReadOnly Property SlaveAddress As Byte
public:
property unsigned char SlaveAddress {
    unsigned char get ();
}
Value
The slave address.


SlaveExceptionCode Property

SlaveExceptionCode Property
Namespaces ► Modbus ► SlaveException ► SlaveExceptionCode
Gets the slave exception code, or 0.
Declaration Syntax
C# Visual Basic Visual C++
public byte SlaveExceptionCode { get; }
Public ReadOnly Property SlaveExceptionCode As Byte
public:
property unsigned char SlaveExceptionCode {
    unsigned char get ();
}
Value
The slave exception code.


Modbus.Data Namespace

Modbus.Data Namespace
Namespaces ► Modbus.Data
Modbus data.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus.Data
Namespace Modbus.Data
namespace Modbus.Data
Types
All Types Classes Interfaces Enumerations
Icon | Type | Description
 | DataStore | Object simulation of device memory map. The underlying collections are thread safe when using the ModbusMaster API to read/write values. You can use the SyncRoot property to synchronize direct access to the DataStore collections.
 | DataStoreEventArgs | Event args for read write actions performed on the DataStore.
 | DataStoreFactory | Data story factory.
 | DiscreteCollection | Collection of discrete values.
 | IModbusMessageDataCollection | Modbus message containing data.
 | ModbusDataCollection<(Of <(TData>)>) | A 1 origin collection represetative of the Modbus Data Model.
 | ModbusDataType | Types of data supported by the Modbus protocol.
 | RegisterCollection | Collection of 16 bit registers.


DataStore Class

DataStore Class
Namespaces ► Modbus.Data ► DataStore
Object simulation of device memory map. The underlying collections are thread safe when using the ModbusMaster API to read/write values. You can use the SyncRoot property to synchronize direct access to the DataStore collections.
Declaration Syntax
C# Visual Basic Visual C++
public class DataStore
Public Class DataStore
public ref class DataStore
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DataStore()()() | Initializes a new instance of the DataStore class.
 | CoilDiscretes | Gets the coil discretes.
 | DataStoreReadFrom | Occurs when the DataStore is read from via a Modbus command.
 | DataStoreWrittenTo | Occurs when the DataStore is written to via a Modbus command.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HoldingRegisters | Gets the holding registers.
 | InputDiscretes | Gets the input discretes.
 | InputRegisters | Gets the input registers.
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | SyncRoot | An object that can be used to synchronize direct access to the DataStore collections.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
DataStore


DataStore Constructor

DataStore Constructor
Namespaces ► Modbus.Data ► DataStore ► DataStore()()()
Initializes a new instance of the DataStore class.
Declaration Syntax
C# Visual Basic Visual C++
public DataStore()
Public Sub New
public:
DataStore()


CoilDiscretes Property

CoilDiscretes Property
Namespaces ► Modbus.Data ► DataStore ► CoilDiscretes
Gets the coil discretes.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection<bool> CoilDiscretes { get; private set; }
Public Property CoilDiscretes As ModbusDataCollection(Of Boolean)
public:
property ModbusDataCollection<bool>^ CoilDiscretes {
    ModbusDataCollection<bool>^ get ();
    void set (ModbusDataCollection<bool>^ value);
}


DataStoreReadFrom Event

DataStoreReadFrom Event
Namespaces ► Modbus.Data ► DataStore ► DataStoreReadFrom
Occurs when the DataStore is read from via a Modbus command.
Declaration Syntax
C# Visual Basic Visual C++
public event EventHandler<DataStoreEventArgs> DataStoreReadFrom
Public Event DataStoreReadFrom As EventHandler(Of DataStoreEventArgs)
public:
 event EventHandler<DataStoreEventArgs^>^ DataStoreReadFrom {
    void add (EventHandler<DataStoreEventArgs^>^ value);
    void remove (EventHandler<DataStoreEventArgs^>^ value);
}


DataStoreWrittenTo Event

DataStoreWrittenTo Event
Namespaces ► Modbus.Data ► DataStore ► DataStoreWrittenTo
Occurs when the DataStore is written to via a Modbus command.
Declaration Syntax
C# Visual Basic Visual C++
public event EventHandler<DataStoreEventArgs> DataStoreWrittenTo
Public Event DataStoreWrittenTo As EventHandler(Of DataStoreEventArgs)
public:
 event EventHandler<DataStoreEventArgs^>^ DataStoreWrittenTo {
    void add (EventHandler<DataStoreEventArgs^>^ value);
    void remove (EventHandler<DataStoreEventArgs^>^ value);
}


HoldingRegisters Property

HoldingRegisters Property
Namespaces ► Modbus.Data ► DataStore ► HoldingRegisters
Gets the holding registers.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection<ushort> HoldingRegisters { get; private set; }
Public Property HoldingRegisters As ModbusDataCollection(Of UShort)
public:
property ModbusDataCollection<unsigned short>^ HoldingRegisters {
    ModbusDataCollection<unsigned short>^ get ();
    void set (ModbusDataCollection<unsigned short>^ value);
}


InputDiscretes Property

InputDiscretes Property
Namespaces ► Modbus.Data ► DataStore ► InputDiscretes
Gets the input discretes.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection<bool> InputDiscretes { get; private set; }
Public Property InputDiscretes As ModbusDataCollection(Of Boolean)
public:
property ModbusDataCollection<bool>^ InputDiscretes {
    ModbusDataCollection<bool>^ get ();
    void set (ModbusDataCollection<bool>^ value);
}


InputRegisters Property

InputRegisters Property
Namespaces ► Modbus.Data ► DataStore ► InputRegisters
Gets the input registers.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection<ushort> InputRegisters { get; private set; }
Public Property InputRegisters As ModbusDataCollection(Of UShort)
public:
property ModbusDataCollection<unsigned short>^ InputRegisters {
    ModbusDataCollection<unsigned short>^ get ();
    void set (ModbusDataCollection<unsigned short>^ value);
}


SyncRoot Property

SyncRoot Property
Namespaces ► Modbus.Data ► DataStore ► SyncRoot
An object that can be used to synchronize direct access to the DataStore collections.
Declaration Syntax
C# Visual Basic Visual C++
public Object SyncRoot { get; }
Public ReadOnly Property SyncRoot As Object
public:
property Object^ SyncRoot {
    Object^ get ();
}


DataStoreEventArgs Class

DataStoreEventArgs Class
Namespaces ► Modbus.Data ► DataStoreEventArgs
Event args for read write actions performed on the DataStore.
Declaration Syntax
C# Visual Basic Visual C++
public class DataStoreEventArgs : EventArgs
Public Class DataStoreEventArgs _
    Inherits EventArgs
public ref class DataStoreEventArgs : public EventArgs
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Data | Data that was read or written.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ModbusDataType | Type of Modbus data (e.g. Holding register).
 | StartAddress | Start address of data.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | EventArgs
 |  | DataStoreEventArgs


Data Property

Data Property
Namespaces ► Modbus.Data ► DataStoreEventArgs ► Data
Data that was read or written.
Declaration Syntax
C# Visual Basic Visual C++
public DiscriminatedUnion<ReadOnlyCollection<bool>, ReadOnlyCollection<ushort>> Data { get; private set; }
Public Property Data As DiscriminatedUnion(Of ReadOnlyCollection(Of Boolean), ReadOnlyCollection(Of UShort))
public:
property DiscriminatedUnion<ReadOnlyCollection<bool>^, ReadOnlyCollection<unsigned short>^>^ Data {
    DiscriminatedUnion<ReadOnlyCollection<bool>^, ReadOnlyCollection<unsigned short>^>^ get ();
    void set (DiscriminatedUnion<ReadOnlyCollection<bool>^, ReadOnlyCollection<unsigned short>^>^ value);
}


ModbusDataType Property

ModbusDataType Property
Namespaces ► Modbus.Data ► DataStoreEventArgs ► ModbusDataType
Type of Modbus data (e.g. Holding register).
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataType ModbusDataType { get; private set; }
Public Property ModbusDataType As ModbusDataType
public:
property ModbusDataType ModbusDataType {
    ModbusDataType get ();
    void set (ModbusDataType value);
}


StartAddress Property

StartAddress Property
Namespaces ► Modbus.Data ► DataStoreEventArgs ► StartAddress
Start address of data.
Declaration Syntax
C# Visual Basic Visual C++
public ushort StartAddress { get; private set; }
Public Property StartAddress As UShort
public:
property unsigned short StartAddress {
    unsigned short get ();
    void set (unsigned short value);
}


DataStoreFactory Class

DataStoreFactory Class
Namespaces ► Modbus.Data ► DataStoreFactory
Data story factory.
Declaration Syntax
C# Visual Basic Visual C++
public static class DataStoreFactory
Public NotInheritable Class DataStoreFactory
public ref class DataStoreFactory abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | CreateDefaultDataStore()()() | Factory method for default data store - register values set to 0 and discrete values set to false.
 | CreateDefaultDataStore(UInt16, UInt16, UInt16, UInt16) | Factory method for default data store - register values set to 0 and discrete values set to false.
 | CreateTestDataStore()()() | Factory method for test data store.
Inheritance Hierarchy
Object
DataStoreFactory


CreateDefaultDataStore Method

CreateDefaultDataStore Method
Namespaces ► Modbus.Data ► DataStoreFactory ► CreateDefaultDataStore()()()
Members
Icon | Member | Description
 | CreateDefaultDataStore()()() | Factory method for default data store - register values set to 0 and discrete values set to false.
 | CreateDefaultDataStore(UInt16, UInt16, UInt16, UInt16) | Factory method for default data store - register values set to 0 and discrete values set to false.


CreateDefaultDataStore Method

CreateDefaultDataStore Method
Namespaces ► Modbus.Data ► DataStoreFactory ► CreateDefaultDataStore()()()
Factory method for default data store - register values set to 0 and discrete values set to false.
Declaration Syntax
C# Visual Basic Visual C++
public static DataStore CreateDefaultDataStore()
Public Shared Function CreateDefaultDataStore As DataStore
public:
static DataStore^ CreateDefaultDataStore()


CreateDefaultDataStore Method (coilsCount, inputsCount, holdingRegistersCount, inputRegistersCount)

CreateDefaultDataStore Method (coilsCount, inputsCount, holdingRegistersCount, inputRegistersCount)
Namespaces ► Modbus.Data ► DataStoreFactory ► CreateDefaultDataStore(UInt16, UInt16, UInt16, UInt16)
Factory method for default data store - register values set to 0 and discrete values set to false.
Declaration Syntax
C# Visual Basic Visual C++
public static DataStore CreateDefaultDataStore(
    ushort coilsCount,
    ushort inputsCount,
    ushort holdingRegistersCount,
    ushort inputRegistersCount
)
Public Shared Function CreateDefaultDataStore ( _
    coilsCount As UShort, _
    inputsCount As UShort, _
    holdingRegistersCount As UShort, _
    inputRegistersCount As UShort _
) As DataStore
public:
static DataStore^ CreateDefaultDataStore(
    unsigned short coilsCount,
    unsigned short inputsCount,
    unsigned short holdingRegistersCount,
    unsigned short inputRegistersCount
)
Parameters
coilsCount (UInt16)
inputsCount (UInt16)
holdingRegistersCount (UInt16)
inputRegistersCount (UInt16)


CreateTestDataStore Method

CreateTestDataStore Method
Namespaces ► Modbus.Data ► DataStoreFactory ► CreateTestDataStore()()()
Factory method for test data store.
Declaration Syntax
C# Visual Basic Visual C++
public static DataStore CreateTestDataStore()
Public Shared Function CreateTestDataStore As DataStore
public:
static DataStore^ CreateTestDataStore()


DiscreteCollection Class

DiscreteCollection Class
Namespaces ► Modbus.Data ► DiscreteCollection
Collection of discrete values.
Declaration Syntax
C# Visual Basic Visual C++
public class DiscreteCollection : Collection<bool>,
    IModbusMessageDataCollection
Public Class DiscreteCollection _
    Inherits Collection(Of Boolean) _
    Implements IModbusMessageDataCollection
public ref class DiscreteCollection : public Collection<bool>,
    IModbusMessageDataCollection
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DiscreteCollection()()() | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(array<Boolean>[]()[]) | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(array<Byte>[]()[]) | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(IList<(Of <(Boolean>)>)) | Initializes a new instance of the DiscreteCollection class.
 | Add(T) | Adds an object to the end of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | ByteCount | Gets the byte count.
 | Clear()()() | Removes all elements from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | ClearItems()()() | Removes all elements from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | Contains(T) | Determines whether an element is in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | CopyTo(array<T>[]()[], Int32) | Copies the entire Collection<(Of <(T>)>) to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection <(Of <( Boolean >)>).)
 | Count | Gets the number of elements actually contained in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetEnumerator()()() | Returns an enumerator that iterates through the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | Insert(Int32, T) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Inherited from Collection <(Of <( Boolean >)>).)
 | InsertItem(Int32, T) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Inherited from Collection <(Of <( Boolean >)>).)
 | Item[([(Int32])]) | Gets or sets the element at the specified index. (Inherited from Collection <(Of <( Boolean >)>).)
 | Items | Gets a IList<(Of <(T>)>) wrapper around the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | NetworkBytes | Gets the network bytes.
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | RemoveAt(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | RemoveItem(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( Boolean >)>).)
 | SetItem(Int32, T) | Replaces the element at the specified index. (Inherited from Collection <(Of <( Boolean >)>).)
 | ToString()()() | Returns a String that represents the current Object. (Overrides Object.ToString()()().)
Inheritance Hierarchy
Object
 | Collection <(Of <( Boolean >)>)
 |  | DiscreteCollection


DiscreteCollection Constructor

DiscreteCollection Constructor
Namespaces ► Modbus.Data ► DiscreteCollection ► DiscreteCollection()()()
Members
Icon | Member | Description
 | DiscreteCollection()()() | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(array<Boolean>[]()[]) | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(array<Byte>[]()[]) | Initializes a new instance of the DiscreteCollection class.
 | DiscreteCollection(IList<(Of <(Boolean>)>)) | Initializes a new instance of the DiscreteCollection class.


DiscreteCollection Constructor

DiscreteCollection Constructor
Namespaces ► Modbus.Data ► DiscreteCollection ► DiscreteCollection()()()
Initializes a new instance of the DiscreteCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public DiscreteCollection()
Public Sub New
public:
DiscreteCollection()


DiscreteCollection Constructor (bits)

DiscreteCollection Constructor (bits)
Namespaces ► Modbus.Data ► DiscreteCollection ► DiscreteCollection(array<Boolean>[]()[])
Initializes a new instance of the DiscreteCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public DiscreteCollection(
    params bool[] bits
)
Public Sub New ( _
    ParamArray bits As Boolean() _
)
public:
DiscreteCollection(
    ... array<bool>^ bits
)
Parameters
bits (array< Boolean >[]()[])


DiscreteCollection Constructor (bytes)

DiscreteCollection Constructor (bytes)
Namespaces ► Modbus.Data ► DiscreteCollection ► DiscreteCollection(array<Byte>[]()[])
Initializes a new instance of the DiscreteCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public DiscreteCollection(
    params byte[] bytes
)
Public Sub New ( _
    ParamArray bytes As Byte() _
)
public:
DiscreteCollection(
    ... array<unsigned char>^ bytes
)
Parameters
bytes (array< Byte >[]()[])


DiscreteCollection Constructor (bits)

DiscreteCollection Constructor (bits)
Namespaces ► Modbus.Data ► DiscreteCollection ► DiscreteCollection(IList<(Of <(Boolean>)>))
Initializes a new instance of the DiscreteCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public DiscreteCollection(
    IList<bool> bits
)
Public Sub New ( _
    bits As IList(Of Boolean) _
)
public:
DiscreteCollection(
    IList<bool>^ bits
)
Parameters
bits (IList <(Of <( Boolean >)>))


ByteCount Property

ByteCount Property
Namespaces ► Modbus.Data ► DiscreteCollection ► ByteCount
Gets the byte count.
Declaration Syntax
C# Visual Basic Visual C++
public byte ByteCount { get; }
Public ReadOnly Property ByteCount As Byte
public:
virtual property unsigned char ByteCount {
    unsigned char get () sealed;
}


NetworkBytes Property

NetworkBytes Property
Namespaces ► Modbus.Data ► DiscreteCollection ► NetworkBytes
Gets the network bytes.
Declaration Syntax
C# Visual Basic Visual C++
public byte[] NetworkBytes { get; }
Public ReadOnly Property NetworkBytes As Byte()
public:
virtual property array<unsigned char>^ NetworkBytes {
    array<unsigned char>^ get () sealed;
}


ToString Method

ToString Method
Namespaces ► Modbus.Data ► DiscreteCollection ► ToString()()()
Returns a String that represents the current Object.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents the current Object.


IModbusMessageDataCollection Interface

IModbusMessageDataCollection Interface
Namespaces ► Modbus.Data ► IModbusMessageDataCollection
Modbus message containing data.
Declaration Syntax
C# Visual Basic Visual C++
public interface IModbusMessageDataCollection
Public Interface IModbusMessageDataCollection
public interface class IModbusMessageDataCollection
Members
All Members | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | ByteCount | Gets the byte count.
 | NetworkBytes | Gets the network bytes.


ByteCount Property

ByteCount Property
Namespaces ► Modbus.Data ► IModbusMessageDataCollection ► ByteCount
Gets the byte count.
Declaration Syntax
C# Visual Basic Visual C++
byte ByteCount { get; }
ReadOnly Property ByteCount As Byte
property unsigned char ByteCount {
    unsigned char get ();
}


NetworkBytes Property

NetworkBytes Property
Namespaces ► Modbus.Data ► IModbusMessageDataCollection ► NetworkBytes
Gets the network bytes.
Declaration Syntax
C# Visual Basic Visual C++
byte[] NetworkBytes { get; }
ReadOnly Property NetworkBytes As Byte()
property array<unsigned char>^ NetworkBytes {
    array<unsigned char>^ get ();
}


ModbusDataCollection(TData) Class

ModbusDataCollection<(Of <(TData>)>) Class
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>)
A 1 origin collection represetative of the Modbus Data Model.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusDataCollection<TData> : Collection<TData>

Public Class ModbusDataCollection(Of TData) _
    Inherits Collection(Of TData)
generic<typename TData>
public ref class ModbusDataCollection : public Collection<TData>
Generic Template Parameters
TData

[Missing <typeparam name="TData"/> documentation for "T:Modbus.Data.ModbusDataCollection`1"]

Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | ModbusDataCollection<(Of <(TData>)>)()()() | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
 | ModbusDataCollection<(Of <(TData>)>)(array<TData>[]()[]) | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
 | ModbusDataCollection<(Of <(TData>)>)(IList<(Of <(TData>)>)) | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
 | Add(T) | Adds an object to the end of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | Clear()()() | Removes all elements from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | ClearItems()()() | Removes all elements from the Collection<(Of <(T>)>). (Overrides Collection <(Of <(TData>)>).ClearItems()()().)
 | Contains(T) | Determines whether an element is in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | CopyTo(array<T>[]()[], Int32) | Copies the entire Collection<(Of <(T>)>) to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection <(Of <(TData>)>).)
 | Count | Gets the number of elements actually contained in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetEnumerator()()() | Returns an enumerator that iterates through the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | Insert(Int32, T) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Inherited from Collection <(Of <(TData>)>).)
 | InsertItem(Int32, TData) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Overrides Collection <(Of <(TData>)>).InsertItem(Int32, T).)
 | Item[([(Int32])]) | Gets or sets the element at the specified index. (Inherited from Collection <(Of <(TData>)>).)
 | Items | Gets a IList<(Of <(T>)>) wrapper around the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | RemoveAt(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <(TData>)>).)
 | RemoveItem(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Overrides Collection <(Of <(TData>)>).RemoveItem(Int32).)
 | SetItem(Int32, TData) | Replaces the element at the specified index. (Overrides Collection <(Of <(TData>)>).SetItem(Int32, T).)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | Collection <(Of <(TData>)>)
 |  | ModbusDataCollection<(Of <(TData>)>)


ModbusDataCollection(TData) Constructor

ModbusDataCollection<(Of <(TData>)>) Constructor
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► ModbusDataCollection<(Of <(TData>)>)()()()
Members
Icon | Member | Description
 | ModbusDataCollection<(Of <(TData>)>)()()() | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
 | ModbusDataCollection<(Of <(TData>)>)(array<TData>[]()[]) | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
 | ModbusDataCollection<(Of <(TData>)>)(IList<(Of <(TData>)>)) | Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.


ModbusDataCollection(TData) Constructor

ModbusDataCollection<(Of <(TData>)>) Constructor
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► ModbusDataCollection<(Of <(TData>)>)()()()
Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection()
Public Sub New
public:
ModbusDataCollection()


ModbusDataCollection(TData) Constructor (data)

ModbusDataCollection<(Of <(TData>)>) Constructor (data)
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► ModbusDataCollection<(Of <(TData>)>)(IList<(Of <(TData>)>))
Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection(
    IList<TData> data
)
Public Sub New ( _
    data As IList(Of TData) _
)
public:
ModbusDataCollection(
    IList<TData>^ data
)
Parameters
data (IList <(Of <( TData >)>))
The data.


ModbusDataCollection(TData) Constructor (data)

ModbusDataCollection<(Of <(TData>)>) Constructor (data)
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► ModbusDataCollection<(Of <(TData>)>)(array<TData>[]()[])
Initializes a new instance of the ModbusDataCollection<(Of <(TData>)>) class.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusDataCollection(
    params TData[] data
)
Public Sub New ( _
    ParamArray data As TData() _
)
public:
ModbusDataCollection(
    ... array<TData>^ data
)
Parameters
data (array< TData >[]()[])
The data.


ClearItems Method

ClearItems Method
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► ClearItems()()()
Removes all elements from the Collection<(Of <(T>)>).
Declaration Syntax
C# Visual Basic Visual C++
protected override void ClearItems()
Protected Overrides Sub ClearItems
protected:
virtual void ClearItems() override


InsertItem Method (index, item)

InsertItem Method (index, item)
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► InsertItem(Int32, TData)
Inserts an element into the Collection<(Of <(T>)>) at the specified index.
Declaration Syntax
C# Visual Basic Visual C++
protected override void InsertItem(
    int index,
    TData item
)
Protected Overrides Sub InsertItem ( _
    index As Integer, _
    item As TData _
)
protected:
virtual void InsertItem(
    int index,
    TData item
) override
Parameters
index (Int32)
The zero-based index at which item should be inserted.
item (TData)
The object to insert. The value can be null for reference types.
Exceptions
Exception | Condition
ArgumentOutOfRangeException | index is less than zero.-or-index is greater than Count.


RemoveItem Method (index)

RemoveItem Method (index)
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► RemoveItem(Int32)
Removes the element at the specified index of the Collection<(Of <(T>)>).
Declaration Syntax
C# Visual Basic Visual C++
protected override void RemoveItem(
    int index
)
Protected Overrides Sub RemoveItem ( _
    index As Integer _
)
protected:
virtual void RemoveItem(
    int index
) override
Parameters
index (Int32)
The zero-based index of the element to remove.
Exceptions
Exception | Condition
ArgumentOutOfRangeException | index is less than zero.-or-index is equal to or greater than Count.


SetItem Method (index, item)

SetItem Method (index, item)
Namespaces ► Modbus.Data ► ModbusDataCollection<(Of <(TData>)>) ► SetItem(Int32, TData)
Replaces the element at the specified index.
Declaration Syntax
C# Visual Basic Visual C++
protected override void SetItem(
    int index,
    TData item
)
Protected Overrides Sub SetItem ( _
    index As Integer, _
    item As TData _
)
protected:
virtual void SetItem(
    int index,
    TData item
) override
Parameters
index (Int32)
The zero-based index of the element to replace.
item (TData)
The new value for the element at the specified index. The value can be null for reference types.
Exceptions
Exception | Condition
ArgumentOutOfRangeException | index is less than zero.-or-index is greater than Count.


ModbusDataType Enumeration

ModbusDataType Enumeration
Namespaces ► Modbus.Data ► ModbusDataType
Types of data supported by the Modbus protocol.
Declaration Syntax
C# Visual Basic Visual C++
public enum ModbusDataType
Public Enumeration ModbusDataType
public enum class ModbusDataType
Members
Member | Description
HoldingRegister | read/write register
InputRegister | readonly register
Coil | read/write discrete
Input | readonly discrete


RegisterCollection Class

RegisterCollection Class
Namespaces ► Modbus.Data ► RegisterCollection
Collection of 16 bit registers.
Declaration Syntax
C# Visual Basic Visual C++
public class RegisterCollection : Collection<ushort>,
    IModbusMessageDataCollection
Public Class RegisterCollection _
    Inherits Collection(Of UShort) _
    Implements IModbusMessageDataCollection
public ref class RegisterCollection : public Collection<unsigned short>,
    IModbusMessageDataCollection
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | RegisterCollection()()() | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(array<Byte>[]()[]) | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(array<UInt16>[]()[]) | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(IList<(Of <(UInt16>)>)) | Initializes a new instance of the RegisterCollection class.
 | Add(T) | Adds an object to the end of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | ByteCount | Gets the byte count.
 | Clear()()() | Removes all elements from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | ClearItems()()() | Removes all elements from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | Contains(T) | Determines whether an element is in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | CopyTo(array<T>[]()[], Int32) | Copies the entire Collection<(Of <(T>)>) to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection <(Of <( UInt16 >)>).)
 | Count | Gets the number of elements actually contained in the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetEnumerator()()() | Returns an enumerator that iterates through the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | Insert(Int32, T) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Inherited from Collection <(Of <( UInt16 >)>).)
 | InsertItem(Int32, T) | Inserts an element into the Collection<(Of <(T>)>) at the specified index. (Inherited from Collection <(Of <( UInt16 >)>).)
 | Item[([(Int32])]) | Gets or sets the element at the specified index. (Inherited from Collection <(Of <( UInt16 >)>).)
 | Items | Gets a IList<(Of <(T>)>) wrapper around the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | NetworkBytes | Gets the network bytes.
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | RemoveAt(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | RemoveItem(Int32) | Removes the element at the specified index of the Collection<(Of <(T>)>). (Inherited from Collection <(Of <( UInt16 >)>).)
 | SetItem(Int32, T) | Replaces the element at the specified index. (Inherited from Collection <(Of <( UInt16 >)>).)
 | ToString()()() | Returns a String that represents the current Object. (Overrides Object.ToString()()().)
Inheritance Hierarchy
Object
 | Collection <(Of <( UInt16 >)>)
 |  | RegisterCollection


RegisterCollection Constructor

RegisterCollection Constructor
Namespaces ► Modbus.Data ► RegisterCollection ► RegisterCollection()()()
Members
Icon | Member | Description
 | RegisterCollection()()() | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(array<Byte>[]()[]) | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(array<UInt16>[]()[]) | Initializes a new instance of the RegisterCollection class.
 | RegisterCollection(IList<(Of <(UInt16>)>)) | Initializes a new instance of the RegisterCollection class.


RegisterCollection Constructor

RegisterCollection Constructor
Namespaces ► Modbus.Data ► RegisterCollection ► RegisterCollection()()()
Initializes a new instance of the RegisterCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public RegisterCollection()
Public Sub New
public:
RegisterCollection()


RegisterCollection Constructor (bytes)

RegisterCollection Constructor (bytes)
Namespaces ► Modbus.Data ► RegisterCollection ► RegisterCollection(array<Byte>[]()[])
Initializes a new instance of the RegisterCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public RegisterCollection(
    byte[] bytes
)
Public Sub New ( _
    bytes As Byte() _
)
public:
RegisterCollection(
    array<unsigned char>^ bytes
)
Parameters
bytes (array< Byte >[]()[])


RegisterCollection Constructor (registers)

RegisterCollection Constructor (registers)
Namespaces ► Modbus.Data ► RegisterCollection ► RegisterCollection(IList<(Of <(UInt16>)>))
Initializes a new instance of the RegisterCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public RegisterCollection(
    IList<ushort> registers
)
Public Sub New ( _
    registers As IList(Of UShort) _
)
public:
RegisterCollection(
    IList<unsigned short>^ registers
)
Parameters
registers (IList <(Of <( UInt16 >)>))


RegisterCollection Constructor (registers)

RegisterCollection Constructor (registers)
Namespaces ► Modbus.Data ► RegisterCollection ► RegisterCollection(array<UInt16>[]()[])
Initializes a new instance of the RegisterCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public RegisterCollection(
    params ushort[] registers
)
Public Sub New ( _
    ParamArray registers As UShort() _
)
public:
RegisterCollection(
    ... array<unsigned short>^ registers
)
Parameters
registers (array< UInt16 >[]()[])


ByteCount Property

ByteCount Property
Namespaces ► Modbus.Data ► RegisterCollection ► ByteCount
Gets the byte count.
Declaration Syntax
C# Visual Basic Visual C++
public byte ByteCount { get; }
Public ReadOnly Property ByteCount As Byte
public:
virtual property unsigned char ByteCount {
    unsigned char get () sealed;
}


NetworkBytes Property

NetworkBytes Property
Namespaces ► Modbus.Data ► RegisterCollection ► NetworkBytes
Gets the network bytes.
Declaration Syntax
C# Visual Basic Visual C++
public byte[] NetworkBytes { get; }
Public ReadOnly Property NetworkBytes As Byte()
public:
virtual property array<unsigned char>^ NetworkBytes {
    array<unsigned char>^ get () sealed;
}


ToString Method

ToString Method
Namespaces ► Modbus.Data ► RegisterCollection ► ToString()()()
Returns a String that represents the current Object.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents the current Object.


Modbus.Device Namespace

Modbus.Device Namespace
Namespaces ► Modbus.Device
Modbus device.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus.Device
Namespace Modbus.Device
namespace Modbus.Device
Types
All Types Classes Interfaces
Icon | Type | Description
 | IModbusMaster | Modbus master device.
 | IModbusSerialMaster | Modbus Serial Master device.
 | ModbusDevice | Modbus device.
 | ModbusIpMaster | Modbus IP master device.
 | ModbusMaster | Modbus master device.
 | ModbusSerialMaster | Modbus serial master device.
 | ModbusSerialSlave | Modbus serial slave device.
 | ModbusSlave | Modbus slave device.
 | ModbusSlaveRequestEventArgs | Modbus Slave request event args containing information on the message.
 | ModbusTcpSlave | Modbus TCP slave device.
 | ModbusUdpSlave | Modbus UDP slave device.


IModbusMaster Interface

IModbusMaster Interface
Namespaces ► Modbus.Device ► IModbusMaster
Modbus master device.
Declaration Syntax
C# Visual Basic Visual C++
public interface IModbusMaster : IDisposable
Public Interface IModbusMaster _
    Implements IDisposable
public interface class IModbusMaster : IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status.
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers.
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers.
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status.
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read.
 | Transport | Transport for used by this master.
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value.
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers.
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value.
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register.


ReadCoils Method (slaveAddress, startAddress, numberOfPoints)

ReadCoils Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► IModbusMaster ► ReadCoils(Byte, UInt16, UInt16)
Read from 1 to 2000 contiguous coils status.
Declaration Syntax
C# Visual Basic Visual C++
bool[] ReadCoils(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Function ReadCoils ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
array<bool>^ ReadCoils(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of coils to read.
Return Value
Coils status


ReadHoldingRegisters Method (slaveAddress, startAddress, numberOfPoints)

ReadHoldingRegisters Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► IModbusMaster ► ReadHoldingRegisters(Byte, UInt16, UInt16)
Read contiguous block of holding registers.
Declaration Syntax
C# Visual Basic Visual C++
ushort[] ReadHoldingRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Function ReadHoldingRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
array<unsigned short>^ ReadHoldingRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Holding registers status


ReadInputRegisters Method (slaveAddress, startAddress, numberOfPoints)

ReadInputRegisters Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► IModbusMaster ► ReadInputRegisters(Byte, UInt16, UInt16)
Read contiguous block of input registers.
Declaration Syntax
C# Visual Basic Visual C++
ushort[] ReadInputRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Function ReadInputRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
array<unsigned short>^ ReadInputRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Input registers status


ReadInputs Method (slaveAddress, startAddress, numberOfPoints)

ReadInputs Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► IModbusMaster ► ReadInputs(Byte, UInt16, UInt16)
Read from 1 to 2000 contiguous discrete input status.
Declaration Syntax
C# Visual Basic Visual C++
bool[] ReadInputs(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Function ReadInputs ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
array<bool>^ ReadInputs(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of discrete inputs to read.
Return Value
Discrete inputs status


ReadWriteMultipleRegisters Method (slaveAddress, startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)

ReadWriteMultipleRegisters Method (slaveAddress, startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)
Namespaces ► Modbus.Device ► IModbusMaster ► ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[])
Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read.
Declaration Syntax
C# Visual Basic Visual C++
ushort[] ReadWriteMultipleRegisters(
    byte slaveAddress,
    ushort startReadAddress,
    ushort numberOfPointsToRead,
    ushort startWriteAddress,
    ushort[] writeData
)
Function ReadWriteMultipleRegisters ( _
    slaveAddress As Byte, _
    startReadAddress As UShort, _
    numberOfPointsToRead As UShort, _
    startWriteAddress As UShort, _
    writeData As UShort() _
) As UShort()
array<unsigned short>^ ReadWriteMultipleRegisters(
    unsigned char slaveAddress,
    unsigned short startReadAddress,
    unsigned short numberOfPointsToRead,
    unsigned short startWriteAddress,
    array<unsigned short>^ writeData
)
Parameters
slaveAddress (Byte)
Address of device to read values from.
startReadAddress (UInt16)
Address to begin reading (Holding registers are addressed starting at 0).
numberOfPointsToRead (UInt16)
Number of registers to read.
startWriteAddress (UInt16)
Address to begin writing (Holding registers are addressed starting at 0).
writeData (array< UInt16 >[]()[])
Register values to write.


Transport Property

Transport Property
Namespaces ► Modbus.Device ► IModbusMaster ► Transport
Transport for used by this master.
Declaration Syntax
C# Visual Basic Visual C++
ModbusTransport Transport { get; }
ReadOnly Property Transport As ModbusTransport
property ModbusTransport^ Transport {
    ModbusTransport^ get ();
}


WriteMultipleCoils Method (slaveAddress, startAddress, data)

WriteMultipleCoils Method (slaveAddress, startAddress, data)
Namespaces ► Modbus.Device ► IModbusMaster ► WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[])
Force each coil in a sequence of coils to a provided value.
Declaration Syntax
C# Visual Basic Visual C++
void WriteMultipleCoils(
    byte slaveAddress,
    ushort startAddress,
    bool[] data
)
Sub WriteMultipleCoils ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    data As Boolean() _
)
void WriteMultipleCoils(
    unsigned char slaveAddress,
    unsigned short startAddress,
    array<bool>^ data
)
Parameters
slaveAddress (Byte)
Address of the device to write to.
startAddress (UInt16)
Address to begin writing values.
data (array< Boolean >[]()[])
Values to write.


WriteMultipleRegisters Method (slaveAddress, startAddress, data)

WriteMultipleRegisters Method (slaveAddress, startAddress, data)
Namespaces ► Modbus.Device ► IModbusMaster ► WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[])
Write a block of 1 to 123 contiguous registers.
Declaration Syntax
C# Visual Basic Visual C++
void WriteMultipleRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort[] data
)
Sub WriteMultipleRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    data As UShort() _
)
void WriteMultipleRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    array<unsigned short>^ data
)
Parameters
slaveAddress (Byte)
Address of the device to write to.
startAddress (UInt16)
Address to begin writing values.
data (array< UInt16 >[]()[])
Values to write.


WriteSingleCoil Method (slaveAddress, coilAddress, value)

WriteSingleCoil Method (slaveAddress, coilAddress, value)
Namespaces ► Modbus.Device ► IModbusMaster ► WriteSingleCoil(Byte, UInt16, Boolean)
Write a single coil value.
Declaration Syntax
C# Visual Basic Visual C++
void WriteSingleCoil(
    byte slaveAddress,
    ushort coilAddress,
    bool value
)
Sub WriteSingleCoil ( _
    slaveAddress As Byte, _
    coilAddress As UShort, _
    value As Boolean _
)
void WriteSingleCoil(
    unsigned char slaveAddress,
    unsigned short coilAddress,
    bool value
)
Parameters
slaveAddress (Byte)
Address of the device to write to.
coilAddress (UInt16)
Address to write value to.
value (Boolean)
Value to write.


WriteSingleRegister Method (slaveAddress, registerAddress, value)

WriteSingleRegister Method (slaveAddress, registerAddress, value)
Namespaces ► Modbus.Device ► IModbusMaster ► WriteSingleRegister(Byte, UInt16, UInt16)
Write a single holding register.
Declaration Syntax
C# Visual Basic Visual C++
void WriteSingleRegister(
    byte slaveAddress,
    ushort registerAddress,
    ushort value
)
Sub WriteSingleRegister ( _
    slaveAddress As Byte, _
    registerAddress As UShort, _
    value As UShort _
)
void WriteSingleRegister(
    unsigned char slaveAddress,
    unsigned short registerAddress,
    unsigned short value
)
Parameters
slaveAddress (Byte)
Address of the device to write to.
registerAddress (UInt16)
Value to write.
value (UInt16)
Value to write.


IModbusSerialMaster Interface

IModbusSerialMaster Interface
Namespaces ► Modbus.Device ► IModbusSerialMaster
Modbus Serial Master device.
Declaration Syntax
C# Visual Basic Visual C++
public interface IModbusSerialMaster : IModbusMaster,
    IDisposable
Public Interface IModbusSerialMaster _
    Implements IModbusMaster, IDisposable
public interface class IModbusSerialMaster : IModbusMaster,
    IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status. (Inherited from IModbusMaster.)
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers. (Inherited from IModbusMaster.)
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers. (Inherited from IModbusMaster.)
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status. (Inherited from IModbusMaster.)
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read. (Inherited from IModbusMaster.)
 | ReturnQueryData(Byte, UInt16) | Serial Line only. Diagnostic function which loops back the original data. NModbus only supports looping back one ushort value, this is a limitation of the "Best Effort" implementation of the RTU protocol.
 | Transport | Transport for used by this master.
 | Transport | Transport for used by this master. (Inherited from IModbusMaster.)
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value. (Inherited from IModbusMaster.)
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers. (Inherited from IModbusMaster.)
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value. (Inherited from IModbusMaster.)
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register. (Inherited from IModbusMaster.)


ReturnQueryData Method (slaveAddress, data)

ReturnQueryData Method (slaveAddress, data)
Namespaces ► Modbus.Device ► IModbusSerialMaster ► ReturnQueryData(Byte, UInt16)
Serial Line only. Diagnostic function which loops back the original data. NModbus only supports looping back one ushort value, this is a limitation of the "Best Effort" implementation of the RTU protocol.
Declaration Syntax
C# Visual Basic Visual C++
bool ReturnQueryData(
    byte slaveAddress,
    ushort data
)
Function ReturnQueryData ( _
    slaveAddress As Byte, _
    data As UShort _
) As Boolean
bool ReturnQueryData(
    unsigned char slaveAddress,
    unsigned short data
)
Parameters
slaveAddress (Byte)
Address of device to test.
data (UInt16)
Data to return.
Return Value
Return true if slave device echoed data.


Transport Property

Transport Property
Namespaces ► Modbus.Device ► IModbusSerialMaster ► Transport
Transport for used by this master.
Declaration Syntax
C# Visual Basic Visual C++
ModbusSerialTransport Transport { get; }
ReadOnly Property Transport As ModbusSerialTransport
property ModbusSerialTransport^ Transport {
    ModbusSerialTransport^ get ();
}


ModbusDevice Class

ModbusDevice Class
Namespaces ► Modbus.Device ► ModbusDevice
Modbus device.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class ModbusDevice : IDisposable
Public MustInherit Class ModbusDevice _
    Implements IDisposable
public ref class ModbusDevice abstract : IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport.
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusMaster
 |  | ModbusSlave


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusDevice ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusDevice ► Dispose()()()
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
public void Dispose()
Public Sub Dispose
public:
virtual void Dispose() sealed


Dispose Method (disposing)

Dispose Method (disposing)
Namespaces ► Modbus.Device ► ModbusDevice ► Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void Dispose(
    bool disposing
)
Protected Overridable Sub Dispose ( _
    disposing As Boolean _
)
protected:
virtual void Dispose(
    bool disposing
)
Parameters
disposing (Boolean)
true to release both managed and unmanaged resources; false to release only unmanaged resources.


Transport Property

Transport Property
Namespaces ► Modbus.Device ► ModbusDevice ► Transport
Gets the Modbus Transport.
Declaration Syntax
C# Visual Basic Visual C++
public ModbusTransport Transport { get; }
Public ReadOnly Property Transport As ModbusTransport
public:
virtual property ModbusTransport^ Transport {
    ModbusTransport^ get () sealed;
}
Value
The transport.


ModbusIpMaster Class

ModbusIpMaster Class
Namespaces ► Modbus.Device ► ModbusIpMaster
Modbus IP master device.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusIpMaster : ModbusMaster
Public Class ModbusIpMaster _
    Inherits ModbusMaster
public ref class ModbusIpMaster : public ModbusMaster
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | CreateIp(TcpClient) | Modbus IP master factory method.
 | CreateIp(UdpClient) | Modbus IP master factory method.
 | CreateIp(SerialPort) | Modbus IP master factory method.
 | CreateIp(IStreamResource) | Modbus IP master factory method.
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ExecuteCustomMessage<(Of <(TResponse>)>)(IModbusMessage) | Executes the custom message. (Inherited from ModbusMaster.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadCoils(UInt16, UInt16) | Read from 1 to 2000 contiguous coils status.
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status. (Inherited from ModbusMaster.)
 | ReadHoldingRegisters(UInt16, UInt16) | Read contiguous block of holding registers.
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers. (Inherited from ModbusMaster.)
 | ReadInputRegisters(UInt16, UInt16) | Read contiguous block of input registers.
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers. (Inherited from ModbusMaster.)
 | ReadInputs(UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status.
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status. (Inherited from ModbusMaster.)
 | ReadWriteMultipleRegisters(UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single MODBUS transaction. The write operation is performed before the read. Message uses default TCP slave id of 0.
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read. (Inherited from ModbusMaster.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | WriteMultipleCoils(UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value.
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value. (Inherited from ModbusMaster.)
 | WriteMultipleRegisters(UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers.
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers. (Inherited from ModbusMaster.)
 | WriteSingleCoil(UInt16, Boolean) | Write a single coil value.
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value. (Inherited from ModbusMaster.)
 | WriteSingleRegister(UInt16, UInt16) | Write a single holding register.
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register. (Inherited from ModbusMaster.)
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusMaster
 |  |  | ModbusIpMaster


CreateIp Method

CreateIp Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► CreateIp()()()
Members
Icon | Member | Description
 | CreateIp(TcpClient) | Modbus IP master factory method.
 | CreateIp(UdpClient) | Modbus IP master factory method.
 | CreateIp(SerialPort) | Modbus IP master factory method.
 | CreateIp(IStreamResource) | Modbus IP master factory method.


CreateIp Method (streamResource)

CreateIp Method (streamResource)
Namespaces ► Modbus.Device ► ModbusIpMaster ► CreateIp(IStreamResource)
Modbus IP master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusIpMaster CreateIp(
    IStreamResource streamResource
)
Public Shared Function CreateIp ( _
    streamResource As IStreamResource _
) As ModbusIpMaster
public:
static ModbusIpMaster^ CreateIp(
    IStreamResource^ streamResource
)
Parameters
streamResource (IStreamResource)


CreateIp Method (serialPort)

CreateIp Method (serialPort)
Namespaces ► Modbus.Device ► ModbusIpMaster ► CreateIp(SerialPort)
Modbus IP master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusIpMaster CreateIp(
    SerialPort serialPort
)
Public Shared Function CreateIp ( _
    serialPort As SerialPort _
) As ModbusIpMaster
public:
static ModbusIpMaster^ CreateIp(
    SerialPort^ serialPort
)
Parameters
serialPort (SerialPort)


CreateIp Method (tcpClient)

CreateIp Method (tcpClient)
Namespaces ► Modbus.Device ► ModbusIpMaster ► CreateIp(TcpClient)
Modbus IP master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusIpMaster CreateIp(
    TcpClient tcpClient
)
Public Shared Function CreateIp ( _
    tcpClient As TcpClient _
) As ModbusIpMaster
public:
static ModbusIpMaster^ CreateIp(
    TcpClient^ tcpClient
)
Parameters
tcpClient (TcpClient)


CreateIp Method (udpClient)

CreateIp Method (udpClient)
Namespaces ► Modbus.Device ► ModbusIpMaster ► CreateIp(UdpClient)
Modbus IP master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusIpMaster CreateIp(
    UdpClient udpClient
)
Public Shared Function CreateIp ( _
    udpClient As UdpClient _
) As ModbusIpMaster
public:
static ModbusIpMaster^ CreateIp(
    UdpClient^ udpClient
)
Parameters
udpClient (UdpClient)


ReadCoils Method (startAddress, numberOfPoints)

ReadCoils Method (startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadCoils(UInt16, UInt16)
Read from 1 to 2000 contiguous coils status.
Declaration Syntax
C# Visual Basic Visual C++
public bool[] ReadCoils(
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadCoils ( _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
public:
array<bool>^ ReadCoils(
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of coils to read.
Return Value
Coils status


ReadHoldingRegisters Method (startAddress, numberOfPoints)

ReadHoldingRegisters Method (startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadHoldingRegisters(UInt16, UInt16)
Read contiguous block of holding registers.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadHoldingRegisters(
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadHoldingRegisters ( _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
public:
array<unsigned short>^ ReadHoldingRegisters(
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Holding registers status


ReadInputRegisters Method (startAddress, numberOfPoints)

ReadInputRegisters Method (startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadInputRegisters(UInt16, UInt16)
Read contiguous block of input registers.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadInputRegisters(
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadInputRegisters ( _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
public:
array<unsigned short>^ ReadInputRegisters(
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Input registers status


ReadInputs Method (startAddress, numberOfPoints)

ReadInputs Method (startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadInputs(UInt16, UInt16)
Read from 1 to 2000 contiguous discrete input status.
Declaration Syntax
C# Visual Basic Visual C++
public bool[] ReadInputs(
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadInputs ( _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
public:
array<bool>^ ReadInputs(
    unsigned short startAddress,
    unsigned short numberOfPoints
)
Parameters
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of discrete inputs to read.
Return Value
Discrete inputs status


ReadWriteMultipleRegisters Method (startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)

ReadWriteMultipleRegisters Method (startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadWriteMultipleRegisters(UInt16, UInt16, UInt16, array<UInt16>[]()[])
Performs a combination of one read operation and one write operation in a single MODBUS transaction. The write operation is performed before the read. Message uses default TCP slave id of 0.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadWriteMultipleRegisters(
    ushort startReadAddress,
    ushort numberOfPointsToRead,
    ushort startWriteAddress,
    ushort[] writeData
)
Public Function ReadWriteMultipleRegisters ( _
    startReadAddress As UShort, _
    numberOfPointsToRead As UShort, _
    startWriteAddress As UShort, _
    writeData As UShort() _
) As UShort()
public:
array<unsigned short>^ ReadWriteMultipleRegisters(
    unsigned short startReadAddress,
    unsigned short numberOfPointsToRead,
    unsigned short startWriteAddress,
    array<unsigned short>^ writeData
)
Parameters
startReadAddress (UInt16)
Address to begin reading (Holding registers are addressed starting at 0).
numberOfPointsToRead (UInt16)
Number of registers to read.
startWriteAddress (UInt16)
Address to begin writing (Holding registers are addressed starting at 0).
writeData (array< UInt16 >[]()[])
Register values to write.


WriteMultipleCoils Method (startAddress, data)

WriteMultipleCoils Method (startAddress, data)
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteMultipleCoils(UInt16, array<Boolean>[]()[])
Force each coil in a sequence of coils to a provided value.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteMultipleCoils(
    ushort startAddress,
    bool[] data
)
Public Sub WriteMultipleCoils ( _
    startAddress As UShort, _
    data As Boolean() _
)
public:
void WriteMultipleCoils(
    unsigned short startAddress,
    array<bool>^ data
)
Parameters
startAddress (UInt16)
Address to begin writing values.
data (array< Boolean >[]()[])
Values to write.


WriteMultipleRegisters Method (startAddress, data)

WriteMultipleRegisters Method (startAddress, data)
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteMultipleRegisters(UInt16, array<UInt16>[]()[])
Write a block of 1 to 123 contiguous registers.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteMultipleRegisters(
    ushort startAddress,
    ushort[] data
)
Public Sub WriteMultipleRegisters ( _
    startAddress As UShort, _
    data As UShort() _
)
public:
void WriteMultipleRegisters(
    unsigned short startAddress,
    array<unsigned short>^ data
)
Parameters
startAddress (UInt16)
Address to begin writing values.
data (array< UInt16 >[]()[])
Values to write.


WriteSingleCoil Method (coilAddress, value)

WriteSingleCoil Method (coilAddress, value)
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteSingleCoil(UInt16, Boolean)
Write a single coil value.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteSingleCoil(
    ushort coilAddress,
    bool value
)
Public Sub WriteSingleCoil ( _
    coilAddress As UShort, _
    value As Boolean _
)
public:
void WriteSingleCoil(
    unsigned short coilAddress,
    bool value
)
Parameters
coilAddress (UInt16)
Address to write value to.
value (Boolean)
Value to write.


WriteSingleRegister Method (registerAddress, value)

WriteSingleRegister Method (registerAddress, value)
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteSingleRegister(UInt16, UInt16)
Write a single holding register.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteSingleRegister(
    ushort registerAddress,
    ushort value
)
Public Sub WriteSingleRegister ( _
    registerAddress As UShort, _
    value As UShort _
)
public:
void WriteSingleRegister(
    unsigned short registerAddress,
    unsigned short value
)
Parameters
registerAddress (UInt16)
Value to write.
value (UInt16)
Value to write.


ModbusMaster Class

ModbusMaster Class
Namespaces ► Modbus.Device ► ModbusMaster
Modbus master device.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class ModbusMaster : ModbusDevice,
    IModbusMaster, IDisposable
Public MustInherit Class ModbusMaster _
    Inherits ModbusDevice _
    Implements IModbusMaster, IDisposable
public ref class ModbusMaster abstract : public ModbusDevice,
    IModbusMaster, IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ExecuteCustomMessage<(Of <(TResponse>)>)(IModbusMessage) | Executes the custom message.
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status.
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers.
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers.
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status.
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value.
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers.
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value.
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register.
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusMaster
 |  |  | ModbusIpMaster
 |  |  | ModbusSerialMaster


ExecuteCustomMessage Method (request)

ExecuteCustomMessage<(Of <(TResponse>)>) Method (request)
Namespaces ► Modbus.Device ► ModbusMaster ► ExecuteCustomMessage<(Of <(TResponse>)>)(IModbusMessage)
Executes the custom message.
Declaration Syntax
C# Visual Basic Visual C++
public TResponse ExecuteCustomMessage<TResponse>(
    IModbusMessage request
)
where TResponse : new(), IModbusMessage

Public Function ExecuteCustomMessage(Of TResponse As {New, IModbusMessage}) ( _
    request As IModbusMessage _
) As TResponse
public:
generic<typename TResponse>
where TResponse : gcnew(), IModbusMessage
TResponse ExecuteCustomMessage(
    IModbusMessage^ request
)
Generic Template Parameters
TResponse
The type of the response.
Parameters
request (IModbusMessage)
The request.


ReadCoils Method (slaveAddress, startAddress, numberOfPoints)

ReadCoils Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusMaster ► ReadCoils(Byte, UInt16, UInt16)
Read from 1 to 2000 contiguous coils status.
Declaration Syntax
C# Visual Basic Visual C++
public bool[] ReadCoils(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadCoils ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
public:
virtual array<bool>^ ReadCoils(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
) sealed
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of coils to read.
Return Value
Coils status


ReadHoldingRegisters Method (slaveAddress, startAddress, numberOfPoints)

ReadHoldingRegisters Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusMaster ► ReadHoldingRegisters(Byte, UInt16, UInt16)
Read contiguous block of holding registers.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadHoldingRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadHoldingRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
public:
virtual array<unsigned short>^ ReadHoldingRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
) sealed
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Holding registers status


ReadInputRegisters Method (slaveAddress, startAddress, numberOfPoints)

ReadInputRegisters Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusMaster ► ReadInputRegisters(Byte, UInt16, UInt16)
Read contiguous block of input registers.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadInputRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadInputRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As UShort()
public:
virtual array<unsigned short>^ ReadInputRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
) sealed
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of holding registers to read.
Return Value
Input registers status


ReadInputs Method (slaveAddress, startAddress, numberOfPoints)

ReadInputs Method (slaveAddress, startAddress, numberOfPoints)
Namespaces ► Modbus.Device ► ModbusMaster ► ReadInputs(Byte, UInt16, UInt16)
Read from 1 to 2000 contiguous discrete input status.
Declaration Syntax
C# Visual Basic Visual C++
public bool[] ReadInputs(
    byte slaveAddress,
    ushort startAddress,
    ushort numberOfPoints
)
Public Function ReadInputs ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    numberOfPoints As UShort _
) As Boolean()
public:
virtual array<bool>^ ReadInputs(
    unsigned char slaveAddress,
    unsigned short startAddress,
    unsigned short numberOfPoints
) sealed
Parameters
slaveAddress (Byte)
Address of device to read values from.
startAddress (UInt16)
Address to begin reading.
numberOfPoints (UInt16)
Number of discrete inputs to read.
Return Value
Discrete inputs status


ReadWriteMultipleRegisters Method (slaveAddress, startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)

ReadWriteMultipleRegisters Method (slaveAddress, startReadAddress, numberOfPointsToRead, startWriteAddress, writeData)
Namespaces ► Modbus.Device ► ModbusMaster ► ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[])
Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read.
Declaration Syntax
C# Visual Basic Visual C++
public ushort[] ReadWriteMultipleRegisters(
    byte slaveAddress,
    ushort startReadAddress,
    ushort numberOfPointsToRead,
    ushort startWriteAddress,
    ushort[] writeData
)
Public Function ReadWriteMultipleRegisters ( _
    slaveAddress As Byte, _
    startReadAddress As UShort, _
    numberOfPointsToRead As UShort, _
    startWriteAddress As UShort, _
    writeData As UShort() _
) As UShort()
public:
virtual array<unsigned short>^ ReadWriteMultipleRegisters(
    unsigned char slaveAddress,
    unsigned short startReadAddress,
    unsigned short numberOfPointsToRead,
    unsigned short startWriteAddress,
    array<unsigned short>^ writeData
) sealed
Parameters
slaveAddress (Byte)
Address of device to read values from.
startReadAddress (UInt16)
Address to begin reading (Holding registers are addressed starting at 0).
numberOfPointsToRead (UInt16)
Number of registers to read.
startWriteAddress (UInt16)
Address to begin writing (Holding registers are addressed starting at 0).
writeData (array< UInt16 >[]()[])
Register values to write.


WriteMultipleCoils Method (slaveAddress, startAddress, data)

WriteMultipleCoils Method (slaveAddress, startAddress, data)
Namespaces ► Modbus.Device ► ModbusMaster ► WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[])
Force each coil in a sequence of coils to a provided value.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteMultipleCoils(
    byte slaveAddress,
    ushort startAddress,
    bool[] data
)
Public Sub WriteMultipleCoils ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    data As Boolean() _
)
public:
virtual void WriteMultipleCoils(
    unsigned char slaveAddress,
    unsigned short startAddress,
    array<bool>^ data
) sealed
Parameters
slaveAddress (Byte)
Address of the device to write to.
startAddress (UInt16)
Address to begin writing values.
data (array< Boolean >[]()[])
Values to write.


WriteMultipleRegisters Method (slaveAddress, startAddress, data)

WriteMultipleRegisters Method (slaveAddress, startAddress, data)
Namespaces ► Modbus.Device ► ModbusMaster ► WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[])
Write a block of 1 to 123 contiguous registers.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteMultipleRegisters(
    byte slaveAddress,
    ushort startAddress,
    ushort[] data
)
Public Sub WriteMultipleRegisters ( _
    slaveAddress As Byte, _
    startAddress As UShort, _
    data As UShort() _
)
public:
virtual void WriteMultipleRegisters(
    unsigned char slaveAddress,
    unsigned short startAddress,
    array<unsigned short>^ data
) sealed
Parameters
slaveAddress (Byte)
Address of the device to write to.
startAddress (UInt16)
Address to begin writing values.
data (array< UInt16 >[]()[])
Values to write.


WriteSingleCoil Method (slaveAddress, coilAddress, value)

WriteSingleCoil Method (slaveAddress, coilAddress, value)
Namespaces ► Modbus.Device ► ModbusMaster ► WriteSingleCoil(Byte, UInt16, Boolean)
Write a single coil value.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteSingleCoil(
    byte slaveAddress,
    ushort coilAddress,
    bool value
)
Public Sub WriteSingleCoil ( _
    slaveAddress As Byte, _
    coilAddress As UShort, _
    value As Boolean _
)
public:
virtual void WriteSingleCoil(
    unsigned char slaveAddress,
    unsigned short coilAddress,
    bool value
) sealed
Parameters
slaveAddress (Byte)
Address of the device to write to.
coilAddress (UInt16)
Address to write value to.
value (Boolean)
Value to write.


WriteSingleRegister Method (slaveAddress, registerAddress, value)

WriteSingleRegister Method (slaveAddress, registerAddress, value)
Namespaces ► Modbus.Device ► ModbusMaster ► WriteSingleRegister(Byte, UInt16, UInt16)
Write a single holding register.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteSingleRegister(
    byte slaveAddress,
    ushort registerAddress,
    ushort value
)
Public Sub WriteSingleRegister ( _
    slaveAddress As Byte, _
    registerAddress As UShort, _
    value As UShort _
)
public:
virtual void WriteSingleRegister(
    unsigned char slaveAddress,
    unsigned short registerAddress,
    unsigned short value
) sealed
Parameters
slaveAddress (Byte)
Address of the device to write to.
registerAddress (UInt16)
Value to write.
value (UInt16)
Value to write.


ModbusSerialMaster Class

ModbusSerialMaster Class
Namespaces ► Modbus.Device ► ModbusSerialMaster
Modbus serial master device.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusSerialMaster : ModbusMaster,
    IModbusSerialMaster, IModbusMaster, IDisposable
Public Class ModbusSerialMaster _
    Inherits ModbusMaster _
    Implements IModbusSerialMaster, IModbusMaster, IDisposable
public ref class ModbusSerialMaster : public ModbusMaster,
    IModbusSerialMaster, IModbusMaster, IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | CreateAscii(SerialPort) | Modbus ASCII master factory method.
 | CreateAscii(TcpClient) | Modbus ASCII master factory method.
 | CreateAscii(UdpClient) | Modbus ASCII master factory method.
 | CreateAscii(IStreamResource) | Modbus ASCII master factory method.
 | CreateRtu(SerialPort) | Modbus RTU master factory method.
 | CreateRtu(TcpClient) | Modbus RTU master factory method.
 | CreateRtu(UdpClient) | Modbus RTU master factory method.
 | CreateRtu(IStreamResource) | Modbus RTU master factory method.
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ExecuteCustomMessage<(Of <(TResponse>)>)(IModbusMessage) | Executes the custom message. (Inherited from ModbusMaster.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status. (Inherited from ModbusMaster.)
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers. (Inherited from ModbusMaster.)
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers. (Inherited from ModbusMaster.)
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status. (Inherited from ModbusMaster.)
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read. (Inherited from ModbusMaster.)
 | ReturnQueryData(Byte, UInt16) | Serial Line only. Diagnostic function which loops back the original data. NModbus only supports looping back one ushort value, this is a limitation of the "Best Effort" implementation of the RTU protocol.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value. (Inherited from ModbusMaster.)
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers. (Inherited from ModbusMaster.)
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value. (Inherited from ModbusMaster.)
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register. (Inherited from ModbusMaster.)
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusMaster
 |  |  | ModbusSerialMaster


CreateAscii Method

CreateAscii Method
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateAscii()()()
Members
Icon | Member | Description
 | CreateAscii(SerialPort) | Modbus ASCII master factory method.
 | CreateAscii(TcpClient) | Modbus ASCII master factory method.
 | CreateAscii(UdpClient) | Modbus ASCII master factory method.
 | CreateAscii(IStreamResource) | Modbus ASCII master factory method.


CreateAscii Method (streamResource)

CreateAscii Method (streamResource)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateAscii(IStreamResource)
Modbus ASCII master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateAscii(
    IStreamResource streamResource
)
Public Shared Function CreateAscii ( _
    streamResource As IStreamResource _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateAscii(
    IStreamResource^ streamResource
)
Parameters
streamResource (IStreamResource)


CreateAscii Method (serialPort)

CreateAscii Method (serialPort)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateAscii(SerialPort)
Modbus ASCII master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateAscii(
    SerialPort serialPort
)
Public Shared Function CreateAscii ( _
    serialPort As SerialPort _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateAscii(
    SerialPort^ serialPort
)
Parameters
serialPort (SerialPort)


CreateAscii Method (tcpClient)

CreateAscii Method (tcpClient)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateAscii(TcpClient)
Modbus ASCII master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateAscii(
    TcpClient tcpClient
)
Public Shared Function CreateAscii ( _
    tcpClient As TcpClient _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateAscii(
    TcpClient^ tcpClient
)
Parameters
tcpClient (TcpClient)


CreateAscii Method (udpClient)

CreateAscii Method (udpClient)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateAscii(UdpClient)
Modbus ASCII master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateAscii(
    UdpClient udpClient
)
Public Shared Function CreateAscii ( _
    udpClient As UdpClient _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateAscii(
    UdpClient^ udpClient
)
Parameters
udpClient (UdpClient)


CreateRtu Method

CreateRtu Method
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateRtu()()()
Members
Icon | Member | Description
 | CreateRtu(SerialPort) | Modbus RTU master factory method.
 | CreateRtu(TcpClient) | Modbus RTU master factory method.
 | CreateRtu(UdpClient) | Modbus RTU master factory method.
 | CreateRtu(IStreamResource) | Modbus RTU master factory method.


CreateRtu Method (streamResource)

CreateRtu Method (streamResource)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateRtu(IStreamResource)
Modbus RTU master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateRtu(
    IStreamResource streamResource
)
Public Shared Function CreateRtu ( _
    streamResource As IStreamResource _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateRtu(
    IStreamResource^ streamResource
)
Parameters
streamResource (IStreamResource)


CreateRtu Method (serialPort)

CreateRtu Method (serialPort)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateRtu(SerialPort)
Modbus RTU master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateRtu(
    SerialPort serialPort
)
Public Shared Function CreateRtu ( _
    serialPort As SerialPort _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateRtu(
    SerialPort^ serialPort
)
Parameters
serialPort (SerialPort)


CreateRtu Method (tcpClient)

CreateRtu Method (tcpClient)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateRtu(TcpClient)
Modbus RTU master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateRtu(
    TcpClient tcpClient
)
Public Shared Function CreateRtu ( _
    tcpClient As TcpClient _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateRtu(
    TcpClient^ tcpClient
)
Parameters
tcpClient (TcpClient)


CreateRtu Method (udpClient)

CreateRtu Method (udpClient)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► CreateRtu(UdpClient)
Modbus RTU master factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialMaster CreateRtu(
    UdpClient udpClient
)
Public Shared Function CreateRtu ( _
    udpClient As UdpClient _
) As ModbusSerialMaster
public:
static ModbusSerialMaster^ CreateRtu(
    UdpClient^ udpClient
)
Parameters
udpClient (UdpClient)


ReturnQueryData Method (slaveAddress, data)

ReturnQueryData Method (slaveAddress, data)
Namespaces ► Modbus.Device ► ModbusSerialMaster ► ReturnQueryData(Byte, UInt16)
Serial Line only. Diagnostic function which loops back the original data. NModbus only supports looping back one ushort value, this is a limitation of the "Best Effort" implementation of the RTU protocol.
Declaration Syntax
C# Visual Basic Visual C++
public bool ReturnQueryData(
    byte slaveAddress,
    ushort data
)
Public Function ReturnQueryData ( _
    slaveAddress As Byte, _
    data As UShort _
) As Boolean
public:
virtual bool ReturnQueryData(
    unsigned char slaveAddress,
    unsigned short data
) sealed
Parameters
slaveAddress (Byte)
Address of device to test.
data (UInt16)
Data to return.
Return Value
Return true if slave device echoed data.


ModbusSerialSlave Class

ModbusSerialSlave Class
Namespaces ► Modbus.Device ► ModbusSerialSlave
Modbus serial slave device.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusSerialSlave : ModbusSlave
Public Class ModbusSerialSlave _
    Inherits ModbusSlave
public ref class ModbusSerialSlave : public ModbusSlave
Members
All Members | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | CreateAscii(Byte, SerialPort) | Modbus ASCII slave factory method.
 | CreateAscii(Byte, IStreamResource) | Modbus ASCII slave factory method.
 | CreateRtu(Byte, SerialPort) | Modbus RTU slave factory method.
 | CreateRtu(Byte, IStreamResource) | Modbus RTU slave factory method.
 | DataStore | Gets or sets the data store. (Inherited from ModbusSlave.)
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Listen()()() | Start slave listening for requests. (Overrides ModbusSlave.Listen()()().)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ModbusSlaveRequestReceived | Occurs when a modbus slave receives a request. (Inherited from ModbusSlave.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | UnitId | Gets or sets the unit ID. (Inherited from ModbusSlave.)
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusSlave
 |  |  | ModbusSerialSlave


CreateAscii Method

CreateAscii Method
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateAscii()()()
Members
Icon | Member | Description
 | CreateAscii(Byte, SerialPort) | Modbus ASCII slave factory method.
 | CreateAscii(Byte, IStreamResource) | Modbus ASCII slave factory method.


CreateAscii Method (unitId, streamResource)

CreateAscii Method (unitId, streamResource)
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateAscii(Byte, IStreamResource)
Modbus ASCII slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialSlave CreateAscii(
    byte unitId,
    IStreamResource streamResource
)
Public Shared Function CreateAscii ( _
    unitId As Byte, _
    streamResource As IStreamResource _
) As ModbusSerialSlave
public:
static ModbusSerialSlave^ CreateAscii(
    unsigned char unitId,
    IStreamResource^ streamResource
)
Parameters
unitId (Byte)
streamResource (IStreamResource)


CreateAscii Method (unitId, serialPort)

CreateAscii Method (unitId, serialPort)
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateAscii(Byte, SerialPort)
Modbus ASCII slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialSlave CreateAscii(
    byte unitId,
    SerialPort serialPort
)
Public Shared Function CreateAscii ( _
    unitId As Byte, _
    serialPort As SerialPort _
) As ModbusSerialSlave
public:
static ModbusSerialSlave^ CreateAscii(
    unsigned char unitId,
    SerialPort^ serialPort
)
Parameters
unitId (Byte)
serialPort (SerialPort)


CreateRtu Method

CreateRtu Method
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateRtu()()()
Members
Icon | Member | Description
 | CreateRtu(Byte, SerialPort) | Modbus RTU slave factory method.
 | CreateRtu(Byte, IStreamResource) | Modbus RTU slave factory method.


CreateRtu Method (unitId, streamResource)

CreateRtu Method (unitId, streamResource)
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateRtu(Byte, IStreamResource)
Modbus RTU slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialSlave CreateRtu(
    byte unitId,
    IStreamResource streamResource
)
Public Shared Function CreateRtu ( _
    unitId As Byte, _
    streamResource As IStreamResource _
) As ModbusSerialSlave
public:
static ModbusSerialSlave^ CreateRtu(
    unsigned char unitId,
    IStreamResource^ streamResource
)
Parameters
unitId (Byte)
streamResource (IStreamResource)


CreateRtu Method (unitId, serialPort)

CreateRtu Method (unitId, serialPort)
Namespaces ► Modbus.Device ► ModbusSerialSlave ► CreateRtu(Byte, SerialPort)
Modbus RTU slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusSerialSlave CreateRtu(
    byte unitId,
    SerialPort serialPort
)
Public Shared Function CreateRtu ( _
    unitId As Byte, _
    serialPort As SerialPort _
) As ModbusSerialSlave
public:
static ModbusSerialSlave^ CreateRtu(
    unsigned char unitId,
    SerialPort^ serialPort
)
Parameters
unitId (Byte)
serialPort (SerialPort)


Listen Method

Listen Method
Namespaces ► Modbus.Device ► ModbusSerialSlave ► Listen()()()
Start slave listening for requests.
Declaration Syntax
C# Visual Basic Visual C++
public override void Listen()
Public Overrides Sub Listen
public:
virtual void Listen() override


ModbusSlave Class

ModbusSlave Class
Namespaces ► Modbus.Device ► ModbusSlave
Modbus slave device.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class ModbusSlave : ModbusDevice
Public MustInherit Class ModbusSlave _
    Inherits ModbusDevice
public ref class ModbusSlave abstract : public ModbusDevice
Members
All Members | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DataStore | Gets or sets the data store.
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Listen()()() | Start slave listening for requests.
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ModbusSlaveRequestReceived | Occurs when a modbus slave receives a request.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | UnitId | Gets or sets the unit ID.
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusSlave
 |  |  | ModbusSerialSlave
 |  |  | ModbusTcpSlave
 |  |  | ModbusUdpSlave


DataStore Property

DataStore Property
Namespaces ► Modbus.Device ► ModbusSlave ► DataStore
Gets or sets the data store.
Declaration Syntax
C# Visual Basic Visual C++
public DataStore DataStore { get; set; }
Public Property DataStore As DataStore
public:
property DataStore^ DataStore {
    DataStore^ get ();
    void set (DataStore^ value);
}


Listen Method

Listen Method
Namespaces ► Modbus.Device ► ModbusSlave ► Listen()()()
Start slave listening for requests.
Declaration Syntax
C# Visual Basic Visual C++
public abstract void Listen()
Public MustOverride Sub Listen
public:
virtual void Listen() abstract


ModbusSlaveRequestReceived Event

ModbusSlaveRequestReceived Event
Namespaces ► Modbus.Device ► ModbusSlave ► ModbusSlaveRequestReceived
Occurs when a modbus slave receives a request.
Declaration Syntax
C# Visual Basic Visual C++
public event EventHandler<ModbusSlaveRequestEventArgs> ModbusSlaveRequestReceived
Public Event ModbusSlaveRequestReceived As EventHandler(Of ModbusSlaveRequestEventArgs)
public:
 event EventHandler<ModbusSlaveRequestEventArgs^>^ ModbusSlaveRequestReceived {
    void add (EventHandler<ModbusSlaveRequestEventArgs^>^ value);
    void remove (EventHandler<ModbusSlaveRequestEventArgs^>^ value);
}


UnitId Property

UnitId Property
Namespaces ► Modbus.Device ► ModbusSlave ► UnitId
Gets or sets the unit ID.
Declaration Syntax
C# Visual Basic Visual C++
public byte UnitId { get; set; }
Public Property UnitId As Byte
public:
property unsigned char UnitId {
    unsigned char get ();
    void set (unsigned char value);
}


ModbusSlaveRequestEventArgs Class

ModbusSlaveRequestEventArgs Class
Namespaces ► Modbus.Device ► ModbusSlaveRequestEventArgs
Modbus Slave request event args containing information on the message.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusSlaveRequestEventArgs : EventArgs
Public Class ModbusSlaveRequestEventArgs _
    Inherits EventArgs
public ref class ModbusSlaveRequestEventArgs : public EventArgs
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets the message.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | EventArgs
 |  | ModbusSlaveRequestEventArgs


Message Property

Message Property
Namespaces ► Modbus.Device ► ModbusSlaveRequestEventArgs ► Message
Gets the message.
Declaration Syntax
C# Visual Basic Visual C++
public IModbusMessage Message { get; }
Public ReadOnly Property Message As IModbusMessage
public:
property IModbusMessage^ Message {
    IModbusMessage^ get ();
}
Value
The message.


ModbusTcpSlave Class

ModbusTcpSlave Class
Namespaces ► Modbus.Device ► ModbusTcpSlave
Modbus TCP slave device.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusTcpSlave : ModbusSlave
Public Class ModbusTcpSlave _
    Inherits ModbusSlave
public ref class ModbusTcpSlave : public ModbusSlave
Members
All Members | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | CreateTcp(Byte, TcpListener) | Modbus TCP slave factory method.
 | DataStore | Gets or sets the data store. (Inherited from ModbusSlave.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Overrides ModbusDevice.Dispose(Boolean).)
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Listen()()() | Start slave listening for requests. (Overrides ModbusSlave.Listen()()().)
 | Masters | Gets the Modbus TCP Masters connected to this Modbus TCP Slave.
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ModbusSlaveRequestReceived | Occurs when a modbus slave receives a request. (Inherited from ModbusSlave.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | UnitId | Gets or sets the unit ID. (Inherited from ModbusSlave.)
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusSlave
 |  |  | ModbusTcpSlave


CreateTcp Method (unitId, tcpListener)

CreateTcp Method (unitId, tcpListener)
Namespaces ► Modbus.Device ► ModbusTcpSlave ► CreateTcp(Byte, TcpListener)
Modbus TCP slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusTcpSlave CreateTcp(
    byte unitId,
    TcpListener tcpListener
)
Public Shared Function CreateTcp ( _
    unitId As Byte, _
    tcpListener As TcpListener _
) As ModbusTcpSlave
public:
static ModbusTcpSlave^ CreateTcp(
    unsigned char unitId,
    TcpListener^ tcpListener
)
Parameters
unitId (Byte)
tcpListener (TcpListener)


Dispose Method (disposing)

Dispose Method (disposing)
Namespaces ► Modbus.Device ► ModbusTcpSlave ► Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
protected override void Dispose(
    bool disposing
)
Protected Overrides Sub Dispose ( _
    disposing As Boolean _
)
protected:
virtual void Dispose(
    bool disposing
) override
Parameters
disposing (Boolean)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Remarks
Dispose is thread-safe.


Listen Method

Listen Method
Namespaces ► Modbus.Device ► ModbusTcpSlave ► Listen()()()
Start slave listening for requests.
Declaration Syntax
C# Visual Basic Visual C++
public override void Listen()
Public Overrides Sub Listen
public:
virtual void Listen() override


Masters Property

Masters Property
Namespaces ► Modbus.Device ► ModbusTcpSlave ► Masters
Gets the Modbus TCP Masters connected to this Modbus TCP Slave.
Declaration Syntax
C# Visual Basic Visual C++
public ReadOnlyCollection<TcpClient> Masters { get; }
Public ReadOnly Property Masters As ReadOnlyCollection(Of TcpClient)
public:
property ReadOnlyCollection<TcpClient^>^ Masters {
    ReadOnlyCollection<TcpClient^>^ get ();
}


ModbusUdpSlave Class

ModbusUdpSlave Class
Namespaces ► Modbus.Device ► ModbusUdpSlave
Modbus UDP slave device.
Declaration Syntax
C# Visual Basic Visual C++
public class ModbusUdpSlave : ModbusSlave
Public Class ModbusUdpSlave _
    Inherits ModbusSlave
public ref class ModbusUdpSlave : public ModbusSlave
Members
All Members | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | CreateUdp(UdpClient) | Modbus UDP slave factory method. Creates NModbus UDP slave with default
 | CreateUdp(Byte, UdpClient) | Modbus UDP slave factory method.
 | DataStore | Gets or sets the data store. (Inherited from ModbusSlave.)
 | Dispose()()() | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusDevice.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Listen()()() | Start slave listening for requests. (Overrides ModbusSlave.Listen()()().)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ModbusSlaveRequestReceived | Occurs when a modbus slave receives a request. (Inherited from ModbusSlave.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Transport | Gets the Modbus Transport. (Inherited from ModbusDevice.)
 | UnitId | Gets or sets the unit ID. (Inherited from ModbusSlave.)
Inheritance Hierarchy
Object
 | ModbusDevice
 |  | ModbusSlave
 |  |  | ModbusUdpSlave


CreateUdp Method

CreateUdp Method
Namespaces ► Modbus.Device ► ModbusUdpSlave ► CreateUdp()()()
Members
Icon | Member | Description
 | CreateUdp(UdpClient) | Modbus UDP slave factory method. Creates NModbus UDP slave with default
 | CreateUdp(Byte, UdpClient) | Modbus UDP slave factory method.


CreateUdp Method (unitId, client)

CreateUdp Method (unitId, client)
Namespaces ► Modbus.Device ► ModbusUdpSlave ► CreateUdp(Byte, UdpClient)
Modbus UDP slave factory method.
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusUdpSlave CreateUdp(
    byte unitId,
    UdpClient client
)
Public Shared Function CreateUdp ( _
    unitId As Byte, _
    client As UdpClient _
) As ModbusUdpSlave
public:
static ModbusUdpSlave^ CreateUdp(
    unsigned char unitId,
    UdpClient^ client
)
Parameters
unitId (Byte)
client (UdpClient)


CreateUdp Method (client)

CreateUdp Method (client)
Namespaces ► Modbus.Device ► ModbusUdpSlave ► CreateUdp(UdpClient)
Modbus UDP slave factory method. Creates NModbus UDP slave with default
Declaration Syntax
C# Visual Basic Visual C++
public static ModbusUdpSlave CreateUdp(
    UdpClient client
)
Public Shared Function CreateUdp ( _
    client As UdpClient _
) As ModbusUdpSlave
public:
static ModbusUdpSlave^ CreateUdp(
    UdpClient^ client
)
Parameters
client (UdpClient)


Listen Method

Listen Method
Namespaces ► Modbus.Device ► ModbusUdpSlave ► Listen()()()
Start slave listening for requests.
Declaration Syntax
C# Visual Basic Visual C++
public override void Listen()
Public Overrides Sub Listen
public:
virtual void Listen() override


Modbus.IO Namespace

Modbus.IO Namespace
Namespaces ► Modbus.IO
Modbus transport IO.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus.IO
Namespace Modbus.IO
namespace Modbus.IO
Types
All Types Classes Interfaces
Icon | Type | Description
 | EmptyTransport | Empty placeholder.
 | IStreamResource | Represents a serial resource. Implementor - http://en.wikipedia.org/wiki/Bridge_Pattern
 | ModbusSerialTransport | Transport for Serial protocols. Refined Abstraction - http://en.wikipedia.org/wiki/Bridge_Pattern
 | ModbusTransport | Modbus transport. Abstraction - http://en.wikipedia.org/wiki/Bridge_Pattern


EmptyTransport Class

EmptyTransport Class
Namespaces ► Modbus.IO ► EmptyTransport
Empty placeholder.
Declaration Syntax
C# Visual Basic Visual C++
public class EmptyTransport : ModbusTransport
Public Class EmptyTransport _
    Inherits ModbusTransport
public ref class EmptyTransport : public ModbusTransport
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | EmptyTransport()()() | Initializes a new instance of the EmptyTransport class
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from ModbusTransport.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusTransport.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadTimeout | Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish. (Inherited from ModbusTransport.)
 | Retries | Number of times to retry sending message after encountering a failure such as an IOException, TimeoutException, or a corrupt message. (Inherited from ModbusTransport.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WaitToRetryMilliseconds | Gets or sets the number of milliseconds the tranport will wait before retrying a message after receiving an ACKNOWLEGE or SLAVE DEVICE BUSY slave exception response. (Inherited from ModbusTransport.)
 | WriteTimeout | Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish. (Inherited from ModbusTransport.)
Inheritance Hierarchy
Object
 | ModbusTransport
 |  | EmptyTransport


EmptyTransport Constructor

EmptyTransport Constructor
Namespaces ► Modbus.IO ► EmptyTransport ► EmptyTransport()()()
Initializes a new instance of the EmptyTransport class
Declaration Syntax
C# Visual Basic Visual C++
public EmptyTransport()
Public Sub New
public:
EmptyTransport()


IStreamResource Interface

IStreamResource Interface
Namespaces ► Modbus.IO ► IStreamResource
Represents a serial resource. Implementor - http://en.wikipedia.org/wiki/Bridge_Pattern
Declaration Syntax
C# Visual Basic Visual C++
public interface IStreamResource : IDisposable
Public Interface IStreamResource _
    Implements IDisposable
public interface class IStreamResource : IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | DiscardInBuffer()()() | Purges the receive buffer.
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
 | InfiniteTimeout | Indicates that no timeout should occur.
 | Read(array<Byte>[]()[], Int32, Int32) | Reads a number of bytes from the input buffer and writes those bytes into a byte array at the specified offset.
 | ReadTimeout | Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.
 | Write(array<Byte>[]()[], Int32, Int32) | Writes a specified number of bytes to the port from an output buffer, starting at the specified offset.
 | WriteTimeout | Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish.


DiscardInBuffer Method

DiscardInBuffer Method
Namespaces ► Modbus.IO ► IStreamResource ► DiscardInBuffer()()()
Purges the receive buffer.
Declaration Syntax
C# Visual Basic Visual C++
void DiscardInBuffer()
Sub DiscardInBuffer
void DiscardInBuffer()


InfiniteTimeout Property

InfiniteTimeout Property
Namespaces ► Modbus.IO ► IStreamResource ► InfiniteTimeout
Indicates that no timeout should occur.
Declaration Syntax
C# Visual Basic Visual C++
int InfiniteTimeout { get; }
ReadOnly Property InfiniteTimeout As Integer
property int InfiniteTimeout {
    int get ();
}


Read Method (buffer, offset, count)

Read Method (buffer, offset, count)
Namespaces ► Modbus.IO ► IStreamResource ► Read(array<Byte>[]()[], Int32, Int32)
Reads a number of bytes from the input buffer and writes those bytes into a byte array at the specified offset.
Declaration Syntax
C# Visual Basic Visual C++
int Read(
    byte[] buffer,
    int offset,
    int count
)
Function Read ( _
    buffer As Byte(), _
    offset As Integer, _
    count As Integer _
) As Integer
int Read(
    array<unsigned char>^ buffer,
    int offset,
    int count
)
Parameters
buffer (array< Byte >[]()[])
The byte array to write the input to.
offset (Int32)
The offset in the buffer array to begin writing.
count (Int32)
The number of bytes to read.
Return Value
The number of bytes read.


ReadTimeout Property

ReadTimeout Property
Namespaces ► Modbus.IO ► IStreamResource ► ReadTimeout
Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
int ReadTimeout { get; set; }
Property ReadTimeout As Integer
property int ReadTimeout {
    int get ();
    void set (int value);
}


Write Method (buffer, offset, count)

Write Method (buffer, offset, count)
Namespaces ► Modbus.IO ► IStreamResource ► Write(array<Byte>[]()[], Int32, Int32)
Writes a specified number of bytes to the port from an output buffer, starting at the specified offset.
Declaration Syntax
C# Visual Basic Visual C++
void Write(
    byte[] buffer,
    int offset,
    int count
)
Sub Write ( _
    buffer As Byte(), _
    offset As Integer, _
    count As Integer _
)
void Write(
    array<unsigned char>^ buffer,
    int offset,
    int count
)
Parameters
buffer (array< Byte >[]()[])
The byte array that contains the data to write to the port.
offset (Int32)
The offset in the buffer array to begin writing.
count (Int32)
The number of bytes to write.


WriteTimeout Property

WriteTimeout Property
Namespaces ► Modbus.IO ► IStreamResource ► WriteTimeout
Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
int WriteTimeout { get; set; }
Property WriteTimeout As Integer
property int WriteTimeout {
    int get ();
    void set (int value);
}


ModbusSerialTransport Class

ModbusSerialTransport Class
Namespaces ► Modbus.IO ► ModbusSerialTransport
Transport for Serial protocols. Refined Abstraction - http://en.wikipedia.org/wiki/Bridge_Pattern
Declaration Syntax
C# Visual Basic Visual C++
public abstract class ModbusSerialTransport : ModbusTransport
Public MustInherit Class ModbusSerialTransport _
    Inherits ModbusTransport
public ref class ModbusSerialTransport abstract : public ModbusTransport
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | CheckFrame | Gets or sets a value indicating whether LRC/CRC frame checking is performed on messages.
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from ModbusTransport.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from ModbusTransport.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadTimeout | Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish. (Inherited from ModbusTransport.)
 | Retries | Number of times to retry sending message after encountering a failure such as an IOException, TimeoutException, or a corrupt message. (Inherited from ModbusTransport.)
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WaitToRetryMilliseconds | Gets or sets the number of milliseconds the tranport will wait before retrying a message after receiving an ACKNOWLEGE or SLAVE DEVICE BUSY slave exception response. (Inherited from ModbusTransport.)
 | WriteTimeout | Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish. (Inherited from ModbusTransport.)
Inheritance Hierarchy
Object
 | ModbusTransport
 |  | ModbusSerialTransport


CheckFrame Property

CheckFrame Property
Namespaces ► Modbus.IO ► ModbusSerialTransport ► CheckFrame
Gets or sets a value indicating whether LRC/CRC frame checking is performed on messages.
Declaration Syntax
C# Visual Basic Visual C++
public bool CheckFrame { get; set; }
Public Property CheckFrame As Boolean
public:
property bool CheckFrame {
    bool get ();
    void set (bool value);
}


ModbusTransport Class

ModbusTransport Class
Namespaces ► Modbus.IO ► ModbusTransport
Modbus transport. Abstraction - http://en.wikipedia.org/wiki/Bridge_Pattern
Declaration Syntax
C# Visual Basic Visual C++
public abstract class ModbusTransport : IDisposable
Public MustInherit Class ModbusTransport _
    Implements IDisposable
public ref class ModbusTransport abstract : IDisposable
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadTimeout | Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.
 | Retries | Number of times to retry sending message after encountering a failure such as an IOException, TimeoutException, or a corrupt message.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WaitToRetryMilliseconds | Gets or sets the number of milliseconds the tranport will wait before retrying a message after receiving an ACKNOWLEGE or SLAVE DEVICE BUSY slave exception response.
 | WriteTimeout | Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish.
Inheritance Hierarchy
Object
 | ModbusTransport
 |  | EmptyTransport
 |  | ModbusSerialTransport


Dispose Method

Dispose Method
Namespaces ► Modbus.IO ► ModbusTransport ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


Dispose Method

Dispose Method
Namespaces ► Modbus.IO ► ModbusTransport ► Dispose()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration Syntax
C# Visual Basic Visual C++
public void Dispose()
Public Sub Dispose
public:
virtual void Dispose() sealed


Dispose Method (disposing)

Dispose Method (disposing)
Namespaces ► Modbus.IO ► ModbusTransport ► Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void Dispose(
    bool disposing
)
Protected Overridable Sub Dispose ( _
    disposing As Boolean _
)
protected:
virtual void Dispose(
    bool disposing
)
Parameters
disposing (Boolean)
true to release both managed and unmanaged resources; false to release only unmanaged resources.


ReadTimeout Property

ReadTimeout Property
Namespaces ► Modbus.IO ► ModbusTransport ► ReadTimeout
Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
public int ReadTimeout { get; set; }
Public Property ReadTimeout As Integer
public:
property int ReadTimeout {
    int get ();
    void set (int value);
}


Retries Property

Retries Property
Namespaces ► Modbus.IO ► ModbusTransport ► Retries
Number of times to retry sending message after encountering a failure such as an IOException, TimeoutException, or a corrupt message.
Declaration Syntax
C# Visual Basic Visual C++
public int Retries { get; set; }
Public Property Retries As Integer
public:
property int Retries {
    int get ();
    void set (int value);
}


WaitToRetryMilliseconds Property

WaitToRetryMilliseconds Property
Namespaces ► Modbus.IO ► ModbusTransport ► WaitToRetryMilliseconds
Gets or sets the number of milliseconds the tranport will wait before retrying a message after receiving an ACKNOWLEGE or SLAVE DEVICE BUSY slave exception response.
Declaration Syntax
C# Visual Basic Visual C++
public int WaitToRetryMilliseconds { get; set; }
Public Property WaitToRetryMilliseconds As Integer
public:
property int WaitToRetryMilliseconds {
    int get ();
    void set (int value);
}


WriteTimeout Property

WriteTimeout Property
Namespaces ► Modbus.IO ► ModbusTransport ► WriteTimeout
Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish.
Declaration Syntax
C# Visual Basic Visual C++
public int WriteTimeout { get; set; }
Public Property WriteTimeout As Integer
public:
property int WriteTimeout {
    int get ();
    void set (int value);
}


Modbus.Message Namespace

Modbus.Message Namespace
Namespaces ► Modbus.Message
Modbus messages.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus.Message
Namespace Modbus.Message
namespace Modbus.Message
Types
All Types Interfaces
Icon | Type | Description
 | IModbusMessage | A message built by the master (client) that initiates a Modbus transaction.
 | IModbusRequest | Methods specific to a modbus request message.


IModbusMessage Interface

IModbusMessage Interface
Namespaces ► Modbus.Message ► IModbusMessage
A message built by the master (client) that initiates a Modbus transaction.
Declaration Syntax
C# Visual Basic Visual C++
public interface IModbusMessage
Public Interface IModbusMessage
public interface class IModbusMessage
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | FunctionCode | The function code tells the server what kind of action to perform.
 | Initialize(array<Byte>[]()[]) | Initializes a modbus message from the specified message frame.
 | MessageFrame | Composition of the slave address and protocol data unit.
 | ProtocolDataUnit | Composition of the function code and message data.
 | SlaveAddress | Address of the slave (server).
 | TransactionId | A unique identifier assigned to a message when using the IP protocol.


FunctionCode Property

FunctionCode Property
Namespaces ► Modbus.Message ► IModbusMessage ► FunctionCode
The function code tells the server what kind of action to perform.
Declaration Syntax
C# Visual Basic Visual C++
byte FunctionCode { get; set; }
Property FunctionCode As Byte
property unsigned char FunctionCode {
    unsigned char get ();
    void set (unsigned char value);
}


Initialize Method (frame)

Initialize Method (frame)
Namespaces ► Modbus.Message ► IModbusMessage ► Initialize(array<Byte>[]()[])
Initializes a modbus message from the specified message frame.
Declaration Syntax
C# Visual Basic Visual C++
void Initialize(
    byte[] frame
)
Sub Initialize ( _
    frame As Byte() _
)
void Initialize(
    array<unsigned char>^ frame
)
Parameters
frame (array< Byte >[]()[])
The frame.


MessageFrame Property

MessageFrame Property
Namespaces ► Modbus.Message ► IModbusMessage ► MessageFrame
Composition of the slave address and protocol data unit.
Declaration Syntax
C# Visual Basic Visual C++
byte[] MessageFrame { get; }
ReadOnly Property MessageFrame As Byte()
property array<unsigned char>^ MessageFrame {
    array<unsigned char>^ get ();
}


ProtocolDataUnit Property

ProtocolDataUnit Property
Namespaces ► Modbus.Message ► IModbusMessage ► ProtocolDataUnit
Composition of the function code and message data.
Declaration Syntax
C# Visual Basic Visual C++
byte[] ProtocolDataUnit { get; }
ReadOnly Property ProtocolDataUnit As Byte()
property array<unsigned char>^ ProtocolDataUnit {
    array<unsigned char>^ get ();
}


SlaveAddress Property

SlaveAddress Property
Namespaces ► Modbus.Message ► IModbusMessage ► SlaveAddress
Address of the slave (server).
Declaration Syntax
C# Visual Basic Visual C++
byte SlaveAddress { get; set; }
Property SlaveAddress As Byte
property unsigned char SlaveAddress {
    unsigned char get ();
    void set (unsigned char value);
}


TransactionId Property

TransactionId Property
Namespaces ► Modbus.Message ► IModbusMessage ► TransactionId
A unique identifier assigned to a message when using the IP protocol.
Declaration Syntax
C# Visual Basic Visual C++
ushort TransactionId { get; set; }
Property TransactionId As UShort
property unsigned short TransactionId {
    unsigned short get ();
    void set (unsigned short value);
}


IModbusRequest Interface

IModbusRequest Interface
Namespaces ► Modbus.Message ► IModbusRequest
Methods specific to a modbus request message.
Declaration Syntax
C# Visual Basic Visual C++
public interface IModbusRequest : IModbusMessage
Public Interface IModbusRequest _
    Implements IModbusMessage
public interface class IModbusRequest : IModbusMessage
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | FunctionCode | The function code tells the server what kind of action to perform. (Inherited from IModbusMessage.)
 | Initialize(array<Byte>[]()[]) | Initializes a modbus message from the specified message frame. (Inherited from IModbusMessage.)
 | MessageFrame | Composition of the slave address and protocol data unit. (Inherited from IModbusMessage.)
 | ProtocolDataUnit | Composition of the function code and message data. (Inherited from IModbusMessage.)
 | SlaveAddress | Address of the slave (server). (Inherited from IModbusMessage.)
 | TransactionId | A unique identifier assigned to a message when using the IP protocol. (Inherited from IModbusMessage.)
 | ValidateResponse(IModbusMessage) | Validate the specified response against the current request.


ValidateResponse Method (response)

ValidateResponse Method (response)
Namespaces ► Modbus.Message ► IModbusRequest ► ValidateResponse(IModbusMessage)
Validate the specified response against the current request.
Declaration Syntax
C# Visual Basic Visual C++
void ValidateResponse(
    IModbusMessage response
)
Sub ValidateResponse ( _
    response As IModbusMessage _
)
void ValidateResponse(
    IModbusMessage^ response
)
Parameters
response (IModbusMessage)


Modbus.Utility Namespace

Modbus.Utility Namespace
Namespaces ► Modbus.Utility
Modbus utility methods.
Declaration Syntax
C# Visual Basic Visual C++
namespace Modbus.Utility
Namespace Modbus.Utility
namespace Modbus.Utility
Types
All Types Classes Enumerations Delegates
Icon | Type | Description
 | Action | Generic delegate definition.
 | Action<(Of <(A0>)>) | Generic delegate definition.
 | CollectionUtility | Provides methods for manipulating collections.
 | DiscriminatedUnion<(Of <(TA, TB>)>) | A data type that can store one of two possible strongly typed options.
 | DiscriminatedUnionOption | Possible options for DiscriminatedUnion type
 | Func<(Of <(T>)>) | Generic delegate definition.
 | Func<(Of <(A0, T>)>) | Generic delegate definition.
 | Func<(Of <(A0, A1, T>)>) | Generic delegate definition.
 | FunctionalUtility | Functional utility methods.
 | ModbusUtility | Modbus utility methods.
 | SequenceUtility | Utility class for IEnumerable<T>
 | StringUtility | String utility methods.


Action Delegate

Action Delegate
Namespaces ► Modbus.Utility ► Action
Generic delegate definition.
Declaration Syntax
C# Visual Basic Visual C++
public delegate void Action()
Public Delegate Sub Action
public delegate void Action()


Action(A0) Delegate

Action<(Of <(A0>)>) Delegate
Namespaces ► Modbus.Utility ► Action<(Of <(A0>)>)
Generic delegate definition.
Declaration Syntax
C# Visual Basic Visual C++
public delegate void Action<A0>(
    A0 arg0
)

Public Delegate Sub Action(Of A0) ( _
    arg0 As A0 _
)
generic<typename A0>
public delegate void Action(
    A0 arg0
)
Generic Template Parameters
A0

[Missing <typeparam name="A0"/> documentation for "T:Modbus.Utility.Action`1"]

Parameters
arg0 (A0)


CollectionUtility Class

CollectionUtility Class
Namespaces ► Modbus.Utility ► CollectionUtility
Provides methods for manipulating collections.
Declaration Syntax
C# Visual Basic Visual C++
public static class CollectionUtility
Public NotInheritable Class CollectionUtility
public ref class CollectionUtility abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[]) | Concatenates array1 with array2.
 | Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[], array<array<T>[]()[]>[]()[]) | Concatenates arrays
 | CreateDefaultCollection<(Of <(T, V>)>)(V, Int32) | Creates a collection initialized to a default value.
 | Slice<(Of <(T>)>)(array<T>[]()[], Int32, Int32) | Returns a subset array of type T.
 | Slice<(Of <(T>)>)(ICollection<(Of <(T>)>), Int32, Int32) | Returns a subset array of type T.
 | ToArray<(Of <(T>)>)(ICollection<(Of <(T>)>)) | Returns an ICollection<>'s elements as an array.
 | ToBoolArray(BitArray) | Returns a boolean array representing the values stored in the BitArray.
 | Update<(Of <(T>)>)(IList<(Of <(T>)>), IList<(Of <(T>)>), Int32) | Updates subset of values in a collection.
Inheritance Hierarchy
Object
CollectionUtility


Concat Method

Concat Method
Namespaces ► Modbus.Utility ► CollectionUtility ► Concat()()()
Members
Icon | Member | Description
 | Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[]) | Concatenates array1 with array2.
 | Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[], array<array<T>[]()[]>[]()[]) | Concatenates arrays


Concat Method (array1, array2)

Concat<(Of <(T>)>) Method (array1, array2)
Namespaces ► Modbus.Utility ► CollectionUtility ► Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[])
Concatenates array1 with array2.
Declaration Syntax
C# Visual Basic Visual C++
public static T[] Concat<T>(
    T[] array1,
    T[] array2
)

Public Shared Function Concat(Of T) ( _
    array1 As T(), _
    array2 As T() _
) As T()
public:
generic<typename T>
static array<T>^ Concat(
    array<T>^ array1,
    array<T>^ array2
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.Concat``1(``0[],``0[])"]

Parameters
array1 (array< T >[]()[])
array2 (array< T >[]()[])


Concat Method (array1, array2, additionalArrays)

Concat<(Of <(T>)>) Method (array1, array2, additionalArrays)
Namespaces ► Modbus.Utility ► CollectionUtility ► Concat<(Of <(T>)>)(array<T>[]()[], array<T>[]()[], array<array<T>[]()[]>[]()[])
Concatenates arrays
Declaration Syntax
C# Visual Basic Visual C++
public static T[] Concat<T>(
    T[] array1,
    T[] array2,
    params T[][] additionalArrays
)

Public Shared Function Concat(Of T) ( _
    array1 As T(), _
    array2 As T(), _
    ParamArray additionalArrays As T()() _
) As T()
public:
generic<typename T>
static array<T>^ Concat(
    array<T>^ array1,
    array<T>^ array2,
    ... array<array<T>^>^ additionalArrays
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.Concat``1(``0[],``0[],``0[][])"]

Parameters
array1 (array< T >[]()[])
array2 (array< T >[]()[])
additionalArrays (array< array< T >[]()[] >[]()[])


CreateDefaultCollection Method (defaultValue, size)

CreateDefaultCollection<(Of <(T, V>)>) Method (defaultValue, size)
Namespaces ► Modbus.Utility ► CollectionUtility ► CreateDefaultCollection<(Of <(T, V>)>)(V, Int32)
Creates a collection initialized to a default value.
Declaration Syntax
C# Visual Basic Visual C++
public static T CreateDefaultCollection<T, V>(
    V defaultValue,
    int size
)
where T : new(), Object, ICollection<V>

Public Shared Function CreateDefaultCollection(Of T As {New, Object, ICollection(Of V)}, V) ( _
    defaultValue As V, _
    size As Integer _
) As T
public:
generic<typename T, typename V>
where T : gcnew(), Object, ICollection<V>
static T CreateDefaultCollection(
    V defaultValue,
    int size
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.CreateDefaultCollection``2(``1,System.Int32)"]

V

[Missing <typeparam name="V"/> documentation for "M:Modbus.Utility.CollectionUtility.CreateDefaultCollection``2(``1,System.Int32)"]

Parameters
defaultValue (V)
size (Int32)


Slice Method

Slice Method
Namespaces ► Modbus.Utility ► CollectionUtility ► Slice()()()
Members
Icon | Member | Description
 | Slice<(Of <(T>)>)(array<T>[]()[], Int32, Int32) | Returns a subset array of type T.
 | Slice<(Of <(T>)>)(ICollection<(Of <(T>)>), Int32, Int32) | Returns a subset array of type T.


Slice Method (collection, startIndex, size)

Slice<(Of <(T>)>) Method (collection, startIndex, size)
Namespaces ► Modbus.Utility ► CollectionUtility ► Slice<(Of <(T>)>)(ICollection<(Of <(T>)>), Int32, Int32)
Returns a subset array of type T.
Declaration Syntax
C# Visual Basic Visual C++
public static T[] Slice<T>(
    ICollection<T> collection,
    int startIndex,
    int size
)

Public Shared Function Slice(Of T) ( _
    collection As ICollection(Of T), _
    startIndex As Integer, _
    size As Integer _
) As T()
public:
generic<typename T>
static array<T>^ Slice(
    ICollection<T>^ collection,
    int startIndex,
    int size
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.Slice``1(System.Collections.Generic.ICollection{``0},System.Int32,System.Int32)"]

Parameters
collection (ICollection <(Of <(T>)>))
startIndex (Int32)
size (Int32)


Slice Method (collection, startIndex, size)

Slice<(Of <(T>)>) Method (collection, startIndex, size)
Namespaces ► Modbus.Utility ► CollectionUtility ► Slice<(Of <(T>)>)(array<T>[]()[], Int32, Int32)
Returns a subset array of type T.
Declaration Syntax
C# Visual Basic Visual C++
public static T[] Slice<T>(
    T[] collection,
    int startIndex,
    int size
)

Public Shared Function Slice(Of T) ( _
    collection As T(), _
    startIndex As Integer, _
    size As Integer _
) As T()
public:
generic<typename T>
static array<T>^ Slice(
    array<T>^ collection,
    int startIndex,
    int size
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.Slice``1(``0[],System.Int32,System.Int32)"]

Parameters
collection (array< T >[]()[])
startIndex (Int32)
size (Int32)


ToArray Method (collection)

ToArray<(Of <(T>)>) Method (collection)
Namespaces ► Modbus.Utility ► CollectionUtility ► ToArray<(Of <(T>)>)(ICollection<(Of <(T>)>))
Returns an ICollection<>'s elements as an array.
Declaration Syntax
C# Visual Basic Visual C++
public static T[] ToArray<T>(
    ICollection<T> collection
)

Public Shared Function ToArray(Of T) ( _
    collection As ICollection(Of T) _
) As T()
public:
generic<typename T>
static array<T>^ ToArray(
    ICollection<T>^ collection
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.ToArray``1(System.Collections.Generic.ICollection{``0})"]

Parameters
collection (ICollection <(Of <(T>)>))


ToBoolArray Method (bitArray)

ToBoolArray Method (bitArray)
Namespaces ► Modbus.Utility ► CollectionUtility ► ToBoolArray(BitArray)
Returns a boolean array representing the values stored in the BitArray.
Declaration Syntax
C# Visual Basic Visual C++
public static bool[] ToBoolArray(
    BitArray bitArray
)
Public Shared Function ToBoolArray ( _
    bitArray As BitArray _
) As Boolean()
public:
static array<bool>^ ToBoolArray(
    BitArray^ bitArray
)
Parameters
bitArray (BitArray)


Update Method (items, destination, startIndex)

Update<(Of <(T>)>) Method (items, destination, startIndex)
Namespaces ► Modbus.Utility ► CollectionUtility ► Update<(Of <(T>)>)(IList<(Of <(T>)>), IList<(Of <(T>)>), Int32)
Updates subset of values in a collection.
Declaration Syntax
C# Visual Basic Visual C++
public static void Update<T>(
    IList<T> items,
    IList<T> destination,
    int startIndex
)

Public Shared Sub Update(Of T) ( _
    items As IList(Of T), _
    destination As IList(Of T), _
    startIndex As Integer _
)
public:
generic<typename T>
static void Update(
    IList<T>^ items,
    IList<T>^ destination,
    int startIndex
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.CollectionUtility.Update``1(System.Collections.Generic.IList{``0},System.Collections.Generic.IList{``0},System.Int32)"]

Parameters
items (IList <(Of <(T>)>))
destination (IList <(Of <(T>)>))
startIndex (Int32)


DiscriminatedUnion(TA, TB) Class

DiscriminatedUnion<(Of <(TA, TB>)>) Class
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>)
A data type that can store one of two possible strongly typed options.
Declaration Syntax
C# Visual Basic Visual C++
public class DiscriminatedUnion<TA, TB>

Public Class DiscriminatedUnion(Of TA, TB)
generic<typename TA, typename TB>
public ref class DiscriminatedUnion
Generic Template Parameters
TA
The type of option A.
TB
The type of option B.
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DiscriminatedUnion<(Of <(TA, TB>)>)()()() | Initializes a new instance of the DiscriminatedUnion<(Of <(TA, TB>)>) class
 | A | Gets the value of option A.
 | B | Gets the value of option B.
 | CreateA(TA) | Factory method for creating DiscriminatedUnion with option A set.
 | CreateB(TB) | Factory method for creating DiscriminatedUnion with option B set.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Option | Gets the discriminated value option set for this instance.
 | ToString()()() | Returns a String that represents the current Object. (Overrides Object.ToString()()().)
Inheritance Hierarchy
Object
DiscriminatedUnion<(Of <(TA, TB>)>)


DiscriminatedUnion(TA, TB) Constructor

DiscriminatedUnion<(Of <(TA, TB>)>) Constructor
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► DiscriminatedUnion<(Of <(TA, TB>)>)()()()
Initializes a new instance of the DiscriminatedUnion<(Of <(TA, TB>)>) class
Declaration Syntax
C# Visual Basic Visual C++
public DiscriminatedUnion()
Public Sub New
public:
DiscriminatedUnion()


A Property

A Property
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► A
Gets the value of option A.
Declaration Syntax
C# Visual Basic Visual C++
public TA A { get; }
Public ReadOnly Property A As TA
public:
property TA A {
    TA get ();
}


B Property

B Property
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► B
Gets the value of option B.
Declaration Syntax
C# Visual Basic Visual C++
public TB B { get; }
Public ReadOnly Property B As TB
public:
property TB B {
    TB get ();
}


CreateA Method (a)

CreateA Method (a)
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► CreateA(TA)
Factory method for creating DiscriminatedUnion with option A set.
Declaration Syntax
C# Visual Basic Visual C++
public static DiscriminatedUnion<TA, TB> CreateA(
    TA a
)
Public Shared Function CreateA ( _
    a As TA _
) As DiscriminatedUnion(Of TA, TB)
public:
static DiscriminatedUnion<TA, TB>^ CreateA(
    TA a
)
Parameters
a (TA)


CreateB Method (b)

CreateB Method (b)
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► CreateB(TB)
Factory method for creating DiscriminatedUnion with option B set.
Declaration Syntax
C# Visual Basic Visual C++
public static DiscriminatedUnion<TA, TB> CreateB(
    TB b
)
Public Shared Function CreateB ( _
    b As TB _
) As DiscriminatedUnion(Of TA, TB)
public:
static DiscriminatedUnion<TA, TB>^ CreateB(
    TB b
)
Parameters
b (TB)


Option Property

Option Property
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► Option
Gets the discriminated value option set for this instance.
Declaration Syntax
C# Visual Basic Visual C++
public DiscriminatedUnionOption Option { get; }
Public ReadOnly Property Option As DiscriminatedUnionOption
public:
property DiscriminatedUnionOption Option {
    DiscriminatedUnionOption get ();
}


ToString Method

ToString Method
Namespaces ► Modbus.Utility ► DiscriminatedUnion<(Of <(TA, TB>)>) ► ToString()()()
Returns a String that represents the current Object.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents the current Object.


DiscriminatedUnionOption Enumeration

DiscriminatedUnionOption Enumeration
Namespaces ► Modbus.Utility ► DiscriminatedUnionOption
Possible options for DiscriminatedUnion type
Declaration Syntax
C# Visual Basic Visual C++
public enum DiscriminatedUnionOption
Public Enumeration DiscriminatedUnionOption
public enum class DiscriminatedUnionOption
Members
Member | Description
A | Option A
B | Option B


Func(T) Delegate

Func<(Of <(T>)>) Delegate
Namespaces ► Modbus.Utility ► Func<(Of <(T>)>)
Generic delegate definition.
Declaration Syntax
C# Visual Basic Visual C++
public delegate T Func<T>()

Public Delegate Function Func(Of T) As T
generic<typename T>
public delegate T Func()
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "T:Modbus.Utility.Func`1"]


Func(A0, T) Delegate

Func<(Of <(A0, T>)>) Delegate
Namespaces ► Modbus.Utility ► Func<(Of <(A0, T>)>)
Generic delegate definition.
Declaration Syntax
C# Visual Basic Visual C++
public delegate T Func<A0, T>(
    A0 arg0
)

Public Delegate Function Func(Of A0, T) ( _
    arg0 As A0 _
) As T
generic<typename A0, typename T>
public delegate T Func(
    A0 arg0
)
Generic Template Parameters
A0

[Missing <typeparam name="A0"/> documentation for "T:Modbus.Utility.Func`2"]

T

[Missing <typeparam name="T"/> documentation for "T:Modbus.Utility.Func`2"]

Parameters
arg0 (A0)


Func(A0, A1, T) Delegate

Func<(Of <(A0, A1, T>)>) Delegate
Namespaces ► Modbus.Utility ► Func<(Of <(A0, A1, T>)>)
Generic delegate definition.
Declaration Syntax
C# Visual Basic Visual C++
public delegate T Func<A0, A1, T>(
    A0 arg0,
    A1 arg1
)

Public Delegate Function Func(Of A0, A1, T) ( _
    arg0 As A0, _
    arg1 As A1 _
) As T
generic<typename A0, typename A1, typename T>
public delegate T Func(
    A0 arg0,
    A1 arg1
)
Generic Template Parameters
A0

[Missing <typeparam name="A0"/> documentation for "T:Modbus.Utility.Func`3"]

A1

[Missing <typeparam name="A1"/> documentation for "T:Modbus.Utility.Func`3"]

T

[Missing <typeparam name="T"/> documentation for "T:Modbus.Utility.Func`3"]

Parameters
arg0 (A0)
arg1 (A1)


FunctionalUtility Class

FunctionalUtility Class
Namespaces ► Modbus.Utility ► FunctionalUtility
Functional utility methods.
Declaration Syntax
C# Visual Basic Visual C++
public static class FunctionalUtility
Public NotInheritable Class FunctionalUtility
public ref class FunctionalUtility abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Memoize<(Of <(T>)>)(Func<(Of <(T>)>)) | Memoizes the given function.
 | Memoize<(Of <(TInput, TOutput>)>)(Func<(Of <(TInput, TOutput>)>)) | Memoizes the given function.
 | Memoize<(Of <(TInput, TKey, TOutput>)>)(Func<(Of <(TInput, TOutput>)>), Func<(Of <(TInput, TKey>)>)) | Memoizes the given function.
Inheritance Hierarchy
Object
FunctionalUtility


Memoize Method

Memoize Method
Namespaces ► Modbus.Utility ► FunctionalUtility ► Memoize()()()
Members
Icon | Member | Description
 | Memoize<(Of <(T>)>)(Func<(Of <(T>)>)) | Memoizes the given function.
 | Memoize<(Of <(TInput, TOutput>)>)(Func<(Of <(TInput, TOutput>)>)) | Memoizes the given function.
 | Memoize<(Of <(TInput, TKey, TOutput>)>)(Func<(Of <(TInput, TOutput>)>), Func<(Of <(TInput, TKey>)>)) | Memoizes the given function.


Memoize Method (generator)

Memoize<(Of <(T>)>) Method (generator)
Namespaces ► Modbus.Utility ► FunctionalUtility ► Memoize<(Of <(T>)>)(Func<(Of <(T>)>))
Memoizes the given function.
Declaration Syntax
C# Visual Basic Visual C++
public static Func<T> Memoize<T>(
    Func<T> generator
)

Public Shared Function Memoize(Of T) ( _
    generator As Func(Of T) _
) As Func(Of T)
public:
generic<typename T>
static Func<T>^ Memoize(
    Func<T>^ generator
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``1(Modbus.Utility.Func{``0})"]

Parameters
generator (Func <(Of <(T>)>))


Memoize Method (generator)

Memoize<(Of <(TInput, TOutput>)>) Method (generator)
Namespaces ► Modbus.Utility ► FunctionalUtility ► Memoize<(Of <(TInput, TOutput>)>)(Func<(Of <(TInput, TOutput>)>))
Memoizes the given function.
Declaration Syntax
C# Visual Basic Visual C++
public static Func<TInput, TOutput> Memoize<TInput, TOutput>(
    Func<TInput, TOutput> generator
)

Public Shared Function Memoize(Of TInput, TOutput) ( _
    generator As Func(Of TInput, TOutput) _
) As Func(Of TInput, TOutput)
public:
generic<typename TInput, typename TOutput>
static Func<TInput, TOutput>^ Memoize(
    Func<TInput, TOutput>^ generator
)
Generic Template Parameters
TInput

[Missing <typeparam name="TInput"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``2(Modbus.Utility.Func{``0,``1})"]

TOutput

[Missing <typeparam name="TOutput"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``2(Modbus.Utility.Func{``0,``1})"]

Parameters
generator (Func <(Of <(TInput, TOutput>)>))


Memoize Method (generator, keySelector)

Memoize<(Of <(TInput, TKey, TOutput>)>) Method (generator, keySelector)
Namespaces ► Modbus.Utility ► FunctionalUtility ► Memoize<(Of <(TInput, TKey, TOutput>)>)(Func<(Of <(TInput, TOutput>)>), Func<(Of <(TInput, TKey>)>))
Memoizes the given function.
Declaration Syntax
C# Visual Basic Visual C++
public static Func<TInput, TOutput> Memoize<TInput, TKey, TOutput>(
    Func<TInput, TOutput> generator,
    Func<TInput, TKey> keySelector
)

Public Shared Function Memoize(Of TInput, TKey, TOutput) ( _
    generator As Func(Of TInput, TOutput), _
    keySelector As Func(Of TInput, TKey) _
) As Func(Of TInput, TOutput)
public:
generic<typename TInput, typename TKey, typename TOutput>
static Func<TInput, TOutput>^ Memoize(
    Func<TInput, TOutput>^ generator,
    Func<TInput, TKey>^ keySelector
)
Generic Template Parameters
TInput

[Missing <typeparam name="TInput"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``3(Modbus.Utility.Func{``0,``2},Modbus.Utility.Func{``0,``1})"]

TKey

[Missing <typeparam name="TKey"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``3(Modbus.Utility.Func{``0,``2},Modbus.Utility.Func{``0,``1})"]

TOutput

[Missing <typeparam name="TOutput"/> documentation for "M:Modbus.Utility.FunctionalUtility.Memoize``3(Modbus.Utility.Func{``0,``2},Modbus.Utility.Func{``0,``1})"]

Parameters
generator (Func <(Of <(TInput, TOutput>)>))
keySelector (Func <(Of <(TInput, TKey>)>))


ModbusUtility Class

ModbusUtility Class
Namespaces ► Modbus.Utility ► ModbusUtility
Modbus utility methods.
Declaration Syntax
C# Visual Basic Visual C++
public static class ModbusUtility
Public NotInheritable Class ModbusUtility
public ref class ModbusUtility abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | CalculateCrc(array<Byte>[]()[]) | Calculate Cyclical Redundancy Check
 | CalculateLrc(array<Byte>[]()[]) | Calculate Longitudinal Redundancy Check.
 | GetAsciiBytes(array<Byte>[]()[]) | Converts an array of bytes to an ASCII byte array
 | GetAsciiBytes(array<UInt16>[]()[]) | Converts an array of UInt16 to an ASCII byte array
 | GetSingle(UInt16, UInt16) | Converts two UInt16 values into a IEEE 32 floating point format
 | GetUInt32(UInt16, UInt16) | Converts two UInt16 values into a UInt32
 | HexToBytes(String) | Converts a hex string to a byte array.
 | NetworkBytesToHostUInt16(array<Byte>[]()[]) | Converts a network order byte array to an array of UInt16 values in host order
Inheritance Hierarchy
Object
ModbusUtility


CalculateCrc Method (data)

CalculateCrc Method (data)
Namespaces ► Modbus.Utility ► ModbusUtility ► CalculateCrc(array<Byte>[]()[])
Calculate Cyclical Redundancy Check
Declaration Syntax
C# Visual Basic Visual C++
public static byte[] CalculateCrc(
    byte[] data
)
Public Shared Function CalculateCrc ( _
    data As Byte() _
) As Byte()
public:
static array<unsigned char>^ CalculateCrc(
    array<unsigned char>^ data
)
Parameters
data (array< Byte >[]()[])
The data used in CRC
Return Value
CRC value


CalculateLrc Method (data)

CalculateLrc Method (data)
Namespaces ► Modbus.Utility ► ModbusUtility ► CalculateLrc(array<Byte>[]()[])
Calculate Longitudinal Redundancy Check.
Declaration Syntax
C# Visual Basic Visual C++
public static byte CalculateLrc(
    byte[] data
)
Public Shared Function CalculateLrc ( _
    data As Byte() _
) As Byte
public:
static unsigned char CalculateLrc(
    array<unsigned char>^ data
)
Parameters
data (array< Byte >[]()[])
The data used in LRC
Return Value
LRC value


GetAsciiBytes Method

GetAsciiBytes Method
Namespaces ► Modbus.Utility ► ModbusUtility ► GetAsciiBytes()()()
Members
Icon | Member | Description
 | GetAsciiBytes(array<Byte>[]()[]) | Converts an array of bytes to an ASCII byte array
 | GetAsciiBytes(array<UInt16>[]()[]) | Converts an array of UInt16 to an ASCII byte array


GetAsciiBytes Method (numbers)

GetAsciiBytes Method (numbers)
Namespaces ► Modbus.Utility ► ModbusUtility ► GetAsciiBytes(array<Byte>[]()[])
Converts an array of bytes to an ASCII byte array
Declaration Syntax
C# Visual Basic Visual C++
public static byte[] GetAsciiBytes(
    params byte[] numbers
)
Public Shared Function GetAsciiBytes ( _
    ParamArray numbers As Byte() _
) As Byte()
public:
static array<unsigned char>^ GetAsciiBytes(
    ... array<unsigned char>^ numbers
)
Parameters
numbers (array< Byte >[]()[])
The byte array
Return Value
An array of ASCII byte values


GetAsciiBytes Method (numbers)

GetAsciiBytes Method (numbers)
Namespaces ► Modbus.Utility ► ModbusUtility ► GetAsciiBytes(array<UInt16>[]()[])
Converts an array of UInt16 to an ASCII byte array
Declaration Syntax
C# Visual Basic Visual C++
public static byte[] GetAsciiBytes(
    params ushort[] numbers
)
Public Shared Function GetAsciiBytes ( _
    ParamArray numbers As UShort() _
) As Byte()
public:
static array<unsigned char>^ GetAsciiBytes(
    ... array<unsigned short>^ numbers
)
Parameters
numbers (array< UInt16 >[]()[])
The ushort array
Return Value
An array of ASCII byte values


GetSingle Method (highOrderValue, lowOrderValue)

GetSingle Method (highOrderValue, lowOrderValue)
Namespaces ► Modbus.Utility ► ModbusUtility ► GetSingle(UInt16, UInt16)
Converts two UInt16 values into a IEEE 32 floating point format
Declaration Syntax
C# Visual Basic Visual C++
public static float GetSingle(
    ushort highOrderValue,
    ushort lowOrderValue
)
Public Shared Function GetSingle ( _
    highOrderValue As UShort, _
    lowOrderValue As UShort _
) As Single
public:
static float GetSingle(
    unsigned short highOrderValue,
    unsigned short lowOrderValue
)
Parameters
highOrderValue (UInt16)
High order ushort value
lowOrderValue (UInt16)
Low order ushort value
Return Value
IEEE 32 floating point value


GetUInt32 Method (highOrderValue, lowOrderValue)

GetUInt32 Method (highOrderValue, lowOrderValue)
Namespaces ► Modbus.Utility ► ModbusUtility ► GetUInt32(UInt16, UInt16)
Converts two UInt16 values into a UInt32
Declaration Syntax
C# Visual Basic Visual C++
public static uint GetUInt32(
    ushort highOrderValue,
    ushort lowOrderValue
)
Public Shared Function GetUInt32 ( _
    highOrderValue As UShort, _
    lowOrderValue As UShort _
) As UInteger
public:
static unsigned int GetUInt32(
    unsigned short highOrderValue,
    unsigned short lowOrderValue
)
Parameters
highOrderValue (UInt16)
lowOrderValue (UInt16)
Return Value


HexToBytes Method (hex)

HexToBytes Method (hex)
Namespaces ► Modbus.Utility ► ModbusUtility ► HexToBytes(String)
Converts a hex string to a byte array.
Declaration Syntax
C# Visual Basic Visual C++
public static byte[] HexToBytes(
    string hex
)
Public Shared Function HexToBytes ( _
    hex As String _
) As Byte()
public:
static array<unsigned char>^ HexToBytes(
    String^ hex
)
Parameters
hex (String)
The hex string
Return Value
Array of bytes


NetworkBytesToHostUInt16 Method (networkBytes)

NetworkBytesToHostUInt16 Method (networkBytes)
Namespaces ► Modbus.Utility ► ModbusUtility ► NetworkBytesToHostUInt16(array<Byte>[]()[])
Converts a network order byte array to an array of UInt16 values in host order
Declaration Syntax
C# Visual Basic Visual C++
public static ushort[] NetworkBytesToHostUInt16(
    byte[] networkBytes
)
Public Shared Function NetworkBytesToHostUInt16 ( _
    networkBytes As Byte() _
) As UShort()
public:
static array<unsigned short>^ NetworkBytesToHostUInt16(
    array<unsigned char>^ networkBytes
)
Parameters
networkBytes (array< Byte >[]()[])
The network order byte array
Return Value
The host order ushort array


SequenceUtility Class

SequenceUtility Class
Namespaces ► Modbus.Utility ► SequenceUtility
Utility class for IEnumerable<T>
Declaration Syntax
C# Visual Basic Visual C++
public class SequenceUtility
Public Class SequenceUtility
public ref class SequenceUtility
Members
All Members | Constructors | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | SequenceUtility()()() | Initializes a new instance of the SequenceUtility class
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToList<(Of <(T>)>)(IEnumerable<(Of <(T>)>)) | Builds an IList<T> from an IEnumerable<T> sequence.
 | ToList<(Of <(T, V>)>)(IEnumerable<(Of <(T>)>), Func<(Of <(T, V>)>)) | Builds an IList<T> from an IEnumerable<T> sequence.
 | ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
SequenceUtility


SequenceUtility Constructor

SequenceUtility Constructor
Namespaces ► Modbus.Utility ► SequenceUtility ► SequenceUtility()()()
Initializes a new instance of the SequenceUtility class
Declaration Syntax
C# Visual Basic Visual C++
public SequenceUtility()
Public Sub New
public:
SequenceUtility()


ToList Method

ToList Method
Namespaces ► Modbus.Utility ► SequenceUtility ► ToList()()()
Members
Icon | Member | Description
 | ToList<(Of <(T>)>)(IEnumerable<(Of <(T>)>)) | Builds an IList<T> from an IEnumerable<T> sequence.
 | ToList<(Of <(T, V>)>)(IEnumerable<(Of <(T>)>), Func<(Of <(T, V>)>)) | Builds an IList<T> from an IEnumerable<T> sequence.


ToList Method (sequence)

ToList<(Of <(T>)>) Method (sequence)
Namespaces ► Modbus.Utility ► SequenceUtility ► ToList<(Of <(T>)>)(IEnumerable<(Of <(T>)>))
Builds an IList<T> from an IEnumerable<T> sequence.
Declaration Syntax
C# Visual Basic Visual C++
public static IList<T> ToList<T>(
    IEnumerable<T> sequence
)

Public Shared Function ToList(Of T) ( _
    sequence As IEnumerable(Of T) _
) As IList(Of T)
public:
generic<typename T>
static IList<T>^ ToList(
    IEnumerable<T>^ sequence
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.SequenceUtility.ToList``1(System.Collections.Generic.IEnumerable{``0})"]

Parameters
sequence (IEnumerable <(Of <(T>)>))


ToList Method (sequence, projection)

ToList<(Of <(T, V>)>) Method (sequence, projection)
Namespaces ► Modbus.Utility ► SequenceUtility ► ToList<(Of <(T, V>)>)(IEnumerable<(Of <(T>)>), Func<(Of <(T, V>)>))
Builds an IList<T> from an IEnumerable<T> sequence.
Declaration Syntax
C# Visual Basic Visual C++
public static IList<V> ToList<T, V>(
    IEnumerable<T> sequence,
    Func<T, V> projection
)

Public Shared Function ToList(Of T, V) ( _
    sequence As IEnumerable(Of T), _
    projection As Func(Of T, V) _
) As IList(Of V)
public:
generic<typename T, typename V>
static IList<V>^ ToList(
    IEnumerable<T>^ sequence,
    Func<T, V>^ projection
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.SequenceUtility.ToList``2(System.Collections.Generic.IEnumerable{``0},Modbus.Utility.Func{``0,``1})"]

V

[Missing <typeparam name="V"/> documentation for "M:Modbus.Utility.SequenceUtility.ToList``2(System.Collections.Generic.IEnumerable{``0},Modbus.Utility.Func{``0,``1})"]

Parameters
sequence (IEnumerable <(Of <(T>)>))
projection (Func <(Of <(T, V>)>))


StringUtility Class

StringUtility Class
Namespaces ► Modbus.Utility ► StringUtility
String utility methods.
Declaration Syntax
C# Visual Basic Visual C++
public static class StringUtility
Public NotInheritable Class StringUtility
public ref class StringUtility abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>)) | Concatenates a specified separator String between each element of a specified collection, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>), Converter<(Of <(T, String>)>)) | Concatenates a specified separator String between each converted element of a specified collection, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, array<T>[]()[]) | Concatenates a specified separator String between each element of a specified array, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, array<T>[]()[], Converter<(Of <(T, String>)>)) | Concatenates a specified separator String between each converted element of a specified array, yielding a single concatenated string.
Inheritance Hierarchy
Object
StringUtility


Join Method

Join Method
Namespaces ► Modbus.Utility ► StringUtility ► Join()()()
Members
Icon | Member | Description
 | Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>)) | Concatenates a specified separator String between each element of a specified collection, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>), Converter<(Of <(T, String>)>)) | Concatenates a specified separator String between each converted element of a specified collection, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, array<T>[]()[]) | Concatenates a specified separator String between each element of a specified array, yielding a single concatenated string.
 | Join<(Of <(T>)>)(String, array<T>[]()[], Converter<(Of <(T, String>)>)) | Concatenates a specified separator String between each converted element of a specified array, yielding a single concatenated string.


Join Method (separator, collection)

Join<(Of <(T>)>) Method (separator, collection)
Namespaces ► Modbus.Utility ► StringUtility ► Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>))
Concatenates a specified separator String between each element of a specified collection, yielding a single concatenated string.
Declaration Syntax
C# Visual Basic Visual C++
public static string Join<T>(
    string separator,
    ICollection<T> collection
)

Public Shared Function Join(Of T) ( _
    separator As String, _
    collection As ICollection(Of T) _
) As String
public:
generic<typename T>
static String^ Join(
    String^ separator,
    ICollection<T>^ collection
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.StringUtility.Join``1(System.String,System.Collections.Generic.ICollection{``0})"]

Parameters
separator (String)
collection (ICollection <(Of <(T>)>))


Join Method (separator, collection, conversion)

Join<(Of <(T>)>) Method (separator, collection, conversion)
Namespaces ► Modbus.Utility ► StringUtility ► Join<(Of <(T>)>)(String, ICollection<(Of <(T>)>), Converter<(Of <(T, String>)>))
Concatenates a specified separator String between each converted element of a specified collection, yielding a single concatenated string.
Declaration Syntax
C# Visual Basic Visual C++
public static string Join<T>(
    string separator,
    ICollection<T> collection,
    Converter<T, string> conversion
)

Public Shared Function Join(Of T) ( _
    separator As String, _
    collection As ICollection(Of T), _
    conversion As Converter(Of T, String) _
) As String
public:
generic<typename T>
static String^ Join(
    String^ separator,
    ICollection<T>^ collection,
    Converter<T, String^>^ conversion
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.StringUtility.Join``1(System.String,System.Collections.Generic.ICollection{``0},System.Converter{``0,System.String})"]

Parameters
separator (String)
collection (ICollection <(Of <(T>)>))
conversion (Converter <(Of <(T, String >)>))


Join Method (separator, collection)

Join<(Of <(T>)>) Method (separator, collection)
Namespaces ► Modbus.Utility ► StringUtility ► Join<(Of <(T>)>)(String, array<T>[]()[])
Concatenates a specified separator String between each element of a specified array, yielding a single concatenated string.
Declaration Syntax
C# Visual Basic Visual C++
public static string Join<T>(
    string separator,
    T[] collection
)

Public Shared Function Join(Of T) ( _
    separator As String, _
    collection As T() _
) As String
public:
generic<typename T>
static String^ Join(
    String^ separator,
    array<T>^ collection
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.StringUtility.Join``1(System.String,``0[])"]

Parameters
separator (String)
collection (array< T >[]()[])


Join Method (separator, collection, conversion)

Join<(Of <(T>)>) Method (separator, collection, conversion)
Namespaces ► Modbus.Utility ► StringUtility ► Join<(Of <(T>)>)(String, array<T>[]()[], Converter<(Of <(T, String>)>))
Concatenates a specified separator String between each converted element of a specified array, yielding a single concatenated string.
Declaration Syntax
C# Visual Basic Visual C++
public static string Join<T>(
    string separator,
    T[] collection,
    Converter<T, string> conversion
)

Public Shared Function Join(Of T) ( _
    separator As String, _
    collection As T(), _
    conversion As Converter(Of T, String) _
) As String
public:
generic<typename T>
static String^ Join(
    String^ separator,
    array<T>^ collection,
    Converter<T, String^>^ conversion
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "M:Modbus.Utility.StringUtility.Join``1(System.String,``0[],System.Converter{``0,System.String})"]

Parameters
separator (String)
collection (array< T >[]()[])
conversion (Converter <(Of <(T, String >)>))


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusSlave ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


WriteMultipleCoils Method

WriteMultipleCoils Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteMultipleCoils()()()
Members
Icon | Member | Description
 | WriteMultipleCoils(UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value.
 | WriteMultipleCoils(Byte, UInt16, array<Boolean>[]()[]) | Force each coil in a sequence of coils to a provided value.


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusTcpSlave ► Dispose()()()
Members
Icon | Member | Description
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Overrides ModbusDevice.Dispose(Boolean).)
 | Dispose()()() | Releases unmanaged and - optionally - managed resources


ReadInputs Method

ReadInputs Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadInputs()()()
Members
Icon | Member | Description
 | ReadInputs(UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status.
 | ReadInputs(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous discrete input status.


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusUdpSlave ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


WriteSingleRegister Method

WriteSingleRegister Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteSingleRegister()()()
Members
Icon | Member | Description
 | WriteSingleRegister(UInt16, UInt16) | Write a single holding register.
 | WriteSingleRegister(Byte, UInt16, UInt16) | Write a single holding register.


Transport Property

Transport Property
Namespaces ► Modbus.Device ► IModbusSerialMaster ► Transport
Members
Icon | Member | Description
 | Transport | Transport for used by this master.
 | Transport | Transport for used by this master.


WriteSingleCoil Method

WriteSingleCoil Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteSingleCoil()()()
Members
Icon | Member | Description
 | WriteSingleCoil(UInt16, Boolean) | Write a single coil value.
 | WriteSingleCoil(Byte, UInt16, Boolean) | Write a single coil value.


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusSerialSlave ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


ReadWriteMultipleRegisters Method

ReadWriteMultipleRegisters Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadWriteMultipleRegisters()()()
Members
Icon | Member | Description
 | ReadWriteMultipleRegisters(UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single MODBUS transaction. The write operation is performed before the read. Message uses default TCP slave id of 0.
 | ReadWriteMultipleRegisters(Byte, UInt16, UInt16, UInt16, array<UInt16>[]()[]) | Performs a combination of one read operation and one write operation in a single Modbus transaction. The write operation is performed before the read.


ReadCoils Method

ReadCoils Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadCoils()()()
Members
Icon | Member | Description
 | ReadCoils(UInt16, UInt16) | Read from 1 to 2000 contiguous coils status.
 | ReadCoils(Byte, UInt16, UInt16) | Read from 1 to 2000 contiguous coils status.


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusSerialMaster ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


WriteMultipleRegisters Method

WriteMultipleRegisters Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► WriteMultipleRegisters()()()
Members
Icon | Member | Description
 | WriteMultipleRegisters(UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers.
 | WriteMultipleRegisters(Byte, UInt16, array<UInt16>[]()[]) | Write a block of 1 to 123 contiguous registers.


Dispose Method

Dispose Method
Namespaces ► Modbus.Device ► ModbusMaster ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Releases unmanaged and - optionally - managed resources
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


Dispose Method

Dispose Method
Namespaces ► Modbus.IO ► EmptyTransport ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


Dispose Method

Dispose Method
Namespaces ► Modbus.IO ► ModbusSerialTransport ► Dispose()()()
Members
Icon | Member | Description
 | Dispose()()() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources


ReadHoldingRegisters Method

ReadHoldingRegisters Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadHoldingRegisters()()()
Members
Icon | Member | Description
 | ReadHoldingRegisters(UInt16, UInt16) | Read contiguous block of holding registers.
 | ReadHoldingRegisters(Byte, UInt16, UInt16) | Read contiguous block of holding registers.


ReadInputRegisters Method

ReadInputRegisters Method
Namespaces ► Modbus.Device ► ModbusIpMaster ► ReadInputRegisters()()()
Members
Icon | Member | Description
 | ReadInputRegisters(UInt16, UInt16) | Read contiguous block of input registers.
 | ReadInputRegisters(Byte, UInt16, UInt16) | Read contiguous block of input registers.