feat(arch): Add lwip udp support

This commit is contained in:
Noel Graf 2025-02-21 14:28:33 +01:00
parent 385644b432
commit 5bd7ceb46d
4 changed files with 1418 additions and 2 deletions

View File

@ -1036,7 +1036,8 @@ if(UA_ARCHITECTURE_LWIP)
${PROJECT_SOURCE_DIR}/arch/common/eventloop_common.c
${PROJECT_SOURCE_DIR}/arch/lwip/eventloop_lwip.h
${PROJECT_SOURCE_DIR}/arch/lwip/eventloop_lwip.c
${PROJECT_SOURCE_DIR}/arch/lwip/eventloop_lwip_tcp.c)
${PROJECT_SOURCE_DIR}/arch/lwip/eventloop_lwip_tcp.c
${PROJECT_SOURCE_DIR}/arch/lwip/eventloop_lwip_udp.c)
endif()
if(UA_ARCHITECTURE_FREERTOS)

File diff suppressed because it is too large Load Diff

View File

@ -780,6 +780,9 @@ UA_EventLoop_new_LWIP(const UA_Logger *logger);
UA_EXPORT UA_ConnectionManager *
UA_ConnectionManager_new_LWIP_TCP(const UA_String eventSourceName);
UA_EXPORT UA_ConnectionManager *
UA_ConnectionManager_new_LWIP_UDP(const UA_String eventSourceName);
#endif
_UA_END_DECLS

View File

@ -314,7 +314,12 @@ setDefaultConfig(UA_ServerConfig *conf, UA_UInt16 portNumber) {
conf->eventLoop->registerEventSource(conf->eventLoop, (UA_EventSource *)tcpCM);
/* Add the UDP connection manager */
#if !defined(UA_ARCHITECTURE_ZEPHYR) && !defined(UA_ARCHITECTURE_LWIP)
#if defined(UA_ARCHITECTURE_LWIP)
UA_ConnectionManager *udpCM =
UA_ConnectionManager_new_LWIP_UDP(UA_STRING("udp connection manager"));
if(udpCM)
conf->eventLoop->registerEventSource(conf->eventLoop, (UA_EventSource *)udpCM);
#elif !defined(UA_ARCHITECTURE_ZEPHYR)
UA_ConnectionManager *udpCM =
UA_ConnectionManager_new_POSIX_UDP(UA_STRING("udp connection manager"));
if(udpCM)