The NetworkMessage flags used with the discovery request messages shall use the following bit values.

  • UADPFlags bits 5 and 6 shall be false, bits 4 and 7 shall be true
  • ExtendedFlags1 bits 3, 5 and 6 shall be false, bits 4 and 7 shall be true
  • ExtendedFlags2 bit 2 shall be true, all other bits shall be false

The setting of the flags ensures a known value for the first five fields in the NetworkMessage on the Publisher as receiver. The actual security settings for the NetworkMessage are indicated by the SecurityHeader.

A variety of rules are used to reduce the amount of traffic on the network in the case of multicast or broadcast communication.

A Subscriber should cache configuration information for PublisherId and DataSetWriterIds of interest.

If a Subscriber requires information from Publishers after a startup or version change detection, discovery requests shall be randomly delayed in the range of 100-500 ms. The request shall be skipped if the information is already received during this time or another Subscriber sent already a request and the response to this request is used.

Discovery requests for different DataSetWriters in one WriterGroup shall be aggregated into one discovery response.

A Publisher shall delay subsequent responses for a combination of request type and identifier like the DataSetWriterId for at least 500 ms. Duplicate requests, that have not yet been responded to, shall be discarded by the Publisher.

A Subscriber shall wait for a response at least 500 ms. As long as not all responses are received, the Subscriber requests the missing information. It shall double the time period between follwing requests until all needed response are received or denied.

The encoding of the discovery request header structure is specified in Table 85.

Table 85 – Discovery Request Header Structure

Name

Type

Description

RequestType

Byte

The following types of discovery request messages are defined.

0Reserved

1 Publisher information request message (see 7.2.2.4.1.4)

The encoding of the Publisher information request message structure is specified in Table 86.

Table 86 – Publisher Information Request Message Structure

Name

Type

Description

InformationType

Byte

The following types of Publisher information requests are defined.

0Reserved

1 Publisher Server Endpoints

2 DataSetMetaData

3 DataSetWriter configuration

DataSetWriterIds

UInt16[]

List of DataSetWriterIds the information is requested for.

If the request is not related to DataSet, the array shall be null.

The NetworkMessage flags used with the discovery response messages shall use the following bit values.

The setting of the flags ensures a known value for the first five fields in the NetworkMessage for Publishers expected by the Subscriber. The actual security settings for the NetworkMessage are indicated by the SecurityHeader.

The encoding of the discovery response header structure is specified in Table 87.

Table 87 – Discovery Response Header Structure

Name

Type

Description

ResponseType

Byte

The following types of discovery response messages are defined.

0Reserved

1Publisher Endpoint message (see 7.2.2.4.2.3)

2DataSet Metadata message (see 7.2.2.4.2.4)

3DataSetWriter configuration message (see 7.2.2.4.2.5)

SequenceNumber

UInt16

A strictly monotonically increasing sequence number assigned to each discovery response sent in the scope of a PublisherId.

The encoding of the available Endpoints of a Publisher is specified in Table 88.

Table 88 – Publisher Endpoints Message Structure

Name

Type

Description

Endpoints

EndpointDescription[]

The OPC UA Server Endpoints of the Publisher. The EndpointDescription is defined in OPC 10000-4.

statusCode

StatusCode

Status code indicating the capability of the Publisher to provide Endpoints.

The encoding of the DataSet metadata message structure is specified in Table 89. It contains the current layout and DataSetMetaData for the DataSet.

The ConfigurationVersion in the DataSetMessage header shall match the ConfigurationVersion in the DataSetMetaData.

The Publisher shall send this message without a corresponding discovery request if the DataSetMetaData changed for the DataSet.

Table 89 – DataSetMetaData Message Structure

Name

Type

Description

DataSetWriterId

UInt16

DataSetWriterId of the DataSet described with the MetaData.

MetaData

DataSetMetaDataType

The current DataSet metadata for the DataSet related to the DataSetWriterId. The DataSetMetaDataType is defined in 6.2.2.1.2.

statusCode

StatusCode

Status code indicating the capability of the Publisher to provide MetaData for the DataSetWriterId.

The encoding of the DataSetWriter configuration data message structure is specified in Table 90. It contains the current configuration of the WriterGroup and the DataSetWriter for the DataSet.

The Publisher shall send this message without a corresponding discovery request if the configuration of the WriterGroup changed.

Table 90 – DataSetWriter Configuration Message Structure

Name

Type

Description

DataSetWriterIds

UInt16[]

DataSetWriterIds contained in the configuration information.

DataSetWriterConfig

WriterGroupDataType

The current WriterGroup and DataSetWriter settings for the DataSet related to the DataSetWriterId. The WriterGroupDataType is defined in 6.2.5.6.

The field DataSetWriters of the WriterGroupDataType shall contain only the entry for the requested or changed DataSetWriters in the WriterGroup.

statusCodes

StatusCode[]

Status codes indicating the capability of the Publisher to provide configuration information for the DataSetWriterIds. The size of the array shall match the size of the DataSetWriterIds array.