The communication configuration applied in the case of a PubSub communication model is a structure of the type PubSubCommunicationConfigurationDataType (see 10.10.3).

The EstablishConnections implementation shall process the supplied PubSubConfiguration with RequireCompleteUpdate and ConfigurationReferences in an atomic operation according to the behaviour of the CloseAndUpdate Method specified by OPC 10000-14. It shall set the overall processing result in PubSubCommunicationConfigurationResults Result and the returned ChangesApplied, ReferenceResults, ConfigurationValues, and ConfigurationObjects in PubSubCommunicationConfigurationResults.

If an error is returned, the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

The SetCommunicationConfigurationCmd will apply the PubSubConfiguration, including the values of all Enabled flags for the configuration elements. Depending on the values of the Enabled flags, this may result in overall enabled PubSub communication without passing the EnableCommunicationCmd or parts of the PubSub communication being enabled while others are disabled.

The EstablishConnections implementation shall create the ToDataSetReader and ToDataSetWriter References according to the link information supplied in ConnectionEndpointConfigurations CommunicationLinks (see 10.13). If the PubSub configuration model is not exposed by this Server, this Reference may point to a Node that is not accessible. If the Reference cannot be created, an appropriate StatusCode shall be set in the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

The EstablishConnections implementation shall verify the SubscribedDataSet associated with the referenced DataSetReader for each element in ConnectionEndpointConfigurations having a ToDataSetReader Reference.

If ExpectedSubscribedDataSetVersion MajorVersion is 0 (for the definition of MajorVersion, see OPC 10000-14), no verification shall be performed. If ExpectedSubscribedDataSetVersion MinorVersion is 0 (for the definition of MinorVersion, see OPC 10000-14), the verification for MinorVersion shall be skipped. If the ExpectedSubscribedDataSetVersion does not match the version of the associated SubscribedDataSet, the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult shall be set to Bad_ConfigurationError, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11

If InputVariableIds is used, and at least one Variable is not contained in the associated SubscribedDataSet, the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult shall be set to Bad_NoMatch, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

The EstablishConnections implementation shall verify the PublishedDataSet associated with the referenced DataSetWriter for each element in ConnectionEndpointConfigurations having a ToDataSetWriter Reference.

If ExpectedPublishedDataSetVersion MajorVersion is 0, no verification shall be performed. If ExpectedPublishedDataSetVersion MinorVersion is 0, the verification for MinorVersion shall be skipped. If the ExpectedPublishedDataSetVersion does not match the version of the associated PublishedDataSet, the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult shall be set to Bad_ConfigurationError, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11

If OutputVariableIds is used, and at least one Variable is not contained in the associated PublishedDataSet, the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult shall be set to Bad_NoMatch, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

The EstablishConnections implementation shall verify that ConnectionEndpoints with their IsPersistent Property set to TRUE reference a DataSetReader and/or DataSetWriter which are persisted, including all parent Objects, i.e., WriterGroup, ReaderGroup, PubSubConnection and PublishSubscribe (see NotPersisted in OPC 10000-14). If the IsPersistent Property is set to FALSE, the EstablishConnections implementation shall verify that the DataSetReader and/or DataSetWriter are not persisted (see NotPersisted in OPC 10000-14). Otherwise, Bad_InvalidState shall be set in the appropriate element in ConnectionEndpointConfigurationResults CommunicationLinksResult, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

If communication configuration exceeds capabilities (PublisherCapabilities, SubscriberCapabilities or ComponentCapabilities) of the AutomationComponent, FunctionalEntities, Input- or OutputData, or if communication configuration cannot be applied, Bad_ConfigurationError shall be set in PubSubCommunicationConfigurationResults Result, and the EstablishConnections implementation shall abort processing as described in 6.2.4.3.11.

NOTE Hint – in the EstablishConnections command, Bad_ConfigurationError is returned if a communication configuration is supplied that requests functionality that is not currently supported and not specified by a capability (e.g., usage of multicast address).

In the ConnectionEndpointConfigurationResults, the possible StatusCodes for the FunctionalEntityNodeResult are formally defined in Table 11. The possible StatusCodes for the ConnectionEndpointResult are formally defined in Table 12. The possible StatusCodes for the CommunicationLinksResult are formally defined in Table 16.

The possible StatusCodes for the CommunicationConfigurationResults Result are formally defined in Table 19.

Standard OPC UA Diagnostics can be used to obtain additional information related to any PubSub configuration errors.