|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.nodes.AbstractUaNode
com.prosysopc.ua.server.nodes.ServerNode
com.prosysopc.ua.server.nodes.BaseNode
com.prosysopc.ua.server.nodes.UaExternalNodeImpl
public class UaExternalNodeImpl
A server side implementation of the UaExternalNode.
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
logger
|
| Fields inherited from class com.prosysopc.ua.server.nodes.BaseNode |
|---|
NODE_VERSION_PROPERTY_NAME |
| Fields inherited from class com.prosysopc.ua.server.nodes.ServerNode |
|---|
eventListeners, INITIALIZATION_TIME, nodeManager, supportedAttributesMap |
| Constructor Summary | |
|---|---|
UaExternalNodeImpl(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId)
|
|
| Method Summary | |
|---|---|
void |
addSubType(UaType type)
Add a new sub type for the type. |
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. |
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. |
Boolean |
getIsAbstract()
A boolean Attribute with the following values: true
it is an abstract Type, i.e. no instances of this type shall exist, only of its subtypes. |
Class<?> |
getJavaClass()
Defines a Java class which is used to keep data of the specified UA type. |
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. |
UaProperty |
getNodeVersion()
|
UaType |
getSuperType()
|
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 |
hasSuperType()
|
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. |
boolean |
inheritsFrom(org.opcfoundation.ua.builtintypes.NodeId typeId)
Check if the type inherits from the specified type. |
boolean |
inheritsFrom(UaType type)
Check if the type inherits from the specified type. |
protected void |
initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
|
org.opcfoundation.ua.builtintypes.DataValue |
readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Read the current value of an attribute. |
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 |
setIsAbstract(Boolean isAbstract)
|
void |
setJavaClass(Class<?> javaClass)
|
void |
setSuperType(UaType parent)
Set the ModelParent reference. |
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. |
String |
toString()
|
| Methods inherited from class com.prosysopc.ua.nodes.AbstractUaNode |
|---|
getForwardReferences, getInverseReferences, getReferences, getReferences, 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, getComponents, getForwardReferences, getInverseReferences, getNodeId, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, readAttribute, removeComponent, setReferences, writeAttribute |
| Field Detail |
|---|
protected static final org.slf4j.Logger logger
| Constructor Detail |
|---|
public UaExternalNodeImpl(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId)
| Method Detail |
|---|
public void addSubType(UaType type)
UaTypeAdds a new reference of type HasSubType to the node with target set to type.
addSubType in interface UaTypetype - the node to add.public org.opcfoundation.ua.core.NodeAttributes getAttributes()
getAttributes in interface UaNodegetAttributes in class BaseNodepublic org.opcfoundation.ua.builtintypes.QualifiedName getBrowseName()
UaNodeA 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.
getBrowseName in interface UaNodegetBrowseName in class BaseNodeAddressSpace.translateBrowsePathsToNodeIds(org.opcfoundation.ua.core.BrowsePath...)public UaNode getComponent(org.opcfoundation.ua.builtintypes.QualifiedName componentName)
UaNode
getComponent in interface UaNodegetComponent in class BaseNodecomponentName - the BrowseName of the component to get
public org.opcfoundation.ua.builtintypes.LocalizedText getDescription()
UaNode
getDescription in interface UaNodegetDescription in class BaseNodepublic org.opcfoundation.ua.builtintypes.LocalizedText getDisplayName()
UaNodeThe string part of the DisplayName is restricted to 512 characters.
getDisplayName in interface UaNodegetDisplayName in class BaseNodepublic Boolean getIsAbstract()
UaTypetrue
| it is an abstract Type, i.e. no instances of this type shall exist, only of its subtypes. |
false
| it is not an abstract Type, i.e. instances of this type can exist. |
getIsAbstract in interface UaTypepublic Class<?> getJavaClass()
UaTypeFor example, the node for UA DataType Int32 typically defines java.lang.Integer as the Java class.
getJavaClass in interface UaType
public UaMethod getMethod(org.opcfoundation.ua.builtintypes.QualifiedName methodName)
throws ClassCastException
UaNode
getMethod in interface UaNodegetMethod in class BaseNodemethodName - the BrowseName (in namespace 0) of the method to get
ClassCastException - if the node is not a method nodepublic org.opcfoundation.ua.core.NodeClass getNodeClass()
UaNode
getNodeClass in interface UaNodegetNodeClass in class BaseNodepublic UaProperty getNodeVersion()
getNodeVersion in interface UaNodegetNodeVersion in class BaseNodepublic UaType getSuperType()
getSuperType in interface UaTypeUaType.hasSuperType()public EnumSet<WriteAccess> getUserWriteMask()
UaNodeThe 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.
getUserWriteMask in interface UaNodegetUserWriteMask in class BaseNodepublic EnumSet<WriteAccess> getWriteMask()
UaNode
getWriteMask in interface UaNodegetWriteMask in class BaseNodepublic boolean hasSuperType()
hasSuperType in interface UaTypeUaType.getSuperType() returns
null.public boolean hasUserWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
UaNode
hasUserWriteAccess in interface UaNodehasUserWriteAccess in class BaseNodeattributeId - the attribute to check
public boolean hasWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
UaNode
hasWriteAccess in interface UaNodehasWriteAccess in class BaseNodeattributeId - the attribute to check
public boolean inheritsFrom(org.opcfoundation.ua.builtintypes.NodeId typeId)
UaType
inheritsFrom in interface UaTypetypeId - The NodeId of the type to check
UaType.getSuperType()public boolean inheritsFrom(UaType type)
UaType
inheritsFrom in interface UaTypetype - The NodeId of the type to check
UaType.getSuperType()public org.opcfoundation.ua.builtintypes.DataValue readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
BaseNode
readAttribute in interface UaNodereadAttribute in class BaseNodeattributeId - the attribute to read - the valid values are defined in
Attributes. Also check
UaNode.supportsAttribute(UnsignedInteger) whether the node actually supports this
attribute type.
UaNode.supportsAttribute(UnsignedInteger)public UaProperty removeProperty(org.opcfoundation.ua.builtintypes.QualifiedName name)
UaNode
removeProperty in interface UaNoderemoveProperty in class BaseNodename - the name of the property
public void setAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
BaseNode
setAttribute in interface UaNodesetAttribute in class BaseNodeStatusExceptionpublic void setAttributes(org.opcfoundation.ua.core.NodeAttributes nodeAttributes)
setAttributes in interface UaNodesetAttributes in class BaseNodepublic void setBrowseName(org.opcfoundation.ua.builtintypes.QualifiedName browseName)
setBrowseName in interface UaNodesetBrowseName in class BaseNodebrowseName - the new BrowseName to setUaNode.getBrowseName()public void setDescription(org.opcfoundation.ua.builtintypes.LocalizedText description)
setDescription in interface UaNodesetDescription in class BaseNodedescription - the new description to setUaNode.getDescription()public void setDisplayName(org.opcfoundation.ua.builtintypes.LocalizedText displayName)
setDisplayName in interface UaNodesetDisplayName in class BaseNodedisplayName - the new DisplayName to setUaNode.getDisplayName()public void setIsAbstract(Boolean isAbstract)
setIsAbstract in interface UaTypeisAbstract - the value to set for IsAbstractUaType.getIsAbstract()public void setJavaClass(Class<?> javaClass)
setJavaClass in interface UaTypejavaClass - the Java class to use for the type.UaType.getJavaClass()public void setSuperType(UaType parent)
UaType
setSuperType in interface UaTypeparent - the super type to set.public void setUserWriteMask(EnumSet<WriteAccess> userWriteMask)
setUserWriteMask in interface UaNodesetUserWriteMask in class BaseNodeuserWriteMask - the new UserWriteMask to setUaNode.getUserWriteMask()public void setWriteMask(EnumSet<WriteAccess> writeMask)
setWriteMask in interface UaNodesetWriteMask in class BaseNodewriteMask - the new WriteMask to setUaNode.getWriteMask()public boolean supportsAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
UaNode
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 UaNode.readAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger).
supportsAttribute in interface UaNodesupportsAttribute in class ServerNodeattributeId - the attribute to check - the valid values are defined in
Attributes
public String toString()
toString in class BaseNodeprotected void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
initSupportedAttributes in class ServerNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||