Visual Basic (Usage) | ![]() |
---|---|
Dim instance As OpcXmlDA Dim PropertyNames() As XmlQualifiedName Dim LocaleID As String Dim ClientRequestHandle As String Dim ItemPath As String Dim ItemName As String Dim ContinuationPoint As String Dim MaxElementsReturned As Integer Dim BrowseFilter As browseFilter Dim ElementNameFilter As String Dim VendorFilter As String Dim ReturnAllProperties As Boolean Dim ReturnPropertyValues As Boolean Dim ReturnErrorText As Boolean Dim Elements As BrowseElement() Dim Errors As OPCError() Dim MoreElements As Boolean Dim value As ReplyBase value = instance.Browse(PropertyNames, LocaleID, ClientRequestHandle, ItemPath, ItemName, ContinuationPoint, MaxElementsReturned, BrowseFilter, ElementNameFilter, VendorFilter, ReturnAllProperties, ReturnPropertyValues, ReturnErrorText, Elements, Errors, MoreElements) |
C# | |
---|---|
[SoapDocumentMethodAttribute(Action="http://opcfoundation.org/webservices/XMLDA/1.0/Browse", RequestNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/", ResponseNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public ReplyBase Browse( XmlQualifiedName[] PropertyNames, string LocaleID, string ClientRequestHandle, string ItemPath, string ItemName, ref string ContinuationPoint, int MaxElementsReturned, browseFilter BrowseFilter, string ElementNameFilter, string VendorFilter, bool ReturnAllProperties, bool ReturnPropertyValues, bool ReturnErrorText, out BrowseElement[] Elements, out OPCError[] Errors, out bool MoreElements ) |
Parameters
- PropertyNames
- A sequence of qualified property names to be returned with each element. If ReturnAllProperties is true, PropertyName is ignored and all properties are returned.
- LocaleID
- An optional value supplied by the client that specifies the language for certain return data (see section LocaleID, above).
- ClientRequestHandle
- An optional value supplied by the client that will be returned with the response. In larger and more complex systems it helps the client to associate the replies with the proper requests.
- ItemPath
- The ItemPath for the starting item. This is not the branch. The fully qualified item name is in the ItemName argument.
If this is a secondary Browse request, this must be identical to the value supplied in the initial request. - ItemName
- The ItemName for the starting item.
If this is a secondary Browse request, this must be identical to the value supplied in the initial request. - ContinuationPoint
- If this is a secondary Browse request, the BrowseResponse might have returned a Continuation Point where the server can restart the browse operation.
This will not be provided in the initial Browse request. This is an Opaque value that the server creates.
A Continuation Point will be returned in the response if a Server does support Continuation Point, and the response is larger than MaxItemsReturned. The Continuation Point will allow the Client to resume the Browse request from the previous completion point. When using continuation point, clients must pass the same mask and filter for all subsequent Browse calls. Failing to do so will return error E_INVALIDCONTINUATIONPOINT. - MaxElementsReturned
- Server must not return any more elements than this value.
If the server supports Continuation Points, then the Server may return a Continuation Point at a value less than MaxElementsReturned. The server will set MoreElements to True if there are more elements than MaxItemsReturned. If MaxElementsReturned is missing or 0 then there is no client side restriction on the number of returned elements. - BrowseFilter
- An enumeration {all, branch, item} specifying which subset of browse elements to return. See the table in the comments section below to determine which combination of bits in BrowseElement are returned for each value of BrowseFilter.
- ElementNameFilter
- An expression that is identical to the format as defined in DA 2.0, and DA 3.0 will be used to filter Element names, i.e., the user readable Name field.
- VendorFilter
- A Vendor specific expression that will be used to filter Vendor specific information. Impact to results of the ElementNameFilter is undefined.
- ReturnAllProperties
- Server must return all properties which are available for each of the returned elements. If ReturnAllProperties is True, PropertyName is ignored. If ReturnAllProperties is False, PropertyName will be used.
- ReturnPropertyValues
- Server must return the property values in addition to the property names.
- ReturnErrorText
- If TRUE the server will return verbose error description.
- Elements
- An arbitrary number of elements which match the request.
- Errors
- An array of OPCError elements with the description of the errors occured in this server call. Errors are only present if Items contain result codes.
- MoreElements
- The server will set MoreElements to True if there are more elements than MaxItemsReturned.
Return Value
Container of information that represents the basic information for most responses.Visual Basic | ![]() |
---|---|
Private Sub Browse(ByVal Srv As XmlServer, ByVal branch As String, ByVal propertyNames As XmlQualifiedName(), _ ByVal allProperties As Boolean, ByVal propertyValues As Boolean, ByVal err As OPCError()) Dim contP As String = Nothing Dim nodes As BrowseElement() Dim more As Boolean Dim rep As ReplyBase Try rep = Srv.Browse( propertyNames, Nothing, "BrowseAll", Nothing, branch, _ contP, 10000, browseFilter.all, Nothing, Nothing, _ allProperties, propertyValues, True, nodes, err, more) If nodes Is Nothing Then ' error Return End If Catch ex As Exception MessageBox.Show(ex.Message, "Exception at Browse") err = Nothing Return End Try err = Nothing For Each bre As BrowseElement In nodes ' handle nodes Next End Sub |
C# | ![]() |
---|---|
private void Browse( Srv as XmServer, string branch, XmlQualifiedName[] propertyNames, bool allProperties, bool propertyValues, out OPCError[] err ) { string contP = null ; BrowseElement[] nodes ; bool more ; ReplyBase rep ; try { rep = Srv.Browse( propertyNames, //properties to be returned null, //LocaleID, "BrowseAll", //ClientRequestHandle, null, //ItemPath, branch, //ItemName, ref contP, //ContinuationPoint 10000, //MaxElementsReturned, browseFilter.all, //browse mode branch,item,all null, //Element name filter null, //VendorFilter, allProperties, //ReturnAllProperties, propertyValues, //ReturnPropertyValues, true, //ReturnErrorText out nodes, //Elements out err, //Error info out more ) ; if( (err != null) && (err.Length >0) && (nodes == null) ) // error return ; } catch( Exception ex ) { MessageBox.Show( ex.Message, "Exception at Browse" ); err = null; return ; } err = null ; foreach( BrowseElement bre in nodes ) { // handle nodes } } |
Target Platforms:Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family
>