A PublishedDataSet defines the content of a DataSetMessage and the configuration of the information source for a DataSet. See 5.2 for the introduction to DataSets, 5.3 for the introduction to DataSetMessages and 5.4.1.2 for an introduction to the different source options and the parameters for sending of DataSetMessages.

The content of a DataSetMessage is defined by the DataSetMetaData. This information is required for interoperability between Publisher and Subscriber. See 6.2.3.2.

The information source is only necessary for the configuration of the Publisher. The standard configuration options are published data items for cyclic DataSets as defined in 6.2.3.7 and published events for acyclic DataSets as defined in 6.2.3.8. OPC UA Applications can provide PublishedDataSets where the information source is application specific. The custom PublishedDataSet source DataType defined in 6.2.3.9 indicates if the DataSet is cyclic or acyclic. Cyclic DataSets are sent as key frame or delta frame DataSetMessages. Acyclic DataSets are sent as event DataSetMessages.

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.3.2.3.

The DataSetMetaData is a subtype of DataTypeSchemaHeader. The DataTypeSchemaHeader provides OPC UA DataType definitions used in the DataSetMetaData. The DataTypeSchemaHeader is defined in OPC 10000-5.

The DataTypeSchemaHeader provides information that is required when the DataSetMetaData is used outside the scope of an OPC UA Server e.g when sent in PubSub messages or when the PubSubConfiguration is exchanged with the UABinaryFileDataType. This information includes a namespace array and DataType descriptions. OPC UA namespace defined DataTypes are not included.

The DataTypeSchemaHeader of the DataSetMetaData shall be populated with the necessary information. This includes all namespaces and DataTypes that are potentially contained in the associated DataSetMessages.

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 5.

Table 5 – DataSetMetaDataType structure

Name

Type

Description

DataSetMetaDataType

Structure

Subtype of DataTypeSchemaHeader defined in OPC 10000-5.

Name

String

Name of the DataSet.

Description

LocalizedText

Description of the DataSet.

The default value is a null or empty LocalizedText.

Fields

FieldMetaData[]

The metadata for the fields in the DataSet.

The FieldMetaData DataType is defined in 6.2.3.2.4.

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 6.

Table 6 – DataSetMetaDataType definition

Attributes

Value

BrowseName

DataSetMetaDataType

IsAbstract

False

Subtype of DataTypeSchemaHeader defined in OPC 10000-5.

Conformance Units

PubSub Parameters Discovery

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

Table 7 – 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 or empty 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 need to 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.4.2.

