Unable to compile UAModeler generated code

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
brandt
Jr. Member
Jr. Member
Posts: 2
Joined: 15 Feb 2013, 09:22

Unable to compile UAModeler generated code

Post by brandt »

Hi,
I can't compile the code generated by the UA Modeler for the ANSI C server SDK.

UA Modeler 1.2.0 214
generated model for ANSI C Server 1.3
ANSI C SDK 1.3.0.225

Problems:
Camel case errors
g_UaProvidercsrv1_uNamespaceIndex1 vs. g_UaProviderCsrv1_uNamespaceIndex1
g_pcsrv1Provider vs. g_pCsrv1Provider
g_pcsrv1ProviderCBInterface ...

OPCUA_BEGIN_EXTERN_C
is used in uaprovider_csrv1.c, but no
OPCUA_END_EXTERN_C
(only a problem if compiled as c++)

When types are defined, the following includes are used in
uaprovider_<project>_types_1.c:
#include <opcua_encoder.h>
#include <opcua_decoder.h>
The do not exist in the SDK.

OpcUa_Encoder seems to be _OpcUa_Encoder
Double seems to be OpcUa_Double

Far too many instances of these problems to compile the server.

Yours,
Sebastian

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

Re: Unable to compile UAModeler generated code

Post by Support Team »

Hello Sebastian,

could you please send your project files to us (support@unifiedautomation.com)?

Best regards
Unified Automation Support Team

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

Re: Unable to compile UAModeler generated code

Post by Support Team »

Camel case errors
g_UaProvidercsrv1_uNamespaceIndex1 vs. g_UaProviderCsrv1_uNamespaceIndex1
g_pcsrv1Provider vs. g_pCsrv1Provider
g_pcsrv1ProviderCBInterface ...
This is a very rare error. This error occurs only if you name your provider beginning with a lower case letter. If the provider name starts with a capital letter, everything works fine. The problem will be fixed in UaModeler 1.3.
OPCUA_BEGIN_EXTERN_C
is used in uaprovider_csrv1.c, but no
OPCUA_END_EXTERN_C
Thanks for reporting this. The compilers used during our tests never encountered a problem. You can add this line of code by hand. The file will not be generated again so this manual fix will remain. The problem will be fixed in UaModeler 1.3.
#include <opcua_encoder.h>
#include <opcua_decoder.h>
The do not exist in the SDK.
This is correct. These files are not part of the evaluation SDK. The source version contains these files. The files are only required if you generate code for custom structured data types. If you do not have a source license, you can request the files at support@unified-automation.com. The missing file will be added in the next release of the evaluation version of the SDK.

Best regards,
Unified Automation Support Team

Post Reply