OPC Studio User's Guide and Reference
EasyAEEventsSubscriptionArguments Constructor(String,String,Int32,EasyAENotificationEventHandler,Object,AESubscriptionFilter,AEAttributeSetDictionary,Boolean,Boolean)



OpcLabs.EasyOpcClassicCore Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.OperationModel Namespace > EasyAEEventsSubscriptionArguments Class > EasyAEEventsSubscriptionArguments Constructor : EasyAEEventsSubscriptionArguments Constructor(String,String,Int32,EasyAENotificationEventHandler,Object,AESubscriptionFilter,AEAttributeSetDictionary,Boolean,Boolean)
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).

Contains ProgID of the OPC server.

The value of this parameter cannot be null (Nothing in Visual Basic).

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.
A callback method to be invoked for each OPC event.

The value of this parameter can be null (Nothing in Visual Basic).

The state object (can be any value supplied by your code); available in event notifications.

The value of this parameter can be null (Nothing in Visual Basic).

An OpcLabs.EasyOpc.AlarmsAndEvents.AESubscriptionFilter that determines the filtering criteria to be used for the event subscription.

The value of this parameter cannot be null (Nothing in Visual Basic).

Determines the attributes to be returned for each category with event notifications. A dictionary where they key is the category ID, and the value is an array of attribute IDs for that event category.

The value of this parameter cannot be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

Creates activated or deactivated subscription. See ChangeEventSubscription for more information.
When set, the subscription will automatically perform a Refresh after each successful connection to the server (either the initial connection, or any automatic reconnection after the connection is lost).
Initializes a new instance of the class, specifying the server description and subscription parameters using their properties, and an optional callback.
Syntax
'Declaration
 
Public Function New( _
   ByVal machineName As String, _
   ByVal serverClass As String, _
   ByVal notificationRate As Integer, _
   ByVal callback As EasyAENotificationEventHandler, _
   ByVal state As Object, _
   ByVal filter As AESubscriptionFilter, _
   ByVal returnedAttributesByCategory As AEAttributeSetDictionary, _
   ByVal active As Boolean, _
   ByVal refreshWhenActive As Boolean _
)
'Usage
 
Dim machineName As String
Dim serverClass As String
Dim notificationRate As Integer
Dim callback As EasyAENotificationEventHandler
Dim state As Object
Dim filter As AESubscriptionFilter
Dim returnedAttributesByCategory As AEAttributeSetDictionary
Dim active As Boolean
Dim refreshWhenActive As Boolean
 
Dim instance As New EasyAEEventsSubscriptionArguments(machineName, serverClass, notificationRate, callback, state, filter, returnedAttributesByCategory, active, refreshWhenActive)

Parameters

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).

state
The state object (can be any value supplied by your code); available in event notifications.

The value of this parameter can be null (Nothing in Visual Basic).

filter
An OpcLabs.EasyOpc.AlarmsAndEvents.AESubscriptionFilter that determines the filtering criteria to be used for the event subscription.

The value of this parameter cannot be null (Nothing in Visual Basic).

returnedAttributesByCategory
Determines the attributes to be returned for each category with event notifications. A dictionary where they key is the category ID, and the value is an array of attribute IDs for that event category.

The value of this parameter cannot be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

active
Creates activated or deactivated subscription. See ChangeEventSubscription for more information.
refreshWhenActive
When set, the subscription will automatically perform a Refresh after each successful connection to the server (either the initial connection, or any automatic reconnection after the connection is lost).
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also