View Issue Details

IDProjectCategoryView StatusLast Update
0007711Part 81: UAFX Connecting Devices and Information Model [sg.BaseFacet]Specpublic2022-05-30 22:41
ReporterDavid Puffer Assigned ToGeorg Biehler  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.00.00 RC2 
Target Version1.00.00 RC3Fixed in Version1.00.00 RC3 
Summary0007711: Init-Values for "Enabled" flag
Description

Status Quo:

6.7.4.3.1 states: "Calling ProcessConnectionConfigurationSets with Action set to ActionEstablishConnectionsEnabled shall establish all logical connections contained in the ConnectionConfigurationSets with a disabled communication model and include EnableCommunicationCmd in the command sequence. A disabled communication model has all enabled flag set to False for all DataSetReader and DataSetWriter configuration elements and all other objects have enabled flag set to True (WriterGroup, ReaderGroup, PubSubConnection, and PublishSubscribe)."

Problem description:

It has been discussed in a call, whether to set all elements of the PubSubConfiguration to Disabled, or only the DataSetWriters and DataSetReaders. It was decided to only set DataSetWriters and DataSetReaders to false, because that would reliably prevent (in the non-error case) unexpected publication.
In the error case (bit-flip) it was perceived, that having the parent objects enabled, would ease diagnostics: only the DataSetWriters and DataSetReaders would have to be evaluated for an "incorrect" value of the Enabled flag, because publication could only happen if one of the DataSetWriters' Enabled flags flipped.

1) While this may be true, in order for unexpected publication to occur, it suffices that a single bit flips if the parent objects are enabled and only DataSetWriters are disabled.
On the other hand, if all objects are disabled, unexpected publication can only occur if a total of 3 bits flip (Writer, WriterGroup, Connection).
The probability for unexpected publication is thus higher, if WriterGroups and Connections are enabled.

2) The error case of unexpected non-publication, is irrelevant: Even if an Enabled flag is incorrectly set to false by a CM, it will be set to true by a subsequent "EnableCommunicationCmd".
This does not apply to using a PubSubConfiguration "as-is" (Action EstablishConnections). But this use-case assumes that the Enabled flag is anyways set by the entity creating the configuration.

3) Setting Connections and WriterGroups to Enabled = true is a problem in the implementation of EstablishConnections in case a NetworkMessage consists of > 1 DataSetWriter ("aggregation"):

Implementing the "EnableCommunicationCmd" involves enabling all DataSetWriters and DataSetReaders one-by-one. For DataSetWriters this would mean, that enabling the first DataSetWriter would already trigger publication of a NetworkMessage: using the periodic fixed layout, a NetworkMessage with the full size would be generated, in which all disabled DataSetMessages are set to invalid. Using the dynamic layout, the NetworkMessage would grow in size while DataSetWriters are being enabled.
An implementation of EstablishConnections would have to explicitly disable a WriterGroup before iterating and enabling all its associated DataSetWriters, in order to avoid the above scenario.

Proposal:

All elements in the passed PubSubConfiguration shall be disabled.
Since the implementation of EstablishConnections is only adding new PubSub elements, but not modifying existing ones, it cannot happen, that existing elements are disabled accidentally.
Setting all elements to disabled, reduces the probability of unexpected publication.
Setting all elements to disabled, avoids that the implementation has to disable parent elements with multiple DataSetWriters underneath, before processing the EnableCommunicationCmd.
Also, there does not seem to be a major diagnostic disadvantage: If an AC is publishing, although all elements were disabled, then that means, that the corresponding DataSetWriter(s) + all parent objects must have been incorrectly enabled. This is not more complex to diagnose.

TagsNo tags attached.

Activities

Paul Hunkar

2022-02-14 04:45

manager   ~0016000

Having other flags as disable, complicate and would require much more of a set of rules to ensure that a configuration that has multiple writer in a single group or where multiple groups are on a connection still work. The connection and group could be enable by other ConnectionConfigurationSet, this proposal does not take this into account.

the publishing of one writer is a group with multiple writer is clearly defined in the specification and no subscriber should have any issues with it. All logic is based on the reader or writer, so the text as 3) make no sense, trying to attribute a problem to something that is just normal behaviour required behaviour.

Also this clause is under discussion "Since the implementation of EstablishConnections is only adding new PubSub elements, but not modifying existing ones, it cannot happen, that existing elements are disabled accidentally." since we think we have identified cases where modification is actually required - this would be covered in a separate Mantis issue.

My recommendation is the this issue as stated be a "No change required"

David Puffer

2022-02-17 11:08

developer   ~0016035

Having other flags as disable, complicate and would require much more of a set of rules to ensure that a configuration that has multiple writer in a single group or where multiple groups are on a connection still work.
The connection and group could be enable by >other ConnectionConfigurationSet, this proposal does not take this into account.

This statement is unclear to me. Currently Part 81 states, that the implementation of "EnableCommunicationCmd" shall enable all Readers/Writers of the corresponding FX Connection, and all parent elements of these Readers/Writers.
No additional rules are required, and the specification already contains this statement.
The use-case under discussion is the creation (ElementAdd) of new Readers, Writers, ReaderGroups and WriterGroups or matching existing ones. If one of these elements already exists (ElementMatch), the value of its enabled flag will not be changed. If it does not exist, it will be newly created in a disabled state.

Quote from Part 14:

"ElementMatch: If this bit is set, the Id and name are null and a matching element is searched. This is used to add children to an existing parent configuration object. This flag can be combined with the ElementAdd flag to either use an existing element or to add the element if it does not exist."

