public class PlainInstanceVariable<T> extends InstanceVariable
InstanceVariable.
This is a generic type, which adds a strongly typed field for the CurrentValue of the property. It also reserves separate fields for status, serverTimestamp and sourceTimestamp.
UaNode.ParameterseventListeners, INITIALIZATION_TIME, nodeManager, supportedAttributesMap| Constructor and Description |
|---|
PlainInstanceVariable(NodeManagerUaNode nodeManager,
NodeId nodeId,
NodeId instanceDeclarationId)
Create a new node, referring to an instance declaration node.
|
PlainInstanceVariable(NodeManagerUaNode nodeManager,
NodeId nodeId,
UaVariable instanceDeclaration)
Create a new node, referring to an instance declaration node.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetValue(DataValue value)
Perform the actual value set.
|
T |
getCurrentValue() |
DateTime |
getServerTimestamp() |
DateTime |
getSourceTimestamp() |
StatusCode |
getStatus() |
DataValue |
getValue() |
Class<?> |
getValueClass() |
boolean |
setCurrentValue(T currentValue)
Set the current value with the current time as sourceTimestamp assuming a good status (unless
null value is given).
|
boolean |
setCurrentValue(T newValue,
DateTime sourceTimestamp)
Set the current value with a specific sourceTimestamp assuming a good status (unless null value
is given).
|
boolean |
setCurrentValue(T newValue,
StatusCode status,
DateTime sourceTimestamp,
UnsignedShort sourcePicoseconds)
Set the currentValue together with a specific Status and sourceTimestamp.
|
void |
setStatus(StatusCode status)
Set the status of the variable.
|
addReference, beforeAddReference, deleteReference, getAccessLevel, getArrayDimensions, getAttributes, getAttributesMap, getBrowseName, getComponent, getComponents, getDataType, getDataTypeId, getDescription, getDisplayName, getHistorizing, getMethod, getMinimumSamplingInterval, getNodeClass, getNodeVersionNode, getProperties, getProperty, getPropertyTypeNode, getReference, getReferencesAsList, getTypeDefinition, getTypeDefinitionId, getTypeDefinitionReference, getUserAccessLevel, getUserWriteMask, getValueRank, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAccessLevel, setArrayDimensions, setAttribute, setAttributes, setBrowseName, setDataType, setDataTypeId, setDescription, setDisplayName, setHistorizing, setMinimumSamplingInterval, setReferences, setTypeDefinition, setTypeDefinitionId, setTypeDefinitionId, setUserAccessLevel, setUserWriteMask, setValue, setValue, setValueRank, setWriteMask, writeAttributeaddComponent, addDataChangeListener, addEventListener, addNewReference, addNewReference, addOrganizes, addProperties, addProperty, addReference, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, dataChange, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, doDeleteReference, equals, findPlaceholders, fireDataChange, fireEvent, fireEventInParents, getAddressSpace, getDefaultBrowseName, getNodeId, getNodeManager, getNodeSetExtensions, getReferenceList, getReferences, getSupportedAttributes, getTargetNodes, getUaNodeId, hashCode, hasReference, initSupportedAttributes, isAddNotifierReferencesToServerObject, isFalseOrNull, isMandatory, isMonitoredForEvents, isTrueOrNull, isType, referenceTypeInherits, removeDataChangeListener, removeEventListener, setAddNotifierReferencesToServerObject, setNodeSetExtensions, supportsAttribute, toString, translateBrowsePathToNodeIds, validateHasEventSourceChain, validateHasEventSourceChain, writeAttributeValuegetForwardReferences, getInverseReferences, getReferences, getReferences, getUserData, referenceTypeInherits, setUserDataclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddDataChangeListener, removeDataChangeListeneraddComponent, addOrganizes, addProperty, addReference, addReference, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getBrowsePaths, getForwardReferences, getInverseReferences, getNodeId, getOrganizedNode, getOrganizedNodes, getReferences, getReferences, getSupportedAttributes, getUaBrowsePaths, getUaNodeId, getUserData, setUserData, supportsAttributepublic PlainInstanceVariable(NodeManagerUaNode nodeManager, NodeId nodeId, NodeId instanceDeclarationId) throws StatusException
nodeManager - The node manager to which the node is created.nodeId - The ID of the new node.instanceDeclarationId - The ID of the instance declaration node, which this node is
referring to. I.e. the same variable or property as this one, but under the type,
instead of the instance.StatusException - if instanceDeclarationId cannot be converted to a variable nodepublic PlainInstanceVariable(NodeManagerUaNode nodeManager, NodeId nodeId, UaVariable instanceDeclaration)
nodeManager - The node manager to which the node is created.nodeId - The ID of the new node.instanceDeclaration - The instance declaration node, which this node is referring to. I.e.
the same variable or property as this one, but under the type, instead of the instance.public final T getCurrentValue()
public DateTime getServerTimestamp()
public DateTime getSourceTimestamp()
public StatusCode getStatus()
getStatus in class InstanceVariablepublic DataValue getValue()
public Class<?> getValueClass()
public boolean setCurrentValue(T currentValue)
currentValue - the currentValue to setpublic boolean setCurrentValue(T newValue, DateTime sourceTimestamp)
newValue - the new value to set. If this is null, status will be set to BAD, otherwise it
is set to GOOD.sourceTimestamp - the time when the value was measured in the actual source, if known.
Leave to null if the time is not available.public boolean setCurrentValue(T newValue, StatusCode status, DateTime sourceTimestamp, UnsignedShort sourcePicoseconds)
newValue - the currentValue to setstatus - the status to setsourceTimestamp - the time when the value was measured in the sourcesourcePicoseconds - optional picosecond accuracy of the timestamppublic void setStatus(StatusCode status)
InstanceVariableThe sourceTimestamp is set to null, and serverTimestamp is set to the current time.
setStatus in class InstanceVariablestatus - the status to setprotected void doSetValue(DataValue value) throws StatusException
InstanceVariabledoSetValue in class InstanceVariableStatusExceptionCopyright © 2026. All rights reserved.