OPCDA.NET Reference Manual
BrowseOPCItemIDs(OPCBROWSETYPE,String,Type,OPCACCESSRIGHTS,IEnumString) Method
See Also  Send Feedback
OpcDaNetUA.Net4 Assembly > OPCDA.NET Namespace > OpcServer Class > BrowseOPCItemIDs Method : BrowseOPCItemIDs(OPCBROWSETYPE,String,Type,OPCACCESSRIGHTS,IEnumString) Method

filterType
IN: branch/leaf filter
OPC_BRANCH - returns only items that have children
OPC_LEAF - returns only items that don't have children
OPC_FLAT - returns everything at and below this level including all children of children - basically 'pretends' that the address space in actually FLAT
This parameter is ignored for FLAT address space.
filterCriteria
A server specific filter string. This is entirely free format and may be entered by the user via an EDIT field. Although the valid criteria are vendor specific, source code for a recommended filter function is included in an Apppendix at the end of this document. This particular filter function is commonly used by OPC interfaces and is very similar in functionality to the LIKE function in Visual Basic. A pointer to a NUL string indicates no filtering.
sTypeFilter
Data type filter specified as a .Net data type
Filter the returned list based in the available datatypes (those that would succeed if passed to AddItem). Type void indicates no filtering. In C# the void type is specified as typeof(void), in VB it's Type.GetType("System.Void")
accessRightsFilter
Filter based on the AccessRights bit mask (OPC_READABLE or OPC_WRITEABLE). The bits passed in the bitmask are 'ANDed' with the bits that would be returned for this Item by AddItem, ValidateItem or EnumOPCItemAttributes. If the result is non-zero then the item is returned. A 0 value in the bitmask indicates that the AccessRights bits should be ignored during the filtering process.
stringEnumerator
OUT: string enumerator

Glossary Item Box

Returns an IENUMString for a list of ItemIDs as determined by the passed parameters. The position from the which the browse is done can be set via ChangeBrowsePosition. ( IOPCBrowseServerAddressSpace:: BrowseOPCItemIDs )
The returned enumerator may have nothing to enumerate if no ItemIDs satisfied the filter constraints. The strings returned by the enumerator represent the BRANCHs and LEAFS contained in the current level. They do NOT include any delimiters or 'parent' names. (See GetItemID). Whenever possible the server should return strings which can be passed directly to AddItems. However, it is allowed for the Server to return a 'hint' string rather than an actual legal Item ID. For example a PLC with 32000 registers could return a single string of "0 to 31999" rather than return 32,000 individual strings from the enumerator. For this reason (as well as the fact that browser support is optional) clients should always be prepared to allow manual entry of ITEM ID strings. In the case of 'hint' strings, there is no indication given as to whether the returned string will be acceptable by AddItem or ValidateItem.

Syntax

Visual Basic (Declaration) 
Public Overloads Function BrowseOPCItemIDs( _
   ByVal filterType As OPCBROWSETYPE, _
   ByVal filterCriteria As String, _
   ByVal sTypeFilter As Type, _
   ByVal accessRightsFilter As OPCACCESSRIGHTS, _
   ByRef stringEnumerator As IEnumString _
) As Integer

Parameters

filterType
IN: branch/leaf filter
OPC_BRANCH - returns only items that have children
OPC_LEAF - returns only items that don't have children
OPC_FLAT - returns everything at and below this level including all children of children - basically 'pretends' that the address space in actually FLAT
This parameter is ignored for FLAT address space.
filterCriteria
A server specific filter string. This is entirely free format and may be entered by the user via an EDIT field. Although the valid criteria are vendor specific, source code for a recommended filter function is included in an Apppendix at the end of this document. This particular filter function is commonly used by OPC interfaces and is very similar in functionality to the LIKE function in Visual Basic. A pointer to a NUL string indicates no filtering.
sTypeFilter
Data type filter specified as a .Net data type
Filter the returned list based in the available datatypes (those that would succeed if passed to AddItem). Type void indicates no filtering. In C# the void type is specified as typeof(void), in VB it's Type.GetType("System.Void")
accessRightsFilter
Filter based on the AccessRights bit mask (OPC_READABLE or OPC_WRITEABLE). The bits passed in the bitmask are 'ANDed' with the bits that would be returned for this Item by AddItem, ValidateItem or EnumOPCItemAttributes. If the result is non-zero then the item is returned. A 0 value in the bitmask indicates that the AccessRights bits should be ignored during the filtering process.
stringEnumerator
OUT: string enumerator

Return Value

HRESULT success/error code

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x

See Also

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