uaPLUS Reference
SetFilter Method
See Also  Send Feedback
NSPlugin Namespace > EventSubscription Class : SetFilter Method

_eventType
eventCategories
Array of event categories of interest. These are event category codes returned by EventServer:.QueryEventCategories.
lowSeverity
Lowest severity of interest (inclusive).
highSeverity
Highest severity of interest (inclusive).
areaList
Array of process area strings of interest - only events or conditions in these areas will be reported. Area strings can be obtained using EventAreaBrowser.GetQualifiedAreaName. It is possible to specify areas using the wildcard syntax. Servers must support the wildcard syntax described in OPC specification Appendix A.
sourceList
Array of event sources of interest - only events from these sources will be reported. It is possible to specify sources using the wildcard syntax. Servers must support the wildcard syntax described in OPC specification Appendix A.

Glossary Item Box

Sets the filtering criteria to be used for the event subscription. Events may be selected using the following criteria: • Type of event, i.e. simple, condition, or tracking. • Event categories • Lowest severity, i.e. all events with a severity greater than or equal to the specified severity. • Highest severity, i.e. all events with a severity less than or equal to the specified severity. • Process areas • Event Sources A list of values for a single criterion are logically ORed together (e.g. if two event categories are specified, event notifications for both categories will be received). If multiple criteria are specified, they will be logically ANDed together, i.e. only those events satisfying all criteria will be selected. An example is specifying both lowest severity and highest severity will result in the selection of events with severities lying between the two values. An OPCEventSubscription object has only one filter.
The Server is responsible for mapping its internal severity levels to evenly span the 1..1000 range. Clients that wish to receive events of all severities should set dwLowSeverity=1 and dwHighSeverity=1000. Servers may not support all the various filter criteria. The specific filter criteria supported by a given server can be determined via the IOPCEventServer::QueryAvailableFilters method. If a filter criterion is specified that is not supported by the server, it will ignore that filter criterion and return S_FALSE.

Syntax

Visual Basic (Declaration) 
Public Function SetFilter( _
   ByVal _eventType As Integer, _
   ByVal eventCategories() As Integer, _
   ByVal lowSeverity As Integer, _
   ByVal highSeverity As Integer, _
   ByVal areaList() As String, _
   ByVal sourceList() As String _
) As Integer
C# 
public int SetFilter( 
   int _eventType,
   int[] eventCategories,
   int lowSeverity,
   int highSeverity,
   string[] areaList,
   string[] sourceList
)

Parameters

_eventType
eventCategories
Array of event categories of interest. These are event category codes returned by EventServer:.QueryEventCategories.
lowSeverity
Lowest severity of interest (inclusive).
highSeverity
Highest severity of interest (inclusive).
areaList
Array of process area strings of interest - only events or conditions in these areas will be reported. Area strings can be obtained using EventAreaBrowser.GetQualifiedAreaName. It is possible to specify areas using the wildcard syntax. Servers must support the wildcard syntax described in OPC specification Appendix A.
sourceList
Array of event sources of interest - only events from these sources will be reported. It is possible to specify sources using the wildcard syntax. Servers must support the wildcard syntax described in OPC specification Appendix A.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

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