(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 base type DataTypeSchemaHeader.

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 base type DataTypeSchemaHeader.

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.

Only a concrete valueRank with values n=-1 or n>0 shall be used if the field is represented as RawData set by the DataSetFieldContentMask defined in 6.2.4.2.

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 or empty if valueRank ≤ 0.

The maximum number of elements of an array transferred on the wire is 2.147.483.647 (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, LocalizedText (the text field) or ByteString then this field specifies the maximum supported length of the data in number of bytes. If the maximum is unknown the value shall be 0.If the dataType field is not a String, LocalizedText 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.

The Property in the FieldMetaData shall correctly describe the Field Value in the DataSetMessages. For example 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.

Its representation in the AddressSpace is defined in Table 8.

Table 8 – FieldMetaData definition

Attributes

Value

BrowseName

FieldMetaData

IsAbstract

False

Subtype of Structure defined in OPC 10000-5.

Conformance Units

PubSub Parameters Discovery

This DataType defines flags for DataSet fields.

The DataSetFieldFlags is formally defined in Table 9.

Table 9 – 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 10.

Table 10 – DataSetFieldFlags definition

Attribute

Value

BrowseName

DataSetFieldFlags

IsAbstract

False

References

Node Class

BrowseName

DataType

TypeDefinition

Others

Subtype of UInt16 defined in OPC 10000-5

HasProperty

Variable

OptionSetValues

LocalizedText []

PropertyType

Conformance Units

PubSub Parameters Discovery

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

Table 11 – 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 shall 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 document.

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 is updated, the minorVersion is updated to the same value as majorVersion.

Its representation in the AddressSpace is defined in Table 12.

Table 12 – ConfigurationVersionDataType definition

Attributes

Value

BrowseName

ConfigurationVersionDataType

IsAbstract

False

Subtype of Structure defined in OPC 10000-5.

Conformance Units

PubSub Parameters Discovery

DataSetMetaData may be specific to a single Publisher and a single selection of information or universal, e.g. defined by a standards organization or by a plant operator as a DataSetClass. DataSets that conform to such a DataSetClass are identified with a DataSetClassId.

The DataSetClassId is the globally unique identifier (Guid) of a DataSetClass. It is included in the DataSetMetaData. The NetworkMessageContentMask controls the availability of the DataSetClassId in the NetworkMessage.

The ExtensionFields parameter allows the configuration of fields with values to be included in the DataSet when the existing AddressSpace of the Publisher does not provide the necessary information. The ExtensionFields are represented as an array of KeyValuePair Structures.

This Structure DataType represents the PublishedDataSet parameters. The PublishedDataSetDataType is formally defined in Table 13.

Table 13 – PublishedDataSetDataType structure

Name

Type

Description

AllowSubtypes

PublishedDataSetDataType

Structure

Name

String

Name of the PublishedDataSet. It is recommended to use a human readable name.

The name of the PublishedDataSet shall be unique in the Publisher.

DataSetFolder

String[]

Optional path of the DataSet folder used to group PublishedDataSets where each entry in the String array represents one level in a DataSet folder hierarchy.

If no grouping is needed the parameter is a null or empty String array.

DataSetMetaData

DataSetMetaDataType

Defined in 6.2.3.2.

ExtensionFields

KeyValuePair[]

Defined in 6.2.3.4.

DataSetSource

PublishedDataSetSourceDataType

Defined in 6.2.3.6. If the parameter is null, the source creates cyclic DataSets. This is equal to a PublishedDataSetCustomSourceDataType with cyclicDataSet set to true.

True

Its representation in the AddressSpace is defined in Table 14.

Table 14 – PublishedDataSetDataType definition

Attributes

Value

BrowseName

PublishedDataSetDataType

IsAbstract

False

Subtype of Structure defined in OPC 10000-5.

Conformance Units

PubSub Parameters PublishedDataSet

The PublishedDataSetSourceDataType Structure is an abstract base type without fields for the definition of the PublishedDataSet source. Its representation in the AddressSpace is defined in Table 15.

Table 15 – PublishedDataSetSourceDataType definition

Attributes

Value

BrowseName

PublishedDataSetSourceDataType

IsAbstract

True

Subtype of Structure defined in OPC 10000-5.

Conformance Units

PubSub Parameters PublishedDataSet

The parameter PublishedData defines the content of a DataSet created from Variable Values and therefore the content of the DataSetMessage sent by a DataSetWriter. The sources of the DataSet fields are defined through an array of PublishedVariableDataType.

The index into the array has an important role for Subscribers and for configuration tools. It is used as a handle to reference the Value in DataSetMessages received by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersion of the DataSet and applications working with the index shall always check the ConfigurationVersion before using the index.

The length of the PublishedData array shall match the length of the fields array in the corresponding DataSetMetaData.

If an entry of the PublishedData references one of the ExtensionFields, the substituteValue shall contain the QualifiedName of the ExtensionFields entry. All other fields of this PublishedVariableDataType array element shall be null or empty.

The DataType PublishedVariableDataType represents the configuration information for one Variable. The PublishedVariableDataType is formally defined in Table 16.

Table 16 – PublishedVariableDataType structure

Name

Type

Description

PublishedVariableDataType

Structure

PublishedVariable

NodeId

The NodeId of the published Variable.

Some transport protocols require knowledge on the message receiver side about the DataType, ValueRank and ArrayDimensions to be able to decode the message content. This information is provided through the DataSetMetaData provided for the DataSet.

AttributeId

IntegerId

Id of the Attribute to publish e.g. the Value Attribute. This shall be a valid Attribute id.

The Attributes are defined in OPC 10000-3. The IntegerId DataType is defined in OPC 10000-4. The IntegerIds for the Attributes are defined in OPC 10000-6.

SamplingIntervalHint

Duration

A recommended rate of acquiring new values for change or deadband evaluation. A Publisher should use this value as hint for setting the internal sampling rate.

The value 0 indicates that the Server should use the fastest practical rate.

The value -1 indicates that the default sampling interval defined by the PublishingInterval of the WriterGroup is requested. Any negative number is interpreted as -1.

DeadbandType

UInt32

A value that defines the Deadband type and behaviour.

Value Description

None No Deadband calculation should be applied.

Absolute AbsoluteDeadband (This type is specified in OPC 10000-4)

Percent PercentDeadband (This type is specified in OPC 10000-8).

DeadbandValue

Double

The deadband value for the corresponding DeadbandType. The meaning of the value depends on DeadbandType.

IndexRange

NumericRange

This parameter is used to identify a single element of an array, or a single range of indexes for arrays. The NumericRange type and the logic for IndexRange are defined in OPC 10000-4.

SubstituteValue

BaseDataType

The SubstituteValue is the value that is included in the DataSet if the StatusCode of the DataValue is Bad. In this case the StatusCode is set to Uncertain_SubstituteValue.

This Value shall match the DataType and ValueRank of the PublishedVariable since DataSetWriters may depend on a valid Value with the right DataType that matches the ConfigurationVersion.

If the SubstituteValue is Null, the StatusCode of the DataValue is processed.

The handling of the SubstituteValue is defined in 6.2.11.

MetaDataProperties

QualifiedName [ ]

This parameter specifies an array of Properties to be included in the FieldMetaData created for this Variable.

It shall be used to populate the properties element of the resulting field in the DataSetMetaData.

Its representation in the AddressSpace is defined in Table 17.

Table 17 – PublishedVariableDataType definition

Attributes

Value

BrowseName

PublishedVariableDataType

IsAbstract

False

Subtype of Structure defined in OPC 10000-5.

Conformance Units

PubSub Parameters PublishedDataSet

This Structure DataType is used to represent PublishedDataItems specific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 6.2.3.6.

The PublishedDataItemsDataType is formally defined in Table 18.

Table 18 – PublishedDataItemsDataType structure

Name

Type

Description

PublishedDataItemsDataType

Structure

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

PublishedData

PublishedVariableDataType[]

Defined in 6.2.3.7.1.

Its representation in the AddressSpace is defined in Table 19.

Table 19 – PublishedDataItemsDataType definition

Attributes

Value

BrowseName

PublishedDataItemsDataType

IsAbstract

False

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

Conformance Units

PubSub Parameters PublishedDataSet

The parameter EventNotifier defines the NodeId of the Object in the event notifier tree of the OPC UA Server from which Events are collected.

The parameter SelectedFields defines the selection of Event fields contained in the DataSet generated for an Event and sent through the DataSetWriter. The SimpleAttributeOperand DataType is defined in OPC 10000-4. The DataType of the selected Event field in the EventType defines the DataType of the DataSet field. Event fields can be null or the field value can be a StatusCode. The encoding of Event based DataSetMessages shall be able to handle these cases. ExtensionFields defined for the instance of the PublishedEventsType can be included in the SelectedFields by specifying the PublishedEventsType NodeId as typeId in the SimpleAttributeOperand and the BrowseName of the extension field in the browsePath of the SimpleAttributeOperand.

The index into the list of entries in the SelectedFields has an important role for Subscribers. It is used as handle to reference the Event field in DataSetMessages received by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersion and applications working with the index shall always check the ConfigurationVersion before using the index. If a change of the SelectedFields adds additional fields, the MinorVersion of the ConfigurationVersion shall be updated. If a change of the SelectedFields removes fields, the MajorVersion of the ConfigurationVersion shall be updated. The ConfigurationVersionDataType and the rules for setting the version are defined in 6.2.3.2.6.

The parameter Filter defines the filter applied to the Events. It allows the reduction of the DataSets generated from Events through a filter. The ContentFilter DataType is defined in OPC 10000-4.

This Structure DataType is used to represent PublishedEvents specific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 6.2.3.6.

The PublishedEventsDataType is formally defined in Table 20.

Table 20 – PublishedEventsDataType structure

Name

Type

Description

PublishedEventsDataType

Structure

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

EventNotifier

NodeId

Defined in 6.2.3.8.1.

SelectedFields

SimpleAttributeOperand[]

Defined in 6.2.3.8.2.

Filter

ContentFilter

Defined in 6.2.3.8.3.

Its representation in the AddressSpace is defined in Table 21.

Table 21 – PublishedEventsDataType definition

Attributes

Value

BrowseName

PublishedEventsDataType

IsAbstract

False

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

Conformance Units

PubSub Parameters PublishedDataSet Events

The CyclicDataSet with DataType Boolean defines the type of DataSetMessages created by the PublishedDataSet.

If CyclicDataSet is false, event DataSetMessages are sent acyclicly and a related DataSetWriter shall use a KeyFrameCount of 0.

If CyclicDataSet is true, key frame or delta frame DataSetMessages are sent and a related DataSetWriter shall use a KeyFrameCount that is greater than or equal to 1.

This Structure DataType is used to represent custom PublishedDataSet source specific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 6.2.3.6.

The DataType can be used directly if no further information is exposed for the source. OPC UA Applications shall use DataTypes derived from PublishedDataSetSourceDataType if they want to provide custom information about the source e.g. product specific configuration options.

The PublishedDataSetCustomSourceDataType is formally defined in Table 22.

Table 22 – PublishedDataSetCustomSourceDataType structure

Name

Type

Description

PublishedDataSetCustomSourceDataType

Structure

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

CyclicDataSet

Boolean

Defined in 6.2.3.9.1.

Its representation in the AddressSpace is defined in Table 23.

Table 23 – PublishedDataSetCustomSourceDataType definition

Attributes

Value

BrowseName

PublishedDataSetCustomSourceDataType

IsAbstract

False

Subtype of PublishedDataSetSourceDataType defined in 6.2.3.6.

Conformance Units

PubSub Parameters PublishedDataSet Custom