Reputation: 395
I am developing an OPC UA client that needs to connect asynchronously to a server and update its node data. I am using UA_Client_connectAsync
to connect to the server but the async write/read APIs e.g. UA_Client_writeValueAttribute_async
in
Examples/client_async.c
of Examples codes are missing from source code and do not compile. Are they deprecated? What is the new API for Async read/write to the server?
I am asking this question because I have tried the UA_Client_writeValueAttribute
API with the non-blocking UA_Client_connectAsync
and the server node does not receive any data on its node.
Upvotes: 2
Views: 1062
Reputation: 3615
There is an async client example at https://github.com/open62541/open62541/blob/master/examples/client_async.c.
The critical ingredient is to call UA_Client_run_iterate
repeatedly (e.g. in a loop that is executed by a separate thread).
Upvotes: 1