VariableTypes are used to provide type definitions for Variables. VariableTypes are defined using the VariableType NodeClass, as specified in Table 14.
Table 14 – VariableType NodeClass
|Base NodeClass Attributes||M||--||Inherited from the Base NodeClass. See 5.2|
|Value||O||Defined by the DataType attribute||The default Value for instances of this type.|
|DataType||M||NodeId||NodeId of the data type definition for instances of this type.|
|ValueRank||M||Int32||This Attribute indicates whether the Value Attribute of the VariableType is an array and how many dimensions the array has. It may have the following values: n > 1: the Value is an array with the specified number of dimensions. OneDimension (1): The value is an array with one dimension. OneOrMoreDimensions (0): The value is an array with one or more dimensions. Scalar (−1): The value is not an array. Any (−2): The value can be a scalar or an array with any number of dimensions. ScalarOrOneDimension (−3): The value can be a scalar or a one dimensional array.NOTE All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.|
|ArrayDimensions||O||UInt32||This Attribute specifies the length of each dimension for an array value. The Attribute specifies the maximum supported length of each dimension. If the maximum is unknown the value is 0. The number of elements shall be equal to the value of the ValueRank Attribute. This Attribute shall be null if ValueRank ≤ 0. For example, if a VariableType is defined by the following C array: Int32 myArray;then this VariableType’s DataType would point to an Int32, the VariableType’s ValueRank has the value 1 and the ArrayDimensions is an array with one entry having the value 346.|
|IsAbstract||M||Boolean||A boolean Attribute with the following values: TRUE it is an abstract VariableType, i.e. no Variable of this type shall exist, only of its subtypes. FALSE it is not an abstract VariableType, i.e. Variables of this type can exist.|
|HasProperty||0..*||HasProperty References are used to identify the Properties of the VariableType. The referenced Nodes may be instantiated by the instances of this type, depending on the ModellingRules defined in 6.4.4.|
|HasComponent||0..*||HasComponent References are used for complex VariableTypes to identify their containing DataVariables. Complex VariableTypes can only be used for DataVariables. The referenced Nodes may be instantiated by the instances of this type, depending on the ModellingRules defined in 6.4.4.|
|HasSubtype||0..*||HasSubtype References identify VariableTypes that are subtypes of this type. The inverse Reference identifies the parent type of this type.|
|GeneratesEvent||0..*||GeneratesEvent References identify the type of Events instances of this type may generate.|
|<other References>||0..*||VariableTypes may contain other References that can be instantiated by Variables defined by this VariableType. ModellingRules are defined in 6.4.4.|
|NodeVersion||O||String||The NodeVersion Property is used to indicate the version of a Node. The NodeVersion Property is updated each time a Reference is added or deleted to the Node the Property belongs to. Attribute value changes except for the DataType, ValueRank and ArrayDimensions Attributes do not cause the NodeVersion to change. Clients may read the NodeVersion Property or subscribe to it to determine when the structure of a Node has changed.Although the relationship of a VariableType to its DataType, ValueRank and ArrayDimensions is not modelled using References, changes to the DataType, ValueRank or ArrayDimensions Attributes of a VariableType lead to an update of the NodeVersion Property.|
The VariableType NodeClass inherits the base Attributes from the Base NodeClass defined in 5.2. The VariableType NodeClass also defines a set of Attributes that describe the default or initial value of its instance Variables. The Value Attribute represents the default value. The DataType, ValueRank and ArrayDimensions Attributes provide the capability to describe simple and complex values. The IsAbstract Attribute defines if the type can be directly instantiated.
The VariableType NodeClass uses HasProperty References to define the Properties and HasComponent References to define DataVariables. Whether they are instantiated depends on the ModellingRules defined in 6.4.4.
The Property NodeVersion indicates the version of the VariableType. There are no additional Properties defined for VariableTypes in this document. Additional parts of this series of standards may define additional Properties for VariableTypes. OPC 10000-8 defines a set of Properties that can be used for VariableTypes.
HasSubtype References are used to subtype VariableTypes. VariableType subtypes inherit the general semantics from the parent type. The general rules for subtyping are defined in Clause 6. It is not required to provide the HasSubtype Reference for the supertype, but it is required that the subtype provides the inverse Reference to its supertype.
GeneratesEvent References identify that Variables of the VariableType may be the source of an Event of the specified EventType or one of its subtypes. Servers should make GeneratesEvent References bidirectional References. However, it is allowed to be unidirectional when the Server is not able to expose the inverse direction pointing from the EventType to each VariableType supporting the EventType.
GeneratesEvent References are optional, i.e. Variables may generate Events of an EventType that is not exposed by its VariableType.
VariableTypes may use any additional References to define relationships to other Nodes. No restrictions are placed on the types of References used or on the NodeClasses of the Nodes that may be referenced. However, restrictions may be defined by the ReferenceType excluding its use for VariableTypes. Standard ReferenceTypes are described in Clause 7.
All Nodes referenced with forward hierarchical References shall have unique BrowseNames in the context of the VariableType (see 4.5).