C++ Based OPC UA Client/Server SDK
1.6.2.402
|
When building the SDK using CMake, it can be configured in a number of ways using the CMake options described below.
The following options influence whether the SDK and/or the UaStack are built as shared libraries or statically.
BUILD_SHARED_STACK
BUILD_SHARED_LIBS
BUILD_UABASECPP
BUILD_UAPKICPP
BUILD_WITH_COM_UTILITIES
UASDK_WITH_XMLPARSER
The following options affect the Server SDK library:
BUILD_UAMODELS
BUILD_UAMODULE
UASDK_WITH_AUDITING_SERVER_FACET
UASDK_WITH_EVENT_SUBSCRIPTION_SERVER_FACET
UASDK_WITH_HISTORICAL_ACCESS
UASDK_WITH_METHOD_SERVER_FACET
UASDK_WITH_NODE_MANAGEMENT_SERVER_FACET
UASDK_WITH_TRACE_CONFIGURATION
UASDK_WITH_TRACE_EVENTS
The following options affect the Client SDK library:
BUILD_UACLIENTC
The UaStack can also be configured in a number of ways, especially the options regarding timers have to be set carefully.
UASTACK_USE_SYNCHRONIZATION
ON
because the SDK works multithreaded. UASTACK_CLIENTAPI_ENABLED
ON
when building the Client SDK. UASTACK_SERVERAPI_ENABLED
ON
when building the Server SDK. The following options configure the security and encryption abilities of the UaStack.
UASTACK_SUPPORT_SECURITYPOLICY_NONE
None
security policy. UASTACK_SUPPORT_SECURITYPOLICY_BASIC128RSA15
Basic128Rsa15
security policy. Only available if UASTACK_WITH_OPENSSL
is set to ON
. UASTACK_SUPPORT_SECURITYPOLICY_BASIC256
Basic256
security policy. Only available if UASTACK_WITH_OPENSSL
is set to ON
. UASTACK_SUPPORT_SECURITYPOLICY_BASIC256SHA256
Basic256Sha256
security policy. Only available if UASTACK_WITH_OPENSSL
is set to ON
. UASTACK_WITH_OPENSSL
UASTACK_WITH_PKI_WIN32
The next set of options enable or disable features in the UaStack, aiming to influence the resulting code and binary size of the UaStack.
UASTACK_MINIMAL_DISABLE_TRACE
UASTACK_MINIMAL_OMIT_TYPE_NAME
UASTACK_MINIMAL_SMALL_DATAVALUE
There are three advanced CMake options influencing the number of connections that can be created to/from the SDK. You can show them by checking the “Advanced” check box in the CMake GUI.
The following values are the minimum required amounts of resources for the targeted functionality, so a reserve should be included when setting the values.
UASTACK_TCPLISTENER_MAX_CONNECTIONS
UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
UASTACK_TCPLISTENER_MAX_CONNECTIONS
plus 3UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
can be found below. UASTACK_NUMBER_OF_AVAILABLE_TIMERS
The following options are only visible after setting the CMake option ENABLE_EXPERIMENTAL_OPTIONS
to ON
. We do not recommend to change any of these options.
ENABLE_STATIC_CRT
UASTACK_GUID_STRING_USE_CURLYBRACE
UASTACK_MINIMAL_SMALL_VARIANT
UASTACK_STATIC_PLATFORM
UASTACK_WITH_HTTPS
UASTACK_WITH_TLS
ON
if you enabled UASTACK_WITH_HTTPS
. The UaStack parameter UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
has to be calculated differently for single-threaded and multithreaded mode. The C++ SDK works only multithreaded, so this variant will be described below.
For each endpoint a server provides, a separate socketmanager is created. Thus, to calculate UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
the number of connections per endpoint is important. We need one socket per connection, plus one internal socket, one listen socket, and one reserved socket: For instance, for a server providing two endpoints, each accepting five connections, UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
is 8: The number of connections per endpoint (5) plus 3. The number of endpoints is not relevant.
For clients, a separate socketmanager is created for each connection, each containing an internal socket and a connection socket. Thus, UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
is always 2, regardless of the number of connections per client.
If an application has both client and server functionality, only UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
for the server part is relevant, because the smallest possible number for a server is 4 (one connection per endpoint plus 3), which is obviously greater than 2.