The A&E COM UA Proxy supports all of the defined A&E COM filter criteria.
These filter types are implemented using simple numeric comparisons. For Eventfilters, the received Eventshall match the Eventtype(s) specified by the filter. For Category filters, the received Event’s category (as mapped from UA Eventtype) shall match the category or categories specified by the filter. For severity filters, the received Eventseverity shall be within the range specified by the Subscriptionfilter.
In the case of source filters, the UA A & C Serveris free to provide any appropriate, Server-specific value for SourceName. There is no expectation that source Nodes discovered via browsing can be matched to the SourceName Propertyof the Eventreturned by the UA A & C Server using string comparisons. Further, the A&E COM Clientmay receive Events from sources which are not discoverable by following only HasNotifier and/or HasEventSource References. Thus, source filters will only apply if the source string can be matched to the SourceName Propertyof an Eventas received from the target UA A & C Server. Source filter logic will use the pattern matching rules documented in the A&E COM specification, including the use of wildcard characters.
The A&E COM UA Proxy implements Area filtering by adjusting the set of MonitoredItems associated with a Subscription. In the simple case where the Clientselects no area filter, the A&E COM UA Proxy will create a UA Subscriptionwhich contains just one MonitoredItem, the Server Object. In doing so, the A&E COM UA Proxy will receive Events from the entire Serveraddress space – that is, all Areas. The A&E COM Clientwill discover the areas associated with the UA Serveraddress space by browsing. The A&E COM Clientwill use GetQualifiedAreaName as usual in order to obtain area strings which can be used as filters. When the A&E COM Clientapplies one or more of these area strings to the COM Subscriptionfilter, the A&E COM UA Proxy will create MonitoredItems for each notifier Nodeidentified by the area string(s). Recall that the fully qualified area name is in fact the namespace qualified relative path to the associated notifier Node.
The A&E COM UA Proxy calls the TranslateBrowsePathsToNodeIds Serviceto get the Nodeids of the fully qualified area names in the filter. The Nodeids are then added as MonitoredItems to the UA Subscriptionmaintained by the A&E COM UA Proxy. The A&E COM UA Proxy also maintains a reference count for each of the areas added, to handle the case of multiple A&E COM Subscriptionapplying the same area filter. When the A&E COM Subscriptions are removed or when the area name is removed from the filter, the ref count on the MonitoredItemcorresponding to the area name is decremented. When the ref count goes to zero, the MonitoredItemis removed from the UA Subscription.
As with source filter strings, area filter strings can contain wildcard characters. Area filter strings which contain wildcard characters require more processing by the A&E COM UA Proxy. When the A&E COM Clientspecifies an area filter string containing wildcard characters, the A&E COM UA Proxy will scan the relative path for path elements that are completely specified. The partial path containing just those segments which are fully specified represents the root of the notifier sub tree of interest. From this sub tree root Node, the A&E COM UA Proxy will collect the list of notifier Nodes below this point. The relative path associated with each of the collected notifier Nodes in the sub tree will be matched against the Clientsupplied relative path containing the wildcard character. A MonitoredItemis created for each notifier Nodein the sub tree whose relative path matches that of the supplied relative path using established pattern matching rules. An area filter string which contains wildcard characters may result in multiple MonitoredItems added to the UA Subscription. By contrast, an area filter string made up of fully specified path segments and no wildcard characters will result in one MonitoredItemadded to the UA Subscription. So, the steps involved are:
- Check if the filter string contains any of these wild card characters, '*', '?', '#', '[', ']', '!', '-'.
- Scan the string for path elements that are completely specified by retrieving the substring up to the last occurrence of the ‘/’ character.
- Obtain the NodeId for this path using TranslateBrowsePathsToNodeIds
- Browse the Nodefor all notifiers below it.
- Using the ComUtils.Match() function match the browse names of these notifiers against the Clientsupplied string containing the wild card character.
- Add the Nodeids of the notifiers that match as MonitoredItems to the UA Subscription.