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.
| Value | Bit No. | Description |
| NetworkMessageHeader | 0 | The JSON NetworkMessage header is included in the NetworkMessages. If this bit is false, bits 3 and 4 shall be 0. |
| DataSetMessageHeader | 1 | 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. |
| SingleDataSetMessage | 2 | Each JSON NetworkMessage contains only one DataSetMessage. |
| PublisherId | 3 | The PublisherId is included in the NetworkMessages. |
| DataSetClassId | 4 | 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. |
| ReplyTo | 5 | Not used. |
| WriterGroupName | 6 | The WriterGroup name is included in the NetworkMessages. |
The JsonNetworkMessageContentMask representation in the AddressSpace is defined in Table 108.
| Attribute | Value | ||||
| BrowseName | JsonNetworkMessageContentMask | ||||
| IsAbstract | False | ||||
| References | Node Class | BrowseName | DataType | TypeDefinition | Others |
|---|---|---|---|---|---|
| Subtype of UInt32 defined in OPC 10000-5 | |||||
| HasProperty | Variable | OptionSetValues | LocalizedText [] | 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.
| Name | Type | Description |
| JsonWriterGroupMessageDataType | Structure | Subtype of WriterGroupMessageDataType defined in 6.2.6.7.3. |
NetworkMessageContentMask | JsonNetworkMessageContentMask | Defined in 6.3.2.1.1. |
Its representation in the AddressSpace is defined in Table 110.
| Attributes | Value |
| BrowseName | JsonWriterGroupMessageDataType |
| IsAbstract | False |
| 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.
| Value | Bit No. | Description |
| DataSetWriterId | 0 | If this flag is set, a DataSetWriterId shall be included in the DataSetMessage header. |
| MetaDataVersion | 1 | If this flag is set, the ConfigurationVersion is included in the DataSetMessage header. |
| SequenceNumber | 2 | If this flag is set, the DataSetMessageSequenceNumber is included in the DataSetMessage header. |
| Timestamp | 3 | If this flag is set, a timestamp shall be included in the DataSetMessage header. |
| Status | 4 | If this flag is set, an overall status is included in the DataSetMessage header. |
| MessageType | 5 | If this flag is set, the message type is included in the DataSetMessage header. |
| DataSetWriterName | 6 | If this flag is set, a DataSetWriterName shall be included in the DataSetMessage header. |
| FieldEncoding1 | 7 | The definition of field encoding configuration through the bits FieldEncoding1 and FieldEncoding2 is defined in Table 112. |
| PublisherId | 8 | The PublisherId is included in the DataSetMessages. This bit shall be false if the NetworkMessageHeader is active. |
| WriterGroupName | 9 | 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. |
| MinorVersion | 10 | If this flag is set, the MinorVersion field of the ConfigurationVersion is included in the DataSetMessage header. |
| FieldEncoding2 | 11 | The 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.
| FieldEncoding1 | FieldEncoding2 | Description |
| False | True | The JSON VerboseEncoding is used for the DataSetMessage field encoding. |
| True | True | The JSON CompactEncoding is used for the DataSetMessage field encoding. The RawData bit of the DataSetFieldContentMask shall be ignored. |
| False | False | The deprecated JSON NonReversibleEncoding is used for the DataSetMessage field encoding. The RawData bit of the DataSetFieldContentMask shall be ignored. |
| True | False | 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.
| Attribute | Value | ||||
| BrowseName | JsonDataSetMessageContentMask | ||||
| IsAbstract | False | ||||
| References | Node Class | BrowseName | DataType | TypeDefinition | Others |
|---|---|---|---|---|---|
| Subtype of UInt32 defined in OPC 10000-5 | |||||
| HasProperty | Variable | OptionSetValues | LocalizedText [] | 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.
| Name | Type | Description |
| JsonDataSetWriterMessageDataType | Structure | Subtype of DataSetWriterMessageDataType defined in 6.2.4.5.3. |
DataSetMessageContentMask | JsonDataSetMessageContentMask | Defined in 6.3.2.3.1. |
Its representation in the AddressSpace is defined in Table 115.
| Attributes | Value |
| BrowseName | JsonDataSetWriterMessageDataType |
| IsAbstract | False |
| 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 NetworkMessageContentMask
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 DataSetMessageContentMask
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.
| Name | Type | Description |
| JsonDataSetReaderMessageDataType | Structure | Subtype of DataSetReaderMessageDataType defined in 6.2.9.13.3. |
NetworkMessageContentMask | JsonNetworkMessageContentMask | Defined in 6.3.2.4.1. |
DataSetMessageContentMask | JsonDataSetMessageContentMask | Defined in 6.3.2.4.2. |
Its representation in the AddressSpace is defined in Table 117.
| Attributes | Value |
| BrowseName | JsonDataSetReaderMessageDataType |
| IsAbstract | False |
| 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.