Multiple Writers in a single group and multiple Groups under a connection: an implementation enables all parent elements, which is existing specification content.

the publishing of one writer is a group with multiple writer is clearly defined in the specification and no subscriber should have any issues with it.
All logic is based on the reader or writer, so the text as 3) make no sense, trying to attribute a problem to something that is just normal behaviour required behaviour.

There are actually 2 real issues with having only Readers and Writers set to false:

3a) Use-Case: FXConnection1 and FxConnection2 share a NetworkMessage. FXConnection1 and FxConnection2 are established in 2 separate calls (the problem occurs even if only 1 call with 2 connections is used) to EstablishConnections (e.g. AC only supports 1 element in the array). An "EnableCommunicationCmd" is sent in a 3rd call (since the NetworkMessage is shared, enabling each FxConnection in their respective setup calls will not work).
The first call will set up PubSubConnection1, WriterGroup1 and Writer1. Will the AC already publish with the valid flag in the DataSetMessageHeader set to false (I do not think it will, the PubSub implementation cannot "know", that Writer1 will remain the only Writer)? If yes, the size of the NetworkMessage will be calculated to accomodate the data of Writer1.
The second call will match PubSubConnection1 and WriterGroup1 and add Writer2: even if the valid flag in the DataSetMessageHeader for Writer2 is set to invalid, the size of the NetworkMessage will now have to change, in order to accomodate the data of Writer2. All of this already happens before even processing the "EnableCommunicationCmd"!

3b) Invalid DataSetMessages in NetworkMessages are a standard use-case in PubSub and every Subscriber is capable of dealing with this. The same applies for growing NetworkMessages in case of using the dynamic layout.
Yet, it seems counter-productive on connection establishment, to let the timing of the Publisher (enabling the Writers) be reflected on the Subscriber(s). This is introducing an unnecessary dependency - it can easily be avoided (without added complexitiy) by creating all new PubSub elements in a disabled state.

Also this clause is under discussion "Since the implementation of EstablishConnections is only adding new PubSub elements, but not modifying existing ones, it cannot happen, that existing elements are disabled accidentally." since we >think we have identified cases where modification is actually required - this would be covered in a separate Mantis issue.

The clause states "...disabled accidentally". And it holds true, regardless of whether we introduce support for ElementModify in a future version. ElementAdd will only add new elements. And ElementMatch will only "match" existing elements, but not modify them. ElementModify is an explicit request to modify and no accidental modification.
Even if we allow ElementModify in the future, that has no impact on the decision of the value of the Enabled flag of elements that are added using "ElementAdd".

Side-Note: I think a discussion is needed about the use-case that makes it necessary to introduce "modify" capability before we think about how we make that feature available.
I for one, dont see this as a very significant real-world use-case. This is a new requirement and we should think well before we extend a method that was designed to create new connections, to also modify existing ones. EstablishConnections is already complex.

Georg Biehler

2022-02-23 07:09

developer   ~0016072

Conclusion of discussion between Matthias / David / Georg​

Use-Case „> 1 Writer/WG“ supported with status quo:​
 Adding disabled Writers below an enabled WG will not lead to publication of a NetworkMessage​
 WG will only start publishing if at least 1 Writer was enabled​

Multiple calls to EstablishConnection() (each adding one or more Writers to the same WG) will thus not lead to a change in size of the NetworkMessage (which would otherwise be problematic for „Multiple FX connections per NetworkMessage“).​

Proposal:​
Extend EstablishConnections description to mandate that additions/change of state (enable/disable) / [future modify] to the PubSub configuration have to be done „atomically“.​
E.g.: a Client calling EstablishConnections() to enable 2 FX connections that are transported in a single NetworkMessage, will receive 2 valid DataSetMessages in the first NetworkMessage, rather than observing these 2 DataSetMessages being enabled sequentially.​

Proposal:​
Insert informal note into EstablishConnections() why top-level PubSub connections and WriterGroups have to be enabled upon processing the EnableCommunicationCmd (that is: because these elements could have been created outside FX).​

Georg Biehler

2022-02-23 07:10

developer   ~0016073

Agreed in team meeting 2022-02-22 to add the proposals to the specification

Georg Biehler

2022-02-23 08:14

developer   ~0016074

Updated the specification according to the proposals.

Paul Hunkar

2022-03-25 13:30

manager   ~0016454

Reviewed changes in call, agreed to text updates and closed issue

Issue History

Date Modified Username Field Change
2022-02-09 15:30 David Puffer New Issue
2022-02-14 04:45 Paul Hunkar Note Added: 0016000
2022-02-17 11:08 David Puffer Note Added: 0016035
2022-02-22 15:24 Paul Hunkar Assigned To => Georg Biehler
2022-02-22 15:24 Paul Hunkar Status new => assigned
2022-02-23 07:09 Georg Biehler Note Added: 0016072
2022-02-23 07:10 Georg Biehler Note Added: 0016073
2022-02-23 08:14 Georg Biehler Status assigned => resolved
2022-02-23 08:14 Georg Biehler Resolution open => fixed
2022-02-23 08:14 Georg Biehler Note Added: 0016074
2022-03-25 13:30 Paul Hunkar Status resolved => closed
2022-03-25 13:30 Paul Hunkar Fixed in Version => 1.00.00 Release
2022-03-25 13:30 Paul Hunkar Note Added: 0016454
2022-05-30 22:41 Paul Hunkar Fixed in Version 1.00.00 Release => 1.00.00 RC3
2022-05-30 22:41 Paul Hunkar Target Version 1.00.00 => 1.00.00 RC3