Search in sources :

Example 1 with Out

use of org.eclipse.milo.opcua.sdk.server.api.methods.Out in project milo by eclipse.

the class GetMonitoredItemsMethod method invoke.

@Override
protected Variant[] invoke(AbstractMethodInvocationHandler.InvocationContext context, Variant[] inputValues) throws UaException {
    UInteger subscriptionId = (UInteger) inputValues[0].getValue();
    Out<UInteger[]> serverHandles = new Out<UInteger[]>();
    Out<UInteger[]> clientHandles = new Out<UInteger[]>();
    invoke(context, subscriptionId, serverHandles, clientHandles);
    return new Variant[] { new Variant(serverHandles.get()), new Variant(clientHandles.get()) };
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) UInteger(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger) Out(org.eclipse.milo.opcua.sdk.server.api.methods.Out)

Example 2 with Out

use of org.eclipse.milo.opcua.sdk.server.api.methods.Out in project milo by eclipse.

the class OpenMethod method invoke.

@Override
protected Variant[] invoke(AbstractMethodInvocationHandler.InvocationContext context, Variant[] inputValues) throws UaException {
    UByte mode = (UByte) inputValues[0].getValue();
    Out<UInteger> fileHandle = new Out<UInteger>();
    invoke(context, mode, fileHandle);
    return new Variant[] { new Variant(fileHandle.get()) };
}
Also used : UByte(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte) Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) UInteger(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger) Out(org.eclipse.milo.opcua.sdk.server.api.methods.Out)

Example 3 with Out

use of org.eclipse.milo.opcua.sdk.server.api.methods.Out in project milo by eclipse.

the class UpdateCertificateMethod method invoke.

@Override
protected Variant[] invoke(AbstractMethodInvocationHandler.InvocationContext context, Variant[] inputValues) throws UaException {
    NodeId certificateGroupId = (NodeId) inputValues[0].getValue();
    NodeId certificateTypeId = (NodeId) inputValues[1].getValue();
    ByteString certificate = (ByteString) inputValues[2].getValue();
    ByteString[] issuerCertificates = (ByteString[]) inputValues[3].getValue();
    String privateKeyFormat = (String) inputValues[4].getValue();
    ByteString privateKey = (ByteString) inputValues[5].getValue();
    Out<Boolean> applyChangesRequired = new Out<Boolean>();
    invoke(context, certificateGroupId, certificateTypeId, certificate, issuerCertificates, privateKeyFormat, privateKey, applyChangesRequired);
    return new Variant[] { new Variant(applyChangesRequired.get()) };
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) ByteString(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString) NodeId(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId) ByteString(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString) Out(org.eclipse.milo.opcua.sdk.server.api.methods.Out)

Example 4 with Out

use of org.eclipse.milo.opcua.sdk.server.api.methods.Out in project milo by eclipse.

the class CloseAndUpdateMethod method invoke.

@Override
protected Variant[] invoke(AbstractMethodInvocationHandler.InvocationContext context, Variant[] inputValues) throws UaException {
    UInteger fileHandle = (UInteger) inputValues[0].getValue();
    Out<Boolean> applyChangesRequired = new Out<Boolean>();
    invoke(context, fileHandle, applyChangesRequired);
    return new Variant[] { new Variant(applyChangesRequired.get()) };
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) UInteger(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger) Out(org.eclipse.milo.opcua.sdk.server.api.methods.Out)

Example 5 with Out

use of org.eclipse.milo.opcua.sdk.server.api.methods.Out in project milo by eclipse.

the class MoveOrCopyMethod method invoke.

@Override
protected Variant[] invoke(AbstractMethodInvocationHandler.InvocationContext context, Variant[] inputValues) throws UaException {
    NodeId objectToMoveOrCopy = (NodeId) inputValues[0].getValue();
    NodeId targetDirectory = (NodeId) inputValues[1].getValue();
    Boolean createCopy = (Boolean) inputValues[2].getValue();
    String newName = (String) inputValues[3].getValue();
    Out<NodeId> newNodeId = new Out<NodeId>();
    invoke(context, objectToMoveOrCopy, targetDirectory, createCopy, newName, newNodeId);
    return new Variant[] { new Variant(newNodeId.get()) };
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) NodeId(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId) Out(org.eclipse.milo.opcua.sdk.server.api.methods.Out)

Aggregations

Out (org.eclipse.milo.opcua.sdk.server.api.methods.Out)10 Variant (org.eclipse.milo.opcua.stack.core.types.builtin.Variant)10 UInteger (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger)7 ByteString (org.eclipse.milo.opcua.stack.core.types.builtin.ByteString)3 NodeId (org.eclipse.milo.opcua.stack.core.types.builtin.NodeId)3 UByte (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte)1 ULong (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.ULong)1