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 185.

Table 185 – 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.

WriterGroupName

String

The name of the WriterGroup which created the NetworkMessage.

This value is mandatory.

DataSetWriterName

String

The name of the DataSetWriter.

This value is mandatory.

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 CompactEncoding 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 186.

Table 186 – 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 187.

Table 187 – 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 188.

Table 188 – 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 PubSubConnection. 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 189.

Table 189 – 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.

A NetworkMessage with MessageType ActionMetaData is a JSON object with the fields defined in Table 190.

Table 190 – JSON ActionMetaData definition

Name

Type

Description

MessageId

String

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

MessageType

String

This value shall be “ua-action-metadata”. This value is mandatory.

PublisherId

String

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

DataSetWriterId

UInt16

An identifier for DataSetWriter which published the metadata.

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.

ActionTargets

ActionTargetDataType[]

The set of Action targets that may be executed.

If an Action target is mapped to a Method of an Object in an OPC UA Server, then the related Object and Method are defined by the corresponding entry in the ActionMethods array.

The ActionTargetId in the ActionTargetDataType is used to address the Method referenced by the ActionMethodDataType.

Request

DataSetMetaDataType

The structure and content of the ActionRequest message.

The name of the Action is defined by the Name field in the DataSetMetaDataType.

Response

DataSetMetaDataType

The structure and content of the ActionResponse message.

The fields Name and ConfigurationVersion of the Request and the Response DataSetMetaDataType shall have equal values.

ActionMethods

ActionMethodDataType[]

The optional array of Action sources. If the source information is provided, the array shall match the size and order of the ActionTargets.

A NetworkMessage with MessageType ActionResponder is a JSON object with the fields defined in Table 190.

Table 191 – JSON ActionResponder definition

Name

Type

Description

MessageId

String

A globally unique identifier for the message.

This value is mandatory.

MessageType

String

This value shall be “ua-action-responder”.

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.

Only DataSetWriters used for Actions are included. All WriterGroups and DataSetWriters not used for Actions shall be excluded.

The ReaderGroup lists in PubSubConnectionDataType shall be empty.

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