Class UaMethod
java.lang.Object
org.eclipse.milo.opcua.sdk.client.methods.UaMethod
A callable method belonging to an ObjectNode.
-
Constructor Summary
ConstructorsConstructorDescriptionUaMethod(OpcUaClient client, UaObjectNode objectNode, UaMethodNode methodNode, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] inputArguments, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] outputArguments) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.milo.opcua.stack.core.types.builtin.Variant[]call(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) Call this method, passing the values ininputsfor the input arguments.CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]>callAsync(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) Call this method, passing the values ininputsfor the input arguments.org.eclipse.milo.opcua.stack.core.types.structured.Argument[]Get the input arguments for this method.Get theUaMethodNodefor this method.Get theUaObjectNodethis method belongs to.org.eclipse.milo.opcua.stack.core.types.structured.Argument[]Get the output arguments for this method.
-
Constructor Details
-
UaMethod
public UaMethod(OpcUaClient client, UaObjectNode objectNode, UaMethodNode methodNode, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] inputArguments, org.eclipse.milo.opcua.stack.core.types.structured.Argument[] outputArguments)
-
-
Method Details
-
getObjectNode
Get theUaObjectNodethis method belongs to.- Returns:
- the
UaObjectNodethis method belongs to.
-
getMethodNode
Get theUaMethodNodefor this method.- Returns:
- the
UaMethodNodefor this method.
-
getInputArguments
public org.eclipse.milo.opcua.stack.core.types.structured.Argument[] getInputArguments()Get the input arguments for this method.The array will be empty if there are no inputs.
- Returns:
- the input arguments for this method.
-
getOutputArguments
public org.eclipse.milo.opcua.stack.core.types.structured.Argument[] getOutputArguments()Get the output arguments for this method.The array will be empty if there are no outputs.
- Returns:
- the output arguments for this method.
-
call
public org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] call(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) throws UaMethodException, org.eclipse.milo.opcua.stack.core.UaException Call this method, passing the values ininputsfor the input arguments.- Parameters:
inputs- an array ofVariants containing the input values.- Returns:
- an array of
Variants containing the output values. - Throws:
org.eclipse.milo.opcua.stack.core.UaException- if a service-level error occurs.UaMethodException- if the operation-level result was not good.
-
callAsync
public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]> callAsync(org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) Call this method, passing the values ininputsfor the input arguments.This method completes asynchronously.
- Parameters:
inputs- an array ofVariants containing the input values.- Returns:
- a
CompletableFuturethat completes successfully with the output values or completes exceptionally if an operation- or service-level error occurs.
-