Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion module_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class TmsClientPropertyObjectBaseImpl : public TmsClientObjectImpl, public Impl
: TmsClientObjectImpl(ctx, clientContext, nodeId)
, Impl(ctx, parent, localId)
, propBrowseName(propBrowseName)
, defaultMethodsNames({"Connect", "Disconnect"})
{
init();
}
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -160,6 +162,7 @@ class TmsClientPropertyObjectBaseImpl : public TmsClientObjectImpl, public Impl
std::map<std::string, std::string> propBrowseName;
opcua::OpcUaNodeId methodParentNodeId;
LoggerComponentPtr loggerComponent;
const std::unordered_set<std::string> defaultMethodsNames{};

ErrCode setOPCUAPropertyValueInternal(IString* propertyName, IBaseObject* value, bool protectedWrite);
void addProperties(const OpcUaNodeId& parentId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,8 @@ void TmsClientPropertyObjectBaseImpl<Impl>::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;
};
Expand Down Expand Up @@ -674,7 +676,7 @@ void TmsClientPropertyObjectBaseImpl<Impl>::setLocksForAttributes()
template <class Impl>
bool TmsClientPropertyObjectBaseImpl<Impl>::isIgnoredMethodProperty(const std::string& browseName)
{
return browseName == "BeginUpdate" || browseName == "EndUpdate" || browseName == "GetErrorInformation";
return browseName == "BeginUpdate" || browseName == "EndUpdate" || browseName == "GetErrorInformation" || defaultMethodsNames.count(browseName) != 0;
}

template <class Impl>
Expand Down
Loading