com.prosysopc.ua.client.nodes
Class UaInstanceImpl

java.lang.Object
  extended by com.prosysopc.ua.nodes.AbstractUaNode
      extended by com.prosysopc.ua.client.nodes.UaNodeImpl
          extended by com.prosysopc.ua.client.nodes.UaInstanceImpl
All Implemented Interfaces:
UaInstance, UaNode
Direct Known Subclasses:
UaObjectImpl, UaVariableImpl

public abstract class UaInstanceImpl
extends UaNodeImpl
implements UaInstance

Straight forward implementation of UaInstance.

It keeps all attributes in memory.

Note that the OPC UA Specification does not define or represent such a common "base class" for all instance nodes. However, all instance nodes support TypeDefinition reference. In principle UaInstance separates the instance nodes from type nodes, which implement UaType.


Field Summary
 
Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addressSpace, references, supportedAttributesMap
 
Constructor Summary
UaInstanceImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName)
           
UaInstanceImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName, org.opcfoundation.ua.builtintypes.LocalizedText description, EnumSet<WriteAccess> writeMask, EnumSet<WriteAccess> userWriteMask, UaClientReference[] references, UaProperty[] properties)
           
UaInstanceImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, String name, Locale locale)
           
 
Method Summary
 UaType getTypeDefinition()
          The UaType object corresponding to TypeDefinitionId.
 org.opcfoundation.ua.builtintypes.ExpandedNodeId getTypeDefinitionId()
          Reference to the NodeId of the object's type definition.
 void setTypeDefinition(UaType type)
          Sets the type of the node.
 void setTypeDefinitionId(org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
          Sets the type definition to an ExpandedNodeId.
 void setTypeDefinitionId(org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
          Sets the type definition to a local NodeId.
 String toString()
           
 
Methods inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addComponent, addProperties, addProperty, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, assertTypeSupport, assertTypeSupport, beforeAddReference, deleteReference, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, equals, findPlaceholders, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeClass, getNodeId, getNodeVersion, getNodeVersionString, getProperties, getProperty, getPropertyValue, getReference, getReferenceList, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hashCode, hasProperty, hasTypeDefinition, hasUserWriteAccess, hasWriteAccess, initSupportedAttributes, readAttribute, readAttribute, readAttributeValue, referenceTypeInherits, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setNodeVersion, setPropertyValue, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute, writeAttributeValue
 
Methods inherited from class com.prosysopc.ua.nodes.AbstractUaNode
getForwardReferences, getInverseReferences, getReferences, getReferences, getReferencesAsList, referenceTypeInherits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.prosysopc.ua.nodes.UaNode
addComponent, addProperty, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeClass, getNodeId, getNodeVersion, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 

Constructor Detail

UaInstanceImpl

public UaInstanceImpl(AddressSpace addressSpace,
                      org.opcfoundation.ua.builtintypes.NodeId nodeId,
                      org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                      org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Parameters:
nodeId -
browseName -
displayName -

UaInstanceImpl

public UaInstanceImpl(AddressSpace addressSpace,
                      org.opcfoundation.ua.builtintypes.NodeId nodeId,
                      org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                      org.opcfoundation.ua.builtintypes.LocalizedText displayName,
                      org.opcfoundation.ua.builtintypes.LocalizedText description,
                      EnumSet<WriteAccess> writeMask,
                      EnumSet<WriteAccess> userWriteMask,
                      UaClientReference[] references,
                      UaProperty[] properties)
Parameters:
nodeId -
browseName -
displayName -
description -
writeMask -
userWriteMask -
references -
properties -

UaInstanceImpl

public UaInstanceImpl(AddressSpace addressSpace,
                      org.opcfoundation.ua.builtintypes.NodeId nodeId,
                      String name,
                      Locale locale)
Parameters:
nodeId -
name -
locale -
Method Detail

getTypeDefinition

public UaType getTypeDefinition()
Description copied from interface: UaInstance
The UaType object corresponding to TypeDefinitionId. Note that the TypeDefinition may be null at certain circumstances although TypeDefinitionId is defined (although it should be implemented generally such that the node is retrieved automatically using TypeDefinitionId).

Specified by:
getTypeDefinition in interface UaInstance
Returns:
the type of the node, if it has such, or null
See Also:
UaInstance.getTypeDefinitionId(), UaInstance.setTypeDefinition(UaType), UaInstance.setTypeDefinitionId(NodeId), UaInstance.setTypeDefinitionId(ExpandedNodeId)

getTypeDefinitionId

public org.opcfoundation.ua.builtintypes.ExpandedNodeId getTypeDefinitionId()
Reference to the NodeId of the object's type definition. Type definitions are only available for the NodeClasses Object and Variable. For all other NodeClasses a null NodeId shall be returned.

Specified by:
getTypeDefinitionId in interface UaInstance
Returns:
See Also:
UaInstance.getTypeDefinition(), UaInstance.setTypeDefinition(UaType), UaInstance.setTypeDefinitionId(NodeId), UaInstance.setTypeDefinitionId(ExpandedNodeId)

setTypeDefinition

public void setTypeDefinition(UaType type)
Sets the type of the node. Also sets typeDefinition, if type is not null. Type definitions are only available for the NodeClasses Object and Variable.

Specified by:
setTypeDefinition in interface UaInstance
Parameters:
type -
See Also:
UaInstance.getTypeDefinitionId(), UaInstance.getTypeDefinition(), UaInstance.setTypeDefinitionId(ExpandedNodeId), UaInstance.setTypeDefinitionId(NodeId)

setTypeDefinitionId

public void setTypeDefinitionId(org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
Sets the type definition to an ExpandedNodeId. Unsets type. Type definitions are only available for the NodeClasses Object and Variable.

Specified by:
setTypeDefinitionId in interface UaInstance
Parameters:
typeDefinition -
See Also:
UaInstance.getTypeDefinitionId(), UaInstance.getTypeDefinition(), UaInstance.setTypeDefinition(UaType), UaInstance.setTypeDefinitionId(NodeId)

setTypeDefinitionId

public final void setTypeDefinitionId(org.opcfoundation.ua.builtintypes.NodeId typeDefinition)
Description copied from interface: UaInstance
Sets the type definition to a local NodeId.

If

Specified by:
setTypeDefinitionId in interface UaInstance
Parameters:
typeDefinition - the type definition Id to set
See Also:
UaInstance.getTypeDefinitionId(), UaInstance.getTypeDefinition(), UaInstance.setTypeDefinition(UaType), UaInstance.setTypeDefinitionId(ExpandedNodeId)

toString

public String toString()
Overrides:
toString in class UaNodeImpl


Copyright © 2018. All rights reserved.