java.lang.Object
org.eclipse.milo.opcua.sdk.client.nodes.UaNode
org.eclipse.milo.opcua.sdk.client.nodes.UaObjectNode
All Implemented Interfaces:
org.eclipse.milo.opcua.sdk.core.nodes.Node, org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
Direct Known Subclasses:
BaseObjectTypeNode

public class UaObjectNode extends UaNode implements org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
  • Constructor Details

    • UaObjectNode

      public UaObjectNode(OpcUaClient client, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass nodeClass, org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText displayName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText description, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger writeMask, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger userWriteMask, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte eventNotifier)
      Construct a UaObjectNode using only attributes defined prior to OPC UA 1.04.
    • UaObjectNode

      public UaObjectNode(OpcUaClient client, org.eclipse.milo.opcua.stack.core.types.builtin.NodeId nodeId, org.eclipse.milo.opcua.stack.core.types.enumerated.NodeClass nodeClass, org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText displayName, org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText description, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger writeMask, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger userWriteMask, org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType[] rolePermissions, org.eclipse.milo.opcua.stack.core.types.structured.RolePermissionType[] userRolePermissions, org.eclipse.milo.opcua.stack.core.types.structured.AccessRestrictionType accessRestrictions, org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte eventNotifier)
      Construct a UaObjectNode using all attributes, including those defined by OPC UA 1.04.
  • Method Details

    • getEventNotifier

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte getEventNotifier()

      The returned attribute is the most recently seen value; it is not read live from the server.

      Specified by:
      getEventNotifier in interface org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
      See Also:
    • setEventNotifier

      public void setEventNotifier(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte eventNotifier)

      The attribute is only updated locally; it is not written to the server.

      Specified by:
      setEventNotifier in interface org.eclipse.milo.opcua.sdk.core.nodes.ObjectNode
      See Also:
    • readEventNotifier

      public org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte readEventNotifier() throws org.eclipse.milo.opcua.stack.core.UaException
      Read the EventNotifier attribute for this Node from the server and update the local attribute if the operation succeeds.
      Returns:
      the UByte read from the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.s
    • writeEventNotifier

      public void writeEventNotifier(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte eventNotifier) throws org.eclipse.milo.opcua.stack.core.UaException
      Write a new EventNotifier attribute for this Node to the server and update the local attribute if the operation succeeds.
      Parameters:
      eventNotifier - the UByte to write to the server.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if a service- or operation-level error occurs.
    • callMethod

      public org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] callMethod(String methodName, org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the method named methodName on this Object, if it exists, using inputs as the input argument values.
      Parameters:
      methodName - the name of the method to call.
      inputs - the input argument values.
      Returns:
      the method's output argument values if the call was successful.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an operation- or service-level error occurs or if a method named methodName could not be found.
    • callMethod

      public org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] callMethod(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName methodName, org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs) throws org.eclipse.milo.opcua.stack.core.UaException
      Call the method named methodName on this Object, if it exists, using inputs as the input argument values.
      Parameters:
      methodName - the name of the method to call.
      inputs - the input argument values.
      Returns:
      the method's output argument values if the call was successful.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an operation- or service-level error occurs or if a method named methodName could not be found.
    • callMethodAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]> callMethodAsync(String methodName, org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs)
      Call the method named methodName on this Object, if it exists, using inputs as the input argument values.

      This call completes asynchronously.

      Parameters:
      methodName - the name of the method to call.
      inputs - the input argument values.
      Returns:
      a CompletableFuture that completes successfully with the method's output argument values if the call was successful, or completes exceptionally if an operation- or service-level error occurs or if a method named methodName could not be found.
    • callMethodAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.Variant[]> callMethodAsync(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName methodName, org.eclipse.milo.opcua.stack.core.types.builtin.Variant[] inputs)
      Call the method named methodName on this Object, if it exists, using inputs as the input argument values.

      This call completes asynchronously.

      Parameters:
      methodName - the name of the method to call.
      inputs - the input argument values.
      Returns:
      a CompletableFuture that completes successfully with the method's output argument values if the call was successful, or completes exceptionally if an operation- or service-level error occurs or if a method named methodName could not be found.
    • getMethod

      public UaMethod getMethod(String methodName) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the method named methodName on this Object, if it exists.
      Parameters:
      methodName - the name of the method.
      Returns:
      a UaMethod for the method named methodName.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an operation- or service-level error occurs or a method named methodName could not be found.
    • getMethod

      public UaMethod getMethod(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName methodName) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the method named methodName on this Object, if it exists.
      Parameters:
      methodName - the name of the method.
      Returns:
      a UaMethod for the method named methodName.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if an operation- or service-level error occurs or a method named methodName could not be found.
    • getMethodAsync

      public CompletableFuture<UaMethod> getMethodAsync(String methodName)
      Get the method named methodName on this Object, if it exists.

      This call completes asynchronously.

      Parameters:
      methodName - the name of the method.
      Returns:
      a CompletableFuture that completes successfully with a UaMethod or completes exceptionally if an operation- or service-level error occurs or if a method named methodName could not be found.
    • getMethodAsync

      public CompletableFuture<UaMethod> getMethodAsync(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName methodName)
      Get the method named methodName on this Object, if it exists.

      This call completes asynchronously.

      Parameters:
      methodName - the name of the method.
      Returns:
      a CompletableFuture that completes successfully with a UaMethod or completes exceptionally if an operation- or service-level error occurs or if a method named methodName could not be found.
    • getObjectComponent

      public UaObjectNode getObjectComponent(String name) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      name - the browse name of the UaObjectNode component.
      Returns:
      the UaObjectNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getObjectComponent

      public UaObjectNode getObjectComponent(String namespaceUri, String name) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      namespaceUri - the namespace URI the browse name belongs to.
      name - the browse name of the UaObjectNode component.
      Returns:
      the UaObjectNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getObjectComponent

      public UaObjectNode getObjectComponent(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaObjectNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      browseName - the browse name of the UaObjectNode component.
      Returns:
      the UaObjectNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getObjectComponentAsync

      public CompletableFuture<? extends UaObjectNode> getObjectComponentAsync(String name)
    • getObjectComponentAsync

      public CompletableFuture<? extends UaObjectNode> getObjectComponentAsync(String namespaceUri, String name)
    • getObjectComponentAsync

      public CompletableFuture<? extends UaObjectNode> getObjectComponentAsync(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName)
    • getVariableComponent

      public UaVariableNode getVariableComponent(String name) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaVariableNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      name - the browse name of the UaVariableNode component.
      Returns:
      the UaVariableNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getVariableComponent

      public UaVariableNode getVariableComponent(String namespaceUri, String name) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaVariableNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      namespaceUri - the namespace URI the browse name belongs to.
      name - the browse name of the UaVariableNode component.
      Returns:
      the UaVariableNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getVariableComponent

      public UaVariableNode getVariableComponent(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName) throws org.eclipse.milo.opcua.stack.core.UaException
      Get the UaVariableNode referenced by a HasComponent reference type with a browse name of name, if it exists.
      Parameters:
      browseName - the browse name of the UaVariableNode component.
      Returns:
      the UaVariableNode component, if it exists.
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException - if the node could not be found or an operation- or service-level error occurs.
    • getVariableComponentAsync

      public CompletableFuture<? extends UaVariableNode> getVariableComponentAsync(String name)
    • getVariableComponentAsync

      public CompletableFuture<? extends UaVariableNode> getVariableComponentAsync(String namespaceUri, String name)
    • getVariableComponentAsync

      public CompletableFuture<? extends UaVariableNode> getVariableComponentAsync(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName browseName)
    • getTypeDefinition

      public UaObjectTypeNode getTypeDefinition() throws org.eclipse.milo.opcua.stack.core.UaException
      Throws:
      org.eclipse.milo.opcua.stack.core.UaException
    • getTypeDefinitionAsync

      public CompletableFuture<? extends UaObjectTypeNode> getTypeDefinitionAsync()
    • getNodeVersionAsync

      public CompletableFuture<String> getNodeVersionAsync()
      Get the value of the ObjectNodeProperties.NodeVersion Property, if it exists.
      Returns:
      the value of the NodeVersion Property, if it exists.
      See Also:
      • ObjectNodeProperties
    • getIconAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.ByteString> getIconAsync()
      Get the value of the ObjectNodeProperties.Icon Property, if it exists.
      Returns:
      the value of the Icon Property, if it exists.
      See Also:
      • ObjectNodeProperties
    • getNamingRuleAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.enumerated.NamingRuleType> getNamingRuleAsync()
      Get the value of the ObjectNodeProperties.NamingRule Property, if it exists.
      Returns:
      the value of the NamingRule Property, if it exists.
      See Also:
      • ObjectNodeProperties
    • setNodeVersionAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> setNodeVersionAsync(String nodeVersion)
      Set the value of the ObjectNodeProperties.NodeVersion Property, if it exists.
      Parameters:
      nodeVersion - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • ObjectNodeProperties
    • setIconAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> setIconAsync(org.eclipse.milo.opcua.stack.core.types.builtin.ByteString icon)
      Set the value of the ObjectNodeProperties.Icon Property, if it exists.
      Parameters:
      icon - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • ObjectNodeProperties
    • setNamingRuleAsync

      public CompletableFuture<org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode> setNamingRuleAsync(org.eclipse.milo.opcua.stack.core.types.enumerated.NamingRuleType namingRule)
      Set the value of the ObjectNodeProperties.NamingRule Property, if it exists.
      Parameters:
      namingRule - the value to set.
      Returns:
      a CompletableFuture that completes with the StatusCode of the write operation.
      See Also:
      • ObjectNodeProperties
    • getAttributeValue

      protected org.eclipse.milo.opcua.stack.core.types.builtin.DataValue getAttributeValue(org.eclipse.milo.opcua.stack.core.AttributeId attributeId)
      Overrides:
      getAttributeValue in class UaNode
    • setAttributeValue

      protected void setAttributeValue(org.eclipse.milo.opcua.stack.core.AttributeId attributeId, org.eclipse.milo.opcua.stack.core.types.builtin.DataValue value)
      Overrides:
      setAttributeValue in class UaNode