6.3.2 JSON message mapping

6.3.2.1 JSON NetworkMessage Writer
6.3.2.1.1 NetworkMessageContentMask

The parameter NetworkMessageContentMask defines the optional header fields to be included in the NetworkMessages produced by the WriterGroup. The DataType for the JSON NetworkMessage mapping is JsonNetworkMessageContentMask.

The DataType JsonNetworkMessageContentMask is formally defined in Table 107.

Table 107 – JsonNetworkMessageContentMask values
Value Bit No. Description
NetworkMessageHeader0

The JSON NetworkMessage header is included in the NetworkMessages.

If this bit is false, bits 3 and 4 shall be 0.

DataSetMessageHeader1

The JSON DataSetMessage header is included in each DataSetMessage.

If this bit is false then the DataSetMessage header is not included and the header related bits in DataSetMessageContentMask for the DataSetWriters are ignored (see 6.3.2.3.1). Bits in the DataSetMessageContentMask related to the payload (like FieldEncoding1 and FieldEncoding2) are applied.

SingleDataSetMessage2Each JSON NetworkMessage contains only one DataSetMessage.
PublisherId3The PublisherId is included in the NetworkMessages.
DataSetClassId4

The DataSetClassId is included in the NetworkMessages.

The NetworkMessage can only contain DataSetMessages with the same DataSetClassId. If DataSetMessages have different DataSetClassIds they must be sent in individual NetworkMessages.

ReplyTo5Not used.
WriterGroupName6The WriterGroup name is included in the NetworkMessages.

The JsonNetworkMessageContentMask representation in the AddressSpace is defined in Table 108.

Table 108 – JsonNetworkMessageContentMask definition
Attribute Value
BrowseNameJsonNetworkMessageContentMask
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of UInt32 defined in OPC 10000-5
HasPropertyVariableOptionSetValuesLocalizedText []PropertyType
Conformance Units
PubSub Parameters JSON
6.3.2.1.2 JsonWriterGroupMessageDataType structure

This Structure DataType is used to represent the JSON NetworkMessage mapping specific WriterGroup parameters. It is a subtype of WriterGroupMessageDataType defined in 6.2.6.7.3.

The JsonWriterGroupMessageDataType is formally defined in Table 109.

Table 109 – JsonWriterGroupMessageDataType structure
Name Type Description
JsonWriterGroupMessageDataTypeStructureSubtype of WriterGroupMessageDataType defined in 6.2.6.7.3.

NetworkMessageContentMask

JsonNetworkMessageContentMaskDefined in 6.3.2.1.1.

Its representation in the AddressSpace is defined in Table 110.

Table 110 – JsonWriterGroupMessageDataType definition
Attributes Value
BrowseNameJsonWriterGroupMessageDataType
IsAbstractFalse
Subtype of WriterGroupMessageDataType defined in 6.2.6.7.3.
Conformance Units
PubSub Parameters JSON
6.3.2.2 JSON ReaderGroup Parameters

There are no JSON specific message mapping parameters defined for the ReaderGroup.

6.3.2.3 JSON DataSetMessage Writer
6.3.2.3.1 DataSetMessageContentMask

The DataSetMessageContentMask defines the flags for the content of the DataSetMessage header. The JSON message mapping specific flags are defined by the JsonDataSetMessageContentMask DataType.

The JsonDataSetMessageContentMask DataType is formally defined in Table 111.

Table 111 – JsonDataSetMessageContentMask values
Value Bit No. Description
DataSetWriterId0If this flag is set, a DataSetWriterId shall be included in the DataSetMessage header.
MetaDataVersion1If this flag is set, the ConfigurationVersion is included in the DataSetMessage header.
SequenceNumber2If this flag is set, the DataSetMessageSequenceNumber is included in the DataSetMessage header.
Timestamp3If this flag is set, a timestamp shall be included in the DataSetMessage header.
Status4If this flag is set, an overall status is included in the DataSetMessage header.
MessageType5If this flag is set, the message type is included in the DataSetMessage header.
DataSetWriterName6If this flag is set, a DataSetWriterName shall be included in the DataSetMessage header.
FieldEncoding17The definition of field encoding configuration through the bits FieldEncoding1 and FieldEncoding2 is defined in Table 112.
PublisherId8

The PublisherId is included in the DataSetMessages.

This bit shall be false if the NetworkMessageHeader is active.

WriterGroupName9

The WriterGroup name is included in the DataSetMessages.

If the WriterGroup name is included in the NetworkMessage header, it shall not be included in the DataSetMessages.

