com.prosysopc.ua.server.nodes
Class UaVariableNode

java.lang.Object
  extended by com.prosysopc.ua.nodes.AbstractUaNode
      extended by com.prosysopc.ua.server.nodes.ServerNode
          extended by com.prosysopc.ua.server.nodes.BaseNode
              extended by com.prosysopc.ua.server.nodes.UaInstanceNode
                  extended by com.prosysopc.ua.server.nodes.UaVariableNode
All Implemented Interfaces:
UaInstance, UaNode, UaValueNode, UaVariable
Direct Known Subclasses:
CacheVariable, CallbackVariable, PlainVariable

public abstract class UaVariableNode
extends UaInstanceNode
implements UaVariable

Abstract base implementation of UaVariable for UA Server side.

It reserves fields for all variable specific attributes, except for the Value attribute. See CacheVariable for a base non-abstract implementation.


Field Summary
 
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
UaVariableNode(NodeManagerUaNode nodeManager, org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.builtintypes.QualifiedName browseName, org.opcfoundation.ua.builtintypes.LocalizedText displayName)
          Create a new variable with dataTypeId initialized to BaseDataType.
UaVariableNode(NodeManagerUaNode nodeManager, org.opcfoundation.ua.builtintypes.NodeId nodeId, String name, Locale locale)
          Create a new variable with a specific data type.
 
Method Summary
 UaReference addProperty(UaProperty property)
          Add a new property node to the node.
