.NET Based OPC UA Client/Server SDK
3.0.0.439
|
A session with the server must be established.
The following dialog shows an example implementation of the Browse service, which can be used to read references from a node. Press the button “Show Code” to display the corresponding code, and the button “Help” to show this documentation page.
First, you have to specify some parameters to filter your results. Klick on the button “...” right of the field “Node ID” to open an adress space browser, select the desired node and confirm with “OK”. Now, the NodeId is shown at the corresponding field.
Pick a browse direction from the drop down menu.
On pressing the button “...” right of the field “Reference Type”, a browse window opens. This allows you to further restrain the results. Check the box in front of “Include Subtypes” to return subtypes of the reference type as well.
By specifiying “Max References” you can limit the maximum number of references in a single response. If specified, a continuation point is set and the method BrowseNext is called repeatedly until all references are returned. Select “0” to get all references in a single response.
After pressing the button “Browse” the reference types matching your request are shown in the table at “Browse Response”. Check the box in front of “Use Asynchronous Pattern” to call “BeginBrowse” instead of “Browse”.
First we need to fill the BrowseContext to specify
The starting NodeId that is used for the Browse operation is provided by the GUI in standard XML format. So NodeId.Parse can be used to get the NodeId. A continuation point has to be used as out parameter.
There is a maximum number of ReferenceDescriptions that can be returned in a single Browse operation. If there are more reference descriptions available on the server that can be retrieved, the continuation point is not null, otherwise the continuation point is null.
This continuation point can used to get the next chunk of reference descriptions from the server. If the client is not interested in the next set of references, the continuation point has to be released.