Issue with DeviceTypeBase with v1.8.5

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
Lafond
Hero Member
Hero Member
Posts: 26
Joined: 14 Oct 2008, 12:55

Issue with DeviceTypeBase with v1.8.5

Post by Lafond »

Hi
The new release of C++ SDK v1.8.5 as an issue with the OpcUaDi::DeviceType, this code was working with v1.8.3.

If I run this line:
device.setDeviceHealth (OpcUaDi::DeviceHealthEnumeration_NORMAL);

I got this error.
.../UA_SDK_1.8.5/src/uaserver/uaservercpp/coremodule/nodemanagerroot.cpp:3169: static OpcUa_Boolean NodeManagerRoot::isOfType(const OpcUa_Variant*, const UaNodeId&): Assertion `false' failed.

Knowing that:
OpcUa::BaseDataVariableType * deviceHealth; // type 6244 OpcUaDi::DeviceHealthEnumeration

void DeviceTypeBase::setDeviceHealth(OpcUaDi::DeviceHealthEnumeration DeviceHealth)
{
...
UaVariant value;
value.setInt32(DeviceHealth);
UaDataValue dataValue;
dataValue.setValue(value, OpcUa_True, OpcUa_True);
m_pDeviceHealth->setValue(NULL, dataValue, OpcUa_False);
}
Looks like there is a type mismatch between variant<int32> and dataValue expecting OpcUaDi::DeviceHealthEnumeration

maybe an automatic conversion was expected.
Thanks for your support

User avatar
Support Team
Hero Member
Hero Member
Posts: 3213
Joined: 18 Mar 2011, 15:09

Re: Issue with DeviceTypeBase with v1.8.5

Post by Support Team »

Hi,

this looks indeed like a bug in the code we have generated for the DI model.
We are working on a solution for it, probably need to re-generate with updated template.

Please contact support team via the contact form for getting patch/workaround.
Best regards
Unified Automation Support Team

Post Reply