One of the use cases is streaming of multiple different data and event DataSets through a single message queue for further processing in cloud applications.

The header layout described in this section is optimized for this use case.

A minimal message has the following settings:

The header layout URI for the multiple DataSetMessages layout as specified in A.3.4.4 is

http://opcfoundation.org/UA/PubSub-Layouts/JSON-NetworkMessage

Table A.20 defines the values for the WriterGroup configuration parameters representing this layout.

Table A.20 – Values for WriterGroup configuration parameters

Parameter

Value

JsonNetworkMessageContentMask

The mask allows the following options:

Bit 0: NetworkMessageHeader = 1

Bit 1: DataSetMessageHeader = 1

Bit 2: SingleDataSetMessage = 0

Bit 3: PublisherId enabled

Bit 4: DataSetClassId configurable (default is 0)

Bit 5: ReplyTo configurable (default is 0)

Bit 6: WriterGroupName configurable (default is 0)

Table A.21 defines the values for the DataSetWriter configuration parameters representing this layout.

Table A.21 – Values for DataSetWriter configuration parameters

Parameter

Value

JsonDataSetMessageContentMask

The mask allows the following options:

Bit 0: DataSetWriterId = 1

Bit 1: MetaDataVersion = 0

Bit 2: SequenceNumber = 1

Bit 3: Timestamp = 1

Bit 4: Status = 1

Bit 5: MessageType configurable (default is 0)

Bit 6: DataSetWriterName configurable (default is 0)

Bit 7: ReversibleFieldEncoding = 0

Bit 8: PublisherId = 0

Bit 9: WriterGroupName configurable (default is 0)

Bit 10: MinorVersion = 1

DataSetFieldContentMask

configurable (default is 0)

KeyFrameCount

configurable

If the KeyFrameCount is not 1, the MessageType bit shall be true.

Example for DataSet1, DataSet2 and DataSet3 with all configurable JsonNetworkMessageContentMask and JsonDataSetMessageContentMask flags set to false and no flags set for DataSetFieldContentMask.

{

"MessageId":"9279c0b3-da88-45a4-af74-451cebf82db0",

"MessageType":"ua-data",

"PublisherId":"MyPublisher",

"Messages":

[

{

"DataSetWriterId":101,

"SequenceNumber":68468,

"MinorVersion":672341762,

"Timestamp":"2021-09-27T18:45:19.555Z",

"Payload":

{

"Active":true,

"Temperature":25.5,

"Counter":0,

"AdditionalInfo":"The system is running normally (1)"

}

},

{

"DataSetWriterId":102,

"SequenceNumber":25460,

"MinorVersion":672341762,

"Timestamp":"2021-09-27T18:45:19.555Z",

"Status":1073741824,

"Payload":

{

"LocationName":"Building A",

"Coordinate":{"X":0,"Y":0.2},

"Measurements":[20030,20020,20010]

}

},

{

"DataSetWriterId":103,

"SequenceNumber":66915,

"MinorVersion":672341762,

"Timestamp":"2021-09-27T18:45:19.555Z",

"Payload":

{

"BooleanValue":false,

"Int32Value":0,

"Int64Value":"1",

"UInt32Value":1,

"UInt64Value":"1",

"DoubleValue":0.5,

"DateTimeValue":"2021-09-14T07:14:30Z",

"StringValue":"String 1",

"GuidValue":"ebfc352a-3142-4b99-9bbe-89a517d6a77e",

"StatusCodeValue":

{

"Code":2147483648,

"Symbol":"Bad"

},

"LocalizedTextValue":"Localized text 1",

"ByteStringValue":"AAEC",

"NodeIdValue":

{

"IdType":1,

"Id":"Boilers.Boiler #1.PipeX001.ValveX001.Input",

"Namespace":"http://test.org/UA/Data/Instance"

},

"QualifiedNameValue":

{

"Name":"PipeX001",

"Uri":"http://test.org/UA/Data/"

}

}

}

]

}