protected  ReflectiveVariable addReflectiveVariable(Object reflectedObject, org.opcfoundation.ua.builtintypes.NodeId nodeId, String fieldName, int nameSpaceIndex, org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
           
protected  boolean beforeAddReference(UaReference reference)
           
protected  void checkPropertyType(org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
           
protected  void checkPropertyType(org.opcfoundation.ua.builtintypes.NodeId nodeId)
           
protected  org.opcfoundation.ua.builtintypes.DataValue createDataValue(Object value)
           
protected abstract  void doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
          Perform the actual value set.
protected  void exposeStructureWithReflectiveVariables(org.opcfoundation.ua.builtintypes.Structure structure, int nameSpaceIndex, org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
           
 EnumSet<org.opcfoundation.ua.core.AccessLevel> getAccessLevel()
          Defines the global read/write access of the Value attribute for all users.
 org.opcfoundation.ua.builtintypes.UnsignedInteger[] getArrayDimensions()
          This Attribute specifies the length of each dimension for an array value.
 org.opcfoundation.ua.core.NodeAttributes getAttributes()
           
protected  org.opcfoundation.ua.core.VariableAttributes getAttributes(org.opcfoundation.ua.core.VariableAttributes attributes)
           
 UaType getDataType()
           
 org.opcfoundation.ua.builtintypes.NodeId getDataTypeId()
           
protected  org.opcfoundation.ua.builtintypes.ExpandedNodeId getDefaultTypeDefinition()
           
 Boolean getHistorizing()
           
 Double getMinimumSamplingInterval()
           
 org.opcfoundation.ua.core.NodeClass getNodeClass()
          The NodeClass Attribute identifies the NodeClass of a Node.
 UaProperty[] getProperties()
           
 org.opcfoundation.ua.builtintypes.StatusCode getStatus()
           
 EnumSet<org.opcfoundation.ua.core.AccessLevel> getUserAccessLevel()
          Defines the user specific read/write access of the Value attribute.
 Integer getValueRank()
          This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions the array has.
 boolean hasUserWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
          Overrides the default to check access to Value attribute from AccessLevel.
 boolean hasWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
          Overrides the default to check access to Value attribute from AccessLevel.
protected  void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
           
protected  boolean isPropertyType()
           
protected  void notifyValueChanging(org.opcfoundation.ua.builtintypes.DataValue newValue)
           
 void notifyValueChanging(Object newValue)
           
protected  void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId, org.opcfoundation.ua.builtintypes.DataValue dataValue)
          Read the value of an attribute.
protected  void semanticsChanged()
          Set the SemanticsChanged bit of statusCodeChangeBits (to be sent with the next notification) and add an entry to the SemanticChangeEvent.
 void setAccessLevel(EnumSet<org.opcfoundation.ua.core.AccessLevel> accessLevel)
           
 void setArrayDimensions(org.opcfoundation.ua.builtintypes.UnsignedInteger[] arrayDimensions)
          This Attribute specifies the length of each dimension for an array value.
 void setAttributes(org.opcfoundation.ua.core.NodeAttributes nodeAttributes)
           
 void setDataType(UaType dataType)
          Set the Data Type node.
 void setDataTypeId(org.opcfoundation.ua.builtintypes.NodeId dataTypeId)
          Set the Data Type.
 void setHistorizing(Boolean historizing)
           
 void setMinimumSamplingInterval(Double minimumSamplingInterval)
           
 void setStatus(org.opcfoundation.ua.builtintypes.StatusCode status)
          Set the status of the variable.
 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 setUserAccessLevel(EnumSet<org.opcfoundation.ua.core.AccessLevel> userAccessLevel)
           
 void setValue(org.opcfoundation.ua.builtintypes.DataValue value)
          The default Value for instances of this type.
 void setValue(Object value)
          Set value.
 void setValueRank(int valueRank)
          This Attribute indicates whether the Value Attribute of the VariableType is an array and how many dimensions the array has.
protected  void structureChanged()
          Set the StructureChanged bit of statusCodeChangeBits (to be sent with the next notification).
 String toString()
           
 void updateValue(Object newValue)
          Update the current value and status.
protected  void updateValue(Object newValue, org.opcfoundation.ua.builtintypes.StatusCode status, org.opcfoundation.ua.builtintypes.DateTime sourceTime, org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
          Update the current value and status.
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.server.nodes.UaInstanceNode
addModellingRule, getTypeDefinition, getTypeDefinitionId, hasTypeDefinition, registerOverridePlainMethod, setTypeDefinitionId, supportsTypeDefinitionNode
 
Methods inherited from class com.prosysopc.ua.server.nodes.BaseNode
addPlainProperty, addPlainVariable, assertTypeSupport, assertTypeSupport, createNodeId, createNodeId, createReflectiveInstanceProperty, createReflectiveInstanceProperty, deleteReference, deleteReference, doAddProperty, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeVersion, getNodeVersionValue, getProperty, getPropertyValue, getReferencesAsList, getStandardBrowseName, getStandardDisplayText, getUserWriteMask, getWriteMask, hasProperty, hasReference, incNodeVersion, initNodeVersion, isChildOfType, readAttribute, readAttribute, registerCallbackProperty, registerPlainInstanceProperty, registerPlainInstanceProperty, registerPlainProperty, registerPlainProperty, registerPlainVariable, registerPlainVariable, registerReflectiveInstanceProperty, registerReflectiveInstanceVariable, registerReflectiveProperty, registerReflectiveVariable, removeProperty, setAccessLevelRecursively, setAccessLevelRecursively, setAttribute, setBrowseName, setDescription, setDisplayName, setNodeVersionValue, setPropertyValue, setUserWriteMask, setWriteMask, writeAttribute
 
Methods inherited from class com.prosysopc.ua.server.nodes.ServerNode
addComponent, addDataChangeListener, addEventListener, addNewReference, addNewReference, addOrganizes, addProperties, addReference, addReference, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, dataChange, deleteReference, deleteReference, deleteReferences, doDeleteReference, equals, findPlaceholders, fireDataChange, fireEvent, fireEventInParents, getAddressSpace, getDefaultBrowseName, getNodeId, getNodeManager, getReference, getReferenceList, getReferences, getSupportedAttributes, getTargetNodes, hashCode, isAddNotifierReferencesToServerObject, isFalseOrNull, isMandatory, isMonitoredForEvents, isTrueOrNull, isType, referenceTypeInherits, removeComponent, removeDataChangeListener, removeEventListener, setAddNotifierReferencesToServerObject, setReferences, supportsAttribute, translateBrowsePathToNodeIds, validateHasEventSourceChain, validateHasEventSourceChain
 
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.UaVariable
addDataChangeListener, removeDataChangeListener
 
Methods inherited from interface com.prosysopc.ua.nodes.UaInstance
getTypeDefinition, getTypeDefinitionId, setTypeDefinitionId
 
Methods inherited from interface com.prosysopc.ua.nodes.UaValueNode
getValue
 
Methods inherited from interface com.prosysopc.ua.nodes.UaNode
addComponent, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeId, getNodeVersion, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setBrowseName, setDescription, setDisplayName, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 

Constructor Detail

UaVariableNode

public UaVariableNode(NodeManagerUaNode nodeManager,
                      org.opcfoundation.ua.builtintypes.NodeId nodeId,
                      org.opcfoundation.ua.builtintypes.QualifiedName browseName,
                      org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Create a new variable with dataTypeId initialized to BaseDataType.

Parameters:
nodeId -
browseName -
displayName -

UaVariableNode

public UaVariableNode(NodeManagerUaNode nodeManager,
                      org.opcfoundation.ua.builtintypes.NodeId nodeId,
                      String name,
                      Locale locale)
Create a new variable with a specific data type.

Parameters:
nodeId - The variable ID.
name - The name used for browseName & displayName
locale - The locale of displayName
dataTypeId - The variable data type as a NodeId.
Method Detail

addProperty

public UaReference addProperty(UaProperty property)
Description copied from interface: UaNode
Add a new property node to the node. All other node types can have properties, except property nodes.

Adds a new forward HasProperty reference with target to the property node.

Specified by:
addProperty in interface UaNode
Overrides:
addProperty in class ServerNode
Parameters:
property - the property to add to the node
Returns:
the property reference that was added (or existed already) or null, if the reference type is not supported by the node (i.e. UaProperty may not have HasProperty references).

getAccessLevel

public EnumSet<org.opcfoundation.ua.core.AccessLevel> getAccessLevel()
Description copied from interface: UaVariable
Defines the global read/write access of the Value attribute for all users.

In contrast to the WriteAccess this attribute only applies to the Value attribute.

Specified by:
getAccessLevel in interface UaVariable
Returns:
the current global access rights
See Also:
UaVariable.getUserAccessLevel()

getArrayDimensions

public org.opcfoundation.ua.builtintypes.UnsignedInteger[] getArrayDimensions()
Description copied from interface: UaValueNode
This Attribute specifies the length of each dimension for an array value. The Attribute is intended to describe the capability of the Variable, not the current size.

The number of elements shall be equal to the value of the ValueRank Attribute. Shall be null if ValueRank <= 0.

A value of 0 for an individual dimension indicates that the dimension has a variable length.

For example, if a Variable is defined by the following C array: Int32 myArray[346];

then this Variable's DataType would point to an Int32, the Variable's ValueRank has the value 1 and the ArrayDimensions is an array with one entry having the value 346.

Specified by:
getArrayDimensions in interface UaValueNode
Returns:
the array dimensions of the variable type or null if this is not a specific array type, i.e. ValueRank <= 0
See Also:
UaValueNode.setArrayDimensions(org.opcfoundation.ua.builtintypes.UnsignedInteger[])

getAttributes

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

getDataType

public UaType getDataType()
Specified by:
getDataType in interface UaValueNode
Returns:
the DataType node, if set.
See Also:
UaValueNode.getDataTypeId()

getDataTypeId

public org.opcfoundation.ua.builtintypes.NodeId getDataTypeId()
Specified by:
getDataTypeId in interface UaValueNode
Returns:
NodeId of the data type definition for instances of this type.

getHistorizing

public Boolean getHistorizing()
Specified by:
getHistorizing in interface UaVariable
Returns:
whether the variable has history

getMinimumSamplingInterval

public Double getMinimumSamplingInterval()
Specified by:
getMinimumSamplingInterval in interface UaVariable
Returns:
the minimum sampling interval that the server supports for the variable

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 BaseNode
Returns:
the Node Class of the node. This is hard-coded and cannot be changed.

getProperties

public UaProperty[] getProperties()
Specified by:
getProperties in interface UaNode
Overrides:
getProperties in class BaseNode
Returns:
all properties of the node or null

getStatus

public org.opcfoundation.ua.builtintypes.StatusCode getStatus()
Returns:
the current status of the variable value.

getUserAccessLevel

public EnumSet<org.opcfoundation.ua.core.AccessLevel> getUserAccessLevel()
Description copied from interface: UaVariable
Defines the user specific read/write access of the Value attribute.

In contrast to the UserWriteAccess this attribute only applies to the Value attribute.

Specified by:
getUserAccessLevel in interface UaVariable
Returns:
the current access rights for the user that requested it
See Also:
UaVariable.getAccessLevel()

getValueRank

public Integer getValueRank()
Description copied from interface: UaValueNode
This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions the array has.

It may have the following values:

Specified by:
getValueRank in interface UaValueNode
Returns:
the value rank
See Also:
UaValueNode.setValueRank(int)

hasUserWriteAccess

public boolean hasUserWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Overrides the default to check access to Value attribute from AccessLevel.

Specified by:
hasUserWriteAccess in interface UaNode
Overrides:
hasUserWriteAccess in class BaseNode
Parameters:
attributeId -
Returns:

hasWriteAccess

public boolean hasWriteAccess(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Overrides the default to check access to Value attribute from AccessLevel.

Specified by:
hasWriteAccess in interface UaNode
Overrides:
hasWriteAccess in class BaseNode
Parameters:
attributeId -
Returns:

notifyValueChanging

public void notifyValueChanging(Object newValue)

setAccessLevel

public void setAccessLevel(EnumSet<org.opcfoundation.ua.core.AccessLevel> accessLevel)
Specified by:
setAccessLevel in interface UaVariable
Parameters:
accessLevel - the access level to set
See Also:
UaVariable.getAccessLevel()

setArrayDimensions

public void setArrayDimensions(org.opcfoundation.ua.builtintypes.UnsignedInteger[] arrayDimensions)
Description copied from interface: UaValueNode
This Attribute specifies the length of each dimension for an array value. The Attribute is intended to describe the capability of the VariableType, not the current size.

The number of elements shall be equal to the value of the ValueRank Attribute. Shall be null if ValueRank <= 0.

A value of 0 for an individual dimension indicates that the dimension has a variable length.

For example, if a VariableType is defined by the following array:

Integer[] myArray = new Integer[346];

then this VariableType's DataType would point to the Int32 data type node, the VariableType's ValueRank has the value 1 and the ArrayDimensions is an array with one entry having the value 346.

Specified by:
setArrayDimensions in interface UaValueNode

setAttributes

public void setAttributes(org.opcfoundation.ua.core.NodeAttributes nodeAttributes)
Specified by:
setAttributes in interface UaNode
Overrides:
setAttributes in class BaseNode

setDataType

public void setDataType(UaType dataType)
Description copied from interface: UaValueNode
Set the Data Type node.

Specified by:
setDataType in interface UaValueNode
See Also:
UaValueNode.setDataTypeId(NodeId)

setDataTypeId

public void setDataTypeId(org.opcfoundation.ua.builtintypes.NodeId dataTypeId)
Description copied from interface: UaValueNode
Set the Data Type.

Specified by:
setDataTypeId in interface UaValueNode
See Also:
UaValueNode.setDataTypeId(NodeId)

setHistorizing

public void setHistorizing(Boolean historizing)
Specified by:
setHistorizing in interface UaVariable
Parameters:
historizing - define that the variable has history - or not

setMinimumSamplingInterval

public void setMinimumSamplingInterval(Double minimumSamplingInterval)
Specified by:
setMinimumSamplingInterval in interface UaVariable
Parameters:
minimumSamplingInterval - define the minimum sampling interval

setStatus

public void setStatus(org.opcfoundation.ua.builtintypes.StatusCode status)
Set the status of the variable. If Status is a Bad status, Value is set to null.

The sourceTimestamp is set to null, and serverTimestamp is set to the current time.

Parameters:
status - the status to set

setTypeDefinition

public void setTypeDefinition(UaType type)
Description copied from class: UaInstanceNode
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
Overrides:
setTypeDefinition in class UaInstanceNode
Parameters:
type - The type to set
See Also:
UaInstance.getTypeDefinitionId(), UaInstance.getTypeDefinition(), UaInstance.setTypeDefinitionId(ExpandedNodeId), UaInstance.setTypeDefinitionId(NodeId)

setTypeDefinitionId

public void setTypeDefinitionId(org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
Description copied from interface: UaInstance
Sets the type definition to an ExpandedNodeId.

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

setUserAccessLevel

public void setUserAccessLevel(EnumSet<org.opcfoundation.ua.core.AccessLevel> userAccessLevel)
Specified by:
setUserAccessLevel in interface UaVariable
Parameters:
userAccessLevel - the user access level to set
See Also:
UaVariable.getUserAccessLevel()

setValue

public void setValue(org.opcfoundation.ua.builtintypes.DataValue value)
              throws StatusException
Description copied from interface: UaValueNode
The default Value for instances of this type.

Specified by:
setValue in interface UaValueNode
Parameters:
value - the default value to set
Throws:
StatusException

setValue

public void setValue(Object value)
              throws StatusException
Set value.

Specified by:
setValue in interface UaValueNode
Parameters:
value - a new value
Throws:
StatusException - if the value is invalid for the Value attribute

setValueRank

public void setValueRank(int valueRank)
Description copied from interface: UaValueNode
This Attribute indicates whether the Value Attribute of the VariableType is an array and how many dimensions the array has.

It may have the following values:

Specified by:
setValueRank in interface UaValueNode
Parameters:
valueRank - the value rank to set

toString

public String toString()
Overrides:
toString in class UaInstanceNode

updateValue

public void updateValue(Object newValue)
                 throws StatusException
Update the current value and status. Server & source timestamp are set to the current time. The status will be set to StatusCode.GOOD, unless the value is null or is a Variant which contains null.

Parameters:
newValue - The new value for the variable. This should be of the correct DataType or a Variant. Or it can be a DataValue, in which case, it is copied to value with a new timestamp.
Throws:
StatusException - if newValue is not valid for the variable

addReflectiveVariable

protected ReflectiveVariable addReflectiveVariable(Object reflectedObject,
                                                   org.opcfoundation.ua.builtintypes.NodeId nodeId,
                                                   String fieldName,
                                                   int nameSpaceIndex,
                                                   org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
                                            throws SecurityException,
                                                   NoSuchMethodException
Parameters:
reflectedObject -
nodeId -
fieldName -
nameSpaceIndex -
typeDefinitionId -
Returns:
Throws:
NoSuchMethodException
SecurityException

beforeAddReference

protected boolean beforeAddReference(UaReference reference)
Overrides:
beforeAddReference in class UaInstanceNode
Returns:

checkPropertyType

protected void checkPropertyType(org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)

checkPropertyType

protected void checkPropertyType(org.opcfoundation.ua.builtintypes.NodeId nodeId)
Parameters:
nodeId -
Throws:
IllegalArgumentException

createDataValue

protected org.opcfoundation.ua.builtintypes.DataValue createDataValue(Object value)

doSetValue

protected abstract void doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
                            throws StatusException
Perform the actual value set.

Parameters:
value -
Throws:
StatusException

exposeStructureWithReflectiveVariables

protected void exposeStructureWithReflectiveVariables(org.opcfoundation.ua.builtintypes.Structure structure,
                                                      int nameSpaceIndex,
                                                      org.opcfoundation.ua.builtintypes.NodeId typeDefinitionId)
Parameters:
structure - a Structure type, auto-generated to the stack. It must define fields with capitalized names, e.g. "FieldName"
typeDefinitionId -
Throws:
SecurityException
RuntimeException

getAttributes

protected org.opcfoundation.ua.core.VariableAttributes getAttributes(org.opcfoundation.ua.core.VariableAttributes attributes)

getDefaultTypeDefinition

protected org.opcfoundation.ua.builtintypes.ExpandedNodeId getDefaultTypeDefinition()
Specified by:
getDefaultTypeDefinition in class UaInstanceNode
Returns:

initSupportedAttributes

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

isPropertyType

protected boolean isPropertyType()
Returns:

notifyValueChanging

protected void notifyValueChanging(org.opcfoundation.ua.builtintypes.DataValue newValue)

readAttributeValue

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

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

semanticsChanged

protected void semanticsChanged()
Set the SemanticsChanged bit of statusCodeChangeBits (to be sent with the next notification) and add an entry to the SemanticChangeEvent.


structureChanged

protected void structureChanged()
Set the StructureChanged bit of statusCodeChangeBits (to be sent with the next notification).


updateValue

protected void updateValue(Object newValue,
                           org.opcfoundation.ua.builtintypes.StatusCode status,
                           org.opcfoundation.ua.builtintypes.DateTime sourceTime,
                           org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
                    throws StatusException
Update the current value and status. Server timestamp is set to the current time.

Parameters:
newValue - The new value for the variable. This should be of the correct DataType or a Variant. Or it can be a DataValue, in which case, it is copied to value with a new timestamp.
status - The new status for the variable.
sourceTimestamp - source timestamp, if null current time is used
Throws:
StatusException - if newValue is not valid for the variable

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 BaseNode
Throws:
StatusException


Copyright © 2018. All rights reserved.