AdsConnection Class
ADS Connection class
Inheritance Hierarchy
System.Object
TwinCAT.Ads.AdsConnection
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
public sealed class AdsConnection : IAdsConnection,
IConnection, IConnectionStateProvider, IAdsNotifications, IAdsSymbolicAccess, IAdsAnyAccess,
IAdsHandle, IAdsReadWrite, IAdsStateProvider, IAdsStateControl, IAdsSymbolChangedProvider,
IAdsRpcInvoke, IAdsReadWriteTimeoutAccess, IAdsStateControlTimeout, IDisposableThe AdsConnection type exposes the following members.
Properties
|
|
Name |
Description |
|---|---|---|
|
|
Gets the access wait time. | |
|
|
Gets the UTC time when tha last active/resurrected Connection was established | |
|
|
Gets the AmsAddress of the ADS server. | |
|
|
Gets the channel port type. | |
|
|
Gets the channel protocol. | |
|
|
Get the AmsAddress of the ADS client. | |
|
|
Gets the configuration. | |
|
|
Gets the UTC time when the Connection was originally established. | |
|
|
Gets the connection lost time. | |
|
|
Gets the current Connection state of the AdsConnection | |
|
|
Gets the default value encoding. | |
|
|
Gets a value indicating whether this AdsConnection is disposed. | |
|
|
Gets the AdsConnection identifier. | |
|
|
Gets a value indicating whether communication is in active state | |
|
|
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. | |
|
|
Gets a value indicating whether the ADS client is connected to a ADS Server on the local computer. | |
|
|
Gets a value indicating whether the communication is in lost / open state | |
|
|
Gets a value indicating whether communication is ready for reconnecting | |
|
|
Gets the connection logger interface. | |
|
|
Gets the logger factory. | |
|
|
Gets the name of this AdsConnection. | |
|
|
Gets the Session object of the AdsConnection object. | |
|
|
Gets the current ConnectionState | |
|
|
Gets the symbol encoding. | |
|
|
Gets the timeout (in milliseconds) | |
|
|
Gets the connection lost count. | |
|
|
Gets the number of tries to resurrect the AdsConnection. | |
|
|
Gets the number of succeeded connection resurrections. |
Methods
|
|
Name |
Description |
|---|---|---|
|
|
AddDeviceNotification(String, Int32, NotificationSettings, Object) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. |
|
|
AddDeviceNotification(UInt32, UInt32, Int32, NotificationSettings, Object) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. |
|
|
AddDeviceNotificationAsync(String, Int32, NotificationSettings, Object, CancellationToken) |
Connects a variable to the ADS client asynchronously. The ADS client will be notified by the AdsNotification event. |
|
|
AddDeviceNotificationAsync(UInt32, UInt32, Int32, NotificationSettings, Object, CancellationToken) |
Connects a variable to the ADS client asynchronously. The ADS client will be notified by the AdsNotification event. |
|
|
AddDeviceNotificationEx(String, NotificationSettings, Object, Type) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotificationEx event. |
|
|
AddDeviceNotificationEx(String, NotificationSettings, Object, Type, Int32[]) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotificationEx event. |
|
|
AddDeviceNotificationEx(UInt32, UInt32, NotificationSettings, Object, Type) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotificationEx event. |
|
|
AddDeviceNotificationEx(UInt32, UInt32, NotificationSettings, 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. Only primitive ('AnyType') types are allowed for the parameter type. |
|
|
AddDeviceNotificationExAsync(String, NotificationSettings, Object, Type, Int32[], CancellationToken) |
Connects a variable to the ADS client asynchronously. The ADS client will be notified by the AdsNotificationEx event. |
|
|
Connects a variable to the ADS client asynchronously. The ADS client will be notified by the AdsNotificationEx event. | |
|
|
Clears the internal symbol cache. | |
|
|
Closes the AdsConnection | |
|
|
(Re)Connects the IConnection when disconnected. | |
|
|
Connects the and wait asynchronous. | |
|
|
Connect as an asynchronous operation. | |
|
|
Generates a unique handle for an ADS variable. | |
|
|
Determines the Symbol handle by its instance path asynchronously. | |
|
|
Deletes an existing notification. | |
|
|
Deletes a registered notification asynchronously. | |
|
|
Releases the handle of a ADS variable again. | |
|
|
Releases the handle of a ADS variable again (asynchronously) | |
|
|
Disconnects this IConnection. | |
|
|
Disconnects this IConnection. | |
|
|
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
|
|
Determines whether the specified object is equal to the current object. | |
|
|
Serves as the default hash function. | |
|
|
Gets the Type of the current instance. | |
|
|
Invokes the specified RPC Method | |
|
|
Invokes the specified RPC Method | |
|
|
Invokes the specified RPC Method | |
|
|
InvokeRpcMethod(String, String, Object[], AnyTypeSpecifier[], AnyTypeSpecifier, Object[]) |
Invokes the specified RPC Method |
|
|
InvokeRpcMethodAsync(String, String, Object[], CancellationToken) |
Invokes the specified RPC Method asynchronously |
|
|
Invokes the specified RPC Method asynchronously | |
|
|
Invokes the specified RPC Method asynchronously | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Reads data synchronously from an ADS device and writes it to an result object. | |
|
|
Reads data synchronously from an ADS device and writes it to an result object. | |
|
|
Read any as an asynchronous operation. | |
|
|
Reads data synchronously from an ADS device and writes it to an object. | |
|
|
Read any as an asynchronous operation. | |
|
|
Read any as an asynchronous operation. | |
|
|
Reads data asynchronously from an ADS device and writes it to an object. | |
|
|
ReadAnyAsync(UInt32, UInt32, Type, Int32[], CancellationToken) |
Read any as an asynchronous operation. |
|
|
Read any as an asynchronous operation. | |
|
|
Reads data synchronously from an ADS device. | |
|
|
Read any as an asynchronous operation. | |
|
|
Read any as an asynchronous operation. | |
|
|
Reads data asynchronously from an ADS device and writes it to an object. | |
|
|
Read any as an asynchronous operation. | |
|
|
Reads any string. | |
|
|
Reads a string from the specified symbol/variable. | |
|
|
Reads as string from a specified address. | |
|
|
ReadAnyStringAsync(String, Int32, Encoding, CancellationToken) |
Read any string as an asynchronous operation. |
|
|
ReadAnyStringAsync(UInt32, Int32, Encoding, CancellationToken) |
Reads a string asynchronously from the specified symbol/variable |
|
|
ReadAnyStringAsync(UInt32, UInt32, Int32, Encoding, CancellationToken) |
read any string as an asynchronous operation. |
|
|
Reads the value synchronously data of the symbol, that is represented by the variable handle./>. | |
|
|
Reads data synchronously from an ADS device /> | |
|
|
Reads data synchronously from an ADS device. | |
|
|
Reads/Determines the DataType Inforrmation with the specifed name. | |
|
|
Reads/Determines the DataType of the specified type as an asynchronous operation. | |
|
|
Reads the identification and version number of an ADS server. | |
|
|
Reads the identification and version number of an ADS server. | |
|
|
Reads the ADS status and the device status from an ADS server. | |
|
|
Reads the ADS status and the device status from an ADS server. | |
|
|
Read state as an asynchronous operation. | |
|
|
Reads the symbol. | |
|
|
Read symbol as an asynchronous operation. | |
|
|
Reads the value of a symbol and returns the value as (boxed) object. | |
|
|
Reads the value of a symbol specified with its instance path and returns the value as boxed object. | |
|
|
Reads the value of a symbol specified with its instance path and returns the value as object of the specified type. | |
|
|
Reads the value of a symbol and returns it as an typed object. | |
|
|
Reads the value. | |
|
|
Read value as an asynchronous operation. | |
|
|
Read value as an asynchronous operation. | |
|
|
Read value as an asynchronous operation. | |
|
|
Read value as an asynchronous operation. | |
|
|
ReadWriteAsResult(UInt32, UInt32, Int32, ReadOnlyMemory<Byte>) |
Writes data synchronously to an ADS device and then Reads data from this device. |
|
|
ReadWriteAsResult(UInt32, UInt32, Int32, ReadOnlyMemory<Byte>, Int32) |
Writes data synchronously to an ADS device and then Reads data from this device. |
|
|
Registers for AdsStateChanged events as an asynchronous operation. | |
|
|
Registers the symbol version changed event (synchronously) | |
|
|
Registers the symbol version changed asynchronously. | |
|
|
Returns a string that represents the current object. | |
|
|
TryAddDeviceNotification(String, Int32, NotificationSettings, Object, UInt32) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. |
|
|
TryAddDeviceNotification(UInt32, UInt32, Int32, NotificationSettings, Object, UInt32) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. |
|
|
TryAddDeviceNotificationEx(String, NotificationSettings, Object, Type, Int32[], UInt32) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotification event. |
|
|
TryAddDeviceNotificationEx(UInt32, UInt32, NotificationSettings, Object, Type, Int32[], UInt32) |
Connects a variable to the ADS client. The ADS client will be notified by the AdsNotificationEx event. |
|
|
Read (determine) the Symbol handle by its name/path | |
|
|
Deletes a registered notification. | |
|
|
Releases the specified symbol/variable handle synchronously. | |
|
|
Invokes the specified RPC Method | |
|
|
TryInvokeRpcMethod(String, String, Object[], Object[], Object) |
Invokes the specified RPC Method |
|
|
Invokes the rpc method. | |
|
|
TryInvokeRpcMethod(String, String, Object[], AnyTypeSpecifier[], AnyTypeSpecifier, Object[], Object) |
Invokes the rpc method. |
|
|
Reads the value synchronously data of the symbol, that is represented by the variable handle into the readBuffer. | |
|
|
Reads data synchronously from an ADS device and writes it to the given stream. | |
|
|
Tries to Read/Determine the DataType of the specified type. | |
|
|
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. | |
|
|
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. | |
|
|
Tries to read the symbol information object specified by the instance path. | |
|
|
Tries to read the value of a symbol and returns the value as boxed object. | |
|
|
Tries to the value of a symbol specified as instance path and returns the value as (boxed) object. | |
|
|
Reads the value of a symbol and returns the value as typed value. | |
|
|
Tries to reads the value of a symbol specified with instance path and returns the typed value. | |
|
|
Writes the value data synchronously that is represented in the writeBuffer to the symbol with the specified variableHandle. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Tries to write a (boxed) value to the symbol | |
|
|
Tries to write a (boxed) value to the symbol instance specified by its instance/symbol path. | |
|
|
Tries to write a value to the symbol. | |
|
|
Tries to Write a (typed) value to the symbol instance specified by its instance/symbol path. | |
|
|
Registers for AdsStateChanged events as an asynchronous operation. | |
|
|
Unregisters the symbol version changed event (synchronously) | |
|
|
Unregisters the symbol version changed asynchronously. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Sends a 'Write' request to the ADS device at the specified address. | |
|
|
Trigger Client Method/Command. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Writes an object synchronously to an ADS device. | |
|
|
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. | |
|
|
Writes an object synchronously to an ADS device. | |
|
|
Writes an object synchronously to an ADS device. | |
|
|
Writes an object synchronously to an ADS device. | |
|
|
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. | |
|
|
Write any as an asynchronous operation. | |
|
|
Writes an object asynchronously 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. | |
|
|
WriteAnyAsync(UInt32, UInt32, Object, Int32[], CancellationToken) |
Write any as an asynchronous operation. |
|
|
write any string as an asynchronous operation. | |
|
|
Writes data synchronously to an ADS device. | |
|
|
Write as an asynchronous operation. | |
|
|
Write as an asynchronous operation. | |
|
|
WriteAsync(UInt32, UInt32, ReadOnlyMemory<Byte>, CancellationToken) |
Write as an asynchronous operation. |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and the device status of an ADS server. | |
|
|
Changes the ADS status and device status of the ADS server asynchronously. | |
|
|
WriteControlAsync(AdsState, UInt16, ReadOnlyMemory<Byte>, CancellationToken) |
Write control as an asynchronous operation. |
|
|
Write symbol as an asynchronous operation. | |
|
|
Writes a (boxed) value to the symbol. | |
|
|
Writes a (boxed value) to the symbol instance specified by its instance/symbol path. | |
|
|
Writes a (typed) value to the symbol. | |
|
|
Writes a typed value to the symbol instance specified by its instance/symbol path. | |
|
|
Write value as an asynchronous operation. | |
|
|
Write value as an asynchronous operation. | |
|
|
Write value as an asynchronous operation. |
Events
|
|
Name |
Description |
|---|---|---|
|
|
Occurs when the ADS device sends a notification to the client. | |
|
|
Occurs when a exception has occurred during notification management. | |
|
|
Occurs when the ADS devices sends a notification to the client. | |
|
|
Occurs when ADS State has been changed. | |
|
|
Occurs when Notifications are send (bundled notifications) | |
|
|
Occurs when the SymbolVersion table of a TwinCAT PLC System has been changed. | |
|
|
Occurs when connection status of the AdsConnection has been changed. | |
|
|
(Local) Router state changed event. |
Extension Methods
|
|
Name |
Description |
|---|---|---|
|
|
Gets an observable sequence of ResultReadAdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadAdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadAdsStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadAdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadAdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of AdsStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadDeviceStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadDeviceStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadDeviceStates via Polling.
| |
|
|
Gets an observable sequence of ResultReadDeviceStates via Polling.
| |
|
|
Polls the state of the system service.
| |
|
|
Polls the system service state asynchronously
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on time points where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on time points where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on time points where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on time points where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol as value sequence of object values with a specified period time.
| |
|
|
Polls the symbol values on timepoints where the polling observable streams data / triggers
| |
|
|
Polls the symbol values on time points where the polling observable streams data / triggers
| |
|
|
Reads the System Service state (AdsSysServState)
| |
|
|
Reads the System Service state (AdsSysServState) (asynchronous)
| |
|
|
Read with fallback.
| |
|
|
Ads Read with Fallback.
| |
|
|
Ads Read with Fallback.
| |
|
|
Ads Read with fallback as an asynchronous operation.
| |
|
|
Ads Read with fallback as an asynchronous operation.
| |
|
|
Ads Read with fallback as an asynchronous operation.
| |
|
|
Ads Read with Fallback.
| |
|
|
ReadWrite with Fallback.
| |
|
|
Ads Read with fallback as an asynchronous operation.
| |
|
|
Ads Read with fallback as an asynchronous operation.
| |
|
|
Repeated AdsRead.
| |
|
|
Repeated AdsRead.
| |
|
|
Repeated AdsRead as an asynchronous operation.
| |
|
|
Repeated AdsRead as an asynchronous operation.
| |
|
|
Repeated AdsRead.
| |
|
|
Repeated AdsReadWrite as an asynchronous operation.
| |
|
|
Repeated AdsWrie.
| |
|
|
Repeated AdsReadWrite as an asynchronous operation.
| |
|
|
Sends a SystemService Restart to the target system and waits until the system has finished the state changes (SystemService, Port 10000) (asynchronously)
| |
|
|
Sends an AdsState/AdsStateCommand Request to an AdsServer and waits until the StateChange is done or fails.
| |
|
|
Sends an AdsState/AdsStateCommand Request to an AdsServer and waits until the StateChange is done or fails (asynchronously)
| |
|
|
Waits until the target AdsServer reaches the requested state.
| |
|
|
Waits until the target AdsServer reaches the requested state (asynchronous)
| |
|
|
Waits until the Restart is detected on the client (SystemService, Port 10000)
| |
|
|
Waits until the SystemService Restart is detectd on the client (SystemService, Port 10000) (asynchronously)
| |
|
|
Gets an observable sequence of AdsStates.
| |
|
|
Gets an observable sequence of Notifications.
| |
|
|
Gets an observable sequence of Notification objects.
| |
|
|
Gets an observable sequence of Notification objects.
| |
|
|
Gets an observable sequence of SymbolValueNotifications.
| |
|
|
Creates an observable sequence of values that are created by ADS Notifications.
| |
|
|
Creates an observable sequence of values that are created by ADS Notifications.
| |
|
|
Gets an observable sequence of SymbolVersion changed counts.
| |
|
|
Gets an observable sequence of SymbolVersion changed counts.
| |
|
|
Observable sequence of Values driven by ADS Notifications on the specified symbol.
| |
|
|
Writes the sequence of values to the symbol specified by the instance path.
| |
|
|
Writes the sequence of values to the symbol specified by the instance path.
|
Remarks
The ADS Connection class represents an ADS Point-to-Point Connection between client and server. It is established by using the Connect method of the AdsSession object. An ADS Connection can have different ConnectionStates, which represent the state of the logical ADS connection.
See Also
Reference
TwinCAT.Ads Namespace AdsSession IAdsConnection IDisposable
Beckhoff Automation GmbH & Co. KG 2001-2026
- AdsConnection.ChannelPortType Property
- AdsConnection.ChannelProtocol Property
- AdsConnection.Configuration Property
- AdsConnection.Logger Property
- AdsConnection.LoggerFactory Property
- AdsConnection.SymbolEncoding Property
- AdsState Enumeration
- AdsConnection.ReadAnyAsync(String, Type, CancellationToken) Method
- AdsConnection.ReadAnyAsync(UInt32, Type, CancellationToken) Method
- AdsConnection.ReadAnyAsync(String, Type, Int32[], CancellationToken) Method
- AdsConnection.ReadAnyAsync(UInt32, Type, Int32[], CancellationToken) Method
- AdsConnection.ReadAnyAsync(UInt32, UInt32, Type, CancellationToken) Method
- AdsConnection.ReadAnyAsync(UInt32, UInt32, Type, Int32[], CancellationToken) Method
- AdsConnection.ReadValueAsync(ISymbol, CancellationToken) Method
- AdsConnection.ReadValueAsync(String, Type, CancellationToken) Method
- AdsConnection.TryReadValue(ISymbol, Object) Method
- AdsConnection.TryReadValue(String, Type, Object) Method