OPCDA.NET Reference Manual
Subscribe(String,Object,Int32,Object,OnBGSubscribe) Method
See Also  Send Feedback
OpcDaNetUA.Net4 Assembly > OPCDA.NET Namespace > BGDataBind Class > Subscribe Method : Subscribe(String,Object,Int32,Object,OnBGSubscribe) Method

itemID
Fully qualified item ID
updControl
Windows control object or callback handler
index
The meaning of this parameter depends on the control. In most cases it's the index of an array element, such as an Item[] element in a ListBox control.
tag
The object is passed to the competion handler and allows the user to pass any information that may be needed in the completion handler. null (nothing) can be specified if the application does not require to pass any information.
onCompleted
Competion notification handler. void xxx( BGException ex, Subscription odbSubscr, object tag ){}

Glossary Item Box

Available in the OPCDA.NET Professional Edition only.
Bind an OPC server item to an element of a control. The meaning of the index parameter depends on the control. In most cases it's the index of an array element, such as an Item[] element in a ListBox control.
The created Subscription object is returned to the user as an argument of the completion handler. The Subscription object allows the user to access properties of the Subscription and call methods of the underlaying classes. NOTE: It is not recommended to use the methods of the Subscription objects. Such calls is handled in the calling thread and may block the user thread for possibly long timeout intervals.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Subscribe( _
   ByVal itemID As String, _
   ByVal updControl As Object, _
   ByVal index As Integer, _
   ByVal tag As Object, _
   ByVal onCompleted As OnBGSubscribe _
) 

Parameters

itemID
Fully qualified item ID
updControl
Windows control object or callback handler
index
The meaning of this parameter depends on the control. In most cases it's the index of an array element, such as an Item[] element in a ListBox control.
tag
The object is passed to the competion handler and allows the user to pass any information that may be needed in the completion handler. null (nothing) can be specified if the application does not require to pass any information.
onCompleted
Competion notification handler. void xxx( BGException ex, Subscription odbSubscr, object tag ){}

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x

See Also

Copyright © 2002-2018 Advosol Inc. All Rights Reserved.