IAdsConnection Interface

ADS Connection interface

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

public interface IAdsConnection : IConnection, 
    IConnectionStateProvider, IAdsNotifications, IAdsAnyAccess, IAdsHandleAccess, ITcAdsRpcInvoke

VB

Public Interface IAdsConnection
    Inherits IConnection, IConnectionStateProvider, IAdsNotifications, IAdsAnyAccess, 
    IAdsHandleAccess, ITcAdsRpcInvoke

The IAdsConnection type exposes the following members.

Properties

 

Name

Description

Address

Gets the AmsAddress of the ADS server.

ClientAddress

Get the AmsAddress of the ADS client.

ConnectionState

Gets the current Connection state of the IConnectionStateProvider (Inherited from IConnectionStateProvider.)

Id

Gets the Connection Identifier . (Inherited from IConnection.)

IsConnected

Gets a value indicating whether the local ADS port was opened successfully. It does not indicate if the target port is available. Use the method ReadState to determine if the target port is available. (Inherited from IConnection.)

IsLocal

Gets a value indicating whether the ADS client is connected to a ADS Server on the local computer.

Session

Gets the session that initiated this IConnection (Inherited from IConnection.)

Timeout

Gets the timeout (in milliseconds) (Inherited from IConnection.)

Methods

 

Name

Description

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

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. (Inherited from IAdsNotifications.)

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. (Inherited from IAdsNotifications.)

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

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. (Inherited from IAdsNotifications.)

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. (Inherited from IAdsNotifications.)

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

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. (Inherited from IAdsNotifications.)

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. (Inherited from IAdsNotifications.)

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. (Inherited from IAdsNotifications.)

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. (Inherited from IAdsNotifications.)

Close

Closes this IConnection (Inherited from IConnection.)

Connect

(Re)Connects the IConnection when disconnected. (Inherited from IConnection.)

CreateVariableHandle

Generates a unique handle for an ADS variable. (Inherited from IAdsHandleAccess.)

DeleteDeviceNotification

Deletes an existing notification. (Inherited from IAdsNotifications.)

DeleteVariableHandle

Releases the handle of a ADS variable again. (Inherited from IAdsHandleAccess.)

Disconnect

Disconnects this IConnection. (Inherited from IConnection.)

InvokeRpcMethod(String, Int32, .Object.)

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

InvokeRpcMethod(String, String, .Object.)

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

InvokeRpcMethod(ITcAdsSymbol, Int32, .Object.)

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

InvokeRpcMethod(ITcAdsSymbol, String, .Object.)

Invokes the specified RPC Method. (Inherited from ITcAdsRpcInvoke.)

Read(Int32, AdsStream)

Reads data synchronously from an ADS device and writes it to the given stream. (Inherited from IAdsHandleAccess.)

Read(Int32, AdsStream, Int32, Int32)

Reads data synchronously from an ADS device and writes it to the given stream. (Inherited from IAdsHandleAccess.)

ReadAny(Int32, Type)

Reads data synchronously from an ADS device and writes it to an object. (Inherited from IAdsAnyAccess.)

ReadAny(Int32, Type, .Int32.)

Reads data synchronously from an ADS device and writes it to an object. (Inherited from IAdsAnyAccess.)

ReadAny(UInt32, UInt32, Type)

Reads data synchronously from an ADS device and writes it to an object. (Inherited from IAdsAnyAccess.)

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

Reads data synchronously from an ADS device and writes it to an object. (Inherited from IAdsAnyAccess.)

ReadAnyString(Int32, Int32, Encoding)

Reads the string. (Inherited from IAdsAnyAccess.)

ReadAnyString(UInt32, UInt32, Int32, Encoding)

Reads the string (Inherited from IAdsAnyAccess.)

ReadDeviceInfo

Reads the identification and version number of an ADS server.

ReadWrite

Writes data synchronously to an ADS device and then Reads data from this device. (Inherited from IAdsHandleAccess.)

TryAddDeviceNotification

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. (Inherited from IAdsNotifications.)

TryAddDeviceNotificationEx

Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. (Inherited from IAdsNotifications.)

TryDeleteDeviceNotification

Deletes an existing notification. (Inherited from IAdsNotifications.)

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

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

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

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

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

Invokes the specified RPC Method (Inherited from ITcAdsRpcInvoke.)

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

Invokes the specified RPC Method. (Inherited from ITcAdsRpcInvoke.)

TryRead

Reads data synchronously from an ADS device and writes it to the given stream. (Inherited from IAdsHandleAccess.)

TryReadWrite

Writes data synchronously to an ADS device and then Reads data from this device. (Inherited from IAdsHandleAccess.)

TryWrite

Writes data synchronously to an ADS device. (Inherited from IAdsHandleAccess.)

Write(Int32, AdsStream)

Writes data synchronously to an ADS device. (Inherited from IAdsHandleAccess.)

Write(Int32, AdsStream, Int32, Int32)

Writes data synchronously to an ADS device. (Inherited from IAdsHandleAccess.)

WriteAny(Int32, Object)

Writes an object synchronously to an ADS device. (Inherited from IAdsAnyAccess.)

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. (Inherited from IAdsAnyAccess.)

WriteAny(UInt32, UInt32, Object)

Writes an object synchronously to an ADS device. (Inherited from IAdsAnyAccess.)

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

Writes an object synchronously to an ADS device. (Inherited from IAdsAnyAccess.)

Events

 

Name

Description

AdsNotification

Occurs when the ADS device sends a notification to the client. (Inherited from IAdsNotifications.)

AdsNotificationError

Occurs when a exception has occurred during notification management. (Inherited from IAdsNotifications.)

AdsNotificationEx

Occurs when the ADS devices sends a notification to the client. (Inherited from IAdsNotifications.)

ConnectionStateChanged

Occurs when connection status of the IConnectionStateProvider has been changed. (Inherited from IConnectionStateProvider.)

Extension Methods

 

Name

Description

PollAdsState(IObservable.Unit.)

Overloaded.

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

PollAdsState(TimeSpan)

Overloaded.

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

PollValues(String, Type, IObservable.Unit.)

Overloaded.

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

PollValues(String, Type, TimeSpan)

Overloaded.

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

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

Overloaded.

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

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.)

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.)

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.)

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.)

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

Overloaded.

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

PollValues.T.(String, TimeSpan)

Overloaded.

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

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.)

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.)

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

Overloaded.

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

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

Overloaded.

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

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.)

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.)

WhenNotification(ISymbol)

Overloaded.

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

WhenNotification(ISymbolCollection)

Overloaded.

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

WhenNotification(ISymbol, NotificationSettings)

Overloaded.

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

WhenNotification(ISymbolCollection, NotificationSettings)

Overloaded.

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

WhenValueChanged

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

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

Overloaded.

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

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

Overloaded.

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

Remarks

The ADS connection interface represents the the logical point-to-point exception between Client and Server within an ADS Session.

Reference

TwinCAT.Ads Namespace

TwinCAT.IConnection

TwinCAT.Ads.IAdsAnyAccess

TwinCAT.Ads.IAdsHandleAccess