AdsConnection Methods

The AdsConnection type exposes the following members.

Methods

 

Name

Description

AdsConnection Methods 1:

AddDeviceNotification(String, AdsStream, AdsTransMode, Int32, Int32, Object)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 2:

AddDeviceNotification(UInt32, UInt32, AdsStream, AdsTransMode, Int32, Int32, Object)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 3:

AddDeviceNotification(String, AdsStream, Int32, Int32, AdsTransMode, Int32, Int32, Object)

Adds the device notification.

AdsConnection Methods 4:

AddDeviceNotification(UInt32, UInt32, AdsStream, Int32, Int32, AdsTransMode, Int32, Int32, Object)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 5:

AddDeviceNotificationEx(String, AdsTransMode, Int32, Int32, Object, Type)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 6:

AddDeviceNotificationEx(String, AdsTransMode, Int32, Int32, Object, Type, .Int32.)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 7:

AddDeviceNotificationEx(UInt32, UInt32, AdsTransMode, Int32, Int32, Object, Type)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 8:

AddDeviceNotificationEx(UInt32, UInt32, AdsTransMode, Int32, Int32, Object, Type, .Int32.)

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. If type is a string type, the first element of the parameter args specifies the number of characters of the string. If type is an array type, the number of elements for each dimension has to be specified in the parameter args. At the moment only 1 dimensional Arrays are supported.

AdsConnection Methods 9:

Close

Closes the AdsConnection

AdsConnection Methods 10:

Connect

(Re)Connects the IConnection when disconnected.

AdsConnection Methods 11:

AdsConnection Methods 12:

CreateSymbolLoader

Creates a new instance of the Symbol loader with the specified mode.

AdsConnection Methods 13:

CreateVariableHandle

Generates a unique handle for an ADS variable.

AdsConnection Methods 14:

DeleteDeviceNotification

Deletes an existing notification.

AdsConnection Methods 15:

DeleteVariableHandle

Releases the handle of a ADS variable again.

AdsConnection Methods 16:

Disconnect

Disconnects this IConnection.

AdsConnection Methods 17:

Dispose

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

AdsConnection Methods 18:

Equals

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

AdsConnection Methods 19:

GetHashCode

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

AdsConnection Methods 20:

GetType

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

AdsConnection Methods 21:

InvokeRpcMethod(String, Int32, .Object.)

Invokes the specified RPC Method

AdsConnection Methods 22:

InvokeRpcMethod(String, String, .Object.)

Invokes the specified RPC Method

AdsConnection Methods 23:

InvokeRpcMethod(ITcAdsSymbol, Int32, .Object.)

Invokes the specified RPC Method

AdsConnection Methods 24:

InvokeRpcMethod(ITcAdsSymbol, String, .Object.)

Invokes the specified RPC Method.

AdsConnection Methods 25:

Read(Int32, AdsStream)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 26:

Read(UInt32, UInt32, AdsStream)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 27:

