问题标签 [open62541]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
179 浏览

c - 如何在 uaexpert 中查看添加的 open62541 参数?

我在这里发布这个是因为我确信这不是一个错误,它只是我的测试配置没有正确设置,但我无法指出我做错了什么。

我安装单个文件版本: https ://open62541.org/releases/

连同 open62541 的构建环境,然后构建并运行本教程: https ://github.com/open62541/open62541/blob/master/examples/tutorial_server_variable.c

使用这些命令:

但是,当我通过匿名登录与 UA 专家联系时,我无法看到每个示例中添加的任何变量。我确实看到并且能够订阅几个默认服务器参数。非常感谢任何可以解释为什么我没有看到变量的人。我相信它们应该出现在左窗格导航器的“对象”文件夹下。 ua专家截图 ua 专家是版本 1.4.4 275

这是服务器的控制台输出:

0 投票
1 回答
385 浏览

opc - UA_STATUSCODE_BADINTERNALERROR 连接时使用用户名和密码安全模式 = NONE 和安全策略 = NONE

我编写了一个 OPC UA 客户端,我正在使用 ProSys OPC UA Simulator Server 对其进行测试。我的客户端以匿名模式运行,我可以浏览服务器。但是,当我将客户端配置为使用用户名和密码时,它会失败,并没有为可能的端点找到合适的 UserTokenPolicy。我已经对其进行了调试,似乎http://opcfoundation.org/UA/Se.....olicy#None不在端点 userIdentityTokens 数组中,尽管在 ProSys 中它声明它是。

我在 OPC UA Simulator 用户名和密码框中设置了一个用户 安全模式 = 无 安全策略 = 没有被勾选

服务器端点安全模式列表=无安全策略=无所以我希望在 userIdentityTokens 数组中看到它。

我的客户端是使用 Open62541 库编写的

任何帮助,将不胜感激。

谢谢

0 投票
0 回答
95 浏览

c - 在调试环境中使用 Open62541 构建简单服务器

我参考此页面提供的文档,使用 open62541 架构构建了一个服务器 。命令提示符的以下输入gcc -std=c99 open62541.c myServer.c -lws2_32 -o myServer.exe生成可执行文件。该架构仅兼容 std c99 库,-lws2_32必须在命令中添加对 Winsock 库的引用,否则将不会生成可执行文件并产生链接器错误。 文件夹结构

我成功地使用命令提示符生成可执行文件,现在我想使用应用程序“Visual Studio”/“Codeblocks”做同样的事情(生成服务器程序可执行文件),因为我想调试程序。

如何为 Visual Studio/Codeblocks 的编译器提供输入以明确包含 std c99 和 Winsock 库?是否有人成功迁移 open62541 以调试环境?

0 投票
1 回答
85 浏览

opc-ua - Open62541 包含对象数组的对象:OptionalPlaceholder 和 HasOrderedComponent 参考

我一直在寻找有关如何面对我要解释的问题的信息,但不幸的是我无法解决它。

我想创建一个ObjectType ProgrammType 的对象程序,其中包含 ObjectType CommandType的实例数组。Programm对象中这些命令对象的顺序是相关的。

我正在使用 ModelDesign XML 文件来创建信息模型。关于我想要实现的信息建模,我已经看到有可能在ProgrammType定义中使用 ModellingRule“OptionalPlaceholder”,尽管说实话,这个 ModellingRule 的用法对我来说并不完全清楚。

所以到目前为止我所做的是将带有 ModellingRule “OptionalPlaceholder”的“CommandType”类型的对象作为子对象添加到ProgrammType定义中。然后,在实例化部分,我正在创建Command对象,最后我使用Programm对象中的“HasOrderedComponent”来引用它们。我不确定这种方法是否真的有意义,它是否利用了先前在ProgrammType定义中定义的“OptionalPlaceholder”。如果这不是他们正确的做法,请让我知道应该如何做。

