From f97a0025434679162acd8b646429d5331837b028 Mon Sep 17 00:00:00 2001 From: "nikolai.shipilov" Date: Wed, 10 Jun 2026 11:21:02 +0200 Subject: [PATCH 1/2] Filter-out duplicating method-properties - Skip property creation for default methods of input ports and servers - Clear error info after detecting property duplicate --- .../opcuatms_client/objects/tms_client_property_object_impl.h | 3 +++ .../src/objects/tms_client_property_object_impl.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/libraries/opcuatms/opcuatms_client/include/opcuatms_client/objects/tms_client_property_object_impl.h b/shared/libraries/opcuatms/opcuatms_client/include/opcuatms_client/objects/tms_client_property_object_impl.h index c8f081f..ac81ab4 100644 --- a/shared/libraries/opcuatms/opcuatms_client/include/opcuatms_client/objects/tms_client_property_object_impl.h +++ b/shared/libraries/opcuatms/opcuatms_client/include/opcuatms_client/objects/tms_client_property_object_impl.h @@ -82,6 +82,7 @@ class TmsClientPropertyObjectBaseImpl : public TmsClientObjectImpl, public Impl : TmsClientObjectImpl(ctx, clientContext, nodeId) , Impl(ctx, parent, localId) , propBrowseName(propBrowseName) + , defaultMethodsNames({"Connect", "Disconnect"}) { init(); } @@ -126,6 +127,7 @@ class TmsClientPropertyObjectBaseImpl : public TmsClientObjectImpl, public Impl : TmsClientObjectImpl(ctx, clientContext, nodeId) , Impl(localId, nullptr, parentDevice, ctx, parent) , propBrowseName(propBrowseName) + , defaultMethodsNames({"EnableDiscovery", "DisableDiscovery"}) { init(); } @@ -160,6 +162,7 @@ class TmsClientPropertyObjectBaseImpl : public TmsClientObjectImpl, public Impl std::map propBrowseName; opcua::OpcUaNodeId methodParentNodeId; LoggerComponentPtr loggerComponent; + const std::unordered_set defaultMethodsNames{}; ErrCode setOPCUAPropertyValueInternal(IString* propertyName, IBaseObject* value, bool protectedWrite); void addProperties(const OpcUaNodeId& parentId, diff --git a/shared/libraries/opcuatms/opcuatms_client/src/objects/tms_client_property_object_impl.cpp b/shared/libraries/opcuatms/opcuatms_client/src/objects/tms_client_property_object_impl.cpp index b886f08..00c137e 100644 --- a/shared/libraries/opcuatms/opcuatms_client/src/objects/tms_client_property_object_impl.cpp +++ b/shared/libraries/opcuatms/opcuatms_client/src/objects/tms_client_property_object_impl.cpp @@ -642,6 +642,8 @@ void TmsClientPropertyObjectBaseImpl::browseRawProperties() auto ec = Impl::addProperty(prop); if (ec != OPENDAQ_ERR_ALREADYEXISTS) return ec; + else + daqClearErrorInfo(); LOG_W("OPC UA exposes two properties with the same name \"{}\". The duplicate property will be ignored.", prop.getName()) return OPENDAQ_SUCCESS; }; @@ -674,7 +676,7 @@ void TmsClientPropertyObjectBaseImpl::setLocksForAttributes() template bool TmsClientPropertyObjectBaseImpl::isIgnoredMethodProperty(const std::string& browseName) { - return browseName == "BeginUpdate" || browseName == "EndUpdate" || browseName == "GetErrorInformation"; + return browseName == "BeginUpdate" || browseName == "EndUpdate" || browseName == "GetErrorInformation" || defaultMethodsNames.count(browseName) != 0; } template From 41c46d73bc8996e61a93310170cfc6b821821814 Mon Sep 17 00:00:00 2001 From: "nikolai.shipilov" Date: Thu, 11 Jun 2026 09:02:42 +0200 Subject: [PATCH 2/2] Update changelog and bump version to 4.0.1 --- changelog/changelog | 1 + module_version | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/changelog b/changelog/changelog index 1d8f725..0877303 100644 --- a/changelog/changelog +++ b/changelog/changelog @@ -5,6 +5,7 @@ ## Bug fixes +- [#32](https://github.com/openDAQ/OpcUaModules/pull/32) Filter-out duplicating method-properties. - [#9](https://github.com/openDAQ/OpcUaModules/pull/9) Fix appending dependent boost components. ## Documenation diff --git a/module_version b/module_version index 0c89fc9..cc868b6 100644 --- a/module_version +++ b/module_version @@ -1 +1 @@ -4.0.0 \ No newline at end of file +4.0.1 \ No newline at end of file