MinorVersion10If this flag is set, the MinorVersion field of the ConfigurationVersion is included in the DataSetMessage header.
FieldEncoding211The definition of field encoding configuration through the bits FieldEncoding1 and FieldEncoding2 is defined in Table 112.

The definition of field encoding configuration through the bits FieldEncoding1 and FieldEncoding2 is defined in Table 112.

Table 112 – Field endcoding configuration
FieldEncoding1 FieldEncoding2 Description
FalseTrueThe JSON VerboseEncoding is used for the DataSetMessage field encoding.
TrueTrue

The JSON CompactEncoding is used for the DataSetMessage field encoding.

The RawData bit of the DataSetFieldContentMask shall be ignored.

FalseFalse

The deprecated JSON NonReversibleEncoding is used for the DataSetMessage field encoding.

The RawData bit of the DataSetFieldContentMask shall be ignored.

TrueFalse

The deprecated JSON ReversibleFieldEncoding is used for the DataSetMessage field encoding.

The RawData bit of the DataSetFieldContentMask shall be ignored.

The JsonDataSetMessageContentMask representation in the AddressSpace is defined in Table 113.

Table 113 – JsonDataSetMessageContentMask definition
Attribute Value
BrowseNameJsonDataSetMessageContentMask
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of UInt32 defined in OPC 10000-5
HasPropertyVariableOptionSetValuesLocalizedText []PropertyType
Conformance Units
PubSub Parameters JSON
6.3.2.3.2 JsonDataSetWriterMessageDataType structure

This Structure DataType is used to represent JSON DataSetMessage mapping specific DataSetWriter parameters. It is a subtype of the DataSetWriterMessageDataType defined in 6.2.4.5.3.

The JsonDataSetWriterMessageDataType is formally defined in Table 114.

Table 114 – JsonDataSetWriterMessageDataType structure
Name Type Description
JsonDataSetWriterMessageDataTypeStructureSubtype of DataSetWriterMessageDataType defined in 6.2.4.5.3.

DataSetMessageContentMask

JsonDataSetMessageContentMaskDefined in 6.3.2.3.1.

Its representation in the AddressSpace is defined in Table 115.

Table 115 – JsonDataSetWriterMessageDataType definition
Attributes Value
BrowseNameJsonDataSetWriterMessageDataType
IsAbstractFalse
Subtype of DataSetWriterMessageDataType defined in 6.2.4.5.3.
Conformance Units
PubSub Parameters JSON
6.3.2.4 JSON DataSetMessage Reader
6.3.2.4.1 Network‌Message‌ContentMask

The NetworkMessageContentMask with DataType JsonNetworkMessageContentMask indicates the optional header fields included in the received NetworkMessages. The JsonNetworkMessageContentMask DataType is defined in 6.3.2.1.1.

6.3.2.4.2 DataSetMessage‌ContentMask

The DataSetMessageContentMask with the DataType JsonDataSetMessageContentMask indicates the optional header fields included in the DataSetMessages.

The JsonDataSetMessageContentMask DataType is defined in 6.3.2.3.1.

6.3.2.4.3 JsonDataSetReaderMessageDataType structure

This Structure DataType is used to represent JSON DataSetMessage mapping specific DataSetReader parameters. It is a subtype of the DataSetReaderMessageDataType defined in 6.2.9.13.3.

The JsonDataSetReaderMessageDataType is formally defined in Table 116.

Table 116 – JsonDataSetReaderMessageDataType structure
Name Type Description
JsonDataSetReaderMessageDataTypeStructureSubtype of DataSetReaderMessageDataType defined in 6.2.9.13.3.

NetworkMessageContentMask

JsonNetworkMessageContentMaskDefined in 6.3.2.4.1.

DataSetMessageContentMask

JsonDataSetMessageContentMaskDefined in 6.3.2.4.2.

Its representation in the AddressSpace is defined in Table 117.

Table 117 – JsonDataSetReaderMessageDataType definition
Attributes Value
BrowseNameJsonDataSetReaderMessageDataType
IsAbstractFalse
Subtype of DataSetReaderMessageDataType defined in 6.2.9.13.3.
Conformance Units
PubSub Parameters JSON
6.3.2.4.4 DataSetClassId

The parameter DataSetClassId with DataType Guid defines a DataSet class related filter. If the value is null or the parameter is not set, the DataSetClassId filter is not applied.

The parameter is configured in the DataSetReaderProperties with the Key 0:DataSetClassId.