据我了解,“HasOrderedComponent”引用意味着服务器始终以相同的顺序返回元素。

我从 ModelDesign XML 文件生成 UANodeSet XML 文件,然后我正在使用这个 NodeSet 创建一个 Open62541 服务器。

所以我的问题是:

1.) 我的建模方法对吗?有没有更好的方法来建模我在开始时描述的内容?

2.) 当我从基于 Open62541 的客户端检索时,在 Open62541 服务器的Programm对象中使用“HasOrderedComponent”引用的命令。

  • 可以预测它们会按什么顺序出现吗?或者返回的顺序总是一样的,但是这个顺序不能设置。
  • 它们会按照在 ModelDesign 文件中定义的顺序返回吗?
  • 如果我从我编写的“手动”代码创建节点。命令的返回顺序是在我的代码中添加引用的顺序吗?

非常感谢您!顺便说一句,一旦我成功地对我正在做的工作进行建模,我就可以准备一个关于如何在 OPC UA 中建模的详细说明,如果您认为它可能相关,可以使用它来扩展 Open62541 文档。

此致

0 投票
1 回答
191 浏览

multicast - OPC UA 组播发现

我是 OPC UA 的初学者,正在探索规范第 12 部分中提到的发现机制。我有几个疑问。

  1. 在组播扩展发现中,服务器向其本地发现服务器(LDS ME)注册,当客户端向其LDS-ME注册时,客户端LDS-ME发出组播探测,服务器端LDS-ME响应带有公告,从而允许客户端知道网络中的服务器列表。我的问题是,为什么这个过程被称为多播探测和多播公告。因为根据 mDNS 规范,探测和公告最初用于确保资源记录的唯一所有权。任何人都可以告诉我为什么它被称为探测和宣布?

  2. 在 open62541 堆栈中,使用发现示例,运行 server_lds.c,我收到一条日志消息“多播 DNS:出站接口 0.0.0.0,这意味着使用了第一个操作系统接口(您可以使用显式设置接口) 'discovery.mdnsInterfaceIP' 配置参数)”。现在理论说多播 dns IP 应该是 224.0.0.251: 5353 为什么它被设置为 0.0.0.0?有人可以告诉我吗?

问候, 罗山

0 投票
0 回答
139 浏览

c++ - CMake 链接到 C++ 第三方库 (open62541)

经过数小时的互联网研究以寻求解决方案(我知道有一些类似的问题,但没有任何帮助),我差点认输,因此非常感谢您的帮助

初步:我想将 C99 库open62541用于我自己的 C++ 项目。我为 PubSub 使用了足够的构建选项,因为这是我最感兴趣的。我还将安装路径配置为/home/user/install/open62541.

问题描述:起初我能够使用这个CMakeLists.txt构建所有内容。但目前我尝试将 open62541 的订阅功能添加到项目中,但 CMake 拒绝将库链接到项目中,因为它应该:

  • 我将此示例代码从教程复制到项目中,add_executable(subscriber ${CMAKE_CURRENT_SOURCE_DIR}/tutorial_pubsub_subscribe.cpp)并添加target_link_libraries(subscriber PUBLIC open62541)到我的CMakeLists.txt中。
  • CMake 抱怨以下问题:undefined reference to 'UA_PubSubConnection_regist'
  • 然后我去我的安装路径的 lib 文件夹找到libopen62541.so
  • 使用 nm 命令检查共享对象nm libopen62541.so | grep UA_PubSubConnection_regist
  • nm 返回 "t",

所以我想 open62541 的构建不能是链接错误的原因。

0 投票
2 回答
111 浏览

c - 来自 Ua_Variant 的 C 类型转换

我试图了解类型转换在以下代码中的作用

这是 UA_Variant 的结构

这条线发生了什么

是否将 Variant 中的数据类型转换为 int32_t 然后将其指针放入变量中,如果是这样,为什么我可以打印出存储在变量中的值?

