If a NetworkMessage payload like a DataSetMessage or a discovery response message has to be split across multiple NetworkMessages the chunks are sent with the payload header defined in Table 77 and the payload defined in Table 78. A chunk NetworkMessage can only contain chunked payload of one DataSetMessage.

Table 77 – Chunked NetworkMessage Payload Header

Name

Type

Description

DataSetWriterId

UInt16

DataSetWriterId contained in the NetworkMessage.

The DataSetWriterId identifies the PublishedDataSet and the DataSetWriter responsible for sending Messages for the DataSet.

A Subscriber can skip DataSetMessages from DataSetWriters it does not expect DataSetMessages from.

The DataSetWriterId shall be set to 0 for discovery response messages.

Table 78 – Chunked NetworkMessage Payload Fields

Name

Type

Description

MessageSequenceNumber

UInt16

Sequence number of the payload as defined for the NetworkMessage type like DataSetMessageSequenceNumber in a DataSetMessage.

NetworkMessages may be received out of order. In this case, a chunk for the next payload can be received before the last chunk of the previous payload was received.

If the next sequence number is received by a Subscribers that can handle only one payload, the chunks of the previous payload are skipped if they are not completely received yet.

ChunkOffset

UInt32

The byte offset position of the chunk in the complete NetworkMessage payload. The last chunk is received if ChunkOffset plus the size of the current chunk equals TotalSize.

The reassembled NetworkMessage payload can be processed after all chunks are received.

TotalSize

UInt32

Total size of the NetworkMessage payload in bytes.

ChunkData

ByteString

The pieces of the original DataSetMessage, are copied into the chunk until the maximum size allowed for a single NetworkMessage is reached minus space for the signature. The data copied into next chunk starts with the byte after the last byte copied into current chunk.

A DataSetMessage is completely received when all chunks are received and the DataSetMessage can be processed completely.