Bind an OPC server item to a simple control that does not need additional parameters. The OPC server item value is transformed and formatted according the definitions in the DataBindFormat parameter.
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.
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub Subscribe( _ ByVal itemID As String, _ ByVal updControl As Object, _ ByVal fmt As DataBindFormat, _ ByVal tag As Object, _ ByVal onCompleted As OnBGSubscribe _ ) |
C# | |
---|---|
public void Subscribe( string itemID, object updControl, DataBindFormat fmt, object tag, OnBGSubscribe onCompleted ) |
Parameters
- itemID
- Fully qualified item ID
- updControl
- Windows control object or callback handler
- fmt
- The OPC server item value is transformed and formatted according this definitions.
- 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 ){}