Search in sources :

Example 1 with BrowseNextRequest

use of org.eclipse.milo.opcua.stack.core.types.structured.BrowseNextRequest in project milo by eclipse.

the class DataTypeDictionaryReader method browseNextAsync.

private CompletableFuture<List<ReferenceDescription>> browseNextAsync(ByteString continuationPoint, List<ReferenceDescription> references) {
    RequestHeader requestHeader = stackClient.newRequestHeader(session.getAuthenticationToken(), stackClient.getConfig().getRequestTimeout());
    BrowseNextRequest request = new BrowseNextRequest(requestHeader, false, new ByteString[] { continuationPoint });
    return stackClient.sendRequest(request).thenApply(BrowseNextResponse.class::cast).thenCompose(response -> {
        BrowseResult result = l(response.getResults()).get(0);
        return maybeBrowseNext(result, references);
    });
}
Also used : RequestHeader(org.eclipse.milo.opcua.stack.core.types.structured.RequestHeader) BrowseNextRequest(org.eclipse.milo.opcua.stack.core.types.structured.BrowseNextRequest) BrowseResult(org.eclipse.milo.opcua.stack.core.types.structured.BrowseResult)

Example 2 with BrowseNextRequest

use of org.eclipse.milo.opcua.stack.core.types.structured.BrowseNextRequest in project milo by eclipse.

the class BrowseHelper method browseNext.

public void browseNext(ServiceRequest service) {
    OpcUaServer server = service.attr(ServiceAttributes.SERVER_KEY).get();
    BrowseNextRequest request = (BrowseNextRequest) service.getRequest();
    List<ByteString> continuationPoints = l(request.getContinuationPoints());
    if (continuationPoints.size() > server.getConfig().getLimits().getMaxBrowseContinuationPoints().intValue()) {
        service.setServiceFault(StatusCodes.Bad_TooManyOperations);
    } else {
        server.getExecutorService().execute(new BrowseNext(server, service));
    }
}
Also used : OpcUaServer(org.eclipse.milo.opcua.sdk.server.OpcUaServer) ByteString(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString) BrowseNextRequest(org.eclipse.milo.opcua.stack.core.types.structured.BrowseNextRequest)

Aggregations

BrowseNextRequest (org.eclipse.milo.opcua.stack.core.types.structured.BrowseNextRequest)2 OpcUaServer (org.eclipse.milo.opcua.sdk.server.OpcUaServer)1 ByteString (org.eclipse.milo.opcua.stack.core.types.builtin.ByteString)1 BrowseResult (org.eclipse.milo.opcua.stack.core.types.structured.BrowseResult)1 RequestHeader (org.eclipse.milo.opcua.stack.core.types.structured.RequestHeader)1