The JSON message mapping defines optional discovery messages. The main purpose is the exchange of additional information not contained in the DataSetMessages like Properties for the DataSet fields.

DataSetMetaData describe the content of DataSetMessages published by a DataSetWriter. More specifically, it specifies the names and data types of the values that shall appear in the Payload of a DataSetMessage.

When the DataSetMetaData of a DataSet changes, the DataSetWriter may be configured to publish the updated value through the mechanism defined by the transport protocol mapping.

The DataSetWriterId and Version fields in a DataSetMessage are used to correlate a DataSetMessage with a DataSetMetaData.

A NetworkMessage with MessageType DataSetMetaData is a JSON object with the fields defined in Table 165.

Table 165 – JSON DataSetMetaData definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message.

This value is mandatory.

MessageType

String

This value shall be “ua-metadata”.

This value is mandatory.

PublisherId

String

A unique identifier for the Publisher. It identifies the source of the message.

This value is mandatory.

DataSetWriterId

UInt16

An identifier for DataSetWriter which published the DataSetMetaData.

This value is mandatory.

It is unique within the scope of a Publisher.

DataSetWriterName

String

The name of the DataSetWriter.

This value is optional. The presence of the value depends on the setting in the JsonDataSetMessageContentMask.

Timestamp

UtcTime

When the message was first sent to the middleware.

This value is mandatory.

MetaData

DataSetMetaDataType

The metadata as defined in 6.2.3.2.3.

This value is mandatory.

All fields with a concrete DataType are encoded using reversible OPC UA JSON Data Encoding defined in OPC 10000-6.

A NetworkMessage with MessageType ApplicationDescription is a JSON object with the fields defined in Table 166.

Table 166 – JSON ApplicationDescription definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message.

This value is mandatory.

MessageType

String

This value shall be “ua-application”.

This value is mandatory.

PublisherId

String

The Publisher that sent the message.

This value is mandatory.

Timestamp

UtcTime

When the message was first sent to the middleware.

This value is mandatory.

Description

ApplicationDescription

The ApplicationDescription Structure is described in OPC 10000-4.

ServerCapabilities

String []

The set of Server capabilities supported by the Server associated with the Publisher. The set of allowed Server capabilities are defined in OPC 10000-12.

A NetworkMessage with MessageType ServerEndpoints is a JSON object with the fields defined in Table 167.

Table 167 – JSON ServerEndpoints definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message.

This value is mandatory.

MessageType

String

This value shall be “ua-endpoints”.

This value is mandatory.

PublisherId

String

The Publisher that sent the message.

This value is mandatory.

Timestamp

UtcTime

When the message was first sent to the middleware.

This value is mandatory.

Endpoints

EndpointDescription []

The list of Server Endpoints of the OPC UA Application. The EndpointDescription Structure is described in OPC 10000-4.

A NetworkMessage with MessageType Status is a JSON object with the fields defined in Table 168.

Table 168 – JSON Status definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message. This value is mandatory.

MessageType

String

This value shall be “ua-status”. This value is mandatory.

PublisherId

String

The Publisher that sent the message. This value is mandatory.

Timestamp

UtcTime

When the message was sent to the Middleware.

Mandatory if IsCyclic=TRUE.

The field is omitted if IsCyclic=FALSE.

IsCyclic

Boolean

If TRUE the Publisher periodically updates the status.

If FALSE the Middleware is responsible for detecting changes to the status.

Status

PubSubState

The current state of the Publisher. This value is mandatory.

NextReportTime

UtcTime

When the Publisher is expected to send the next update.

Mandatory if IsCyclic=TRUE.

The field is omitted if IsCyclic=FALSE.

IsCyclic is set to FALSE if a PublisherId is used exclusively by a single application and the Message Oriented Middleware can detect when Publishers go offline. In these cases, the Publisher sends updates only when its state changes and the Message Oriented Middleware will send an update with PubSubState Error if the Publisher goes offline. The status message from the Message Oriented Middleware does not contain the Timestamp.

If IsCyclic is set to TRUE the Publisher only reports when it is Operational. The NextReportTime indicates when the Publisher is expected to send an update. If the Subscriber does not receive updates and the NextReportTime is a reasonable time in the past, the Subscriber assumes the PubSubState Error.

A NetworkMessage with MessageType PubSubConnection is a JSON object with the fields defined in Table 169.

Table 169 – JSON PubSubConnection definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message. This value is mandatory.

MessageType

String

This value shall be “ua-connection”. This value is mandatory.

PublisherId

String

The Publisher that sent the message. This value is mandatory.

Timestamp

UtcTime

When the message was first sent to the Middleware.

This value is mandatory.

Connection

PubSubConnectionDataType

The PubSubConnectionDataType Structure is defined in 6.2.7.5.1.

The ReaderGroup lists and the Address in PubSubConnectionDataType shall be empty.

The configuration properties shall not be included in the PubSubConnectionDataType, WriterGroupDataType and DataSetWriterDataType.