The DataType NodeClass describes the syntax of a Variable Value. DataTypes are defined using the DataType NodeClass, as specified in Table 16.
Table 16 – DataType NodeClass
|Base NodeClass Attributes||M||--||Inherited from the Base NodeClass. See 5.2.|
|IsAbstract||M||Boolean||A boolean Attribute with the following values:
TRUE it is an abstract DataType.
FALSE it is not an abstract DataType.
|DataTypeDefinition||O||DataTypeDefinition||The DataTypeDefinition Attribute is used to provide the meta data and encoding information for custom DataTypes. The abstract DataTypeDefinition DataType is defined in 8.48.
Structure and Union DataTypes
The Attribute is mandatory for DataTypes derived from Structure and Union. For such DataTypes, the Attribute contains a structure of the DataType StructureDefinition. The StructureDefinition DataType is defined in 8.49. It is a subtype of DataTypeDefinition.
Enumeration and OptionSet DataTypes
The Attribute is mandatory for DataTypes derived from Enumeration, OptionSet and subtypes of UInteger representing an OptionSet. For such DataTypes, the Attribute contains a structure of the DataType EnumDefinition. The EnumDefinition DataType is defined in 8.50. It is a subtype of DataTypeDefinition.
|HasProperty||0..*||HasProperty References identify the Properties for the DataType.|
|HasSubtype||0..*||HasSubtype References may be used to span a data type hierarchy.|
|HasEncoding||0..*||HasEncoding References identify the encodings of the DataType represented as Objects of type DataTypeEncodingType.
Only concrete Structured DataTypes may use HasEncoding References. Abstract, Built-in, Enumeration, and Simple DataTypes are not allowed to be the SourceNode of a HasEncoding Reference.
Each concrete Structured DataType shall point to at least one DataTypeEncoding Object with the BrowseName “Default Binary” or “Default XML” having the NamespaceIndex 0. The BrowseName of the DataTypeEncoding Objects shall be unique in the context of a DataType, i.e. a DataType shall not point to two DataTypeEncodings having the same BrowseName.
|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 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. Clients shall not use the content for programmatic purposes except for equality comparisions.
|EnumStrings||O||LocalizedText||The EnumStrings Property only applies for Enumeration DataTypes. It shall not be applied for other DataTypes. If the EnumValues Property is provided, the EnumStrings Property shall not be provided.
Each entry of the array of LocalizedText in this Property represents the human-readable representation of an enumerated value. The Integer representation of the enumeration value points to a position of the array.
|EnumValues||O||EnumValueType||The EnumValues Property only applies for Enumeration DataTypes. It shall not be applied for other DataTypes. If the EnumStrings Property is provided, the EnumValues Property shall not be provided.
Using the EnumValues Property it is possible to represent Enumerations with integers that are not zero-based or have gaps (e.g. 1, 2, 4, 8, and 16).
Each entry of the array of EnumValueType in this Property represents one enumeration value with its integer notation, human-readable representation and help information.
|OptionSetValues||O||LocalizedText||The OptionSetValues Property only applies for OptionSet DataTypes and UInteger DataTypes.
An OptionSet DataType is used to represent a bit mask and the OptionSetValues Property contains the human-readable representation for each bit of the bit mask.
The OptionSetValues Property provides an array of LocalizedText containing the human-readable representation for each bit.
The DataType NodeClass inherits the base Attributes from the Base NodeClass defined in 5.2. The IsAbstract Attribute specifies if the DataType is abstract or not. Abstract DataTypes can be used in the AddressSpace, i.e. Variables and VariableTypes can point with their DataType Attribute to an abstract DataType. However, concrete values can never be of an abstract DataType and shall always be of a concrete subtype of the abstract DataType.
HasProperty References are used to identify the Properties of a DataType. The Property NodeVersion is used to indicate the version of the DataType. The Property EnumStrings contains human-readable representations of enumeration values and is only applied to Enumeration DataTypes. Instead of the EnumStrings Property an Enumeration DataType can also use the EnumValues Property to represent Enumerations with integer values that are not zero-based or containing gaps. There are no additional Properties defined for DataTypes in this standard. Additional parts of this series of standards may define additional Properties for DataTypes.
HasSubtype References may be used to expose a data type hierarchy in the AddressSpace. The semantic of subtyping is only defined to the point, that a Server may provide instances of the subtype instead of the DataType. Clients should not make any assumptions about any other semantic with that information. For example, it might not be possible to cast a value of one data type to its base data type. Servers need not provide HasSubtype References, even if their DataTypes span a type hierarchy. Some restrictions apply for subtyping enumeration DataTypes as defined in 8.14.
HasEncoding References point from the DataType to its DataTypeEncodings. Each concrete Structured DataType can point to many DataTypeEncodings, but each DataTypeEncoding shall belong to one DataType, that is, it is not permitted for two DataType Nodes to point to the same DataTypeEncoding Object using HasEncoding References.
An abstract DataType is not the SourceNode of a HasEncoding Reference. The DataTypeEncoding of an abstract DataType is provided by its concrete subtypes.
DataType Nodes shall not be the SourceNode of other types of References. However, they may be the TargetNode of other References.