Handling structure DataTypes

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

Moderator: uasdkc

Post Reply
nemethz
Sr. Member
Sr. Member
Posts: 13
Joined: 14 Mar 2017, 09:10

Handling structure DataTypes

Post by nemethz »

Hi,

Due to the integration of production lines with new technology into our systems, I need to expand the management of data by dynamically managing different types of ExtensionObjects.
I'm looking for example codes for this and so far I've found this: https://documentation.unified-automation.com/uasdkc/1.10.0/html/client_structure_datatypes.html.

This example does not work because the functions in the uastack\utilities modules are not exported into the uastack ddl because the function declarations are missing the OPCUA_EXPORT definition. If I fix this, the sample code can be linked and works the static decoding.

Well, I would be interested in what the sample code does not cover - see the comment in. How to use the TypeID, how to get the type definition from the server and how to decode the data inside the ExtensionObject based on that.

Do you have a complete sample code or any specific suggestions for this?

Thanks
Zoltan Nemeth

ANSI C Based OPC UA Client, 1.10

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

Re: Handling structure DataTypes

Post by Support Team »

Hi,

yes that is correct, the given code in the documentation is "pseudo" code to demonstrate the general approach, but not meant to be complete. The export into the stack dll is not our intention here and is not required. The "simplified" decoder is just a convinience, hence ended up in the "utilities".
You may want to copy the code into your application to make it work and link without touching the stack.dll.

We have already some requests for creating a better example, and we have that in the backlog already.
Best regards
Unified Automation Support Team

nemethz
Sr. Member
Sr. Member
Posts: 13
Joined: 14 Mar 2017, 09:10

Re: Handling structure DataTypes

Post by nemethz »

Hi,

Great, I'm looking forward to it.

In the meantime, can you give a brief help on how to read the data type using the c library, e.g. how the UaExpert does it.
What are the steps and how to do this: "TypeCache: Reading type info of NodeId NS... succeeded" in UaExpert
It's probably my fault, but I haven't been able to find a usable description and sample of this for days.

Regards
Zoltán Németh

nemethz
Sr. Member
Sr. Member
Posts: 13
Joined: 14 Mar 2017, 09:10

Re: Handling structure DataTypes

Post by nemethz »

Hi,

Great, I'm looking forward to it.

In the meantime, can you give a brief help on how to read the data type using the c library, e.g. how the UaExpert does it.
What are the steps and how to do this: "TypeCache: Reading type info of NodeId NS... succeeded" in UaExpert
It's probably my fault, but I haven't been able to find a usable description and sample of this for days.

Regards
Zoltán Németh

Post Reply