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 126.96.36.199.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||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 188.8.131.52.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||ConfigurationVersionDataType||The configuration version for the current configuration of the DataSet.|
Its representation in the AddressSpace is defined in Table 4.
Table 4 – DataSetMetaDataType Definition
|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||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 184.108.40.206.(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
|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
|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
|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.|
DataSetMetaData may be specific to a single Publisher and a single selection of information or universal e.g. defined by a standard organisation 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 array of KeyValuePair Structures.
This Structure DataType represents the PublishedDataSet parameters. The PublishedDataSetDataType is formally defined in Table 9.
Table 9 – PublishedDataSetDataType Structure
|name||String||Name of the PublishedDataSet.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 String array.|
|dataSetMetaData||DataSetMetaDataType||Defined in 220.127.116.11.|
|extensionFields||KeyValuePair||Defined in 18.104.22.168.|
|dataSetSource||PublishedDataSetSourceDataType||Defined in 22.214.171.124.|
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 10.
Table 10 – PublishedDataSetSourceDataType Definition
|Subtype of Structure defined in OPC 10000-5.|
|HasSubtype||DataType||PublishedDataItemsDataType||FALSE||Defined in 126.96.36.199.2.|
|HasSubtype||DataType||PublishedEventsDataType||FALSE||Defined in 188.8.131.52.4.|
The parameterPublishedData defines the content of a DataSet created from Variable Values and therefore the content of the DataSetMessage sent by aDataSetWriter. 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.
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.
The DataType PublishedVariableDataType represents the configuration information for one Variable. The PublishedVariableDataType is formally defined in Table 11.
Table 11 – 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_0 No Deadband calculation should be applied. Absolute_1 AbsoluteDeadband (This type is specified in OPC 10000-4) Percent_2 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 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 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.10.|
|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.|
This Structure DataType is used to represent PublishedDataItems specific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 184.108.40.206.
The PublishedDataItemsDataType is formally defined in Table 12.
Table 12 – PublishedDataItemsDataType Structure
|publishedData||PublishedVariableDataType||Defined in 220.127.116.11.1.|
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 basedDataSetMessages 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 18.104.22.168.5.
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 22.214.171.124.
The PublishedEventsDataType is formally defined in Table 13.
Table 13 – PublishedEventsDataType Structure
|eventNotifier||NodeId||Defined in 126.96.36.199.1.|
|selectedFields||SimpleAttributeOperand||Defined in 188.8.131.52.2.|
|filter||ContentFilter||Defined in 184.108.40.206.3.|