A DataSetMessage is produced by a DataSetWriter and contains list of name/value pairs which are specified by the PublishedDataSet associated with the DataSetWriter. The contents of the DataSetMessage are formally described by a DataSetMetaData Object. A DataSetMessage is a JSON object with the fields defined in Table 164.
A key frame DataSetMessage or an event based DataSetMessage contains name and value for all fields of the DataSet.
A delta frame DataSetMessage contains only name and value for the changed fields.
DataSetWriters may periodically provide keep-alive messages which are DataSetMessages without any Payload field.
Table 164 – JSON DataSetMessage definition
Name |
Type |
Description |
DataSetWriterId |
UInt16 |
An identifier for DataSetWriter which created the DataSetMessage. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. It is unique within the scope of a Publisher. |
DataSetWriterName |
String |
The name of the DataSetWriter which created the DataSetMessage. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. |
PublisherId |
String |
A unique identifier for the Publisher. It identifies the source of the message. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. The source is the PublisherId on a PubSubConnection (see 6.2.7.1). If the PublisherId is a UInteger, the UInteger value is converted to a String without leading zeros. The value shall be omitted if the NetworkMessage header is present. |
WriterGroupName |
String |
The name of the WriterGroup which created the DataSetMessage. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. The value shall be omitted if the WriterGroupName is contained in the NetworkMessage header. |
SequenceNumber |
UInt32 |
Sequence number for each new DataSetMessage as defined in 7.2.3. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. For the DataSetMessage MessageType “ua-keepalive”, the sequence number provides the next expected sequence number for the DataSetWriter. |
MetaDataVersion |
ConfigurationVersionDataType |
The version of the DataSetMetaData which describes the contents of the Payload. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. |
MinorVersion |
VersionTime |
The minor version of the DataSetMetaData which describes the contents of the Payload. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. The value shall be omitted if the MetaDataVersion is contained in the DataSetMessage header. |
Timestamp |
DateTime |
The time the DataSetMessage was created. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. |
Status |
StatusCode |
The overall status of the DataSetMessage. The dependencies to the status of DataSet fields are defined in Table 26. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. |
MessageType |
String |
Possible values are “ua-keyframe”, “ua-deltaframe”, “ua-event” and “ua-keepalive”. The presence of the value depends on the setting in the JsonDataSetMessageContentMask. |
Payload |
Object |
A JSON object containing the name-value pairs specified by the PublishedDataSet. The format of the value depends on the DataType of the field and the flags specified by the DataSetFieldContentMask. For MessageType “ua-event”, only Variant or RawData encoding shall be allowed. If bits for DataValue encoding are set, the Variant encoding shall be used. |
All fields with a concrete DataType are encoded using reversible OPC UA JSON Data Encoding defined in OPC 10000-6.
The fields in the DataSetMessage are specified by the DataSetFieldContentMask in the DataSetWriter parameters.
The format of the field values in the Payload depend on the setting of the ReversibleFieldEncoding flag in the DataSetMessageContentMask.