The DataType NodeClass describes the syntax of a Variable Value. DataTypes are defined using the DataType NodeClass, as specified in Table 16.
Name |
Use |
Data Type |
Description |
Attributes |
|
|
|
Base NodeClass Attributes |
M |
-- |
Inherited from the Base NodeClass. See 5.2. |
IsAbstract |
M |
Boolean |
A boolean Attribute with the following values: TRUEit is an abstract DataType. FALSEit 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.47. 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.48. 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.49. It is a subtype of DataTypeDefinition. |
|
|
|
|
References |
|
|
|
HasProperty |
0..* |
|
HasProperty References identify the Properties for the DataType. |
HasSubtype |
0..* |
|
HasSubtype References may be used to span a data type hierarchy. The inverse Reference identifies the parent type of this type. |
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. |
|
|
|
|
Standard Properties |
|
|
|
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 comparisons. |
EnumStrings |
O |
LocalizedText[] |
Enumeration DataTypes shall have either an EnumStrings Property or an EnumValues Property. They shall not be applied for other DataTypes. 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[] |
Enumeration DataTypes shall have either an EnumStrings Property or an EnumValues Property. They shall not be applied for other DataTypes. The EnumValues Property shall be used 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 shall be applied to OptionSet DataTypes and UInteger DataTypes representing bit masks. An OptionSet DataType or UInteger 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 shall provide an array of LocalizedText containing the human-readable representation for each bit. |
OptionSetLength |
O |
UInt32 |
The OptionSetLength Property shall only be applied to subtypes of the OptionSet DataType. It optionally provides the length, in bytes, of the OptionSet. The provided length shall at least provide enough bytes that all bits defined in the OptionSetValues can be managed. For example, if 18 bits are defined by the OptionSetValues, the OptionSetLength shall be at least 3 bytes. |
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, however it is required that the subtype provides the inverse Reference to its supertype. 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. The DataTypeEncoding Node shall provide the inverse HasEncoding Reference to its DataType.
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.