public class PlainVariable<T> extends UaVariableNode
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.ParameterssynchronizeStructuresNODE_VERSION_PROPERTY_NAME, useQuickPropertyLookupeventListeners, INITIALIZATION_TIME, nodeManager, supportedAttributesMap| Modifier | Constructor and Description |
|---|---|
|
PlainVariable(NodeManagerUaNode nodeManager,
NodeId nodeId,
QualifiedName browseName,
LocalizedText displayName) |
|
PlainVariable(NodeManagerUaNode nodeManager,
NodeId nodeId,
String name,
Locale locale) |
protected |
PlainVariable(UaNode.Parameters parameters) |
| 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.
|
protected void |
updateValue(Object newValue,
StatusCode status,
DateTime sourceTime,
UnsignedShort sourcePicoseconds)
Update the current value and status.
|
addProperty, addReflectiveVariable, beforeAddReference, checkPropertyType, checkPropertyType, createDataValue, exposeStructureWithReflectiveVariables, getAccessLevel, getArrayDimensions, getAttributes, getAttributes, getAttributesMap, getDataType, getDataTypeId, getDefaultTypeDefinition, getHistorizing, getMinimumSamplingInterval, getNodeClass, getProperties, getUserAccessLevel, getValueRank, hasUserWriteAccess, hasWriteAccess, initSupportedAttributes, isPropertyType, notifyValueChanging, notifyValueChanging, readAttributeValue, semanticsChanged, setAccessLevel, setArrayDimensions, setAttributes, setDataType, setDataTypeId, setHistorizing, setMinimumSamplingInterval, setTypeDefinition, setTypeDefinitionId, setUserAccessLevel, setValue, setValue, setValueRank, structureChanged, toString, updateValue, writeAttributeValueaddModellingRule, getTypeDefinition, getTypeDefinitionId, hasTypeDefinition, registerOverridePlainMethod, setTypeDefinitionId, supportsTypeDefinitionNodeaddPlainProperty, addPlainVariable, assertTypeSupport, assertTypeSupport, createNodeId, createNodeId, createReflectiveInstanceProperty, createReflectiveInstanceProperty, deleteReference, deleteReference, doAddProperty, getAttributes, getAttributesMap, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeVersion, getNodeVersionNode, getProperty, getPropertyReference, 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, setNodeVersion, setPropertyValue, setUserWriteMask, setWriteMask, writeAttributeaddComponent, 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, getNodeSetExtensions, getReference, getReferenceList, getReferences, getSupportedAttributes, getTargetNodes, getUaNodeId, hashCode, isAddNotifierReferencesToServerObject, isFalseOrNull, isMandatory, isMonitoredForEvents, isTrueOrNull, isType, referenceTypeInherits, removeComponent, removeDataChangeListener, removeEventListener, setAddNotifierReferencesToServerObject, setNodeSetExtensions, setReferences, supportsAttribute, translateBrowsePathToNodeIds, validateHasEventSourceChain, validateHasEventSourceChaingetForwardReferences, getInverseReferences, getReferences, getReferences, getUserData, referenceTypeInherits, setUserDataclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddDataChangeListener, removeDataChangeListenergetTypeDefinition, getTypeDefinitionId, setTypeDefinitionIdaddComponent, addOrganizes, addReference, addReference, addReference, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getAttributesMap, getBrowseName, getBrowsePaths, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeId, getNodeVersionNode, getOrganizedNode, getOrganizedNodes, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUaBrowsePaths, getUaNodeId, getUserData, getUserWriteMask, getWriteMask, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setBrowseName, setDescription, setDisplayName, setReferences, setUserData, setUserWriteMask, setWriteMask, supportsAttribute, writeAttributepublic PlainVariable(NodeManagerUaNode nodeManager, NodeId nodeId, QualifiedName browseName, LocalizedText displayName)
nodeManager - nodeId - browseName - displayName - public PlainVariable(NodeManagerUaNode nodeManager, NodeId nodeId, String name, Locale locale)
nodeManager - nodeId - name - locale - protected PlainVariable(UaNode.Parameters parameters)
public final T getCurrentValue()
public DateTime getServerTimestamp()
public DateTime getSourceTimestamp()
public StatusCode getStatus()
getStatus in class UaVariableNodepublic 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 tie 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)
UaVariableNodeThe sourceTimestamp is set to null, and serverTimestamp is set to the current time.
setStatus in class UaVariableNodestatus - the status to setprotected void doSetValue(DataValue value) throws StatusException
UaVariableNodedoSetValue in class UaVariableNodeStatusExceptionprotected void updateValue(Object newValue, StatusCode status, DateTime sourceTime, UnsignedShort sourcePicoseconds) throws StatusException
UaVariableNodeupdateValue in class UaVariableNodenewValue - 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.StatusException - if newValue is not valid for the variableCopyright © 2026. All rights reserved.