'Declaration
<ExtensionAttribute()> Public Overloads Shared Function SubscribeItem( _ ByVal client As IEasyDAClient, _ ByVal serverDescriptor As ServerDescriptor, _ ByVal itemDescriptor As DAItemDescriptor, _ ByVal groupParameters As DAGroupParameters, _ ByVal callback As EasyDAItemChangedEventHandler, _ ByVal state As Object _ ) As Integer
'Usage
Dim client As IEasyDAClient Dim serverDescriptor As ServerDescriptor Dim itemDescriptor As DAItemDescriptor Dim groupParameters As DAGroupParameters Dim callback As EasyDAItemChangedEventHandler Dim state As Object Dim value As Integer value = IEasyDAClientExtension.SubscribeItem(client, serverDescriptor, itemDescriptor, groupParameters, callback, state)
[Extension()] public static int SubscribeItem( IEasyDAClient client, ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor, DAGroupParameters groupParameters, EasyDAItemChangedEventHandler callback, object state )
[Extension()] public: static int SubscribeItem( IEasyDAClient^ client, ServerDescriptor^ serverDescriptor, DAItemDescriptor^ itemDescriptor, DAGroupParameters^ groupParameters, EasyDAItemChangedEventHandler^ callback, Object^ state )
Parameters
- client
- The client object that will perform the operation.
- serverDescriptor
- The OPC server involved in the operation.
- itemDescriptor
- The OPC item to be subscribed to.
- groupParameters
- An object containing subscription parameters, such as the requested update rate.
- callback
- A callback method to be invoked for each significant item change.
- state
- The state object (can be any object supplied by your code); available in event notifications.
Return Value
The method returns an integer handle that uniquely identifies the item subscription.