0 投票
1 回答
360 浏览

c - 使用 Open62541 的 OPC UA 客户端服务器连接

我在将 Raspberry Pi 上的客户端连接到 Raspberry pi 上的服务器时遇到了一点问题,希望你们对如何解决它有一些想法。

它们都已使用本指南 https://open62541.org/doc/current/building.html进行设置

为简单起见,我也使用了他们网站上的简单客户端和服务器设置,位于

https://open62541.org/doc/current/tutorial_client_firststeps.html

https://open62541.org/doc/current/tutorial_server_firststeps.html

唯一的区别是因为我使用的是 UA_ENABLE_AMALGAMATION 选项

已更改为

我得到的读数是

对于服务器和

为客户

我可以用 UaExpert 连接到两个树莓派,但由于某种原因,客户端不想连接?

任何想法可能导致此问题?

这些也是 Open62541 的当前配置

Open62541配置

0 投票
1 回答
93 浏览

opc-ua - OPC UA 发现中的多播 DNS 名称冲突

处理向客户端显示服务器状态信息(可用或忙碌)的需求。2种方法如下:

  1. 使用服务器功能阵列的设施来显示信息。因为它是一个数组,所以第一个元素是服务器的特征,第二个元素是状态(初始可用)。服务器配置(多播服务器的最大会话更改为 1。发生这种情况时,功能数组的第二个元素更改为忙碌。但是,在运行客户端应用程序时(来自 open62541 发现示例的 findServersOnNetwork.c),这是未反映,因为配置参数的值是在服务器运行之前获取的(例如:始终可用状态)

2)使用相同的服务器能力阵列扩展,这一次,一旦建立会话,我取消注册服务器,将能力列表更改为忙碌并再次注册服务器。但这样做时,我收到一个错误:检测到多播 DNS 名称冲突:'Crane Multicast Server-._opcua-tcp._tcp.local。用于 16 型

我已附上成功注销(删除记录)的LDS日志。然而它显示了冲突。请让我知道这里可能是什么问题?尽管删除了记录,但冲突是不可接受的,对吧?

LDS 日志的图像

复制步骤:server_multicast.c(来自 open62541 堆栈的示例部分)

0 投票
1 回答
211 浏览

c - 在 Windows 中使用 open62541 构建一个简单的服务器

我正在尝试通过参考此页面提供的文档来使用 open62541 构建服务器。

我可以通过参考这个网页生成 open62541.c 和 open62541.h 文件。如前所述,我使用 CMake 和 VisualStudio 生成了这些文件。当我尝试编译 myServer.c 文件时,出现以下错误。

大多数错误描述未定义某些变量。我发现 UA_SOCKET 未在 open62541.h 或 open62541.c 文件中定义,但在文档中写到这两个文件足以构建服务器文件。

有人成功编译服务器文件吗?谢谢。

错误

