View Issue Details

IDProjectCategoryView StatusLast Update
0007715Part 81: UAFX Connecting Devices and Information Model [sg.BaseFacet]Specpublic2022-05-30 21:49
ReporterDavid Puffer Assigned ToPaul Hunkar  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionwon't fix 
Product Version1.00.00 RC2 
Summary0007715: 6.7.4 ProcessConnectionConfigurationSets Method: ActionEstablishConnections
Description

Status quo:

ProcessConnectionConfigurationSets accepts the enumeration constant "ActionEstablishConnections", which will cause the CM to deploy PubSubConfiguration to the ACs in question "as-is", i.e. without modifying the Enabled flag of PubSub configuration elements.

This Action was introduced for the following reason:

1) Use-Case: A client may want to establish connections on an AC, but not enable all of them at once.

The interface on the AC (EstablishConnections) permits this use-case (establish all connections without setting the EnableCommunicationCmd bit, then selectively enable the connections in question using a 2nd call with that bit set).

The interface on the CM (ProcessConnectionConfigurationSets) allows this use-case only if multiple ConnectionConfigurationSets are used, e.g.: 10 connections shall be configured on AC1, but only 5 of them being enabled (with the other 5 possibly being enabled at a later point in time).
2 ConnectionConfigurationSets would have to be created, 1 that contains all connections that are supposed to be deployed and enabled, the other one with all connections that are supposed to be deployed only.
ProcessConnectionConfigurationSets would have to be called once with ActionEstablishConnectionsEnabled for the former, and once with ActionEstablishConnectionsDisabled for the latter.

Problem:

ActionEstablishConnections will apply PubSubConfiguration as-is, without modifying the Enabled flag of PubSub configuration elements.
Not specifying the initialization values for the Enabled flag, leads to undefined behavior on an AC, if the entity that generated the PubSubConfiguration sets these flags incorrectly (= not to the intention of the user).
This will be difficult to diagnose (and the error may manifest on any AC that is a communication partner of the AC with faulty PubSubConfiguration), since:

  • exposing the Part 14 information model is optional on the AC
  • exposing the applied PubSubConfiguration for a specific CCS is optional on the CM
  • Client/Server session upon calling EstablishConnections may be encrypted and network traces with clear-text data thus difficult to obtain.

Proposal:

1) Remove ActionEstablishConnections for release 1.00.00 completely.

Use-Case is solvable as described above. If vendors do not want to split CCS to enable this use-case, they may provide vendor-specific configuration information in the configuration that is deployed from the ET to the CM, to indicate which connections within a CCS shall only be deployed. They may then simply use the EstablishConnections interface on the AC to enable this use-case.

2) Specify this use-case in detail for C2D (e.g. by Kuka and other vendors who require this use-case), and add a corresponding interface in the CM IM for C2D.
The perceived use-case is tool-change on a robot, which is more of a C2D than C2C use-case.

Followup-Proposal:

If the above proposal is accepted, there is no more reason for EstablishConnections to accept PubSubConfiguration elements with the Enabled flag set to anything else than false.
The implementation of EstablishConnections shall thus create all PubSubConfiguration elements with the Enabled flag set to false. This does not cause additional implementation effort or a performance impact, since all passed PubSubConfigurationRef elements have to be iterated in any case.
Benefits:
1) Specified and certified initialization for the Enabled flag on each AC. Less potential for undefined behavior in the field.
2) Consistent behavior of the EstablishConnections interface: enabling of communication only via EnableCommunicationCmd.

TagsNo tags attached.

Activities

Paul Hunkar

2022-02-14 04:33

manager   ~0015999

Use case described in 1) does not take into account that none of the connection are to be create if any of them fails. ConnectionConfigurationSets are processed as a unit, so separating them into enable and not enable break this unit and could cause multiple other problems.

This option is one of three enumeration, it is the one that would be used by a knowledgeable configuration expert /well designed tool. This is not about an engineer making a mistake, there are many other mistakes an engineer could make, such as setting intervals incorrectly (keep alive vs handshake etc.) again a well designed engineering tool would prevent this - so we do not add code to AC or CM to to check or overwrite this.

