open62541: Building EUROMAP 83 generated nodeset produces multiple 'incompatible types' errors
Description
Files from euromap.org for EUROMAP 83, after generation to .c/.h generates ‘incompatible types’ errors
Background Information / Reproduction Steps
Download files from http://www.euromap.org/en/euromap83/ Use UAModeler to generate .bsd files generate nodeset code using nodeset_compiler.py, generate_datatypes.py Upon make, get following output: `$ make [ 11%] Building C object CMakeFiles/opcua_server.dir/open62541_generated/ua_namespace_euromap83.c.o /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c: In function ‘function_ua_namespace_euromap83_276_begin’: /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c:9907:78: error: incompatible types when assigning to type ‘size_t {aka unsigned int}’ from type ‘UA_String {aka struct <anonymous>}’ ode_ns_2_i_6104_ProductionDatasetInformationType_0->productNameSize = UA_STRING(“”); ^ /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c: In function ‘function_ua_namespace_euromap83_378_begin’: /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c:13720:78: error: incompatible types when assigning to type ‘size_t {aka unsigned int}’ from type ‘UA_String {aka struct <anonymous>}’ ode_ns_2_i_6136_ProductionDatasetInformationType_0->productNameSize = UA_STRING(“”); ^ /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c: In function ‘function_ua_namespace_euromap83_502_begin’: /home/mmtools/workspace/euromap77a_open62541/open62541_generated/ua_namespace_euromap83.c:18462:78: error: incompatible types when assigning to type ‘size_t {aka unsigned int}’ from type ‘UA_String {aka struct <anonymous>}’ ode_ns_2_i_6276_ProductionDatasetInformationType_0->productNameSize = UA_STRING(“”); ^ CMakeFiles/opcua_server.dir/build.make:114: recipe for target ‘CMakeFiles/opcua_server.dir/open62541_generated/ua_namespace_euromap83.c.o’ failed
make[2]: *** [CMakeFiles/opcua_server.dir/open62541_generated/ua_namespace_euromap83.c.o] Error 1 CMakeFiles/Makefile2:72: recipe for target ‘CMakeFiles/opcua_server.dir/all’ failed make[1]: *** [CMakeFiles/opcua_server.dir/all] Error 2 Makefile:83: recipe for target ‘all’ failed make: *** [all] Error 2`
Checklist
Branch: master Commit Id: 45ca322125c3eb669705070d177f65d1d4f8cebe Linux MMLCA1-5509 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux gen_euromap77a.bash.txt CMakeLists.txt open62541_generated.zip Please provide the following information:
- open62541 Version (release number or git tag):
- Other OPC UA SDKs used (client or server):
- Operating system:
- Logs (with
UA_LOGLEVEL
set as low as necessary) attached - Wireshark network dump attached
- Self-contained code example attached
- Critical issue
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (10 by maintainers)
Hallo Götz, das sind wir
jw at datatroniq.com
(schreib gerne jederzeit) - EuropMap83 verwenden wir allerdings (noch) nicht produktiv - wir wollten vor allem schauen, ob es klappt verschiedene Specs dynamisch nachzuladen, insbesondere auch welche, die einigermaßen komplex sind.@GoetzGoerisch I found that problem was with
NAMESPACE_MAP
. When I provided correct value (starting from 2) error gone.The issue here is that EUInformation is from the NS0 Types. This means that you also need to import that types.bsd file while working with the Euromap bsd.
I improved the error message and added the possibility to do this via the generate_namespace_and_datatypes macro. See: #3314
And here is an example that works for me: https://github.com/Pro/open62541/tree/example/euromap77