|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.nodes.AbstractUaNode
com.prosysopc.ua.client.nodes.UaNodeImpl
com.prosysopc.ua.client.nodes.UaTypeImpl
com.prosysopc.ua.client.nodes.UaVariableTypeImpl
public class UaVariableTypeImpl
Straight forward implementation of UaVariableType.
It keeps all attributes in memory.
| Field Summary |
|---|
| Fields inherited from class com.prosysopc.ua.client.nodes.UaTypeImpl |
|---|
javaClass |
| Fields inherited from class com.prosysopc.ua.client.nodes.UaNodeImpl |
|---|
addressSpace, logger, references, supportedAttributesMap |
| Constructor Summary | |
|---|---|
UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
|
|
UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.LocalizedText description,
EnumSet<WriteAccess> writeMask,
EnumSet<WriteAccess> userWriteMask,
UaClientReference[] references,
UaProperty[] properties,
org.opcfoundation.ua.builtintypes.DataValue value,
org.opcfoundation.ua.builtintypes.NodeId dataType,
Integer valueRank,
org.opcfoundation.ua.builtintypes.UnsignedInteger[] arrayDimensions,
Boolean isAbstract)
|
|
UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
Create a new node with name to be used for browseName and displayName. |
|
| Method Summary | |
|---|---|
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.VariableTypeAttributes |
getAttributes(org.opcfoundation.ua.core.VariableTypeAttributes attributes)
|
UaType |
getDataType()
|
org.opcfoundation.ua.builtintypes.NodeId |
getDataTypeId()
|
org.opcfoundation.ua.core.NodeClass |
getNodeClass()
The NodeClass Attribute identifies the NodeClass of a Node. |
org.opcfoundation.ua.builtintypes.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<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
|
protected void |
readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
Read the value of an attribute. |
void |
setArrayDimensions(org.opcfoundation.ua.builtintypes.UnsignedInteger[] ArrayDimensions)
This Attribute specifies the length of each dimension for an array value. |
void |
setAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
Unconditionally, set the value of the specified attribute. |
void |
setAttributes(org.opcfoundation.ua.core.VariableTypeAttributes variableTypeAttributes)
|
void |
setDataType(UaType dataType)
Set the Data Type node. |
void |
setDataTypeId(org.opcfoundation.ua.builtintypes.NodeId dataTypeId)
Set the Data Type. |
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. |
boolean |
supportsAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId)
Check if the node supports the specified attribute. |
String |
toString()
|
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.client.nodes.UaTypeImpl |
|---|
addSubType, getIsAbstract, getJavaClass, getSuperType, hasSuperType, inheritsFrom, inheritsFrom, setIsAbstract, setJavaClass, setSuperType |
| Methods inherited from class com.prosysopc.ua.nodes.AbstractUaNode |
|---|
getForwardReferences, getInverseReferences, getReferences, getReferences, getReferencesAsList, referenceTypeInherits |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.prosysopc.ua.nodes.UaType |
|---|
addSubType, getIsAbstract, getJavaClass, getSuperType, hasSuperType, inheritsFrom, inheritsFrom, setIsAbstract, setJavaClass, setSuperType |
| Constructor Detail |
|---|
public UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName)
public UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.LocalizedText description,
EnumSet<WriteAccess> writeMask,
EnumSet<WriteAccess> userWriteMask,
UaClientReference[] references,
UaProperty[] properties,
org.opcfoundation.ua.builtintypes.DataValue value,
org.opcfoundation.ua.builtintypes.NodeId dataType,
Integer valueRank,
org.opcfoundation.ua.builtintypes.UnsignedInteger[] arrayDimensions,
Boolean isAbstract)
public UaVariableTypeImpl(AddressSpace addressSpace,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
String name,
Locale locale)
nodeId - name - locale - | Method Detail |
|---|
public org.opcfoundation.ua.builtintypes.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(org.opcfoundation.ua.builtintypes.UnsignedInteger[])public org.opcfoundation.ua.core.NodeAttributes getAttributes()
getAttributes in interface UaNodepublic UaType getDataType()
getDataType in interface UaValueNodeUaValueNode.getDataTypeId()public org.opcfoundation.ua.builtintypes.NodeId getDataTypeId()
getDataTypeId in interface UaValueNodepublic final org.opcfoundation.ua.core.NodeClass getNodeClass()
UaNode
getNodeClass in interface UaNodegetNodeClass in class UaNodeImplpublic org.opcfoundation.ua.builtintypes.DataValue getValue()
getValue in interface UaValueNodepublic Integer getValueRank()
UaValueNodeIt may have the following values:
getValueRank in interface UaValueNodeUaValueNode.setValueRank(int)public void setArrayDimensions(org.opcfoundation.ua.builtintypes.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 UaValueNode
public void setAttribute(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
UaNodeImpl
setAttribute in interface UaNodesetAttribute in class UaNodeImplStatusExceptionpublic void setAttributes(org.opcfoundation.ua.core.VariableTypeAttributes variableTypeAttributes)
public void setDataType(UaType dataType)
UaValueNode
setDataType in interface UaValueNodeUaValueNode.setDataTypeId(NodeId)public void setDataTypeId(org.opcfoundation.ua.builtintypes.NodeId dataTypeId)
UaValueNode
setDataTypeId in interface UaValueNodeUaValueNode.setDataTypeId(NodeId)public void setValue(org.opcfoundation.ua.builtintypes.DataValue value)
UaValueNode
setValue in interface UaValueNodevalue - the default value to set
public 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(org.opcfoundation.ua.builtintypes.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(org.opcfoundation.ua.builtintypes.UnsignedInteger).
supportsAttribute in interface UaNodesupportsAttribute in class UaNodeImplattributeId - the attribute to check - the valid values are defined in
Attributes
public String toString()
toString in class UaTypeImplprotected org.opcfoundation.ua.core.VariableTypeAttributes getAttributes(org.opcfoundation.ua.core.VariableTypeAttributes attributes)
protected void initSupportedAttributes(List<org.opcfoundation.ua.builtintypes.UnsignedInteger> l)
initSupportedAttributes in class UaTypeImpl
protected void readAttributeValue(org.opcfoundation.ua.builtintypes.UnsignedInteger attributeId,
org.opcfoundation.ua.builtintypes.DataValue dataValue)
throws StatusException
UaNodeImpl
readAttributeValue in class UaTypeImplattributeId - the ID of the attribute to read.dataValue - the DataValue structure in which the value is set.
StatusException
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
writeAttributeValue in class UaTypeImplStatusException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||