If we are worried about being able to debug what configuration is pushed down - the simpler solution is to require CommunicationModelConfigurationType be exposed instead of leaving it as optional (this could be done in a profile, if not in the specification). Actually the more I look at this I think leaving it as optional is a mistake, and maybe your entire discussion on diagnostic would go away. I can actually think of many other diagnostic difficulties that could result if this is not exposed.

I think the additional interface does not help matter and I don't believe it is only a C2D issue, in the process world that are many case where communication is configured, but not enable until needed (for example in batch processing). [note enabling a single writer or reader is something that one can already do via the PubSub interfaces, if they are exposed, so again maybe the solution is to require that these interface be exposed, so that an application could enable communication or disable it as needed - i..e not just a connectionmanager.]

This issue can be discussed, but I would not change the numeration option, but if diagnostics is a major issue I would instead mandate the communicationconfiguration be exposed and optionally the PubSub configuration . I would also feel that this issue has been discussed for a long time when the enumeration was decided and revisiting that issue again, when no actual problem exist may be counter productive to getting the specification actually released, so the best solution is a "No Change Required"

David Puffer

2022-02-17 13:04

developer   ~0016036

Use case described in 1) does not take into account that none of the connection are to be create if any of them fails.
ConnectionConfigurationSets are processed as a unit, so separating them into enable and not enable break this unit and could cause multiple other problems.

Correct. And yet, this use-case has never been discussed in detail, and we may be even missing more requirements. It only came up when we discussed the value of the enabled flag for PubSub elements when we discovered that this use-case was not possible with the current CM interface.
There is also no written use-case / requirement / Mantis issue that I am aware of -> Even now, we may not know fully, what the requirements are exactly.
What we know is: As currently specified, this use-case make use of a feature that uses EstablishConnections() in a communication-model specific manner, rather than using the FX connection abstraction provided. Which may cause errors that are difficult to diagnose.
The use-case itself, does not seem to warrant having such an implementation in the field. I would rather add this feature in a subsequent version of the spec. The interface on the AC allows this use-case and it is only a matter of creating additional methods on the CM to make it possible.

Even considering that an automatic rollback for CCS that are split into multiple ones, will not work, this use-case could be solved for C2C MVS by other means:

1) An application (e.g. standard OPC UA client or vendor-specific tool) using the methods of the CM, may be aware of the requirement, that 2 distinct CCSs are supposed to be treated as 1 (e.g. the system integrator may know this) - and call CloseConnections(Remove = true) on both CCs, if 1 or both fail to establish.
2) For C2C MVS, the ET and CM are considered to come from the same vendor. It is a matter of making this kind of use-case configurable in a vendor's engineering tool. The CM may then use CM.ProcessConnectionConfigurationSets(ActionEstablishConnectionsDisabled, Ccs) and a subsequent AC.EstablishConnections(connectionsToEnable).
The interface on the CM was always meant to be used by external OPC UA Clients (the system integrator). A CM implementation that automatically establishes connections on startup, will probably use internal functions, rather than connecting to its own Server-interface and calling OPC UA Methods. So it is free to call AC.EstablishConnections(EnableCommunicationCmd) to support this use-case.

A subsequent version of the specification may solve this use-case like so:

1) Use existing method ProcessConnectionConfigurationSet(ActionEstablishConnectionsDisabled, Ccs) to establish all connections in the CCS in a disabled state, making use of potential rollback.
2) Subsequently use a newly defined method "ConnectionConfigurationSetType.Process(FxProcessEnum, connectionsInCcsToProcess)" -> this could even make use of the existing enum, since all of them are applicable to single connections as well.

This option is one of three enumeration, it is the one that would be used by a knowledgeable configuration expert /well designed tool.
This is not about an engineer making a mistake, there are many other mistakes an engineer could make, such as setting intervals incorrectly (keep alive vs handshake etc.) again a well designed engineering tool would prevent this - so we do not add code to AC or CM to to check or overwrite this.

The expert using the (engineering) tool may not be the same as the one using an OPC UA Client to call methods on the CM. This is not about relying that experts dont make mistakes. It is about avoiding the consequences if mistakes do happen despite experts using a system.
Considering that we can solve this use-case in a well-designed manner in a future version of the spec, and that work-arounds exist to solve it in the current one (see above), it seems counter-productive to realize this use-case as currently specified.

