public class UaVariableTypeImpl extends UaTypeImpl implements UaVariableType
UaVariableType.
It keeps all attributes in memory.
UaNode.ParametersaddressSpace, logger, references, supportedAttributesMap| Modifier | Constructor and Description |
|---|---|
|
UaVariableTypeImpl(AddressSpace addressSpace,
NodeId nodeId,
QualifiedName browseName,
LocalizedText displayName) |
|
UaVariableTypeImpl(AddressSpace addressSpace,
NodeId nodeId,
QualifiedName browseName,
LocalizedText displayName,
LocalizedText description,
AttributeWriteMask writeMask,
AttributeWriteMask userWriteMask,
UaClientReference[] references,
UaProperty[] properties,
DataValue value,
NodeId dataType,
Integer valueRank,
UnsignedInteger[] arrayDimensions,
Boolean isAbstract) |
|
UaVariableTypeImpl(AddressSpace addressSpace,
NodeId nodeId,
String name,
Locale locale)
Create a new node with name to be used for browseName and displayName.
|
protected |
UaVariableTypeImpl(UaNode.Parameters parameters) |
| Modifier and Type | Method and Description |
|---|---|
UnsignedInteger[] |
getArrayDimensions()
This Attribute specifies the length of each dimension for an array value.
|
NodeAttributes |
getAttributes()
Returns the current attribute values of the node in a NodeAttributes structure.
|
protected VariableTypeAttributes |
getAttributes(VariableTypeAttributes attributes) |
protected void |
getAttributesMap(Map<UnsignedInteger,Object> map) |
UaDataType |
getDataType() |
NodeId |
getDataTypeId() |
NodeClass |
getNodeClass()
The NodeClass Attribute identifies the NodeClass of a Node.
|
DataValue |
getValue() |
Integer |
getValueRank()
This Attribute indicates whether the Value Attribute of the Variable is an array and how many
dimensions the array has.
|
protected void |
initSupportedAttributes(List<UnsignedInteger> l) |
protected void |
readAttributeValue(UnsignedInteger attributeId,
DataValue dataValue)
Read the value of an attribute.
|
void |
setArrayDimensions(UnsignedInteger[] ArrayDimensions)
This Attribute specifies the length of each dimension for an array value.
|
void |
setAttribute(UnsignedInteger attributeId,
DataValue dataValue)
Unconditionally, set the value of the specified attribute.
|
void |
setAttributes(VariableTypeAttributes variableTypeAttributes) |
void |
setDataType(UaDataType dataType)
Set the Data Type node.
|
void |
setDataTypeId(NodeId dataTypeId)
Set the Data Type.
|
void |
setValue(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.
|
boolean |
supportsAttribute(UnsignedInteger attributeId)
Check if the node supports the specified attribute.
|
String |
toString() |
protected void |
writeAttributeValue(UnsignedInteger attributeId,
Object value,
StatusCode statusCode,
DateTime sourceTime,
UnsignedShort sourcePicoseconds) |
addSubType, getIsAbstract, getSuperType, getSuperTypeId, hasSuperType, inheritsFrom, inheritsFrom, setIsAbstract, setSuperTypeaddComponent, addProperties, addProperty, addReference, addReference, addReference, addReference, afterAddReference, afterDeleteReference, assertTypeSupport, assertTypeSupport, beforeAddReference, deleteReference, deleteReference, deleteReference, deleteReference, deleteReferences, doAddProperty, equals, findPlaceholders, getAddressSpace, getAttributes, getAttributesMap, getBrowseName, getComponent, getComponents, getDescription, getDescription, getDisplayName, getDisplayName, getMethod, getNodeId, getNodeVersion, getNodeVersionNode, getProperties, getProperty, getPropertyValue, getReference, getReferenceList, getReferences, getSupportedAttributes, getUaNodeId, getUserWriteMask, getWriteMask, hashCode, hasProperty, hasTypeDefinition, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, referenceTypeInherits, removeComponent, removeProperty, setAttributes, setBrowseName, setDescription, setDisplayName, setNodeVersion, setPropertyValue, setReferences, setUserWriteMask, setWriteMask, writeAttributegetForwardReferences, getInverseReferences, getReferences, getReferences, getReferencesAsList, getUserData, referenceTypeInherits, setUserDataclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddSubType, getIsAbstract, getSuperType, getSuperTypeId, hasSuperType, inheritsFrom, inheritsFrom, inheritsFromAny, inheritsFromAny, setIsAbstract, setSuperTypeaddComponent, addOrganizes, addProperty, 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, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUaBrowsePaths, getUaNodeId, getUserData, getUserWriteMask, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAttributes, setBrowseName, setDescription, setDisplayName, setReferences, setUserData, setUserWriteMask, setWriteMask, writeAttributepublic UaVariableTypeImpl(AddressSpace addressSpace, NodeId nodeId, QualifiedName browseName, LocalizedText displayName)
public UaVariableTypeImpl(AddressSpace addressSpace, NodeId nodeId, QualifiedName browseName, LocalizedText displayName, LocalizedText description, AttributeWriteMask writeMask, AttributeWriteMask userWriteMask, UaClientReference[] references, UaProperty[] properties, DataValue value, NodeId dataType, Integer valueRank, UnsignedInteger[] arrayDimensions, Boolean isAbstract)
public UaVariableTypeImpl(AddressSpace addressSpace, NodeId nodeId, String name, Locale locale)
nodeId - name - locale - protected UaVariableTypeImpl(UaNode.Parameters parameters)
public UnsignedInteger[] getArrayDimensions()
UaValueNodeThe 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.
getArrayDimensions in interface UaValueNodeUaValueNode.setArrayDimensions(com.prosysopc.ua.stack.builtintypes.UnsignedInteger[])public NodeAttributes getAttributes()
UaNodegetAttributes in interface UaNodepublic UaDataType getDataType()
getDataType in interface UaValueNodeUaValueNode.getDataTypeId()public NodeId getDataTypeId()
getDataTypeId in interface UaValueNodepublic final NodeClass getNodeClass()
UaNodegetNodeClass in interface UaNodegetNodeClass in class UaNodeImplpublic DataValue getValue()
getValue in interface UaValueNodepublic Integer getValueRank()
UaValueNodeIt may have the following values:
getValueRank in interface UaValueNodeUaValueNode.setValueRank(int)public void setArrayDimensions(UnsignedInteger[] ArrayDimensions)
UaValueNodeThe 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.
setArrayDimensions in interface UaValueNodepublic void setAttribute(UnsignedInteger attributeId, DataValue dataValue) throws StatusException
UaNodeImplsetAttribute in interface UaNodesetAttribute in class UaNodeImplStatusExceptionpublic void setAttributes(VariableTypeAttributes variableTypeAttributes)
public void setDataType(UaDataType dataType)
UaValueNodesetDataType in interface UaValueNodeUaValueNode.setDataTypeId(NodeId)public void setDataTypeId(NodeId dataTypeId)
UaValueNodesetDataTypeId in interface UaValueNodeUaValueNode.setDataTypeId(NodeId)public void setValue(DataValue value)
UaValueNodesetValue in interface UaValueNodevalue - the default value to setpublic void setValue(Object value) throws StatusException
setValue in interface UaValueNodevalue - a new value. The value may be a DataValue, Variant or any "OPC UA compliant"
value, i.e. value which can be used to initialize a Variant.StatusException - if the value is invalid for the Value attributepublic void setValueRank(int valueRank)
UaValueNodeIt may have the following values:
setValueRank in interface UaValueNodevalueRank - the value rank to setpublic boolean supportsAttribute(UnsignedInteger attributeId)
UaNode
Use the method to check if the node object you have is actually supporting a specific UA
Attribute. The supported attributes are available from specific Java properties, and the values
can also be read with UaNode.readAttribute(com.prosysopc.ua.stack.builtintypes.UnsignedInteger).
supportsAttribute in interface UaNodesupportsAttribute in class UaNodeImplattributeId - the attribute to check - the valid values are defined in
Attributespublic String toString()
toString in class UaTypeImplprotected VariableTypeAttributes getAttributes(VariableTypeAttributes attributes)
protected void getAttributesMap(Map<UnsignedInteger,Object> map)
getAttributesMap in class UaNodeImplprotected void initSupportedAttributes(List<UnsignedInteger> l)
initSupportedAttributes in class UaTypeImplprotected void readAttributeValue(UnsignedInteger attributeId, DataValue dataValue) throws StatusException
UaNodeImplreadAttributeValue in class UaTypeImplattributeId - the ID of the attribute to read.dataValue - the DataValue structure in which the value is set.StatusException - on failureprotected void writeAttributeValue(UnsignedInteger attributeId, Object value, StatusCode statusCode, DateTime sourceTime, UnsignedShort sourcePicoseconds) throws StatusException
writeAttributeValue in class UaTypeImplStatusExceptionCopyright © 2026. All rights reserved.