Show / Hide Table of Contents

Interface IStreamResource

Represents a serial resource. Implementor - http://en.wikipedia.org/wiki/Bridge_Pattern

Inherited Members
System.IDisposable.Dispose()
Namespace: NModbus.IO
Assembly: NModbus.dll
Syntax
public interface IStreamResource : IDisposable

Properties

| Improve this Doc View Source

InfiniteTimeout

Indicates that no timeout should occur.

Declaration
int InfiniteTimeout { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

ReadTimeout

Gets or sets the number of milliseconds before a timeout occurs when a read operation does not finish.

Declaration
int ReadTimeout { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

WriteTimeout

Gets or sets the number of milliseconds before a timeout occurs when a write operation does not finish.

Declaration
int WriteTimeout { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

DiscardInBuffer()

Purges the receive buffer.

Declaration
void DiscardInBuffer()
| Improve this Doc View Source

Read(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
int Read(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer

The byte array to write the input to.

System.Int32 offset

The offset in the buffer array to begin writing.

System.Int32 count

The number of bytes to read.

Returns
Type Description
System.Int32

The number of bytes read.

| Improve this Doc View Source

Write(Byte[], Int32, Int32)

Writes a specified number of bytes to the port from an output buffer, starting at the specified offset.

Declaration
void Write(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer

The byte array that contains the data to write to the port.

System.Int32 offset

The offset in the buffer array to begin writing.

System.Int32 count

The number of bytes to write.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX