AdsNotificationEventArgs Constructor

Initializes a new instance of the AdsStream class AdsSyncNotificationEventArgs.

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

Syntax

C#

public AdsNotificationEventArgs(
    long timeStamp,
    Object userData,
    int notificationHandle,
    int length,
    int offset,
    AdsStream dataStream
)

VB

Public Sub New ( 
    timeStamp As Long,
    userData As Object,
    notificationHandle As Integer,
    length As Integer,
    offset As Integer,
    dataStream As AdsStream
)

Parameters

timeStamp

Type: System.Int64
TwinCAT realtime timestamp.

userData

Type: System.Object
An object, that is passed by AddDeviceNotification.

notificationHandle

Type: System.Int32
Handle of the connection.

length

Type: System.Int32
Length of the data in dataStream.

offset

Type: System.Int32
The offset of the data in dataStream .

dataStream

Type: TwinCAT.Ads.AdsStream
Stream that is used to store the data.

Remarks

The TwinCAT realtime target system (even when working locally) has its own TimeSystem which is synchronized with the Desktop/User time at TwinCAT Start. From this moment on the Desktop/User time can drift from the local Realtime/Target time. can differ. The TimeStamp can be converted to a .NET DateTime Object with FromFileTimeUtc(Int64) or FromFileTime(Int64)

Reference

AdsNotificationEventArgs Class

TwinCAT.Ads Namespace