use of org.eclipse.milo.opcua.stack.core.types.structured.ViewDescription in project milo by eclipse.
the class DataTypeDictionaryReader method browseNode.
private CompletableFuture<List<ReferenceDescription>> browseNode(BrowseDescription browseDescription) {
RequestHeader requestHeader = stackClient.newRequestHeader(session.getAuthenticationToken(), stackClient.getConfig().getRequestTimeout());
BrowseRequest browseRequest = new BrowseRequest(requestHeader, new ViewDescription(NodeId.NULL_VALUE, DateTime.MIN_VALUE, uint(0)), uint(0), new BrowseDescription[] { browseDescription });
return stackClient.sendRequest(browseRequest).thenApply(BrowseResponse.class::cast).thenApply(r -> Objects.requireNonNull(r.getResults())[0]).thenCompose(result -> {
List<ReferenceDescription> references = Collections.synchronizedList(new ArrayList<>());
return maybeBrowseNext(result, references);
});
}
use of org.eclipse.milo.opcua.stack.core.types.structured.ViewDescription in project milo by eclipse.
the class ViewServices method browse.
/**
* Like {@link #browse(BrowseContext, ViewDescription, NodeId)} but with a null/empty {@link ViewDescription}.
*
* @param context the {@link BrowseContext}.
* @param nodeId the {@link NodeId} to browse.
*/
default void browse(BrowseContext context, NodeId nodeId) {
ViewDescription view = new ViewDescription(NodeId.NULL_VALUE, DateTime.NULL_VALUE, uint(0));
browse(context, view, nodeId);
}
use of org.eclipse.milo.opcua.stack.core.types.structured.ViewDescription in project milo by eclipse.
the class BrowseHelper method browse.
public static CompletableFuture<List<ReferenceDescription>> browse(UaStackClient client, OpcUaSession session, BrowseDescription browseDescription, UInteger maxReferencesPerNode) {
BrowseRequest browseRequest = new BrowseRequest(client.newRequestHeader(session.getAuthenticationToken(), client.getConfig().getRequestTimeout()), new ViewDescription(NodeId.NULL_VALUE, DateTime.MIN_VALUE, uint(0)), maxReferencesPerNode, new BrowseDescription[] { browseDescription });
return client.sendRequest(browseRequest).thenApply(BrowseResponse.class::cast).thenCompose(response -> {
BrowseResult result = response.getResults()[0];
List<ReferenceDescription> references = Collections.synchronizedList(new ArrayList<>());
return maybeBrowseNext(client, session, references, result);
});
}
Aggregations