|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UaNode
OPC UA Node interface.
The interface defines common functionality of all UA nodes, according to the UA specification.
All nodes define the attributes: NodeClass, NodeId, BrowseName, DisplayName and Description, WriteMask, UserWriteMask. They can also have References to other nodes and Properties.
There is one common property, which is optional, though, NodeVersion.
All nodes also support readAttribute, which can be used to read any attribute value and writeAttribute to (attempt to) set any attribute value.
| Method Summary | |
|---|---|
UaReference |
addComponent(UaNode node)
Adds a new component to the Node. |
UaReference |
addProperty(UaProperty property)
Add a new property node to the node. |
UaReference |
addReference(org.opcfoundation.ua.builtintypes.ExpandedNodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Convenience method for addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId. |
UaReference |
addReference(org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Adds a new reference of the specified type to the specified node. |
UaReference |
addReference(UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Add a reference to the node. |
UaReference |
deleteReference(org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node. |
UaReference |
deleteReference(org.opcfoundation.ua.builtintypes.NodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node. |
UaReference |
deleteReference(UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node. |
UaReference |
deleteReference(UaReference reference)
Delete a reference from the node. |
UaAddressSpace |
getAddressSpace()
Returns the (@link UaAddressSpace) of the (@link UaNode). |
org.opcfoundation.ua.core.NodeAttributes |
getAttributes()
|
org.opcfoundation.ua.builtintypes.QualifiedName |
getBrowseName()
Nodes have a BrowseName Attribute that is used as a non-localised human-readable name when browsing the AddressSpace to create paths out of BrowseNames. |
UaNode |
getComponent(org.opcfoundation.ua.builtintypes.QualifiedName componentName)
Get the component, which has the specified name. |
UaNode[] |
getComponents()
Get a list of components of this node, i.e. target nodes of all forward HasComponent references. |
org.opcfoundation.ua.builtintypes.LocalizedText |
getDescription()
The optional Description Attribute shall explain the meaning of the Node in a localized text using the same mechanisms for localization as described for the DisplayName. |
org.opcfoundation.ua.builtintypes.LocalizedText |
getDisplayName()
The DisplayName Attribute contains the localised name of the Node. |
UaReference[] |
getForwardReferences(org.opcfoundation.ua.builtintypes.NodeId... referenceTypeIds)
Get all forward references of this node. |
UaReference[] |
getInverseReferences(org.opcfoundation.ua.builtintypes.NodeId... referenceTypeIds)
Get all inverse references of this node. |
UaMethod |
getMethod(org.opcfoundation.ua.builtintypes.QualifiedName methodName)
Get the method, which has the specified name. |
org.opcfoundation.ua.core.NodeClass |
getNodeClass()
The NodeClass Attribute identifies the NodeClass of a Node. |
org.opcfoundation.ua.builtintypes.NodeId |
getNodeId()
Nodes are unambiguously identified using a constructed identifier called the NodeId. |
UaProperty |
getNodeVersion()
|
UaProperty[] |
getProperties()
|
UaProperty |
getProperty(org.opcfoundation.ua.builtintypes.QualifiedName name)
Find the property with the specified name. |
UaReference |
getReference(org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Finds the first reference of the specified reference type. |
UaReference[] |
getReferences()
Returns all references of the Node. |
UaReference[] |
getReferences(org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
Finds all references of the specified reference type. |
org.opcfoundation.ua.builtintypes.UnsignedInteger[] |
getSupportedAttributes()
|
EnumSet<WriteAccess> |
getUserWriteMask()
The optional UserWriteMask Attribute exposes the possibilities of a client to write the Attributes of the Node taking user access rights into account. |
EnumSet<WriteAccess> |
getWriteMask()
The optional WriteMask Attribute exposes the possibilities of a client to write the Attributes of the Node. |
boolean |
hasUserWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Checks additional user access rights to the node. |
boolean |
hasWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Check the common access rights of a node attribute. |
org.opcfoundation.ua.builtintypes.DataValue |
readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Read the current value of an attribute. |
void |
readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue,
Locale locale)
|
UaNode |
removeComponent(UaNode component)
Remove a component reference from the node. |
UaProperty |
removeProperty(org.opcfoundation.ua.builtintypes.QualifiedName name)
Remove the property with the specified name. |
void |
setAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
Unconditionally, set the value of the specified attribute. |
void |
setAttributes(org.opcfoundation.ua.core.NodeAttributes nodeAttributes)
|
void |
setBrowseName(org.opcfoundation.ua.builtintypes.QualifiedName browseName)
|
void |
setDescription(org.opcfoundation.ua.builtintypes.LocalizedText description)
|
void |
setDisplayName(org.opcfoundation.ua.builtintypes.LocalizedText displayName)
|
void |
setReferences(UaReference[] references)
Set all references of the node at one call. |
void |
setUserWriteMask(EnumSet<WriteAccess> userWriteMask)
|
void |
setWriteMask(EnumSet<WriteAccess> writeMask)
|
boolean |
supportsAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Check if the node supports the specified attribute. |
boolean |
writeAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
Write the attribute value in a node. |
| Method Detail |
|---|
UaReference addComponent(UaNode node)
Depending on the background implementation, the component node may also get added.
This is a shortcut for
addReference(component, Identifiers.HasComponent, false);
node - the component node
IllegalArgumentException - if the node is not of the correct class (see above)addReference(UaNode, NodeId, boolean)UaReference addProperty(UaProperty property)
Adds a new forward HasProperty reference with target to the property node.
property - the property to add to the node
UaReference addReference(org.opcfoundation.ua.builtintypes.ExpandedNodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId.
nodeId - The target nodereferenceTypeId - The reference typeisInverse - Whether the reference is an inverse reference (or forward, if isInverse=false)
UaReference addReference(org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
nodeId - The target node of the referencereferenceTypeId - The reference typeisInverse - Whether the reference is an inverse reference (or forward, if isInverse=false)
UaReference addReference(UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
targetNode - The target node where the reference points to.referenceTypeId - The type of reference.isInverse - Whether the reference is an inverse reference.
UaReference deleteReference(org.opcfoundation.ua.builtintypes.ExpandedNodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
targetNodeId - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.
UaReference deleteReference(org.opcfoundation.ua.builtintypes.NodeId targetNodeId,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
targetNodeId - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.
UaReference deleteReference(UaNode targetNode,
org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
targetNode - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.UaReference deleteReference(UaReference reference)
reference - The reference to delete.UaAddressSpace getAddressSpace()
org.opcfoundation.ua.core.NodeAttributes getAttributes()
org.opcfoundation.ua.builtintypes.QualifiedName getBrowseName()
A BrowseName should never be used to display the name of a Node. The DisplayName should be used instead for this purpose.
Unlike NodeIds, the BrowseName cannot be used to unambiguously identify a Node. Different Nodes may have the same BrowseName.
AddressSpace.translateBrowsePathsToNodeIds(org.opcfoundation.ua.core.BrowsePath...)UaNode getComponent(org.opcfoundation.ua.builtintypes.QualifiedName componentName)
componentName - the BrowseName of the component to get
UaNode[] getComponents()
org.opcfoundation.ua.builtintypes.LocalizedText getDescription()
org.opcfoundation.ua.builtintypes.LocalizedText getDisplayName()
The string part of the DisplayName is restricted to 512 characters.
UaReference[] getForwardReferences(org.opcfoundation.ua.builtintypes.NodeId... referenceTypeIds)
referenceTypeIds - the reference types that are used to filter the set.
getInverseReferences(NodeId...),
getReferences(NodeId, boolean),
getReferences(),
getReference(NodeId, boolean)UaReference[] getInverseReferences(org.opcfoundation.ua.builtintypes.NodeId... referenceTypeIds)
referenceTypeIds - the reference types that are used to filter the set.
getForwardReferences(NodeId...),
getReferences(NodeId, boolean),
getReferences(),
getReference(NodeId, boolean)
UaMethod getMethod(org.opcfoundation.ua.builtintypes.QualifiedName methodName)
throws ClassCastException
methodName - the BrowseName (in namespace 0) of the method to get
ClassCastException - if the node is not a method nodeorg.opcfoundation.ua.core.NodeClass getNodeClass()
org.opcfoundation.ua.builtintypes.NodeId getNodeId()
UaProperty getNodeVersion()
UaProperty[] getProperties()
UaProperty getProperty(org.opcfoundation.ua.builtintypes.QualifiedName name)
name - the name of the property
UaReference getReference(org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
referenceTypeId - the reference type to search (or null to accept any)isInverse - To search for inverse reference, instead of non-inverse (applied also if null
referenceType is defined)
UaReference[] getReferences()
UaReference[] getReferences(org.opcfoundation.ua.builtintypes.NodeId referenceTypeId,
boolean isInverse)
referenceTypeId - the reference type to search (or null to accept any)isInverse - To search for inverse reference, instead of non-inverse (applied also if null
referenceType is defined)
org.opcfoundation.ua.builtintypes.UnsignedInteger[] getSupportedAttributes()
EnumSet<WriteAccess> getUserWriteMask()
The UserWriteMask Attribute can only further restrict the WriteMask Attribute, when it is set to not writable in the general case that applies for every user.
EnumSet<WriteAccess> getWriteMask()
boolean hasUserWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
attributeId - the attribute to check
boolean hasWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
attributeId - the attribute to check
org.opcfoundation.ua.builtintypes.DataValue readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
attributeId - the attribute to read - the valid values are defined in
Attributes. Also check
supportsAttribute(UnsignedInteger) whether the node actually supports this
attribute type.
supportsAttribute(UnsignedInteger)
void readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue,
Locale locale)
UaNode removeComponent(UaNode component)
This is a shortcut for
deleteReference(component, Identifiers.HasComponent, false);
Note that the method does not remove the component - it only removes the reference to it.
component - the component node to removedeleteReference(UaNode, NodeId, boolean)UaProperty removeProperty(org.opcfoundation.ua.builtintypes.QualifiedName name)
name - the name of the property
void setAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
attributeId - dataValue -
StatusExceptionvoid setAttributes(org.opcfoundation.ua.core.NodeAttributes nodeAttributes)
nodeAttributes - void setBrowseName(org.opcfoundation.ua.builtintypes.QualifiedName browseName)
browseName - the new BrowseName to setgetBrowseName()void setDescription(org.opcfoundation.ua.builtintypes.LocalizedText description)
description - the new description to setgetDescription()void setDisplayName(org.opcfoundation.ua.builtintypes.LocalizedText displayName)
displayName - the new DisplayName to setgetDisplayName()void setReferences(UaReference[] references)
Use addReference(org.opcfoundation.ua.builtintypes.ExpandedNodeId, org.opcfoundation.ua.builtintypes.NodeId, boolean) to add new references to the node.
references - the references to setgetReferences(),
getReference(NodeId, boolean)void setUserWriteMask(EnumSet<WriteAccess> userWriteMask)
userWriteMask - the new UserWriteMask to setgetUserWriteMask()void setWriteMask(EnumSet<WriteAccess> writeMask)
writeMask - the new WriteMask to setgetWriteMask()boolean supportsAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Use the method to check if the node object you have is actually supporting a specific UA
Attribute. The supported attributes are available from specific Java properties, and the values
can also be read with readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger).
attributeId - the attribute to check - the valid values are defined in
Attributes
boolean writeAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
attributeId - the attribute to write - the valid values are defined in
AttributesdataValue - the new value, if this is null, the status of the attribute is set to
StatusCode.BAD, otherwise the status and value are used from it
StatusException - if the write is not accepted (for above mentioned reasons)supportsAttribute(UnsignedInteger)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||