DataSetMetaData describe the content and semantic of a DataSet. The order of the fields in the DataSetMetaData shall match the order of DataSet fields when they are included in the published DataSetMessages. The DataSetMetaDataType is defined in 6.2.2.1.2.

This Structure DataType is a subtype of DataTypeSchemaHeader and is used to provide the metadata for a DataSet. The DataSetMetaDataType is formally defined in Table 3.

The DataTypeSchemaHeader provides OPC UA DataType definitions used in the DataSetMetaData. The DataTypeSchemaHeader is defined in A.1.1.

Table 3 – DataSetMetaDataType Structure

Name

Type

Description

DataSetMetaDataType

Structure

name

String

Name of the DataSet.

description

LocalizedText

Description of the DataSet.

The default value is a null LocalizedText.

fields

FieldMetaData[]

The metadata for the fields in the DataSet.

The FieldMetaData DataType is defined in 6.2.2.1.3.

dataSetClassId

Guid

This field provides the globally unique identifier of the class of DataSet if the DataSet is based on a DataSetClass. In this case, this field shall match the DataSetClassId of the concrete DataSet configuration.

If the DataSets are not created from a class, this field is null.

configurationVersion

Configuration‌VersionDataType

The configuration version for the current configuration of the DataSet.

Its representation in the AddressSpace is defined in Table 4.

Table 4 – DataSetMetaDataType Definition

Attributes

Value

BrowseName

DataSetMetaDataType

IsAbstract

False

Subtype of DataTypeSchemaHeader defined in A.1.1.

This Structure DataType is used to provide the metadata for a field in a DataSet. The FieldMetaData is formally defined in Table 5.

Table 5 – FieldMetaData Structure

Name

Type

Description

FieldMetaData

Structure

name

String

Name of the field.

The name shall be unique in the DataSet.

description

LocalizedText

Description of the field.

The default value shall be a null LocalizedText.

fieldFlags

DataSetFieldFlags

Flags for the field.

builtInType

Byte

The built-in data type of the field. The possible built-in type values are defined in OPC 10000-6.

All data types are transferred in DataSetMessages as one of the built-in data types. In most cases the identifier of the DataType NodeId matches the built-in type. The following special cases must be handled in addition:

(1) Abstract types always have the built-in type Variant since they can result in different concrete types in a DataSetMessage. The dataType field may provide additional restrictions e.g. if the abstract type is Number. Abstract types shall not be used if the field is represented as RawData set by the DataSetFieldContentMask defined in 6.2.3.1.

(2) Enumeration DataTypes are encoded as Int32. The Enumeration strings are defined through a DataType referenced through the dataType field.

(3) Structure and Union DataTypes are encoded as ExtensionObject. The encoding rules are defined through a DataType referenced through the dataType field.

(4) DataTypes derived from built-in types have the BuiltInType of the corresponding base DataType. The concrete subtype is defined through the dataType field.

(5) OptionSet DataTypes are either encoded as one of the concrete UInteger DataTypes or as an instance of an OptionSetType in an ExtensionObject.

dataType

NodeId

The NodeId of the DataType of this field.

If the DataType is an Enumeration or an OptionSet, the semantic of the Enumeration DataType is provided through the enumDataTypes field of the DataSetMetaData.

If the DataType is a Structure or Union, the encoding and decoding description of the Structure DataType is provided through the structureDataTypes field of the DataSetMetaData.

valueRank

Int32

Indicates whether the dataType is an array and how many dimensions the array has.

It may have the following values:

n > 1: the dataType is an array with the specified number of dimensions.

OneDimension (1): The dataType is an array with one dimension.

OneOrMoreDimensions (0): The dataType is an array with one or more dimensions.

Scalar (−1): The dataType is not an array.

Any (−2): The dataType can be a scalar or an array with any number of dimensions.

ScalarOrOneDimension (−3): The dataType 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

UInt32[]

This field specifies the maximum supported length of each dimension. If the maximum is unknown the value shall be 0.

The number of elements shall be equal to the value of the valueRank field. This field shall be null if valueRank ≤ 0.

The maximum number of elements of an array transferred on the wire is 2147483647 (max Int32). It is the total number of elements in all dimensions based on the UA Binary encoding rules for arrays.

maxStringLength

UInt32

If the dataType field is a String or ByteString then this field specifies the maximum supported length. If the maximum is unknown the value shall be 0.

If the dataType field is not a String or ByteString the value shall be 0.

If the valueRank is greater than 0 this field applies to each element of the array.

dataSetFieldId

Guid

The unique ID for the field in the DataSet. The ID is generated when the field is added to the list. A change of the position of the field in the list shall not change the ID.

properties

KeyValuePair[]

List of Property values providing additional semantic for the field.

If at least one Property value changes, the MajorVersion of the ConfigurationVersion shall be updated.

If the Property is EngineeringUnits, the unit of the Field Value shall match the unit of the FieldMetaData.

The KeyValuePair DataType is defined in OPC 10000-5. For this field the key in the KeyValuePair structure is the BrowseName of the Property and the value in the KeyValuePair structure is the Value of the Property.

This DataType defines flags for DataSet fields.

The DataSetFieldFlags is formally defined in Table 6.

Table 6 – DataSetFieldFlags Values

Value

Bit No.

Description

PromotedField

0

The flag indicates if the field is promoted to the NetworkMessages or transport protocol header.

Setting this flag increases the size of the NetworkMessages since information from the DataSetMessage body is also promoted to the header.

Depending on the used security, the header including the field may be unencrypted.

Promoted fields are always included in the header even if the DataSetMessage payload is a delta frame and the DataSet field is not included in the delta frame. In this case the last sent value is sent in the header.

The order of the fields in the DataSetMetaData promoted to the header shall match the order of the fields in the header unless the header includes field names.

The DataSetFieldFlags representation in the AddressSpace is defined in Table 7.

Table 7 – DataSetFieldFlags Definition

Attributes

Value

BrowseName

DataSetFieldFlags

IsAbstract

False

References

NodeClass

BrowseName

DataType

Subtype of UInt16 defined in OPC 10000-5.

HasProperty

Variable

OptionSetValues

LocalizedText [ ]

This Structure DataType is used to indicate configuration changes in the information published for a DataSet. The ConfigurationVersionDataType is formally defined in Table 8.

Table 8 – ConfigurationVersionDataType Structure

Name

Type

Description

ConfigurationVersionDataType

Structure

majorVersion

VersionTime

The MajorVersion reflects the time of the last major change of the DataSet content. The VersionTime DataType is defined in OPC 10000-4.

To assure interoperability, the Subscriber has to use DataSetMetaData for decoding with a MajorVersion that matches the MajorVersion in DataSetMessages sent by the Publisher.

Removing fields from the DataSet content, reordering fields, adding fields in between other fields or a DataType change in fields shall result in an update of the MajorVersion.

If at least one Property value of a DataSetMetaData field changes, the MajorVersion shall be updated.

There can be situations where older configurations of a Publisher are loaded and changed with product specific configuration tools. In this case the MajorVersion shall be updated if the configuration tool is not able to verify if the change only extends the configuration and does not change the existing content.

Additional criteria for changing MajorVersion or MinorVersion are defined in this specification.

minorVersion

VersionTime

The MinorVersion reflects the time of the last change.

Only the MinorVersion shall be updated if fields are added at the end of the DataSet content.

If the MajorVersion version is updated, the MinorVersion is updated to the same value as MajorVersion.