A DataTypeField defines an abstract representation of a field within a UADataType that can be used by design tools to automatically create serialization code. The fields in the DataTypeField type are defined in Table F.14.

Table F.14 – DataTypeField

Element

Type

Description

Name

String

A name for the field that is unique within the DataTypeDefinition.

SymbolicName

String

A symbolic name for the field that can be used in autogenerated code.

It should only be specified if the Name cannot be used for this purpose.

Only letters, digits or the underscore (‘_’) are permitted.

DisplayName

LocalizedText []

A display name for the field in multiple locales.

DataType

NodeId

The NodeId of the DataType for the field.

This NodeId can refer to another Node with its own DataTypeDefinition.

This field is not specified for Enumeration or OptionSet DataTypes.

ValueRank

Int32

The value rank for the field.

It shall be Scalar (-1) or a fixed rank Array (>=1).

This field is not specified for Enumeration or OptionSet DataTypes.

ArrayDimensions

String

The maximum length of an array.

This field is a comma separated list of unsigned integer values. The list has a number of elements equal to the ValueRank.

The value is 0 if the maximum is not known for a dimension.

This field is not specified if the ValueRank <= 0.

This field is not specified for Enumeration or OptionSet DataTypes.

MaxStringLength

UInt32

The maximum length of a String or ByteString value.

If not known the value is 0.

The value is 0 if the DataType is not String or ByteString.

If the ValueRank > 0 the maximum applies to each element in the array.

This field is not specified for Enumeration or OptionSet DataTypes.

Description

LocalizedText []

A description for the field in multiple locales.

Value

Int32

The value associated with the field.

This field is only specified for Enumeration or OptionSet DataTypes.

IsOptional

Boolean

The field indicates if a data type field in a structure is optional.

The default value is false.

This field is not specified for Enumeration, Union or OptionSet DataTypes.

AllowSubTypes

Boolean

For backward compatibility, this field shall be FALSE if the DataType is BaseDataType, Structure or if the DataType is a subtype of simple built-in types such as a String or Int32.

This field only applies to fields with a DataType which could have subtypes that have different encodings.

This field shall be TRUE for all abstract DataTypes where the possible subtypes have different encodings.

When TRUE, the field’s value is allowed to contain subtypes of the DataType.

If TRUE, all subtypes of Structure are encoded as an ExtensionObject (see 5.1.6) and all DataTypes that are not subtypes of Structure are encoded as a Variant (see 5.1.9).

The default value is false.

This field is not specified for Enumeration or OptionSet DataTypes.