Skip to content

Commit

Permalink
handle UA_DataTypeKind_XmlElement (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
matkonnerth authored Nov 20, 2024
1 parent aba0fa4 commit f58c7e7
Show file tree
Hide file tree
Showing 4 changed files with 17,096 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backends/open62541/src/DataTypeImporter.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ typedef struct
char c;
UA_String member;
} TempString;

typedef struct
{
char c;
UA_XmlElement member;
} TempXmlElement;
typedef struct
{
char c;
Expand Down Expand Up @@ -231,6 +237,8 @@ static int getAlignment(const UA_DataType *type,
return offsetof(TempString, member);
case UA_DATATYPEKIND_BYTESTRING:
return offsetof(TempByteString, member);
case UA_DATATYPEKIND_XMLELEMENT:
return offsetof(TempXmlElement, member);
case UA_DATATYPEKIND_DATETIME:
return offsetof(TempDateTime, member);
case UA_DATATYPEKIND_EXPANDEDNODEID:
Expand Down
7 changes: 7 additions & 0 deletions backends/open62541/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ add_test(NAME issue_246_2_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_246_2 ${CMAKE_CURRENT_SOURCE_DIR}/issue_246_2.xml)

add_executable(issue_266 issue_266_testdata.c)
target_include_directories(issue_266 PRIVATE ${CHECK_INCLUDE_DIR})
target_link_libraries(issue_266 PRIVATE NodesetLoader open62541::open62541 ${CHECK_LIBRARIES} ${PTHREAD_LIB})
add_test(NAME issue_266_Test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND issue_266 ${CMAKE_CURRENT_SOURCE_DIR}/issue266_TestData.NodeSet2.xml)

if(${ENABLE_DATATYPEIMPORT_TEST})
add_subdirectory(dataTypeImport)
endif()
Expand Down
Loading

0 comments on commit f58c7e7

Please sign in to comment.