'Declaration
<ExtensionAttribute()> Public Overloads Shared Function SubscribeEvents( _ ByVal client As IEasyAEClient, _ ByVal machineName As String, _ ByVal serverClass As String, _ ByVal notificationRate As Integer, _ ByVal callback As EasyAENotificationEventHandler _ ) As Integer
'Usage
Dim client As IEasyAEClient Dim machineName As String Dim serverClass As String Dim notificationRate As Integer Dim callback As EasyAENotificationEventHandler Dim value As Integer value = IEasyAEClientExtension.SubscribeEvents(client, machineName, serverClass, notificationRate, callback)
[Extension()] public static int SubscribeEvents( IEasyAEClient client, string machineName, string serverClass, int notificationRate, EasyAENotificationEventHandler callback )
[Extension()] public: static int SubscribeEvents( IEasyAEClient^ client, String^ machineName, String^ serverClass, int notificationRate, EasyAENotificationEventHandler^ callback )
Parameters
- client
- The client object that will perform the operation.
This is typically the EasyAEClient object.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - machineName
- Name of the machine. Determines the computer on which the OPC server is located. It may be an empty string, in which case the OPC server is assumed to exist on the local computer or at the computer specified for it by DCOM configuration.
The value represents a UNC or DNS computer name. Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. IPv6 addresses are normally enclosed between '[' and ']'.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - serverClass
- Contains ProgID of the OPC server.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - notificationRate
- The requested notification rate. The notification rate is in milliseconds and tells the server how often to send event notifications. This is a minimum time - do not send event notifications any faster that this UNLESS the buffer size is reached. A value of 0 for notification rate means that the server should send event notifications as soon as it gets them. This parameter is used to improve communications efficiency between client and server. This parameter is a recommendation from the client, and the server is allowed to ignore the parameter.
- callback
- A callback method to be invoked for each OPC event.
The value of this parameter can be
null
(Nothing
in Visual Basic).