Multiple logical connections across multiple AutomationComponents may require more steps. Assume that a ConnectionManager must establish a ConnectionConfigurationSet containing logical connections between multiple AutomationComponents.

Figure E.8 illustrates an example of such a ConnectionConfigurationSet. For this scenario, the ConnectionManager may set up the logical connections as follows:

  1. The ConnectionManager calls EstablishConnections on AC1, AC2, and AC3 using the ReserveCommunicationIdsCmd to reserve WriterGroupIds and DataSetWriterIds for the publishing side (i.e., WriterGroups, and DataSetWriters for AC1, AC2 and AC3) and to retrieve the default PublisherId.
  2. The ConnectionManager updates the communication configuration for AC1, AC2, and AC3 regarding the publishing and subscribing side (DataSetReaders) using the IDs reserved in step (1). The ConnectionManager then calls EstablishConnections on AC1, AC2, and AC3 using the SetCommunicationConfigurationCmd to add the complete communication configuration.

The ConnectionManager may use the sequence illustrated in Figure E.8.

image128.png

Figure E.8 – Sequence for establishing connections (multiple AutomationComponents)

To set up this scenario, six Calls are needed in total (2 Calls per AutomationComponent). The Calls to different AutomationComponents can be issued in parallel.

If all logical connections are related to one AutomationComponent in our sample, this would be AC1. The sequence could be optimized as follows:

  1. The ConnectionManager calls EstablishConnections on AC1 using the ReserveCommunicationIdsCmd to reserve WriterGroupIds and DataSetWriterIds for the publishing side (i.e., WriterGroups and DataSetWriters for AC1) and to retrieve the default PublisherId.
  2. The ConnectionManager updates the communication configuration for AC2 and AC3 regarding the subscribing side (DataSetReaders) using the IDs reserved in step (1). The ConnectionManager will set the publishing side of the communication configuration for AC2 and AC3 to null IDs. The ConnectionManager calls EstablishConnections on AC1 and AC2 using the SetCommunicationConfigurationCmd to add the updated communication configuration. While adding the communication configuration, AC2 and AC3 assign IDs to the publishing side of the communication configuration applied and will return the information.
  3. The ConnectionManager updates the communication configuration for AC1 regarding the publishing side using the IDs reserved in step (1) and the IDs returned from step (2). The ConnectionManager calls EstablishConnections on AC1 using the SetCommunicationConfigurationCmd to add the complete communication configuration.

This optimized sequence is illustrated in Figure E.9

image129.png

Figure E.9 – Optimized Sequence for establishing connections (multiple AutomationComponents)

The ConnectionManager may also use a variant of the sequences above, for example, using SetCommunicationConfigurationCmd, with the publishing side of the communication configuration having null IDs instead of using the ReserveCommunicationIdsCmd. In this case, the subscribing side of the communication configuration will be added in a separate step.