In file included from open62541.c:28: open62541.h:22834:5: error: unknown type name 'UA_SOCKET' 22834 | UA_SOCKET sockfd; /* Most connectivity solutions run on | ^~~~~~~~~ open62541.h:30209:1: error: unknown type name 'ssize_t'; did you mean '_ssize_t'? 30209 | ssize_t UA_send(UA_SOCKET sockfd, const void *buf, size_t len, int flags); //equivalent to posix send implementation | ^~~~~~~ | _ssize_t open62541.h:30209:17: error: unknown type name 'UA_SOCKET' 30209 | ssize_t UA_send(UA_SOCKET sockfd, const void *buf, size_t len, int flags); //equivalent to posix send implementation | ^~~~~~~~~ open62541.h:30213:1: error: unknown type name 'ssize_t'; did you mean '_ssize_t'? 30213 | ssize_t UA_sendto(UA_SOCKET sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); //equivalent to posix sendto implementation | ^~~~~~~ | _ssize_t open62541.h:30213:19: error: unknown type name 'UA_SOCKET' 30213 | ssize_t UA_sendto(UA_SOCKET sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); //equivalent to posix sendto implementation | ^~~~~~~~~ open62541.h:30213:111: error: unknown type name 'socklen_t' 30213 | ssize_t UA_sendto(UA_SOCKET sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); //equivalent to posix sendto implementation | ^~~~~~~~~ open62541.h:30217:15: error: unknown type name 'UA_SOCKET' 30217 | int UA_select(UA_SOCKET nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); //equivalent to posix select implementation | ^~~~~~~~~ open62541.h:30217:31: error: unknown type name 'fd_set' 30217 | int UA_select(UA_SOCKET nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); //equivalent to posix select implementation | ^~~~~~ open62541.h:30217:48: error: unknown type name 'fd_set' 30217 | int UA_select(UA_SOCKET nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); //equivalent to posix select implementation | ^~~~~~ open62541.h:30217:66: error: unknown type name 'fd_set' 30217 | int UA_select(UA_SOCKET nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); //equivalent to posix select implementation | ^~~~~~ open62541.h:30221:1: error: unknown type name 'ssize_t'; did you mean '_ssize_t'? 30221 | ssize_t UA_recv(UA_SOCKET sockfd, void *buf, size_t len, int flags); //equivalent to posix recv implementation | ^~~~~~~ | _ssize_t open62541.h:30221:17: error: unknown type name 'UA_SOCKET' 30221 | ssize_t UA_recv(UA_SOCKET sockfd, void *buf, size_t len, int flags); //equivalent to posix recv implementation | ^~~~~~~~~ open62541.h:30225:1: error: unknown type name 'ssize_t'; did you mean '_ssize_t'? 30225 | ssize_t UA_recvfrom(UA_SOCKET sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); | ^~~~~~~ | _ssize_t open62541.h:30225:21: error: unknown type name 'UA_SOCKET' 30225 | ssize_t UA_recvfrom(UA_SOCKET sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); | ^~~~~~~~~ open62541.h:30225:100: error: unknown type name 'socklen_t' 30225 | ssize_t UA_recvfrom(UA_SOCKET sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); | ^~~~~~~~~ open62541.h:30229:17: error: unknown type name 'UA_SOCKET' 30229 | int UA_shutdown(UA_SOCKET sockfd, int how); //equivalent to posix shutdown implementation | ^~~~~~~~~ open62541.h:30233:1: error: unknown type name 'UA_SOCKET' 30233 | UA_SOCKET UA_socket(int domain, int type, int protocol);//equivalent to posix socket implementation | ^~~~~~~~~ open62541.h:30237:13: error: unknown type name 'UA_SOCKET' 30237 | int UA_bind(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix bind implementation | ^~~~~~~~~ open62541.h:30237:60: error: unknown type name 'socklen_t' 30237 | int UA_bind(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix bind implementation | ^~~~~~~~~ open62541.h:30241:15: error: unknown type name 'UA_SOCKET' 30241 | int UA_listen(UA_SOCKET sockfd, int backlog);//equivalent to posix listen implementation | ^~~~~~~~~ open62541.h:30245:15: error: unknown type name 'UA_SOCKET' 30245 | int UA_accept(UA_SOCKET sockfd, struct sockaddr *addr, socklen_t *addrlen);//equivalent to posix accept implementation | ^~~~~~~~~ open62541.h:30245:56: error: unknown type name 'socklen_t' 30245 | int UA_accept(UA_SOCKET sockfd, struct sockaddr *addr, socklen_t *addrlen);//equivalent to posix accept implementation | ^~~~~~~~~ open62541.h:30249:14: error: unknown type name 'UA_SOCKET' 30249 | int UA_close(UA_SOCKET sockfd);//equivalent to posix close implementation | ^~~~~~~~~ open62541.h:30253:16: error: unknown type name 'UA_SOCKET' 30253 | int UA_connect(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix connect implementation | ^~~~~~~~~ open62541.h:30253:63: error: unknown type name 'socklen_t' 30253 | int UA_connect(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix connect implementation | ^~~~~~~~~ open62541.h:30257:16: error: unknown type name 'UA_SOCKET' 30257 | void UA_fd_set(UA_SOCKET fd, fd_set *set); //equivalent to posix FD_SET implementation | ^~~~~~~~~ open62541.h:30257:30: error: unknown type name 'fd_set' 30257 | void UA_fd_set(UA_SOCKET fd, fd_set *set); //equivalent to posix FD_SET implementation | ^~~~~~ open62541.h:30261:17: error: unknown type name 'UA_SOCKET' 30261 | int UA_fd_isset(UA_SOCKET fd, fd_set *set);//equivalent to posix FD_ISSET implementation | ^~~~~~~~~ open62541.h:30261:31: error: unknown type name 'fd_set' 30261 | int UA_fd_isset(UA_SOCKET fd, fd_set *set);//equivalent to posix FD_ISSET implementation | ^~~~~~ open62541.h:30265:72: warning: 'struct addrinfo' declared inside parameter list will not be visible outside of this definition or declaration 30265 | int UA_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);//equivalent to posix getaddrinfo implementation | ^~~~~~~~ open62541.h:30287:37: error: unknown type name 'UA_SOCKET' 30287 | unsigned int UA_socket_set_blocking(UA_SOCKET sockfd);//set a socket as blocking. Returns 0 if OK, other value otherwise | ^~~~~~~~~ open62541.h:30291:40: error: unknown type name 'UA_SOCKET' 30291 | unsigned int UA_socket_set_nonblocking(UA_SOCKET sockfd);//set a socket as non-blocking. Returns 0 if OK, other value otherwise | ^~~~~~~~~ open62541.h:30295:69: error: unknown type name 'socklen_t' 30295 | int UA_getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); //equivalent to posix getsockopt implementation. Only in non windows architectures | ^~~~~~~~~ open62541.h:30299:75: error: unknown type name 'socklen_t' 30299 | int UA_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);//equivalent to posix setsockopt implementation | ^~~~~~~~~ open62541.h:30303:29: warning: 'struct addrinfo' declared inside parameter list will not be visible outside of this definition or declaration 30303 | void UA_freeaddrinfo(struct addrinfo *res);//equivalent to posix freeaddrinfo implementatio | ^~~~~~~~ open62541.h:30311:55: error: unknown type name 'socklen_t' 30311 | int UA_getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);//equivalent to posix getsockname implementation | ^~~~~~~~~ open62541.c: In function 'UA_Timer_init': open62541.c:19600:5: warning: implicit declaration of function 'UA_LOCK_INIT'; did you mean 'UA_LOG_INFO'? [-Wimplicit-function-declaration] 19600 | UA_LOCK_INIT(&t->timerMutex); | ^~~~~~~~~~~~ | UA_LOG_INFO open62541.c:19600:20: error: 'UA_Timer' has no member named 'timerMutex' 19600 | UA_LOCK_INIT(&t->timerMutex); | ^~ open62541.c: In function 'UA_Timer_addTimerEntry': open62541.c:19605:5: warning: implicit declaration of function 'UA_LOCK' [-Wimplicit-function-declaration] 19605 | UA_LOCK(&t->timerMutex); | ^~~~~~~ open62541.c:19605:15: error: 'UA_Timer' has no member named 'timerMutex' 19605 | UA_LOCK(&t->timerMutex); | ^~ open62541.c:19611:5: warning: implicit declaration of function 'UA_UNLOCK' [-Wimplicit-function-declaration] 19611 | UA_UNLOCK(&t->timerMutex); | ^~~~~~~~~ open62541.c:19611:17: error: 'UA_Timer' has no member named 'timerMutex' 19611 | UA_UNLOCK(&t->timerMutex); | ^~ 37908 | UA_LOCK(&server->serviceMutex); | ^~ open62541.c:37910:22: error: 'UA_Server' has no member named 'serviceMutex' 37910 | UA_UNLOCK(&server->serviceMutex); | ^~ open62541.c: In function 'Service_FindServers': open62541.c:38031:27: error: 'UA_Server' has no member named 'serviceMutex' 38031 | UA_LOCK_ASSERT(&server->serviceMutex, 1); | ^~ open62541.c: In function 'Service_GetEndpoints': open62541.c:38115:27: error: 'UA_Server' has no member named 'serviceMutex' 38115 | UA_LOCK_ASSERT(&server->serviceMutex, 1); | ^~ open62541.c: In function 'setSubscriptionSettings': open62541.c:38662:27: error: 'UA_Server' has no member named 'serviceMutex' 38662 | UA_LOCK_ASSERT(&server->serviceMutex, 1)ent 2 of 'addServerSocket' from incompatible pointer type [-Wincompatible-pointer-types] 64148 | UA_StatusCode statusCode = addServerSocket(layer, ai); | ^~ | | | struct addrinfo * open62541.c:64006:64: note: expected 'struct addrinfo *' but argument is of type 'struct addrinfo *' 64006 | addServerSocket(ServerNetworkLayerTCP *layer, struct addrinfo *ai) { | ~~~~~~~~~~~~~~~~~^~ open62541.c:64151:29: warning: passing argument 1 of 'UA_freeaddrinfo' from incompatible pointer type [-Wincompatible-pointer-types] 64151 | UA_freeaddrinfo(res); | ^~~ | | | struct addrinfo * In file included from open62541.c:28: open62541.h:30303:39: note: expected 'struct addrinfo *' but argument is of type 'struct addrinfo *' 30303 | void UA_freeaddrinfo(struct addrinfo *res);//equivalent to posix freeaddrinfo implementatio | ~~~~~~~~~~~~~~~~~^~~ open62541.c:64155:21: warning: passing argument 1 of 'UA_freeaddrinfo' from incompatible pointer type [-Wincompatible-pointer-types] 64155 | UA_freeaddrinfo(res); | ^~~ | | | struct addrinfo * In file included from open62541.c:28: open62541.h:30303:39: note: expected 'struct addrinfo *' but argument is of type 'struct addrinfo *' 30303 | void UA_freeaddrinfo(struct addrinfo *res);//equivalent to posix freeaddrinfo implementatio | ~~~~~~~~~~~~~~~~~^~~ open62541.c: At top level: open62541.c:64186:40: error: unknown type name 'fd_set' 64186 | setFDSet(ServerNetworkLayerTCP *layer, fd_set *fdset) { | ^~~~~~ open62541.c: In function 'ServerNetworkLayerTCP_listen': open62541.c:64215:5: error: unknown type name 'fd_set' 64215 | fd_set fdset, errset; | ^~~~~~ open62541.c:64216:26: warning: implicit declaration of function 'setFDSet' [-Wimplicit-function-declaration] 64216 | UA_Int32 highestfd = setFDSet(layer, &fdset); | ^~~~~~~~ open62541.c:64218:12: error: variable 'tmptv' has initializer but incomplete type 64218 | struct timeval tmptv = {0, timeout * 1000}; | ^~~~~~~ open62541.c:64218:29: warning: excess elements in struct initializer 64218 | struct timeval tmptv = {0, timeout * 1000}; | ^ open62541.c:64218:29: note: (near initialization for 'tmptv') open62541.c:64218:32: warning: excess elements in struct initializer 64218 | struct timeval tmptv = {0, timeout * 1000}; | ^~~~~~~ open62541.c:64218:32: note: (near initialization for 'tmptv') open62541.c:64218:20: error: storage size of 'tmptv' isn't known 64218 | struct timeval tmptv = {0, timeout * 1000}; | ^~~~~ open62541.c:64222:60: error: 'errno_str' undeclared (first use in this function) 64222 | "Socket select failed with %s", errno_str)); | ^~~~~~~~~ open62541.c:64229:13: warning: implicit declaration of function 'UA_fd_isset' [-Wimplicit-function-declaration] 64229 | if(!UA_fd_isset(layer->serverSockets[i], &fdset)) | ^~~~~~~~~~~ open62541.c:64232:33: error: storage size of 'remote' isn't known 64232 | struct sockaddr_storage remote; | ^~~~~~ open62541.c:64233:9: error: unknown type name 'socklen_t' 64233 | socklen_t remote_size = sizeof(remote); | ^~~~~~~~~ open62541.c:64234:9: error: unknown type name 'UA_SOCKET' 64234 | UA_SOCKET newsockfd = UA_accept(layer->serverSockets[i], | ^~~~~~~~~ open62541.c:64234:31: warning: implicit declaration of function 'UA_accept'; did you mean 'UA_access'? [-Wimplicit-function-declaration] 64234 | UA_SOCKET newsockfd = UA_accept(layer->serverSockets[i], | ^~~~~~~~~ | UA_access open62541.c:64236:25: error: 'UA_INVALID_SOCKET' undeclared (first use in this function) 64236 | if(newsockfd == UA_INVALID_SOCKET) | ^~~~~~~~~~~~~~~~~ open62541.c: At top level: open62541.c:64373:21: error: field 'hints' has incomplete type 64373 | struct addrinfo hints, *server; | ^~~~~ open62541.c: In function 'ClientNetworkLayerTCP_close': open62541.c:64388:30: error: 'UA_INVALID_SOCKET' undeclared (first use in this function) 64388 | if(connection->sockfd != UA_INVALID_SOCKET) { | ^~~~~~~~~~~~~~~~~ open62541.c: In function 'ClientNetworkLayerTCP_free': open62541.c:64402:38: warning: passing argument 1 of 'UA_freeaddrinfo' from incompatible pointer type [-Wincompatible-pointer-types] 64402 | UA_freeaddrinfo(tcpConnection->server); | ~~~~~~~~~~~~~^~~~~~~~ | | | struct addrinfo * In file included from open62541.c:28: open62541.h:30303:39: note: expected 'struct addrinfo *' but argument is of type 'struct addrinfo *' 30303 | void UA_freeaddrinfo(struct addrinfo *res);//equivalent to posix freeaddrinfo implementatio | ~~~~~~~~~~~~~~~~~^~~ open62541.c: In function 'UA_ClientConnectionTCP_poll': open62541.c:64426:30: error: 'UA_INVALID_SOCKET' undeclared (first use in this function) 64426 | if(connection->sockfd == UA_INVALID_SOCKET) { | ^~~~~~~~~~~~~~~~~ open62541.c:64427:61: error: invalid use of undefined type 'struct addrinfo' 64427 | connection->sockfd = UA_socket(tcpConnection->server->ai_family, | ^~ open62541.c:64428:61: error: invalid use of undefined type 'struct addrinfo' 64428 | tcpConnection->server->ai_socktype, | ^~ open62541.c:64429:61: error: invalid use of undefined type 'struct addrinfo' 64429 | tcpConnection->server->ai_protocol); | ^~ open62541.c:64432:68: error: 'UA_ERRNO' undeclared (first use in this function) 64432 | "Could not create client socket: %s", strerror(UA_ERRNO)); | ^~~~~~~~ open62541.c:64457:17: warning: implicit declaration of function 'UA_connect' [-Wimplicit-function-declaration] 64457 | int error = UA_connect(connection->sockfd, tcpConnection->server->ai_addr, | ^~~~~~~~~~ open62541.c:64457:69: error: invalid use of undefined type 'struct addrinfo' 64457 | int error = UA_connect(connection->sockfd, tcpConnection->server->ai_addr, | ^~ open62541.c:64458:49: error: invalid use of undefined type 'struct addrinfo' 64458 | tcpConnection->server->ai_addrlen); | ^~ open62541.c:64467:20: error: 'UA_ERR_CONNECTION_PROGRESS' undeclared (first use in this function) 64467 | if(UA_ERRNO != UA_ERR_CONNECTION_PROGRESS) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ open62541.c:64503:5: error: unknown type name 'fd_set' 64503 | fd_set fdset; | ^~~~~~ open62541.c:64506:12: error: variable 'tmptv' has initializer but incomplete type 64506 | struct timeval tmptv = { (long int) (timeout_usec / 1000000), | ^~~~~~~ open62541.c:64506:30: warning: excess elements in struct initializer 64506 | struct timeval tmptv = { (long int) (timeout_usec / 1000000), | ^ open62541.c:64506:30: note: (near initialization for 'tmptv') open62541.c:64507:30: warning: excess elements in struct initializer 64507 | (int) (timeout_usec % 1000000) }; | ^ ^~~~~~~~~ open62541.h:30253:16: error: unknown type name 'UA_SOCKET' 30253 | int UA_connect(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix connect implementation | ^~~~~~~~~ open62541.h:30253:63: error: unknown type name 'socklen_t' 30253 | int UA_connect(UA_SOCKET sockfd, const struct sockaddr *addr, socklen_t addrlen);//equivalent to posix connect implementation | ^~~~~~~~~ open62541.h:30257:16: error: unknown type name 'UA_SOCKET' 30257 | void UA_fd_set(UA_SOCKET fd, fd_set *set); //equivalent to posix FD_SET implementation | ^~~~~~~~~ open62541.h:30257:30: error: unknown type name 'fd_set' 30257 | void UA_fd_set(UA_SOCKET fd, fd_set *set); //equivalent to posix FD_SET implementation | ^~~~~~ open62541.h:30261:17: error: unknown type name 'UA_SOCKET' 30261 | int UA_fd_isset(UA_SOCKET fd, fd_set *set);//equivalent to posix FD_ISSET implementation | ^~~~~~~~~ open62541.h:30261:31: error: unknown type name 'fd_set' 30261 | int UA_fd_isset(UA_SOCKET fd, fd_set *set);//equivalent to posix FD_ISSET implementation | ^~~~~~ open62541.h:30265:72: warning: 'struct addrinfo' declared inside parameter list will not be visible outside of this definition or declaration 30265 | int UA_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);//equivalent to posix getaddrinfo implementation | ^~~~~~~~ open62541.h:30287:37: error: unknown type name 'UA_SOCKET' 30287 | unsigned int UA_socket_set_blocking(UA_SOCKET sockfd);//set a socket as blocking. Returns 0 if OK, other value otherwise | ^~~~~~~~~ open62541.h:30291:40: error: unknown type name 'UA_SOCKET' 30291 | unsigned int UA_socket_set_nonblocking(UA_SOCKET sockfd);//set a socket as non-blocking. Returns 0 if OK, other value otherwise | ^~~~~~~~~ open62541.h:30295:69: error: unknown type name 'socklen_t' 30295 | int UA_getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); //equivalent to posix getsockopt implementation. Only in non windows architectures | ^~~~~~~~~ open62541.h:30299:75: error: unknown type name 'socklen_t' 30299 | int UA_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);//equivalent to posix setsockopt implementation | ^~~~~~~~~ open62541.h:30303:29: warning: 'struct addrinfo' declared inside parameter list will not be visible outside of this definition or declaration 30303 | void UA_freeaddrinfo(struct addrinfo *res);//equivalent to posix freeaddrinfo implementatio | ^~~~~~~~ open62541.h:30311:55: error: unknown type name 'socklen_t' 30311 | int UA_getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);//equivalent to posix getsockname implementation