AdsBinaryReader Class

Derives from BinaryReader and reads primitive as well as PLC data types as binary values.

Inheritance Hierarchy

System.Object
  System.IO.BinaryReader
    TwinCAT.Ads.AdsBinaryReader
Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

public class AdsBinaryReader : BinaryReader

VB

Public Class AdsBinaryReader
    Inherits BinaryReader

The AdsBinaryReader type exposes the following members.

Constructors

 

Name

Description

AdsBinaryReader Class 1:

AdsBinaryReader

Initializes a new instance of the AdsBinaryReader class based on the supplied stream.

Properties

 

Name

Description

AdsBinaryReader Class 2:

BaseStream

Exposes access to the underlying stream of the BinaryReader. (Inherited from BinaryReader.)

Methods

 

Name

Description

AdsBinaryReader Class 3:

Close

Closes the current reader and the underlying stream. (Inherited from BinaryReader.)

AdsBinaryReader Class 4:

Dispose.

Releases all resources used by the current instance of the BinaryReader class. (Inherited from BinaryReader.)

AdsBinaryReader Class 5:

Dispose(Boolean)

Releases the unmanaged resources used by the BinaryReader class and optionally releases the managed resources. (Inherited from BinaryReader.)

AdsBinaryReader Class 6:

Equals

Determines whether the specified object is equal to the current object. (Inherited from Object.)

AdsBinaryReader Class 7:

FillBuffer

Fills the internal buffer with the specified number of bytes read from the stream. (Inherited from BinaryReader.)

AdsBinaryReader Class 8:

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)

AdsBinaryReader Class 9:

GetHashCode

Serves as the default hash function. (Inherited from Object.)

AdsBinaryReader Class 10:

GetType

Gets the Type of the current instance. (Inherited from Object.)

AdsBinaryReader Class 11:

MemberwiseClone

Creates a shallow copy of the current Object. (Inherited from Object.)

AdsBinaryReader Class 12:

PeekChar

Returns the next available character and does not advance the byte or character position. (Inherited from BinaryReader.)

AdsBinaryReader Class 13:

Read.

Reads characters from the underlying stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.)

AdsBinaryReader Class 14:

Read(.Char., Int32, Int32)

Reads the specified number of characters from the stream, starting from a specified point in the character array. (Inherited from BinaryReader.)

AdsBinaryReader Class 15:

Read(.Byte., Int32, Int32)

Reads the specified number of bytes from the stream, starting from a specified point in the byte array. (Inherited from BinaryReader.)

AdsBinaryReader Class 16:

Read7BitEncodedInt

Reads in a 32-bit integer in compressed format. (Inherited from BinaryReader.)

AdsBinaryReader Class 17:

ReadBoolean

Reads a Boolean value from the current stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.)

AdsBinaryReader Class 18:

ReadByte

Reads the next byte from the current stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.)

AdsBinaryReader Class 19:

ReadBytes

Reads the specified number of bytes from the current stream into a byte array and advances the current position by that number of bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 20:

ReadChar

Reads the next character from the current stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.)

AdsBinaryReader Class 21:

ReadChars

Reads the specified number of characters from the current stream, returns the data in a character array, and advances the current position in accordance with the Encoding used and the specific character being read from the stream. (Inherited from BinaryReader.)

AdsBinaryReader Class 22:

ReadDecimal

Reads a decimal value from the current stream and advances the current position of the stream by sixteen bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 23:

ReadDouble

Reads an 8-byte floating point value from the current stream and advances the current position of the stream by eight bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 24:

ReadGuid

Reads a Guid from the current stream.

AdsBinaryReader Class 25:

ReadInt16

Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 26:

ReadInt32

Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 27:

ReadInt64

Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 28:

AdsBinaryReader Class 29:

ReadPlcAnsiString

Reads a PLC string from the current stream (Encoding.Default, ANSI Encoding)

AdsBinaryReader Class 30:

ReadPlcDATE

Reads a PLC Date type from the current stream.

AdsBinaryReader Class 31:

ReadPlcTIME

Reads a PLC 'TIME' data type from the current stream.

AdsBinaryReader Class 32:

AdsBinaryReader Class 33:

ReadPlcUnicodeString

Reads a PLC string from the current stream (Encoding.Unicode, Unicode Encoding)

AdsBinaryReader Class 34:

ReadSByte

Reads a signed byte from this stream and advances the current position of the stream by one byte. (Inherited from BinaryReader.)

AdsBinaryReader Class 35:

ReadSingle

Reads a 4-byte floating point value from the current stream and advances the current position of the stream by four bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 36:

ReadString

Reads a string from the current stream. The string is prefixed with the length, encoded as an integer seven bits at a time. (Inherited from BinaryReader.)

AdsBinaryReader Class 37:

ReadUInt16

Reads a 2-byte unsigned integer from the current stream using little-endian encoding and advances the position of the stream by two bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 38:

ReadUInt32

Reads a 4-byte unsigned integer from the current stream and advances the position of the stream by four bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 39:

ReadUInt64

Reads an 8-byte unsigned integer from the current stream and advances the position of the stream by eight bytes. (Inherited from BinaryReader.)

AdsBinaryReader Class 40:

ToString

Returns a string that represents the current object. (Inherited from Object.)

Remarks

The AdsBinaryReader object is initialized with System.Text.Encoding.Default (ANSI Encoding).

Reference

TwinCAT.Ads Namespace