com.prosysopc.ua.server.nodes
Class CacheVariable
java.lang.Object
com.prosysopc.ua.nodes.AbstractUaNode
com.prosysopc.ua.server.nodes.ServerNode
com.prosysopc.ua.server.nodes.BaseNode
com.prosysopc.ua.server.nodes.UaInstanceNode
com.prosysopc.ua.server.nodes.UaVariableNode
com.prosysopc.ua.server.nodes.CacheVariable
- All Implemented Interfaces:
- UaInstance, UaNode, UaValueNode, UaVariable
- Direct Known Subclasses:
- AbstractGeneratedVariableNode, CacheProperty
public class CacheVariable
- extends UaVariableNode
A base implementation of UaVariable with a value cache.
|
Constructor Summary |
CacheVariable(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
Create a new cache variable. |
CacheVariable(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
Create a new cache variable. |
|
Method Summary |
protected void |
doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
Perform the actual value set. |
org.opcfoundation.ua.builtintypes.DataValue |
getValue()
|
void |
updateValue(Object newValue)
Update the current value and status. |
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. |
| Methods inherited from class com.prosysopc.ua.server.nodes.UaVariableNode |
addProperty, addReflectiveVariable, beforeAddReference, checkPropertyType, checkPropertyType, createDataValue, exposeStructureWithReflectiveVariables, getAccessLevel, getArrayDimensions, getAttributes, getAttributes, getDataType, getDataTypeId, getDefaultTypeDefinition, getHistorizing, getMinimumSamplingInterval, getNodeClass, getProperties, getStatus, getUserAccessLevel, getValueRank, hasUserWriteAccess, hasWriteAccess, initSupportedAttributes, isPropertyType, notifyValueChanging, notifyValueChanging, readAttributeValue, semanticsChanged, setAccessLevel, setArrayDimensions, setAttributes, setDataType, setDataTypeId, setHistorizing, setMinimumSamplingInterval, setStatus, setTypeDefinition, setTypeDefinitionId, setUserAccessLevel, setValue, setValue, setValueRank, structureChanged, toString, writeAttributeValue |
| 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 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 |
CacheVariable
public CacheVariable(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
- Create a new cache variable.
- Parameters:
nodeManager - the nodeManager to which the variable is addednodeId - the nodeId of the variablebrowseName - the browseName of the variabledisplayName - the displayName of the variable
CacheVariable
public CacheVariable(NodeManagerUaNode nodeManager,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
- Create a new cache variable. Name is used as the BrowseName and DisplayName of the variable.
- Parameters:
nodeManager - the nodeManager to which the variable is addednodeId - the nodeId of the variablename - the name of the variablelocale - the locale of the DisplayName (which is equal to name)
getValue
public org.opcfoundation.ua.builtintypes.DataValue getValue()
- Returns:
- The default Value for instances of this type.
updateValue
public void updateValue(Object newValue)
throws StatusException
- Description copied from class:
UaVariableNode
- 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.
- Overrides:
updateValue in class UaVariableNode
- 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
updateValue
public void updateValue(Object newValue,
org.opcfoundation.ua.builtintypes.StatusCode status,
org.opcfoundation.ua.builtintypes.DateTime sourceTime,
org.opcfoundation.ua.builtintypes.UnsignedShort sourcePicoseconds)
throws StatusException
- Description copied from class:
UaVariableNode
- Update the current value and status. Server timestamp is set to the current time.
- Overrides:
updateValue in class UaVariableNode
- 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.
- Throws:
StatusException - if newValue is not valid for the variable
doSetValue
protected void doSetValue(org.opcfoundation.ua.builtintypes.DataValue value)
throws StatusException
- Description copied from class:
UaVariableNode
- Perform the actual value set.
- Specified by:
doSetValue in class UaVariableNode
- Parameters:
value -
- Throws:
StatusException
Copyright © 2018. All rights reserved.