The PublishingInterval, the SamplingOffsetthe PublishingOffsetand the timestamp in the NetworkMessageheader shall use the same time base.
If an underlying network provides a synchronized global clock, this clock shall be used as the time base for the Publisherand Subscriber.
The beginning of a PublishingIntervalshall be a multiple of the PublishingIntervalrelative to the start of the time base. The reference start time of the PublishsingIntervalcan be calculated by using the following formula:
Start of periodic execution =
current time + PublishingInterval – (current time % PublishingInterval)
Current time is the number of nanoseconds since the start of epoch used by the reference clock.
PublishingIntervalis the duration in nanoseconds.
Start of periodic executionis the number of nanoseconds since the start of epoch which is the next possible start of a PublishingInterval.
Figure 23shows an example how to select the possible start of a PublishingInterval.
Figure 23– Start of the periodic publisher execution
The different timing offsets inside a PublishingIntervalcycle on Publisherand Subscriberside are shown in Figure 24. The SamplingOffsetand PublishingOffsetare defined as parameters of the UADP WriterGroup. The ReceiveOffsetand the ProcessingOffsetare defined as parameters of the UADP DataSetReaderin 6.3.1.3.
Figure 24– Timing offsets in a PublishingInterval
The GroupVersionwith DataType VersionTimereflects the time of the last layout change of the content of the NetworkMessagespublished by the WriterGroup. The VersionTime DataTypeis defined in OPC 10000-4. The GroupVersionchanges when one of the following parameters is modified:
- NetworkMessageContentMaskof this WriterGroup
- Offsetof any DataSetWriterin this WriterGroup
- MinorVersionof the DataSetof any DataSetWriterin this WriterGroup
- DataSetFieldContentMaskof any DataSetWriterin this WriterGroup
- DataSetMessageContentMaskof any DataSetWriterin this WriterGroup
- DataSetWriterIdof any DataSetWriterin this WriterGroup
The GroupVersionis valid for all NetworkMessagesresulting from this WriterGroup.
The DataSetOrderingdefines the ordering of the DataSetMessagesin the NetworkMessages. Possible values for DataSetOrderingare described in Table 51. The default value is Undefined_0.
The DataSetOrderingTypeis an enumeration that specifies the possible options for the ordering of DataSetMessagesinside NetworkMessages. The possible enumeration values are described in Table 51.
Table 51– DataSetOrderingType Values
Value |
Description |
Undefined_0 |
The ordering of DataSetMessagesis not specified. |
AscendingWriterId_1 |
DataSetMessagesare ordered ascending by the value of their corresponding DataSetWriterIds. |
AscendingWriterIdSingle_2 |
DataSetMessagesare ordered ascending by the value of their corresponding DataSetWriterIdsand only one DataSetMessageis sent per NetworkMessage. |
If DataSetOrderingis Undefined_0any ordering between DataSets and their distribution into NetworkMessagesis allowed. Ordering and distribution even may change between each PublishingInterval. If DataSetOrderingis set to AscendingWriterId_1the Publisherhas to fill up each NetworkMessagewith DataSetswith an ascending order of the related DataSetWriterIdsas long as the accumulated DataSetsizes will not exceed the MaxNetworkMessageSize. The different options are shown in Figure 25.
Figure 25– DataSetOrdering and MaxNetworkMessageSize
The parameter NetworkMessageContentMaskdefines the optional header fields to be included in the NetworkMessagesproduced by the WriterGroup. The DataTypefor the UADP NetworkMessagemapping is UadpNetworkMessageContentMask.
The DataType UadpNetworkMessageContentMaskis formally defined in Table 52.
Table 52– UadpNetworkMessageContentMask Values
Value |
Bit No. |
Description |
PublisherId |
0 |
The PublisherIdis included in the NetworkMessages. |
GroupHeader |
1 |
The GroupHeader is included in the NetworkMessages. |
WriterGroupId |
2 |
The WriterGroupIdfield is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
GroupVersion |
3 |
The GroupVersionfield is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
NetworkMessageNumber |
4 |
The NetworkMessageNumberfield is included in the GroupHeader. The field is required if more than one NetworkMessage is needed to transfer all DataSets of the group. The flag is only valid if Bit 1 is set. |
SequenceNumber |
5 |
The SequenceNumberfield is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
PayloadHeader |
6 |
The PayloadHeaderis included in the NetworkMessages. |
Timestamp |
7 |
The sender timestamp is included in the NetworkMessages. |
PicoSeconds |
8 |
The sender PicoSecondsportion of the timestamp is included in the NetworkMessages. |
DataSetClassId |
9 |
The DataSetClassIdis included in the NetworkMessages. |
PromotedFields |
10 |
The PromotedFieldsare included in the NetworkMessages. |
The UadpNetworkMessageContentMaskrepresentation in the AddressSpaceis defined in Table 53.
Table 53– UadpNetworkMessageContentMask Definition
Attributes |
Value |
||
BrowseName |
UadpNetworkMessageContentMask |
||
IsAbstract |
False |
||
References |
NodeClass |
BrowseName |
DataType |
Subtype of UInt32 defined in OPC 10000-5. |
|||
HasProperty |
Variable |
OptionSetValues |
LocalizedText [ ] |
The SamplingOffsetwith the DataType Durationdefines the time in milliseconds for the offset of creating the NetworkMessagein the PublishingIntervalcycle.
Any negative value indicates that the optional parameter is not configured. In this case the Publishershall calculate the time before the PublishingOffsetthat is necessary to create the NetworkMessagein time for sending at the PublishingOffset.
The Duration DataTypeis a subtype of Doubleand allows configuration of intervals smaller than a millisecond.
The PublishingOffsetis an array of DataType Durationthat defines the time in milliseconds for the offset in the PublishingIntervalcycle of sending the NetworkMessageto the network.
The Duration DataTypeis a subtype of Doubleand allows configuration of intervals smaller than a millisecond.
Figure 26depicts how the different variations of PublishingOffsetsettings affect sending of multiple NetworkMessages.
Figure 26– PublishingOffset options for multiple NetworkMessages
If all DataSetsof a group are transferred with a single NetworkMessage, the scalar value or the first value in the array defines the offset for sending the NetworkMessagerelative to the start of the PublishingIntervalcycle. If the DataSetsof a group are sent in a series of NetworkMessages, the values in the array define the offsets of sending the NetworkMessagesrelative to the start of the PublishingIntervalcycle. If a scalar value is configured, the first NetworkMessageis sent at the offset and the following NetworkMessages are sent immediately after each other. If more NetworkMessages are available for sending than offset values in the array, the offset for the remaining NetworkMessages are extrapolated from the last two offset values in the array.
The PublishingInterval, the SamplingOffsetthe PublishingOffsetand the timestamp in the NetworkMessageheader shall use the same time base.
This Structure DataTypeis used to represent the UADP NetworkMessagemapping specific WriterGroup parameters. It is a subtype of WriterGroupMessageDataTypedefined in 6.2.5.6.3.
The UadpWriterGroupMessageDataTypeis formally defined in Table 54.
Table 54– UadpWriterGroupMessageDataType Structure
Name |
Type |
Description |
UadpWriterGroupMessageDataType |
Structure |
|
groupVersion |
UInt32 |
Defined in 6.3.1.1.2. |
dataSetOrdering |
DataSetOrderingType |
Defined in 6.3.1.1.3. |
networkMessageContentMask |
UadpNetworkMessageContentMask |
Defined in 6.3.1.1.4. |
samplingOffset |
Duration |
Defined in 6.3.1.1.5. |
publishingOffset |
Duration[] |
Defined in 6.3.1.1.6. |
The configuration of the DataSetWritersin a WriterGroupcan result in a fixed NetworkMessagelayout where all DataSetshave a static position between NetworkMessages.
In this case the parametersNetworkMessageNumberand DataSetOffsetprovide information about the static position of the DataSetMessagein a NetworkMessage Subscriberscan rely on. If the value of one of the two parameters is 0, the position is not guaranteed to be static.
Note 1: A Publishercan only provide valid values for the parameters NetworkMessageNumberand DataSetOffsetif the message mapping allows keeping the value for these Propertiesconstant unless the configuration of the WriterGroupis changed.
The DataSetMessageContentMaskdefines the flags for the content of the DataSetMessageheader. The UADP message mapping specific flags are defined by the UadpDataSetMessageContentMask DataType.
The UadpDataSetMessageContentMask DataTypeis formally defined in Table 55.
Table 55– UadpDataSetMessageContentMask Values
Value |
Bit No. |
Description |
Timestamp |
0 |
If this flag is set, a timestamp shall be included in the DataSetMessageheader. |
PicoSeconds |
1 |
If this flag is set, a PicoSecondstimestamp field shall be included in the DataSetMessageheader. This flag is ignored if the HeaderTimestampflag is not set. |
Status |
2 |
If this flag is set, the DataSetMessagestatus is included in the DataSetMessageheader. The rules for creating the DataSetMessagestatus are defined in Table 16. |
MajorVersion |
3 |
If this flag is set, the ConfigurationVersion.MajorVersionis included in the DataSetMessageheader. |
MinorVersion |
4 |
If this flag is set, the ConfigurationVersion.MinorVersionis included in the DataSetMessageheader. |
SequenceNumber |
5 |
If this flag is set, the DataSetMessageSequenceNumber is included in the DataSetMessage header. |
The UadpDataSetMessageContentMaskrepresentation in the AddressSpaceis defined in Table 56.
Table 56– UadpDataSetMessageContentMask Definition
Attributes |
Value |
||
BrowseName |
UadpDataSetMessageContentMask |
||
IsAbstract |
False |
||
References |
NodeClass |
BrowseName |
DataType |
Subtype of UInt32 defined in OPC 10000-5. |
|||
HasProperty |
Variable |
OptionSetValues |
LocalizedText [ ] |
The parameter ConfiguredSizewith the DataType UInt16defines the fixed size in bytes a DataSetMessageuses inside a NetworkMessage. The default value is 0 and it indicates a dynamic length. If a DataSetMessagewould be smaller in size (e.g. because of the current values that are encoded) the DataSetMessageis padded with bytes with value zero. In case it would be larger, the Publishershall set bit 0 of the DataSetFlags1to false to indicate that the DataSetMessageis not valid.
Note 1to entry: The parameter ConfiguredSizecan be used for different reasons. One reason is the reservation of space inside a NetworkMessageby setting ConfiguredSizeto a higher value than the assigned DataSetactually requires. Modifications (e.g. extensions) of the DataSetwould then not change the required bandwidth on the network which reduces the risk of side effects. Another reason would be to maintain predictable network behaviour even when using a volatile field DataTypeslike Stringor ByteString.
The parameter NetworkMessageNumberwith the DataType UInt16is a read-only parameter set by the Publisherin the case of a fixed NetworkMessagelayout. The default value is 0 and indicates that the position of the DataSetMessagein a NetworkMessageis not fixed.
If the NetworkMessagelayout is fixed and all DataSetMessagesof a WriterGroupfit into one single NetworkMessagethe value of NetworkMessageNumbershall be 1. If the DataSetMessagesof a WriterGroupare distributed or chunked over more than one NetworkMessagethe first NetworkMessagein a PublishingIntervalshall be generated with the value 1, the following NetworkMessagesshall be generated with incrementing NetworkMessageNumbers. To avoid a roll-over the number of NetworkMessagesgenerated from one WriterGroupwithin one PublishingIntervalis limited to 65535.
The parameter DataSetOffsetwith the DataType UInt16is a read-only parameter set by the Publisherthat specifies the offset in bytes inside a NetworkMessageat which the DataSetMessageis located, relative to the beginning of the NetworkMessage. The default value 0 indicates that the position of the DataSetMessagein a NetworkMessageis not fixed.
This Structure DataTypeis used to represent UADP DataSetMessage mapping specific DataSetWriterparameters. It is a subtype of the DataSetWriterMessageDataTypedefined in 6.2.3.5.3.
The UadpDataSetWriterMessageDataTypeis formally defined in Table 57.
Table 57– UadpDataSetWriterMessageDataType Structure
Name |
Type |
Description |
UadpDataSetWriterMessageDataType |
Structure |
|
dataSetMessageContentMask |
UadpDataSetMessageContentMask |
Defined in 6.3.1.2.2. |
configuredSize |
UInt16 |
Defined in 6.3.1.2.3. |
networkMessageNumber |
UInt16 |
Defined in 6.3.1.2.4. |
dataSetOffset |
UInt16 |
Defined in 6.3.1.2.5. |
The parameterGroupVersion with DataType VersionTime defines the expected value in the field GroupVersion in the header of the NetworkMessage. The default value 0 is defined as null value, and means this parameter shall be ignored.
The parameterNetworkMessageNumber with DataType UInt16 is the number of the NetworkMessageinside a PublishingIntervalin which this DataSetMessageis published. The default value 0 is defined as null value, and means this parameter shall be ignored.
The parameterDataSetOffset with DataType UInt16 defines the offset for the DataSetMessageinside the corresponding NetworkMessage. The default value 0 is defined as null value, and means this parameter shall be ignored.
The parameterDataSetClassIdwith DataType Guid defines a DataSetclass related filter. If the value is null, the DataSetClassIdfilter is not applied.
The NetworkMessageContentMaskwith DataType UadpNetworkMessageContentMaskindicates the optional header fields included in the received NetworkMessages. The UadpNetworkMessageContentMask DataTypeis defined in 6.3.1.1.4.
The DataSetMessageContentMaskwith the DataType UadpDataSetMessageContentMaskindicates the optional header fields included in the DataSetMessages.
The UadpDataSetMessageContentMaskDataType is defined in 6.3.1.2.2.
The PublishingIntervalwith DataType Duration indicates the rate the Publishersends NetworkMessagesrelated to the DataSet. The start time for the periodic execution of the Subscribershall be calculated according to 6.3.1.1.1.
The ReceiveOffset with DataType Duration defines the time in milliseconds for the offset in the PublishingIntervalcycle for the expected receive time of the NetworkMessagefor the DataSetfrom the network.
The ProcessingOffsetwith DataType Duration defines the time in milliseconds for the offset in the PublishingIntervalcycle when the received DataSet must be processed by the application in the Subscriber.
The different timing offsets inside a PublishingIntervalcycle on Publisherand Subscriberside are shown in Figure 24.
This Structure DataTypeis used to represent UADP message mapping specific DataSetReaderparameters. It is a subtype of the DataSetReaderMessageDataTypedefined in 6.2.8.11.3.
The UadpDataSetReaderMessageDataTypeis formally defined in Table 58.
Table 58– UadpDataSetReaderMessageDataType Structure
Name |
Type |
Description |
UadpDataSetReaderMessageDataType |
Structure |
|
groupVersion |
VersionTime |
Defined in 6.3.1.3.1. |
networkMessageNumber |
UInt16 |
Defined in 6.3.1.3.2. |
dataSetOffset |
UInt16 |
Defined in 6.3.1.3.3. |
dataSetClassId |
Guid |
Defined in 6.3.1.3.4. |
networkMessageContentMask |
UadpNetworkMessageContentMask |
Defined in 6.3.1.3.5. |
dataSetMessageContentMask |
UadpDataSetMessageContentMask |
Defined in 6.3.1.3.6. |
publishingInterval |
Duration |
Defined in 6.3.1.3.7. |
receiveOffset |
Duration |
Defined in 6.3.1.3.8. |
processingOffset |
Duration |
Defined in 6.3.1.3.9. |
The parameter NetworkMessageContentMaskdefines the optional header fields to be included in the NetworkMessagesproduced by the WriterGroup. The DataTypefor the JSON NetworkMessagemapping is JsonNetworkMessageContentMask.
The DataType JsonNetworkMessageContentMaskis formally defined in Table 59.
Table 59– JsonNetworkMessageContentMask Values
Value |
Bit No. |
Description |
NetworkMessageHeader |
0 |
The JSON NetworkMessageheader is included in the NetworkMessages. If this bit is false, bits 2 to 4 shall be 0. |
DataSetMessageHeader |
1 |
The JSON DataSetMessageheader is included in each DataSetMessage. If this bit is false then the DataSetMessageContentMaskfor the DataSetWritersare ignored (see 6.3.2.2.1). |
SingleDataSetMessage |
2 |
Each JSON NetworkMessagecontains only one DataSetMessage. |
PublisherId |
3 |
The PublisherIdis included in the NetworkMessages. |
DataSetClassId |
4 |
The DataSetClassIdis included in the NetworkMessages. |
ReplyTo |
5 |
The ReplyTois included in the NetworkMessages. |
The JsonNetworkMessageContentMaskrepresentation in the AddressSpaceis defined in Table 60.
Table 60– JsonNetworkMessageContentMask Definition
Attributes |
Value |
||
BrowseName |
JsonNetworkMessageContentMask |
||
IsAbstract |
False |
||
References |
NodeClass |
BrowseName |
DataType |
Subtype of UInt32 defined in OPC 10000-5. |
|||
HasProperty |
Variable |
OptionSetValues |
LocalizedText [ ] |
This Structure DataTypeis used to represent the JSON NetworkMessagemapping specific WriterGroupparameters. It is a subtype of WriterGroupMessageDataTypedefined in 6.2.5.6.3.
The JsonWriterGroupMessageDataTypeis formally defined in Table 61.
Table 61– JsonWriterGroupMessageDataType Structure
Name |
Type |
Description |
JsonWriterGroupMessageDataType |
Structure |
|
networkMessageContentMask |
JsonNetworkMessageContentMask |
Defined in 6.3.2.1.1. |
The DataSetMessageContentMaskdefines the flags for the content of the DataSetMessageheader. The JSON message mapping specific flags are defined by the JsonDataSetMessageContentMask DataType.
The JsonDataSetMessageContentMask DataTypeis formally defined in Table 62.
Table 62– JsonDataSetMessageContentMask Values
Value |
Bit No. |
Description |
DataSetWriterId |
0 |
If this flag is set, a DataSetWriterId shall be included in the DataSetMessageheader. |
MetaDataVersion |
1 |
If this flag is set, the ConfigurationVersionis included in the DataSetMessageheader. |
SequenceNumber |
2 |
If this flag is set, the DataSetMessageSequenceNumber is included in the DataSetMessage header. |
Timestamp |
3 |
If this flag is set, a timestamp shall be included in the DataSetMessageheader. |
Status |
4 |
If this flag is set, an overall status is included in the DataSetMessageheader. |
The JsonDataSetMessageContentMask representation in the AddressSpaceis defined in Table 63.
Table 63– JsonDataSetMessageContentMask Definition
Attributes |
Value |
||
BrowseName |
JsonDataSetMessageContentMask |
||
IsAbstract |
False |
||
References |
NodeClass |
BrowseName |
DataType |
Subtype of UInt32 defined in OPC 10000-5. |
|||
HasProperty |
Variable |
OptionSetValues |
LocalizedText [ ] |
This Structure DataTypeis used to represent JSON DataSetMessagemapping specific DataSetWriterparameters. It is a subtype of the DataSetWriterMessageDataTypedefined in 6.2.3.5.3.
The JsonDataSetWriterMessageDataTypeis formally defined in Table 64.
Table 64– JsonDataSetWriterMessageDataType Structure
Name |
Type |
Description |
JsonDataSetWriterMessageDataType |
Structure |
|
dataSetMessageContentMask |
JsonDataSetMessageContentMask |
Defined in 6.3.2.2.1. |
The NetworkMessageContentMaskwith DataType JsonNetworkMessageContentMaskindicates the optional header fields included in the received NetworkMessages. The JsonNetworkMessageContentMask DataTypeis defined in 6.3.2.1.1.
The DataSetMessageContentMaskwith the DataType JsonDataSetMessageContentMaskindicates the optional header fields included in the DataSetMessages.
The JsonDataSetMessageContentMaskDataType is defined in 6.3.2.2.1.
This Structure DataTypeis used to represent JSON DataSetMessagemapping specific DataSetReaderparameters. It is a subtype of the DataSetReaderMessageDataTypedefined in 6.2.8.11.3.
The JsonDataSetReaderMessageDataTypeis formally defined in Table 65.
Table 65– JsonDataSetReaderMessageDataType Structure
Name |
Type |
Description |
JsonDataSetReaderMessageDataType |
Structure |
|
networkMessageContentMask |
JsonNetworkMessageContentMask |
Defined in 6.3.2.3.1. |
dataSetMessageContentMask |
JsonDataSetMessageContentMask |
Defined in 6.3.2.3.2. |