Page 1 of 1

DataTypeEncoding

Posted: 05 Jul 2013, 15:20
by sandeepraj
Hi,

Can someone explain in detaila about the DataTypeEncoding, default binary & default xml ?
Can i use the HistoryReadResult->HistoryData.Body.Binary.Data in order to get the actual "value" of the node ? If so how is this different from HistoryReadResult->HistoryData.Body.Xml.Data ?

-Sandeep

Re: DataTypeEncoding

Posted: 11 Jul 2013, 16:21
by Support Team
Hi,

depending on the Encoding member of the ExtensionObject, one of the elements of the Body union of the ExtensionObject is set (Body.Binary, Body.Xml or Body.EncodeableObject).

For types that are known to the UaStack (e.g. OpcUa_HistoryData), the value is deserialized automatically and will be stored in Body.EncodeableObject, with Body.EncodeableObject.Type pointing to the according OpcUa_EncodeableType. In this case, Body.EncodeableObject.Object is a pointer to the deserialized structure.

Please refer to the examples of our SDKs to find sample uses of ExtensionObjects. For details and uses of dataEncoding, please refer to the UA specification, especially parts 4 and 6.

Best Regards,
Unified Automation Support Team

Re: DataTypeEncoding

Posted: 12 Jul 2013, 11:43
by sandeepraj
Hi,

Many thanks for the reply !
I have another query, related to the extension object. Currently my implementation is in C++ and I see that in UA SDK the implementation for C#(extension object and other encodeable type objects) is different compared to C++.
Any pointer on how to proceed ?

Re: DataTypeEncoding

Posted: 19 Jul 2013, 14:28
by Support Team
Hi,

Extension object handling is definitely different in different programming languages and for SDKs / Stacks. The general OPC UA logic should be the same but coding and helper support may be completely different.

Best Regards,
Unified Automation Support Team