DataSetMetaDatadescribe the content and semantic of a DataSet. The order of the fields in the DataSetMetaDatashall match the order of DataSetfields when they are included in the published DataSetMessages. The DataSetMetaDataTypeis defined in 6.2.2.1.2.
This Structure DataTypeis a subtype of DataTypeSchemaHeaderand is used to provide the metadata for a DataSet. The DataSetMetaDataTypeis formally defined in Table 3.
The DataTypeSchemaHeaderprovides OPC UA DataTypedefinitions used in the DataSetMetaData. The DataTypeSchemaHeaderis 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 DataSetif the DataSetis based on a DataSetClass. In this case, this field shall match the DataSetClassIdof the concrete DataSetconfiguration. If the DataSetsare 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
Attributes |
Value |
BrowseName |
DataSetMetaDataType |
IsAbstract |
False |
Subtype of DataTypeSchemaHeader defined in A.1.1. |
This Structure DataTypeis used to provide the metadata for a field in a DataSet. The FieldMetaDatais 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 DataSetMessagesas one of the built-in data types. In most cases the identifier of the DataType NodeIdmatches the built-in type. The following special cases must be handled in addition: (1) Abstract types always have the built-in type Variantsince they can result in different concrete types in a DataSetMessage. The dataTypefield may provide additional restrictions e.g. if the abstract type is Number. Abstract types shall not be used if the field is represented as RawDataset by the DataSetFieldContentMaskdefined in 6.2.3.1. (2) Enumeration DataTypesare encoded as Int32. The Enumerationstrings are defined through a DataTypereferenced through the dataTypefield. (3) Structureand Union DataTypesare encoded as ExtensionObject. The encoding rules are defined through a DataTypereferenced through the dataTypefield. (4) DataTypesderived from built-in types have the BuiltInTypeof the corresponding base DataType. The concrete subtype is defined through the dataTypefield. (5) OptionSet DataTypesare either encoded as one of the concrete UInteger DataTypesor as an instance of an OptionSetTypein an ExtensionObject. |
dataType |
NodeId |
The NodeIdof the DataTypeof this field. If the DataTypeis an Enumerationor an OptionSet, the semantic of the Enumeration DataTypeis provided through the enumDataTypesfield of the DataSetMetaData. If the DataTypeis a Structureor Union, the encoding and decoding description of the Structure DataTypeis provided through the structureDataTypesfield of the DataSetMetaData. |
valueRank |
Int32 |
Indicates whether the dataTypeis an array and how many dimensions the array has. It may have the following values: n > 1: the dataTypeis an array with the specified number of dimensions. OneDimension (1): The dataTypeis an array with one dimension. OneOrMoreDimensions (0): The dataTypeis an array with one or more dimensions. Scalar (−1): The dataTypeis not an array. Any (−2): The dataTypecan be a scalar or an array with any number of dimensions. ScalarOrOneDimension (−3): The dataTypecan be a scalar or a one dimensional array. NOTE All DataTypesare considered to be scalar, even if they have array-like semantics like ByteStringand 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 dataTypefield is a Stringor ByteStringthen this field specifies the maximum supported length. If the maximum is unknown the value shall be 0. If the dataType field is not a Stringor ByteStringthe value shall be 0. If the valueRankis 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 Propertyvalues providing additional semantic for the field. If at least one Propertyvalue changes, the MajorVersionof the ConfigurationVersionshall be updated. If the Propertyis EngineeringUnits, the unit of the Field Valueshall match the unit of the FieldMetaData. The KeyValuePairDataType is defined in OPC 10000-5. For this field the key in the KeyValuePairstructure is the BrowseNameof the Propertyand the value in the KeyValuePairstructure is the Valueof the Property. |
This DataTypedefines flags for DataSet fields.
The DataSetFieldFlagsis 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 NetworkMessagesor transport protocol header. Setting this flag increases the size of the NetworkMessagessince information from the DataSetMessagebody 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 DataSetMessagepayload is a delta frame and the DataSetfield 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 DataSetMetaDatapromoted to the header shall match the order of the fields in the header unless the header includes field names. |
The DataSetFieldFlagsrepresentation in the AddressSpaceis 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 DataTypeis used to indicate configuration changes in the information published for a DataSet. The ConfigurationVersionDataTypeis formally defined in Table 8.
Table 8– ConfigurationVersionDataType Structure
Name |
Type |
Description |
ConfigurationVersionDataType |
Structure |
|
majorVersion |
VersionTime |
The MajorVersionreflects the time of the last major change of the DataSetcontent. The VersionTime DataTypeis defined in OPC 10000-4. To assure interoperability, the Subscriberhas to use DataSetMetaDatafor decoding with a MajorVersionthat matches the MajorVersionin DataSetMessagessent by the Publisher. Removing fields from the DataSetcontent, 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 Propertyvalue of a DataSetMetaDatafield changes, the MajorVersionshall be updated. There can be situations where older configurations of a Publisherare loaded and changed with product specific configuration tools. In this case the MajorVersionshall 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 MajorVersionor MinorVersionare defined in this specification. |
minorVersion |
VersionTime |
The MinorVersionreflects the time of the last change. Only the MinorVersionshall be updated if fields are added at the end of the DataSetcontent. If the MajorVersionversion is updated, the MinorVersionis updated to the same value as MajorVersion. |
DataSetMetaDatamay be specific to a single Publisherand a single selection of information or universal e.g. defined by a standard organisation or by a plant operator as a DataSetClass. DataSetsthat conform to such a DataSetClassare identified with a DataSetClassId.
The DataSetClassIdis the globally unique identifier (Guid) of a DataSetClass. It is included in the DataSetMetaData. The NetworkMessageContentMaskcontrols the availability of the DataSetClassIdin the NetworkMessage.
The ExtensionFieldsparameterallows the configuration of fields with values to be included in the DataSetwhen the existing AddressSpaceof the Publisherdoes not provide the necessary information. The ExtensionFieldsare represented as array of KeyValuePair Structures.
This Structure DataTyperepresents the PublishedDataSetparameters. The PublishedDataSetDataTypeis formally defined in Table 9.
Table 9– PublishedDataSetDataType Structure
Name |
Type |
Description |
PublishedDataSetDataType |
Structure |
|
name |
String |
Name of the PublishedDataSet. The name of the PublishedDataSetshall be unique in the Publisher. |
dataSetFolder |
String[] |
Optional path of the DataSetfolder used to group PublishedDataSetswhere each entry in the Stringarray represents one level in a DataSetfolder hierarchy. If no grouping is needed the parameter is a null Stringarray. |
dataSetMetaData |
DataSetMetaDataType |
Defined in 6.2.2.1. |
extensionFields |
KeyValuePair[] |
Defined in 6.2.2.3. |
dataSetSource |
PublishedDataSetSourceDataType |
Defined in 6.2.2.5. |
The PublishedDataSetSourceDataType Structureis an abstract base type without fields for the definition of the PublishedDataSetsource. Its representation in the AddressSpaceis defined in Table 10.
Table 10– PublishedDataSetSourceDataType Definition
Attributes |
Value |
|||
BrowseName |
PublishedDataSetSourceDataType |
|||
IsAbstract |
True |
|||
References |
NodeClass |
BrowseName |
IsAbstract |
Description |
Subtype of Structure defined in OPC 10000-5. |
||||
HasSubtype |
DataType |
PublishedDataItemsDataType |
FALSE |
Defined in 6.2.2.6.2. |
HasSubtype |
DataType |
PublishedEventsDataType |
FALSE |
Defined in 6.2.2.7.4. |
The parameterPublishedDatadefines the content of a DataSetcreated from Variable Valuesand therefore the content of the DataSetMessagesent 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 Subscribersand for configuration tools. It is used as a handle to reference the Valuein DataSetMessagesreceived by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersionof the DataSetand applications working with the index shall always check the ConfigurationVersionbefore using the index.
If an entry of the PublishedDatareferences one of the ExtensionFields, the substituteValueshall contain the QualifiedName of the ExtensionFields entry. All other fields of this PublishedVariableDataTypearray element shall be null.
The DataType PublishedVariableDataTyperepresents the configuration information for one Variable. The PublishedVariableDataTypeis formally defined in Table 11.
Table 11– PublishedVariableDataType Structure
Name |
Type |
Description |
PublishedVariableDataType |
Structure |
|
publishedVariable |
NodeId |
The NodeIdof 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 DataSetMetaDataprovided for the DataSet. |
attributeId |
IntegerId |
Id of the Attributeto publish e.g. the Value Attribute. This shall be a valid Attributeid. The Attributesare defined in OPC 10000-3. The IntegerId DataType is defined in OPC 10000-4. The IntegerIdsfor the Attributesare defined in OPC 10000-6. |
samplingIntervalHint |
Duration |
A recommended rate of acquiring new values for change or deadband evaluation. A Publishershould use this value as hint for setting the internal sampling rate. The value 0 indicates that the Servershould use the fastest practical rate. The value -1 indicates that the default sampling interval defined by the PublishingIntervalof the WriterGroup is requested. Any negative number is interpreted as -1. |
deadbandType |
UInt32 |
A value that defines the Deadbandtype and behaviour. Value Description None_0 No Deadbandcalculation 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 NumericRangetype and the logic for IndexRangeare defined in OPC 10000-4.
|
substituteValue |
BaseDataType |
The value that is included in the DataSetif the StatusCodeof the DataValueis Bad. In this case the StatusCodeis set to Uncertain_SubstituteValue. This Value shall match the DataTypeof the PublishedVariablesince DataSetWritersmay depend on a valid Valuewith the right DataTypethat matches the ConfigurationVersion. If the SubstituteValueis Null, the StatusCodeof the DataValueis processed. The handling of the SubstituteValueis defined in 6.2.10. |
metaDataProperties |
QualifiedName [ ] |
This parameter specifies an array of Propertiesto be included in the FieldMetaDatacreated for this Variable. It shall be used to populate the propertieselement of the resulting field in the DataSetMetaData. |
This Structure DataTypeis used to represent PublishedDataItemsspecific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 6.2.2.5.
The PublishedDataItemsDataTypeis formally defined in Table 12.
Table 12– PublishedDataItemsDataType Structure
Name |
Type |
Description |
PublishedDataItemsDataType |
Structure |
|
publishedData |
PublishedVariableDataType[] |
Defined in 6.2.2.6.1. |
The parameter EventNotifierdefines the NodeIdof the Objectin the event notifier tree of the OPC UA Serverfrom which Eventsare collected.
The parameter SelectedFieldsdefines the selection of Eventfields contained in the DataSetgenerated for an Eventand sent through the DataSetWriter. The SimpleAttributeOperand DataTypeis defined in OPC 10000-4. The DataTypeof the selected Eventfield in the EventTypedefines the DataTypeof the DataSetfield. Eventfields can be null or the field value can be a StatusCode. The encoding of EventbasedDataSetMessagesshall be able to handle these cases. ExtensionFieldsdefined for the instance of the PublishedEventsTypecan be included in the SelectedFieldsby specifying the PublishedEventsType NodeIdas typeId in the SimpleAttributeOperandand the BrowseNameof the extension field in the browsePathof the SimpleAttributeOperand.
The index into the list of entries in the SelectedFieldshas an important role for Subscribers. It is used as handle to reference the Eventfield in DataSetMessagesreceived by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersionand applications working with the index shall always check the ConfigurationVersionbefore using the index. If a change of the SelectedFieldsadds additional fields, the MinorVersionof the ConfigurationVersionshall be updated. If a change of the SelectedFieldsremoves fields, the MajorVersionof the ConfigurationVersionshall be updated. The ConfigurationVersionDataTypeand the rules for setting the version are defined in 6.2.2.1.5.
The parameter Filterdefines the filter applied to the Events. It allows the reduction of the DataSetsgenerated from Eventsthrough a filter. The ContentFilter DataTypeis defined in OPC 10000-4.
This Structure DataTypeis used to represent PublishedEventsspecific parameters. It is a subtype of the PublishedDataSetSourceDataType defined in 6.2.2.5.
The PublishedEventsDataTypeis formally defined in Table 13.
Table 13– PublishedEventsDataType Structure
Name |
Type |
Description |
PublishedEventsDataType |
Structure |
|
eventNotifier |
NodeId |
Defined in 6.2.2.7.1. |
selectedFields |
SimpleAttributeOperand[] |
Defined in 6.2.2.7.2. |
filter |
ContentFilter |
Defined in 6.2.2.7.3. |