Read(Int32, AdsStream, Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 28:

Read(UInt32, UInt32, .Byte., Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 29:

Read(UInt32, UInt32, AdsStream, Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 30:

Read(UInt32, UInt32, .Byte., Int32, Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 31:

Read(UInt32, UInt32, AdsStream, Int32, Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 32:

ReadAny(Int32, Type)

Reads data synchronously from an ADS device and writes it to an object.

AdsConnection Methods 33:

ReadAny(Int32, Type, .Int32.)

Reads any.

AdsConnection Methods 34:

ReadAny(UInt32, UInt32, Type)

Reads data synchronously from an ADS device and writes it to an object.

AdsConnection Methods 35:

ReadAny(UInt32, UInt32, Type, .Int32.)

Reads data synchronously from an ADS device and writes it to an object. If the Type of the object to be read is a string type, the first element of the parameter args specifies the number of characters of the string. If the Type of the object to be read is an array type, the number of elements for each dimension has to be specified in the parameter args. At the moment only 1 dimensional Arrays are supported.

AdsConnection Methods 36:

ReadAny(UInt32, UInt32, Type, .Int32., Int32)

Reads data synchronously from an ADS device and writes it to an object. If the Type of the object to be read is a string type, the first element of the parameter args specifies the number of characters of the string. If the Type of the object to be read is an array type, the number of elements for each dimension has to be specified in the parameter args. At the moment only 1 dimensional Arrays are supported.

AdsConnection Methods 37:

ReadAnyString(Int32, Int32, Encoding)

Reads the string.

AdsConnection Methods 38:

ReadAnyString(UInt32, UInt32, Int32, Encoding)

Reads the string

AdsConnection Methods 39:

ReadDeviceInfo

Reads the identification and version number of an ADS server.

AdsConnection Methods 40:

ReadState.

Reads the ADS status and the device status from an ADS server.

AdsConnection Methods 41:

ReadState(Int32)

Reads the ADS status and the device status from an ADS server.

AdsConnection Methods 42:

ReadSymbol(ITcAdsSymbol)

Reads the value of a symbol and returns it as an object. Strings and all primitive datatypes(UInt32, Int32, Bool etc.) are supported. Arrays and structures cannot be read.

AdsConnection Methods 43:

ReadSymbol(String, Type, Boolean)

Reads the value of a symbol and returns the value as object. The parameter type must have the same layout as the ADS symbol.

AdsConnection Methods 44:

ReadSymbolInfo

Call this method to obtain information about the individual symbols (variables) in ADS devices.

AdsConnection Methods 45:

ReadWrite(UInt32, UInt32, AdsStream, AdsStream)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 46:

ReadWrite(UInt32, UInt32, AdsStream, AdsStream, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 47:

ReadWrite(Int32, AdsStream, Int32, Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 48:

ReadWrite(UInt32, UInt32, .Byte., Int32, Int32, .Byte., Int32, Int32)

Writes data synchronously to an ADS device and then reads data from this device.

AdsConnection Methods 49:

ReadWrite(UInt32, UInt32, AdsStream, Int32, Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 50:

ReadWrite(UInt32, UInt32, .Byte., Int32, Int32, .Byte., Int32, Int32, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 51:

ReadWrite(UInt32, UInt32, AdsStream, Int32, Int32, AdsStream, Int32, Int32, Int32)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 52:

ToString

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

AdsConnection Methods 53:

TryAddDeviceNotification

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 54:

TryAddDeviceNotificationEx

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event.

AdsConnection Methods 55:

TryDeleteDeviceNotification

Deletes an existing notification.

AdsConnection Methods 56:

TryInvokeRpcMethod(String, Int32, .Object., Object.)

Invokes the specified RPC Method

AdsConnection Methods 57:

TryInvokeRpcMethod(String, String, .Object., Object.)

Invokes the specified RPC Method

AdsConnection Methods 58:

TryInvokeRpcMethod(ITcAdsSymbol, Int32, .Object., Object.)

Invokes the specified RPC Method

AdsConnection Methods 59:

TryInvokeRpcMethod(ITcAdsSymbol, String, .Object., Object.)

Invokes the specified RPC Method.

AdsConnection Methods 60:

TryRead(Int32, AdsStream, Int32, Int32, Int32.)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 61:

TryRead(UInt32, UInt32, .Byte., Int32, Int32, Int32.)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 62:

TryRead(UInt32, UInt32, AdsStream, Int32, Int32, Int32.)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 63:

TryRead(UInt32, UInt32, .Byte., Int32, Int32, Int32, Int32.)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 64:

TryRead(UInt32, UInt32, AdsStream, Int32, Int32, Int32, Int32.)

Reads data synchronously from an ADS device and writes it to the given stream.

AdsConnection Methods 65:

TryReadState(StateInfo.)

Reads the ADS status and the device status from an ADS server. Unlike the ReadState method this method does not call an exception on failure. Instead an AdsErrorCode is returned. If the return value is equal to AdsErrorCode.NoError the call was successful.

AdsConnection Methods 66:

TryReadState(Int32, StateInfo.)

Reads the ADS status and the device status from an ADS server. Unlike the ReadState method this method does not call an exception on failure. Instead an AdsErrorCode is returned. If the return value is equal to AdsErrorCode.NoError the call was successfull.

AdsConnection Methods 67:

TryReadWrite(Int32, AdsStream, Int32, Int32, AdsStream, Int32, Int32, Int32.)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 68:

TryReadWrite(UInt32, UInt32, .Byte., Int32, Int32, .Byte., Int32, Int32, Int32.)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 69:

TryReadWrite(UInt32, UInt32, AdsStream, Int32, Int32, AdsStream, Int32, Int32, Int32.)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 70:

TryReadWrite(UInt32, UInt32, .Byte., Int32, Int32, .Byte., Int32, Int32, Int32, Int32.)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 71:

TryReadWrite(UInt32, UInt32, AdsStream, Int32, Int32, AdsStream, Int32, Int32, Int32, Int32.)

Writes data synchronously to an ADS device and then Reads data from this device.

AdsConnection Methods 72:

TryWrite(Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 73:

TryWrite(UInt32, UInt32, .Byte., Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 74:

TryWrite(UInt32, UInt32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 75:

TryWrite(UInt32, UInt32, .Byte., Int32, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 76:

TryWrite(UInt32, UInt32, AdsStream, Int32, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 77:

TryWriteControl(StateInfo)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 78:

TryWriteControl(StateInfo, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 79:

TryWriteControl(StateInfo, AdsStream, Int32, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 80:

TryWriteControl(StateInfo, AdsStream, Int32, Int32, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 81:

Write(Int32, AdsStream)

Writes data synchronously to an ADS device.

AdsConnection Methods 82:

Write(UInt32, UInt32)

Trigger Client Method/Command.

AdsConnection Methods 83:

Write(UInt32, UInt32, Int32)

Trigger Client Method/Command.

AdsConnection Methods 84:

Write(UInt32, UInt32, AdsStream)

Writes data synchronously to an ADS device.

AdsConnection Methods 85:

Write(Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 86:

Write(UInt32, UInt32, AdsStream, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 87:

Write(UInt32, UInt32, .Byte., Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 88:

Write(UInt32, UInt32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 89:

Write(UInt32, UInt32, .Byte., Int32, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 90:

Write(UInt32, UInt32, AdsStream, Int32, Int32, Int32)

Writes data synchronously to an ADS device.

AdsConnection Methods 91:

WriteAny(Int32, Object)

Writes an object synchronously to an ADS device.

AdsConnection Methods 92:

WriteAny(Int32, Object, .Int32.)

Writes an object synchronously to an ADS device. If the Type of the object to be written is a string type, the first element of parameter args specifies the number of characters of the string.

AdsConnection Methods 93:

WriteAny(UInt32, UInt32, Object)

Writes an object synchronously to an ADS device.

AdsConnection Methods 94:

WriteAny(UInt32, UInt32, Object, .Int32.)

Writes an object synchronously to an ADS device. If the Type of the object to be written is a string type, the first element of parameter args specifies the number of characters of the string.

AdsConnection Methods 95:

WriteAny(UInt32, UInt32, Object, .Int32., Int32)

Writes an object synchronously to an ADS device. If the Type of the object to be written is a string type, the first element of parameter args specifies the number of characters of the string.

AdsConnection Methods 96:

WriteControl(StateInfo)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 97:

WriteControl(StateInfo, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 98:

WriteControl(StateInfo, AdsStream, Int32, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 99:

WriteControl(StateInfo, AdsStream, Int32, Int32, Int32)

Changes the ADS status and the device status of an ADS server.

AdsConnection Methods 100:

WriteSymbol(ITcAdsSymbol, Object)

Writes a value to the symbol. Strings and all primitive data types(UInt32, Int32, Bool etc.) are supported. Array and structures are not supported. If a string is passed as parameter, the method attempts to parse the string according to the ADS data type of the symbol.

AdsConnection Methods 101:

WriteSymbol(String, Object, Boolean)

Writes the passed object value to the specified ADS symbol.The parameter type must have the same layout as the ADS symbol.

Extension Methods

 

Name

Description

AdsConnection Methods 102:

AdsConnection Methods 103:

PollAdsState(IObservable.Unit.)

Overloaded.

Gets an observable sequence of AdsStates via Polling. (Defined by AdsClientExtensions.)

AdsConnection Methods 104:

AdsConnection Methods 105:

PollAdsState(TimeSpan)

Overloaded.

Gets an observable sequence of AdsStates via Polling. (Defined by AdsClientExtensions.)

AdsConnection Methods 106:

PollValues(String, Type, IObservable.Unit.)

Overloaded.

Polls the symbol values on timepoints where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 107:

PollValues(String, Type, TimeSpan)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 108:

PollValues(String, Type, .Int32., TimeSpan)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 109:

PollValues(String, Type, IObservable.Unit., Func.Exception, Object.)

Overloaded.

Polls the symbol values on timepoints where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 110:

PollValues(String, Type, TimeSpan, Func.Exception, Object.)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 111:

PollValues(String, Type, .Int32., IObservable.Unit., Func.Exception, Object.)

Overloaded.

Polls the symbol values on time points where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 112:

PollValues(String, Type, .Int32., TimeSpan, Func.Exception, Object.)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 113:

PollValues.T.(String, IObservable.Unit.)

Overloaded.

Polls the symbol values on timepoints where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 114:

PollValues.T.(String, TimeSpan)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 115:

PollValues.T.(String, IObservable.Unit., Func.Exception, T.)

Overloaded.

Polls the symbol values on timepoints where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 116:

PollValues.T.(String, TimeSpan, Func.Exception, T.)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 117:

PollValues.T.(String, .Int32., IObservable.Unit.)

Overloaded.

Polls the symbol values on time points where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 118:

AdsConnection Methods 119:

PollValues.T.(String, .Int32., TimeSpan)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 120:

PollValues.T.(String, .Int32., IObservable.Unit., Func.Exception, T.)

Overloaded.

Polls the symbol values on timepoints where the polling observable streams data / triggers (Defined by AnyTypeExtensions.)

AdsConnection Methods 121:

AdsConnection Methods 122:

PollValues.T.(String, .Int32., TimeSpan, Func.Exception, T.)

Overloaded.

Polls the symbol as value sequence of object values with a specified period time. (Defined by AnyTypeExtensions.)

AdsConnection Methods 123:

WhenNotification(ISymbol)

Overloaded.

Gets an observable sequence of Notifications. (Defined by AdsClientExtensions.)

AdsConnection Methods 124:

AdsConnection Methods 125:

WhenNotification(ISymbolCollection)

Overloaded.

Gets an observable sequence of Notification objects. (Defined by AdsClientExtensions.)

AdsConnection Methods 126:

WhenNotification(ISymbol, NotificationSettings)

Overloaded.

Gets an observable sequence of Notifications. (Defined by AdsClientExtensions.)

AdsConnection Methods 127:

AdsConnection Methods 128:

WhenNotification(ISymbolCollection, NotificationSettings)

Overloaded.

Gets an observable sequence of Notification objects. (Defined by AdsClientExtensions.)

AdsConnection Methods 129:

AdsConnection Methods 130:

WhenValueChanged

Observable sequence of Values driven by ADS Notifications on the specified symbol. (Defined by ValueSymbolExtensions.)

AdsConnection Methods 131:

AdsConnection Methods 132:

WriteValues.T.(String, IObservable.T.)

Overloaded.

Writes the sequence of values to the symbol specified by the instance path. (Defined by AnyTypeExtensions.)

AdsConnection Methods 133:

AdsConnection Methods 134:

WriteValues.T.(String, IObservable.T., Action.Exception.)

Overloaded.

Writes the sequence of values to the symbol specified by the instance path. (Defined by AnyTypeExtensions.)

Reference

AdsConnection Class

TwinCAT.Ads Namespace