ANSI C Based OPC UA Client/Server SDK
1.8.0.369
|
When using the SDK in a multithreaded application, some important issues have to be considered.
For being used in a multithreaded application, the SDK needs to be built with support for synchronization. Starting with version 1.4.0 this is enabled by default and can be configured using the CMake option UASTACK_USE_SYNCHRONIZATION
.
When calling SDK functions from other threads than the SDK’s main thread (the one calling UaBase_DoCom), it is important to only call thread-safe SDK functions from these threads.
All functions that can safely be called from within other threads are marked with a note “This function is thread-safe.” in the documentation. These include:
All other utility functions that don’t work on structures managed by the SDK (e.g. sessions, subscriptions, monitored items) can also be safely called from another thread as long as it is ensured that the structure they are working on is not modified by another thread at the same time. These include, amongst others: