The ConnectionConfigurationSet contains a PubSubConfiguration Variable that has a DataType that is a large structure. This structure is passed to the EstablishConnections Method to provide the required information to the AutomationComponent to configure PubSub communication on that AutomationComponent. Some information that is inside of this data structure may need to be adjusted by an OPC UA Client (see 5.5.2). To facilitate this possible adjustment, some aspects of the large structure are exposed as Variables in the ConnectionConfigurationSet.
Figure E.19 illustrates the relation between elements in the ConnectionConfigurationSet and the PubSubConfiguration. Note that for clarity, parts of the ConnectionConfigurationSet are omitted. For an overview of all elements in the ConnectionConfigurationSet, please refer to Figure 35.
Each AutomationComponentConfiguration listed in the ConnectionConfigurationSet has its individual PubSubCommunicationModelConfiguration. The PubSubCommunicationModelConfiguration holds the PubSubConfiguration (highlighted in green with a dashed line).
- PubSubConnectionEndpointParameter Variables CommunicationLinks, PreconfiguredPublishedDataSet, and PreconfiguredSubscribedDataSet are related to DataSetReader and DataSetWriter in the PubSubConfiguration
- PubSubCommunicationFlowConfiguration Object including its SubscriberConfiguration child Objects and SecurityKeyServerAddress Object contain Variables related to PubSubConnections, ReaderGroups and WriterGroups in the PubSubConfiguration
All of the related Variables are of SelectionListType, which allows limiting the choice that can be made (see 6.8.1). After a ConnectionConfigurationSet is edited (see 6.7.3), the ConnectionManager reflects the changes into the PubSubConfiguration.
Clause E.6 indicates PubSubConfiguration settings which are based on using UDP-UADP as the transport profile and UADP-Periodic-Fixed as the header layout profile. Details for other transport or header layout profiles may be added in a later version of this document.
As defined in OPC 10000-14, a WriterGroup defines the Publisher of a NetworkMessage. It is recommended that the PubSubConfiguration contains a WriterGroup for each instance of PubSubCommunicationFlowConfigurationType. For the example illustrated in Figure E.5, a WriterGroup in AC_A is generated based on the parameters in Flow1, and a WriterGroup is generated for each AC_B and AC_C based on the parameters in Flow2.
Figure E.20 illustrates the relation between the PubSubCommunicationFlowConfiguration and the PubSubConnection and WriterGroup within the PubSubConfiguration. If any changes are made to the PubSubCommunicationFlowConfiguration, the related PubSubConnection information, as illustrated in Figure E.20, will be updated.
Depending on the transport profile and on the type of Address (unicast or multicast), the Address will be in the PubSubConnection or in the WriterGroup’s TransportSettings; see OPC 10000-14 for details. As an example, if UDP-UADP is used as the transport profile, a unicast address is set in the WriterGroup, but a multicast address is set in the PubSubConnection.
TransportProfileUri is used to set up the information in the PubSubConnection, whereas HeaderLayoutUri, PublishingInterval, Qos, SecurityMode and SecurityGroupId are used to set up the information in the WriterGroup.
The PubSubConnection elements ConnectionProperties and TransportSettings are transport specific. For the TransportProfileUri “http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp” (UDP-UADP), both are set to null.
The WriterGroup elements GroupProperties and TransportSettings are transport specific. For UDP-UADP, GroupProperties is set to null. For UDP-UADP, the elements MessageDelay, MessageRepeatCount, Address, QosCategory, and DatagramQos are defined in TransportSettings. The value of MessageDelay and MessageRepeatCount depends on the header layout. For HeaderLayoutUri. For “http://opcfoundation.org/UA/PubSub-Layouts/UADP-Periodic-Fixed” (UADP-Periodic-Fixed), both are set to 0. QosCategory and DatagramQos are derived from Qos.
The WriterGroup element MessageSettings is transport-specific. For UDP-UADP, the GroupVersion is defined by the generator of the ConnectionConfigurationSet. To ensure a consistent definition of the GroupVersion, it is recommended that the WriterGroup is configured completely within one ConnectionConfigurationSet. NetworkMessageContentMask and DataSetOrdering are derived from the HeaderLayoutUri. PublishingOffset and SamplingOffset may be set to a negative value, meaning not used. They may be used when additional Quality of Services are specified.
For MaxNetworkMessageSize, follow the recommendations in OPC 10000-14. For UADP-PeriodicFixed, KeepAliveTime should be set to PublishingInterval. LocaleIds may be set to a value different from null if the translation of Strings will be done by the Publisher. Priority may be used to set the relative priority of the WriterGroup for processing it.
As defined in OPC 10000-14, DataSetReaders in a ReaderGroup may extract their DataSetMessages from different NetworkMessages. However, it is recommended that the PubSubConfiguration generated for an AutomationComponent contains a ReaderGroup for each PubSubCommunicationFlowConfiguration. By this, common parameters (e.g., SecurityGroupId, SecurityKeyServices, TransportSettings, or MessageSettings) are configured on the ReaderGroup and do not need to be repeated in each DataSetReader.
For the example illustrated in Figure E.5, a ReaderGroup in AC_A is generated based on the parameters in SubA, a ReaderGroup is generated for each AC_B based on the parameters in SubB, and a ReaderGroup is generated in AC_C based on the parameters in SubC.
Figure E.21 illustrates the relation between the SubscriberConfiguration and the PubSubConnection and ReaderGroup within the PubSubConfiguration. Note that the SubscriberConfiguration uses information from the parent Object as illustrated.
TransportProfileUri is used to set up the information in the PubSubConnection, whereas HeaderLayoutUri, PublishingInterval, Qos, SecurityMode and SecurityGroupId are used to set up the information in the ReaderGroup.
The ToDataSetWriter reference can be derived from either the PreconfiguredPublishedDataSet or from a custom PublishedDataSet within the PubSubConfiguration. The PublishedDataSet contains the OutputVariableIds specified in the ConnectionEndpointParameter.
The DataSetWriter element MessageSettings is transport-specific. For UDP-UADP, the DataSetMessageContentMask, ConfiguredSize, NetworkMessageNumber, and DataSetOffset are derived from the HeaderLayoutUri. For UADP-Periodic-Fixed ConfiguredSize, NetworkMessageNumber and DataSetOffset of the DataSetMessage are determined by the generator of the PubSubConfiguration.
For UADP-Periodic-Fixed, the KeyFrameCount is set to 1.
It is recommended to update PublisherId, WriterGroupId and DataSetWriterId after issuing the ReserveCommunicationIdsCmd; see E.2.1 for details. The values are set corresponding to the Publisher of the DataSetMessage.
The ToDataSetReader reference can be derived from either the PreconfiguredSubscribedDataSet or from a custom SubscribedDataSet within the PubSubConfiguration. The SubscribedDataSet contains the InputVariableIds specified in the ConnectionEndpointParameter.
The DataSetReader element MessageSettings is transport-specific. For UDP-UADP, NetworkMessageNumber, DataSetOffset, NetworkMessageContentMask, and DataSetMessageContentMask are derived from the HeaderLayoutUri. For UADP-Periodic-Fixed, NetworkMessageNumber and DataSetOffset of the DataSetMessage are determined by the generator of the PubSubConfiguration. ReceiveOffset and ProcessingOffset may be set to a negative value, meaning not used. They may be used when additional Quality of Services are specified. GroupVersion and PublishingInterval are set corresponding to the Publisher of the DataSetMessage. DataSetClassId may be set to NULL.
For UDP_UADP, no DataSetReaderProperties are defined.
The ConnectionConfigurationSet can contain a PubSubConfiguration, which has a datatype of PubSubConfiguration2DataType. The PubSubConfiguration2DataType is a complex structure that can include Datasets (published or subscribed) that would include fields that are of NodeId DataType. NodeIds contain a NamespaceIndex. The NamespaceIndex is an index into a NamespaceArray that contains the URI that describes the owner of the Node. On a Server, this NamespaceArray is in the Server Object and is used to resolve all nodes on the Server. But in this case, the PublishedDataSet or SubscribedDataSet describes Variables that are on the Publisher or Subscriber Server, which is very likely to be a different Server. Depending on how the ConnectionConfigurationSet and PubSubConfiguration were generated, the Namespaces may not exist on the ConnectionManager Server.
This document describes how these NodeId are to be resolved to the correct Namespace indexes on the target Server before the structure is transmitted as part of an EstablishConnections (see 126.96.36.199). No issues exist in using the structure to set up a Connection, but if the configuration of the ConnectionManager Server is saved as a UANodeSet XML File or if the ConnectionConfigurationsSet is generated in an engineering tool and loaded into the ConnectionManager Server, problems could arise.
The general rules for processing UANodeSet XML file are described in OPC 10000-6 Annex F.14 This section provides the following instructions related to NodeIds:
When generating a UANodeSet XML file, the NamespaceArray is included at the top of the UANodeset XML file. The Indexes may be updated to match the list of Namespaces listed at the top of the generated file. But in this case, not all Namespace entries might be defined in the ConnectionManager Server. So, exporting a UANodeset XML from the Server could result in an error (if the index in a Node does not exist in the Server’s NamespaceArray), or it could result in an incorrect Namespace being referenced. The simplest solution is to ensure that the ConnectionManager Server include all Namespaces in its NamespaceArray, even if the only Node using that Namespace is in the complex data structure.
When an engineering tool generates a ConnectionConfigurationSet, if it includes DataSets, then it will need to ensure that any NodeId it generates for its ConnectionManager’s Server does not have a translation issue. Multiple options exist:
- This could be done by ensuring that the ConnectionManager Server configuration includes all Namespaces used for all NodeIds, even if the NodeIds are not on the ConnectionManager’s Server.
- The ConnectionManager’s Server could understand the ConnectionConfigurationSet PubSubConfiguration and bypass standard processing for the PubSubConfiguration (i.e., not map).
- The engineering tool does not provide DataSets that include Variables, and the ConnectionManager generates the PubSubConfiguration.
The actual manner that this is handled is vendor-specific, but the developer should be aware of these related issues.