OPCDA.NET Reference Manual
AddGroup(String,Boolean,Int32,Int32,DataChangeEventHandler,Object,OnBGSrvAddGroup) Method
See Also  Send Feedback
OpcDaNetUA.Net4 Assembly > OPCDA.NET Namespace > BGServer Class > AddGroup Method : AddGroup(String,Boolean,Int32,Int32,DataChangeEventHandler,Object,OnBGSrvAddGroup) Method

groupName
The name identifies the group in the group list and enables the user to search the BGGroup object by the name. The group is created in the server with this name.
active
The initial active state og the gorup. Data change callbacks occur only for active groups. Ifa group is to be used with read/write operations only then the state can be set to inactive in order to prevent data changed callbacks. The handling of read/write operations is not influenced by the active state of the group.
requestedUpdateRate
The fastest rate the server is allowed to make data changed callbacks. The server may use a modified rate if the requested rate is outside of the server's allowed range.
clientHandle
This handle is returned in data change callbacks to allow the user to associate the values with the proper item. It's only used if multiple groups use the same callback handler and the item client handles are not unique over all groups.
DataChangedHandler
This method is called from the server on data changed events. The BGGroup intercepts the callback and synchronizes it with the user thread by calling BeginInvoke of the of the Form object associated with the underlying BGServer object.
Can be null (Nothing) if no callback handling is required.
tag
This 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, BGGroup group, object tag ){}

Glossary Item Box

Available in the OPCDA.NET Professional Edition only.
A new BGGroup object is created and added to this BGServer instance. In the OPC DA server a group is added to the associated server instance and the group is associated with the new BGGroup object.
A BGGroup is required for data change handling and for read/write operations.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub AddGroup( _
   ByVal groupName As String, _
   ByVal active As Boolean, _
   ByVal requestedUpdateRate As Integer, _
   ByVal clientHandle As Integer, _
   ByVal DataChangedHandler As DataChangeEventHandler, _
   ByVal tag As Object, _
   ByVal onCompleted As OnBGSrvAddGroup _
) 

Parameters

groupName
The name identifies the group in the group list and enables the user to search the BGGroup object by the name. The group is created in the server with this name.
active
The initial active state og the gorup. Data change callbacks occur only for active groups. Ifa group is to be used with read/write operations only then the state can be set to inactive in order to prevent data changed callbacks. The handling of read/write operations is not influenced by the active state of the group.
requestedUpdateRate
The fastest rate the server is allowed to make data changed callbacks. The server may use a modified rate if the requested rate is outside of the server's allowed range.
clientHandle
This handle is returned in data change callbacks to allow the user to associate the values with the proper item. It's only used if multiple groups use the same callback handler and the item client handles are not unique over all groups.
DataChangedHandler
This method is called from the server on data changed events. The BGGroup intercepts the callback and synchronizes it with the user thread by calling BeginInvoke of the of the Form object associated with the underlying BGServer object.
Can be null (Nothing) if no callback handling is required.
tag
This 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, BGGroup group, 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.