We may inquire at the FA/PA team and/or SC, WG Arch, about whether this use-case is important enough for C2C MVS to warrant potential problems in the field.

If we are worried about being able to debug what configuration is pushed down - the simpler solution is to require CommunicationModelConfigurationType be exposed instead of leaving it as optional (this could be done in a profile, if not in the specification). >Actually the more I look at this I think leaving it as optional is a mistake, and maybe your entire discussion on diagnostic would go away. I can actually think of many other diagnostic difficulties that could result if this is not exposed.

I support the proposal of making it mandatory to expose the PubSubConfiguration used, but if, then only as binary file that can be downloaded on demand (RAM). At least for B&R, RAM consumption in combination with OPC UA is an issue - we'd have to find a solution that does not require the whole file to be loaded into RAM upon download.
This solves the diagnostic issue, but it does not solve the potential for errors. It also does not solve, that EstablishConnections() is being used in 2 different ways to enable connections - via the abstraction of FX connections, and via the communication model directly. This is a design issue. Proper design from the start avoids incorrect usage and many potential problems that can occur otherwise. We may not even have the complete picture of the potential error cases yet.

I think the additional interface does not help matter and I don't believe it is only a C2D issue, in the process world that are many case where communication is configured, but not enable until needed (for example in batch processing).
[note enabling a single writer or reader is something that one can already do via the PubSub interfaces, if they are exposed, so again maybe the solution is to require that these interface be exposed, so that an application could enable communication or disable it as needed - i..e not just a connectionmanager.]

ad C2D vs C2C: If this is a use-case that must be solved for C2C, then there should be or should have been an explicit document requirement for it (I am not aware of one). As of now, we are discussing a use-case that has not been considered in the design, when we are already at the stage of an RC2. We should not sacrifice design for a use-case that was not considered from the beginning.
The additional interface I outlined above, should solve this use-case (we may discuss if you think it does not - but the point is: EstablishConnections() allows this use-case, so it is a matter of the interface on the CM side only, to support this as well) and can easily be added in a subsequent version of the spec.

This issue can be discussed, but I would not change the numeration option, but if diagnostics is a major issue I would instead mandate the communicationconfiguration be exposed and optionally the PubSub configuration . I would also feel that this issue has >been discussed for a long time when the enumeration was decided and revisiting that issue again, when no actual problem exist may be counter productive to getting the specification actually released, so the best solution is a "No Change Required"

I do not agree: members of the group have pointed out the problem / design issue with allowing this, from the time when this was first discussed.
If we have possibilities to solve this problem with vendor-specific work-arounds now and specify a technically well-designed a solution for v1.x, we should do that, rather than having a "specified" work-around.

I propose to remove this enum constant completely for v1.0, and extend the CM interface with the outlined Method (or something similar to be discussed) to solve this use-case in a subsequent version.
In addition I propose, that the Enabled flag for all new PubSubConfiguration elements (ElementAdd), shall be set by the AC, rather than the CM. This would have the added benefit, that even 3rd party Clients of EstablishConnections() would use the method according to how it was designed.

Paul Hunkar

2022-04-29 13:54

manager   ~0016658

Agreed to no changes to this issue

Paul Hunkar

2022-04-29 13:55

manager   ~0016659

reviewed in call - agreed to close this issue

Issue History

Date Modified Username Field Change
2022-02-10 13:46 David Puffer New Issue
2022-02-14 04:33 Paul Hunkar Note Added: 0015999
2022-02-17 13:04 David Puffer Note Added: 0016036
2022-04-29 13:54 Paul Hunkar Assigned To => Paul Hunkar
2022-04-29 13:54 Paul Hunkar Status new => resolved
2022-04-29 13:54 Paul Hunkar Resolution open => won't fix
2022-04-29 13:54 Paul Hunkar Note Added: 0016658
2022-04-29 13:55 Paul Hunkar Status resolved => closed
2022-04-29 13:55 Paul Hunkar Note Added: 0016659
2022-05-30 21:49 Paul Hunkar Target Version 1.00.00 Release =>