The UADP DataSet payload header and other parts of the NetworkMessage are shown in Figure 28.

Different types of DataSetMessage can be combined in on NetworkMessage.

image031.png

Figure 28 – UADP DataSet Payload

The encoding of the UADP DataSet payload header is specified in Table 79. The payload header is unencrypted. This header shall be omitted if bit 6 of the UADPFlags is false.

Table 79 – UADP DataSet Payload Header

Name

Type

Description

Count

Byte

Number of DataSetMessages contained in the NetworkMessage. The NetworkMessage shall contain at least one DataSetMessages if the NetworkMessage type is DataSetMessage payload.

DataSetWriterIds

UInt16 [Count]

List of DataSetWriterIds contained in the NetworkMessage. The size of the list is defined by the Count.

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 DataSet payload is defined in Table 80. The payload is encrypted.

Table 80 – UADP DataSet Payload

Name

Type

Description

Sizes

UInt16 [Count]

List of byte sizes of the DataSetMessages.

The size of the list is defined by the Count in the DataSet payload header.

If the payload size exceeds 65535, the DataSetMessages shall be allocated to separate NetworkMessages. If a single DataSetMessage exceeds the payload size it shall be split into Chunk NetworkMessages.

This field shall be omitted if count is one or if bit 6 of the UADPFlags is false.

DataSetMessages

DataSetMessage [Count]

DataSetMessages contained in the NetworkMessage. The size of the list is defined by the Count in the DataSet payload header.

The type of encoding used for the DataSetMessages is defined by the DataSetWriter.

The encodings for the DataSetMessage are defined in 7.2.2.3.4.

The DataSetMessage header structure and the relation to other parts in a NetworkMessage is shown in Figure 29.

image032.png

Figure 29 – DataSetMessage Header Structure

The encoding of the DataSetMessage header structure is specified in Table 81.

The DataSetFieldContentMask and the DataSetMessageContentMask settings of the DataSetWriter control the flags in the fields DataSetFlags1 and DataSetFlags2. The setting of the flags shall not change until the configuration of the DataSetWriter is changed.

Table 81 – DataSetMessage Header Structure

Name

Type

Description

DataSetFlags1

Byte

Bit 0: DataSetMessage is valid.

If this bit is set to false, the rest of this DataSetMessage is considered invalid, and shall not be processed by the Subscriber.

Bit range 1-2: Field Encoding

00 The DataSet fields are encoded as Variant The Variant can contain a StatusCode instead of the expected DataType if the status of the field is Bad. The Variant can contain a DataValue with the value and the statusCode if the status of the field is Uncertain.

01 RawData Field Encoding

The DataSet fields are encoded in the DataTypes specified in the DataSetMetaData for the DataSet.

The encoding is handled like a Structure DataType where the DataSet fields are handled like Structure fields and fields with Structure DataType are handled like nested structures.

All restrictions for the encoding of Structure DataTypes also apply to the RawData Field Encoding.

10 DataValue Field Encoding

The DataSet fields are encoded as DataValue. This option is set if the DataSet is configured to send more than the Value.

11 Reserved

Bit 3: DataSetMessageSequenceNumber enabled

Bit 4: Status enabled

Bit 5: ConfigurationVersionMajorVersion enabled

Bit 6: ConfigurationVersionMinorVersion enabled

Bit 7: DataSetFlags2 enabled

The bit shall be false, if DataSetFlags2 is 0.

DataSetFlags2

Byte

The DataSetFlags2 shall be omitted if bit 7 of the DataSetFlags1 is false.

If the field is omitted, the Subscriber shall handle the related bits as false.

Bit range 0-3: UADP DataSetMessage type

0000Data Key Frame (see 7.2.2.3.5)

If the DataSetFlags2 field is not provided, this is the default DataSetMessage type.

0001Data Delta Frame (see 7.2.2.3.6)

0010Event (see 7.2.2.3.7)

0011Keep Alive (see 7.2.2.3.8)

01xxReserved

1xxxReserved

Bit 4: Timestamp enabled

Bit 5: PicoSeconds included in the DataSetMessage header

Bit 6: Reserved

Bit 7: Reserved for further extended flag fields

DataSetMessage‌SequenceNumber

UInt16

A strictly monotonically increasing sequence number assigned by the publisher to each DataSetMessage sent.

