On the EasyDAClient object, there are overloads of browsing methods accept a parameter of type DANodeFilter, which can be filled in with various pieces that limit the amounf of nodes returned:
- ElementNameFilter: A wildcard string to filter the returned element names (empty string for no filtering).
- VendorFilter: A server specific filter string (empty string for no filtering).
- DataTypeFilter: Specifies to only return nodes of certain data type. Use Empty for no filtering.
- AccessRightsFilter: Specifies to only return nodes with certain access rights. Use None for no filtering.
Some OPC servers have large address space, with hundreds or thousand nodes (branches or leaves) under a parent node. If this is to be displayed to the user, it might be too many nodes for the human to reasonably work with - or also, internally too much data to transfer. The OPC Specification therefore allows the sub-nodes be filtered (limited) according to various criteria.
To make it even easier, there are also overloads of browsing methods that simply take parts of the complete filter (such as ElementNameFilter and/or VendorFilter), so you do not need to bother with the DANodeFilter object at all, usually.
I think that your question was mainly about the ElementNameFilter and VendorFilter, so I will describe them here.
The ElementNameFilter has a syntax that is dictated by the OPC specification, is the same for all servers, and behaves like Visual Basic LIKE operator. Here is the most important part of the spec for it:
The pattern-matching features allow you to use wildcard characters, character lists, or character ranges, in any combination, to match strings. The following table shows the characters allowed in pattern and what they match:
Characters in pattern
Matches in string
?
Any single character.
*
Zero or more characters.
#
Any single digit (0-9).
[charlist]
Any single character in charlist.
[!charlist]
Any single character not in charlist.
A group of one or more characters (charlist) enclosed in brackets ([ ]) can be used to match any single character in string and can include almost any charcter code, including digits.
For example, "A*" means any node that starts with letter 'A'.
The VendorFilter is completely different - the meaning of it is defined by the OPC server itself. Consult the server's documentation for information about how your OPC server iterprets the vendor filtr. Many server will simply ignore it, or imterpret it the same as ElementNameFilter - in which case it won't bring you any extra value.
With this in hand, if you need a concrete code example, lwr me know what precisely your are after, and we can work on it.
Best regards,
Zbynek Zahradnik