com.prosysopc.ua.client.nodes
Class UaViewImpl

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.UaViewImpl
All Implemented Interfaces:
UaNode, UaView

public class UaViewImpl
extends UaNodeImpl
implements UaView

Straight forward implementation of UaView.

It keeps all attributes in memory.


Field Summary
 
Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl
addressSpace, logger, references, supportedAttributesMap
 
Constructor Summary
UaViewImpl(AddressSpace addressSpace, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName)
           
UaViewImpl(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, boolean containsNoLoops, EnumSet<EventNotifierClass> eventNotifier)
           
 
Method Summary
 org.opcfoundation.ua.core.NodeAttributes getAttributes()
           
protected  org.opcfoundation.ua.core.NodeAttributes getAttributes(org.opcfoundation.ua.core.ViewAttributes attributes)
           
 Boolean getContainsNoLoops()
          If set to true this Attribute indicates that following References in the context of the View contains no loops, i.e. starting from a Node 'A' contained in the View and following the forward References in the context of the View Node 'A' will not be reached again.
 EnumSet<EventNotifierClass> getEventNotifier()
          Defines whether the node can be used to subscribe to events.
 org.opcfoundation.ua.core.NodeClass getNodeClass()
          The NodeClass Attribute identifies the NodeClass of a Node.
 UaProperty getViewVersion()
          The version number for the View.
protected  void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
           
protected  void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, org.opcfoundation.ua.builtintypes.DataValue dataValue)
          Read the value of an attribute.
 void setAttributes(org.opcfoundation.ua.core.ViewAttributes viewAttributes)
           
 void setContainsNoLoops(Boolean containsNoLoops)
           
 void setEventNotifier(EnumSet<EventNotifierClass> eventNotifier)
           
protected  void setViewVersion(Integer viewVersion)
          Set the value of the ViewVersion property.
 String toString()
           
protected  void writeAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, Object value, org.opcfoundation.ua.builtintypes.StatusCode statusCode, org.opcfoundation.ua.builtintypes.DateTime sourceTime, org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
           
 
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, getNodeId, getNodeVersion, getNodeVersionString, getProperties, getProperty, getPropertyValue, getReference, getReferenceList, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hashCode, hasProperty, hasTypeDefinition, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, referenceTypeInherits, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setNodeVersion, setPropertyValue, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 
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, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, 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

UaViewImpl

public UaViewImpl(AddressSpace addressSpace,
                  org.opcfoundation.ua.builtintypes.NodeId nodeId,
                  org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                  org.opcfoundation.ua.builtintypes.LocalizedText displayName)

UaViewImpl

public UaViewImpl(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,
                  boolean containsNoLoops,
                  EnumSet<EventNotifierClass> eventNotifier)
Method Detail

getAttributes

public org.opcfoundation.ua.core.NodeAttributes getAttributes()
Specified by:
getAttributes in interface UaNode
Returns:
the current attribute values of the node in a NodeAttributes structure.

getContainsNoLoops

public Boolean getContainsNoLoops()
Description copied from interface: UaView
If set to true this Attribute indicates that following References in the context of the View contains no loops, i.e. starting from a Node 'A' contained in the View and following the forward References in the context of the View Node 'A' will not be reached again. It does not specify that there is only one path starting from the View Node to reach a Node contained in the View. If set to false this Attribute indicates that following References in the context of the View may lead to loops. (OPC UA Specification, Part 3.)

Specified by:
getContainsNoLoops in interface UaView
Returns:
whether the view contains loops or not.

getEventNotifier

public EnumSet<EventNotifierClass> getEventNotifier()
Description copied from interface: UaView
Defines whether the node can be used to subscribe to events. The set can contain one or several of the following values.
Value Description
SubscribeToEvents Indicates if it can be used to subscribe to Events (0 means cannot be used to subscribe to Events, 1 means can be used to subscribe to Events).
HistoryRead Indicates if the history of the Events is readable (0 means not readable, 1 means readable).
HistoryWrite Indicates if the history of the Events is writable (0 means not writable, 1 means writable).
HistoryRead and HistoryWrite also indicate if the history of the Events is available via the OPC UA server.

Specified by:
getEventNotifier in interface UaView
Returns:
the current value of the EventNotifier attribute

getNodeClass

public final org.opcfoundation.ua.core.NodeClass getNodeClass()
Description copied from interface: UaNode
The NodeClass Attribute identifies the NodeClass of a Node.

Specified by:
getNodeClass in interface UaNode
Overrides:
getNodeClass in class UaNodeImpl
Returns:
the Node Class of the node. This is hard-coded and cannot be changed.

getViewVersion

public UaProperty getViewVersion()
Description copied from interface: UaView
The version number for the View. When Nodes are added to or removed from a View, the value of the ViewVersion Property is updated. Clients may detect changes to the composition of a View using this Property. The value of the ViewVersion shall always be greater than 0. (OPC UA Specification, Part 3.)

Specified by:
getViewVersion in interface UaView
Returns:
the ViewVersion property. This is an optional property, so it may be null, if the property is not defined.

setAttributes

public void setAttributes(org.opcfoundation.ua.core.ViewAttributes viewAttributes)

setContainsNoLoops

public void setContainsNoLoops(Boolean containsNoLoops)
Specified by:
setContainsNoLoops in interface UaView
Parameters:
containsNoLoops - the value of containsNoLoops to set
See Also:
UaView.getContainsNoLoops()

setEventNotifier

public void setEventNotifier(EnumSet<EventNotifierClass> eventNotifier)
Specified by:
setEventNotifier in interface UaView
Parameters:
eventNotifier - the value of Eventnotifier to set
See Also:
UaView.getEventNotifier()

toString

public String toString()
Overrides:
toString in class UaNodeImpl

getAttributes

protected org.opcfoundation.ua.core.NodeAttributes getAttributes(org.opcfoundation.ua.core.ViewAttributes attributes)

initSupportedAttributes

protected void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
Overrides:
initSupportedAttributes in class UaNodeImpl

readAttributeValue

protected void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
                                  org.opcfoundation.ua.builtintypes.DataValue dataValue)
                           throws StatusException
Description copied from class: UaNodeImpl
Read the value of an attribute.

Overrides:
readAttributeValue in class UaNodeImpl
Parameters:
attributeId - the ID of the attribute to read.
dataValue - the DataValue structure in which the value is set.
Throws:
StatusException

setViewVersion

protected void setViewVersion(Integer viewVersion)
                       throws StatusException
Set the value of the ViewVersion property. Assumes that the property has already been defined.

Parameters:
viewVersion -
Throws:
StatusException

writeAttributeValue

protected void writeAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
                                   Object value,
                                   org.opcfoundation.ua.builtintypes.StatusCode statusCode,
                                   org.opcfoundation.ua.builtintypes.DateTime sourceTime,
                                   org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
                            throws StatusException
Overrides:
writeAttributeValue in class UaNodeImpl
Throws:
StatusException


Copyright © 2018. All rights reserved.