A receiver should ignore older DataSetMessage than the last sequence processed if it does not handle reordering of DataSetMessages. Receivers need to be aware of sequence numbers roll over (change from 65535 to 0).

To determine whether a received DataSetMessage is newer than the last processed DataSetMessage the following formula shall be used:

(65535 + received sequence number – last processed sequence number) modulo 65536

Results below 16384 indicate that the received DataSetMessage is newer than the last processed DataSetMessage and the received DataSetMessage is processed.

Results above 49162 indicate that the received message is older (or same) than the last processed DataSetMessage and the received DataSetMessage should be ignored if reordering of DataSetMessages is not necessary.

Other results are invalid and the DataSetMessage shall be ignored.

The field shall be omitted if Bit 2 of DataSetFlags1 is false.

Timestamp

UtcTime

The time the Data was collected.

The Timestamp shall be omitted if Bit 3 of DataSetFlags1 is false.

PicoSeconds

UInt16

Specifies the number of 10 picoseconds (1,0 e-11 seconds) intervals which shall be added to the Timestamp.

The field shall be omitted if Bit 4 of DataSetFlags2 is false.

Status

UInt16

The overall status of the DataSet.

This is the high order 16 bits of the StatusCode DataType representing the numeric value of the Severity and SubCode of the StatusCode DataType.

The field shall be omitted if Bit 4 of DataSetFlags1 is false.

ConfigurationVersion

MajorVersion

VersionTime

The major version of the configuration version of the DataSet used as consistency check with the DataSetMetaData available on the Subscriber side.

The field shall be omitted if Bit 5 of DataSetFlags1 is false.

ConfigurationVersion

MinorVersion

VersionTime

The minor version of the configuration version of the DataSet used as consistency check with the DataSetMetaData available on the Subscriber side.

The field shall be omitted if Bit 6 of DataSetFlags1 is false.

The data key frame DataSetMessage data and related headers are shown in Figure 30.

image033.png

Figure 30 – Data Key Frame DataSetMessage Data

The encoding of the data key DataSetMessage structure is specified in Table 82.

Table 82 – Data Key Frame DataSetMessage Structure

Name

Type

Description

FieldCount

UInt16

Number of fields of the DataSet contained in the DataSetMessage.

The FieldCount shall be omitted if RawData field encoding is set in the EncodingFlags defined in 7.2.2.3.4.

DataSetFields

BaseDataType[]

The field values of the DataSet.

The field encoding depends on the EncodingFlags of the DataSetMessage Header defined in 7.2.2.3.4. The default encoding is Variant if bit 0 and 1 are not set.

The data delta frame DataSetMessage data and the related headers are shown in Figure 31.

image034.png

Figure 31 – Data Delta Frame DataSetMessage

The information for a single value in delta frame messages is larger because of the additional index necessary for sending just changed data. The Publisher shall send a key frame message if the delta frame message is larger than a key frame message.

The encoding of the data delta frame DataSetMessage structure is specified in Table 83.

Table 83 – Data Delta Frame DataSetMessage Structure

Name

Type

Description

FieldCount

UInt16

Number of fields of the DataSet contained in the DataSetMessage.

DeltaFrameFields

Structure[]

The subset of field values of the DataSet contained in the delta frame.

FieldIndex

UInt16

The index of the Field in the DataSet. The index is based on the field position in the DataSetMetaData with the configuration version defined in the ConfigurationVersion field.

FieldValue

BaseDataType

The field values of the DataSet.

The field encoding depends on the EncodingFlags of the DataSetMessage Header defined in 7.2.2.3.4. The default encoding is Variant if bit 2 and 3 are not set.

The Event DataSetMessage data and the related headers are shown in Figure 32.

image035.png

Figure 32 – Event DataSetMessage

The encoding of the Event DataSetMessage structure is specified in Table 84.

Table 84 – Event DataSetMessage Structure

Name

Type

Description

FieldCount

UInt16

Number of fields of the DataSet contained in the DataSetMessage.

DataSetFields

BaseDataType[]

The field values of the DataSet.

The fields of Event DataSetMessages shall be encoded as Variant.

The Field Encoding DataSetFlags1 of the DataSetMessage header (bit 1 and 2) defined in 7.2.2.3.4 shall be set to false.

The keep alive message does not add any additional fields. The message and the related headers are shown in Figure 33.

image036.png

Figure 33 – KeepAlive Message

The sequence number contains the next expected sequence number for the DataSetWriter.