Clarification on ConfigurationMask Behavior in CloseAndUpdate Method|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Clarification on ConfigurationMask Behavior in CloseAndUpdate Method
Avatar
Sameer AL-Qadasi
Member
Members
Forum Posts: 5
Member Since:
03/01/2017
sp_UserOfflineSmall Offline
1
05/07/2025 - 03:01
sp_Permalink sp_Print

Hello all, I’m currently implementing the CloseAndUpdate method of PubSubConfigurationType (V1.05.04) and I’m facing some challenges in fully understanding the semantics of the ConfigurationMask of type PubSubConfigurationRefMask.

From what I gathered in the specification, the element operations behave as follows:

– ElementAdd: This applies only to the element itself. If the element has children (e.g., a PubSubConnection that contains a WriterGroup), the children are ignored and must be added in separate element operations. So ElementAdd on a PubSubConnection will add only the connection, not its WriterGroup.

– ElementMatch: This attempts to match an existing element and, if successful, adds its children (if the written configuration contains any). For example, using ElementMatch with a PubSubConnection that includes a WriterGroup (which itself includes a DataSetWriter) will match the PubSubConnection, and add both the WriterGroup and its DataSetWriter to the successfully matched PubSubConnection.

– ElementModify: behaves similarly to ElementAdd in that it only affects the element itself. Its children must be modified through separate operations.

– ElementRemove: this one is clear. It removes the element itself together with all its children.

From this, I currently understand the following:

– If I want to add an element without its children: use ElementAdd.

– If I want to add children to an existing element: use ElementMatch.

– If I want to add an element with its children: use a combination of ElementAdd and ElementMatch.

Could someone please confirm if this interpretation is correct, or clarify the intended behavior of these flags in the context of the CloseAndUpdate method?

Thank you for your support

Avatar
Matthias Damm
Moderator
Members

Moderators-Companion
Forum Posts: 11
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
05/08/2025 - 07:51
sp_Permalink sp_Print

Hello,

most of your understanding is right but I am not sure on the ElementMatch.

ElementMatch is just used to match an element in the passed configuration with an existing element. Children are not added automatically. You need to reference all children you want to add with the ElementAdd flag.

ElementMatch and ElementAdd can be combined for one element to either match or add the entry.

For pure PubSub configuration where the configuration client reads the existing configuration and is then doing add/modify/remove based on this existing configuration, the ElementMatch would not be used. The main use case is more or less a write only access through additional configuration interfaces like OPC UA FX connection establishment. In this case a DataSetReader and DataSetWriter is inserted into an existing configuration without reading the configuration. ElementMatch + ElementAdd is used in this case to either create or use a PubSubConnection.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Christian Burger
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1483
Posts: 5011