The PublishingInterval, the SamplingOffset the PublishingOffset and the timestamp in the NetworkMessage header 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 Publisher and Subscriber.
The beginning of a PublishingInterval shall be a multiple of the PublishingInterval relative to the start of the time base. The reference start time of the PublishingInterval can be calculated by using the following formula:
Start of periodic execution =
current time + PublishingInterval – (current time MODULO PublishingInterval)
Current time is the number of nanoseconds since the start of epoch used by the reference clock.
PublishingInterval is the duration in nanoseconds.
Start of periodic execution is the number of nanoseconds since the start of epoch which is the next possible start of a PublishingInterval.
Figure 25 shows an example how to select the possible start of a PublishingInterval.
Figure 25 – Start of the periodic publisher execution
The different timing offsets inside a PublishingInterval cycle on Publisher and Subscriber side are shown in Figure 26. The SamplingOffset and PublishingOffset are defined as parameters of the UADP WriterGroup. The ReceiveOffset and the ProcessingOffset are defined as parameters of the UADP DataSetReader in 6.3.1.4.
Figure 26 – Timing offsets in a PublishingInterval
The GroupVersion with DataType VersionTime reflects the time of the last layout change of the content of the NetworkMessages published by the WriterGroup. The VersionTime DataType is defined in OPC 10000-4. The GroupVersion changes when one of the following parameters is modified:
- NetworkMessageContentMask of this WriterGroup;
- Offset of any DataSetWriter in this WriterGroup;
- MinorVersion of the DataSet of any DataSetWriter in this WriterGroup;
- DataSetFieldContentMask of any DataSetWriter in this WriterGroup;
- DataSetMessageContentMask of any DataSetWriter in this WriterGroup;
- DataSetWriterId of any DataSetWriter in this WriterGroup.
The GroupVersion is valid for all NetworkMessages resulting from this WriterGroup.
The DataSetOrdering defines the ordering of the DataSetMessages in the NetworkMessages. Possible values for DataSetOrdering are described in Table 81. The default value is Undefined.
The DataSetOrderingType is an enumeration that specifies the possible options for the ordering of DataSetMessages inside and across NetworkMessages. The possible enumeration values are described in Table 81.
Table 81 – DataSetOrderingType values
Name |
Value |
Description |
Undefined |
0 |
The ordering of DataSetMessages is not specified. |
AscendingWriterId |
1 |
DataSetMessages are ordered ascending by the value of their corresponding DataSetWriterIds. |
AscendingWriterIdSingle |
2 |
DataSetMessages are ordered ascending by the value of their corresponding DataSetWriterIds and only one DataSetMessage is sent per NetworkMessage. |
If DataSetOrdering is Undefined any ordering between DataSets and their distribution into NetworkMessages is allowed. Ordering and distribution even may change between each PublishingInterval. If DataSetOrdering is set to AscendingWriterId, the Publisher shall fill up each NetworkMessage with DataSets with an ascending order of the related DataSetWriterIds as long as the accumulated DataSet sizes will not exceed the MaxNetworkMessageSize. The different options are shown in Figure 27.
Figure 27 – DataSetOrdering and MaxNetworkMessageSize
The DataSetOrderingType representation in the AddressSpace is defined in Table 82.
Table 82 – DataSetOrderingType definition
Attribute |
Value |
||||
BrowseName |
DataSetOrderingType |
||||
IsAbstract |
False |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
Others |
Subtype of Enumeration defined in OPC 10000-5 |
|||||
HasProperty |
Variable |
EnumStrings |
LocalizedText [] |
PropertyType |
|
Conformance Units |
|||||
PubSub Parameters UADP |
The parameter NetworkMessageContentMask defines the optional header fields to be included in the NetworkMessages produced by the WriterGroup. The DataType for the UADP NetworkMessage mapping is UadpNetworkMessageContentMask.
The DataType UadpNetworkMessageContentMask is formally defined in Table 83.
Table 83 – UadpNetworkMessageContentMask values
Value |
Bit No. |
Description |
PublisherId |
0 |
The PublisherId is included in the NetworkMessages. |
GroupHeader |
1 |
The GroupHeader is included in the NetworkMessages. |
WriterGroupId |
2 |
The WriterGroupId field is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
GroupVersion |
3 |
The GroupVersion field is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
NetworkMessageNumber |
4 |
The NetworkMessageNumber field 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 SequenceNumber field is included in the GroupHeader. The flag is only valid if Bit 1 is set. |
PayloadHeader |
6 |
The PayloadHeader is included in the NetworkMessages. |
Timestamp |
7 |
The sender timestamp is included in the NetworkMessages. |
PicoSeconds |
8 |
The sender PicoSeconds portion of the timestamp is included in the NetworkMessages. This flag is ignored if the Timestamp flag is not set. |
DataSetClassId |
9 |
The DataSetClassId is included in the NetworkMessages. The NetworkMessage can only contain DataSetMessages with the same DataSetClassId. If DataSetMessages have different DataSetClassIds they must be sent in individual NetworkMessages. |
PromotedFields |
10 |
The PromotedFields are included in the NetworkMessages. |
The UadpNetworkMessageContentMask representation in the AddressSpace is defined in Table 84.
Table 84 – UadpNetworkMessageContentMask definition
Attribute |
Value |
||||
BrowseName |
UadpNetworkMessageContentMask |
||||
IsAbstract |
False |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
Others |
Subtype of UInt32 defined in OPC 10000-5 |
|||||
HasProperty |
Variable |
OptionSetValues |
LocalizedText [] |
PropertyType |
|
Conformance Units |
|||||
PubSub Parameters UADP |
The SamplingOffset with the DataType Duration defines the time in milliseconds for the offset of creating the NetworkMessage in the PublishingInterval cycle.
Any negative value indicates that the optional parameter is not configured. In this case the Publisher shall calculate the time before the PublishingOffset that is necessary to create the NetworkMessage in time for sending at the PublishingOffset.
The Duration DataType is a subtype of Double and allows configuration of intervals smaller than a millisecond.
The PublishingOffset is an array of DataType Duration that defines the time in milliseconds for the offset in the PublishingInterval cycle of sending the NetworkMessage to the network.
Any negative value indicates that the PublishingOffset is not configured and the timing inside the PublishingInterval is application specific.
The Duration DataType is a subtype of Double and allows configuration of intervals smaller than a millisecond.
Figure 28 depicts how the different variations of PublishingOffset settings affect sending of multiple NetworkMessages.
Figure 28 – PublishingOffset options for multiple NetworkMessages
If all DataSets of a group are transferred with a single NetworkMessage, the scalar value or the first value in the array defines the offset for sending the NetworkMessage relative to the start of the PublishingInterval cycle. If the DataSets of a group are sent in a series of NetworkMessages, the values in the array define the offsets of sending the NetworkMessages relative to the start of the PublishingInterval cycle. If a scalar value is configured, the first NetworkMessage is 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 is extrapolated from the last two offset values in the array.
The PublishingInterval, the SamplingOffset the PublishingOffset and the timestamp in the NetworkMessage header shall use the same time base.
This Structure DataType is used to represent the UADP NetworkMessage mapping specific WriterGroup parameters. It is a subtype of WriterGroupMessageDataType defined in 6.2.6.7.3.
The UadpWriterGroupMessageDataType is formally defined in Table 85.
Table 85 – UadpWriterGroupMessageDataType structure
Name |
Type |
Description |
UadpWriterGroupMessageDataType |
Structure |
Subtype of WriterGroupMessageDataType defined in 6.2.6.7.3 |
GroupVersion |
VersionTime |
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. |
Its representation in the AddressSpace is defined in Table 86.
Table 86 – UadpWriterGroupMessageDataType definition
Attributes |
Value |
BrowseName |
UadpWriterGroupMessageDataType |
IsAbstract |
False |
Subtype of WriterGroupMessageDataType defined in 6.2.6.7.3. |
|
Conformance Units |
|
PubSub Parameters UADP |