ANSI C UA Server SDK
1.7.0.354
|
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
The following options affect the base library which is needed for Client and Server SDK:
BUILD_UABASEC
UABASE_ENABLE_ERROR_LOOKUP
UABASE_SETTINGS_USE_FILEBACKEND
UABASE_USE_FILESYSTEM
The following options affect the Server SDK library:
BUILD_UASERVERC
BUILD_AUTH_INTERNAL
, BUILD_AUTH_WIN32
, BUILD_AUTH_PAM
, BUILD_AUTH_SASL
, BUILD_AUTH_USER
BUILD_AUTHORIZATION
BUILD_DI_PROVIDER
BUILD_PLCOPEN_PROVIDER
UASERVER_CALL
UASERVER_EVENTS
UASERVER_HISTORYREAD
UASERVER_HISTORYUPDATE
UASERVER_NODEMANAGEMENT
UASERVER_QUERY
BUILD_WITH_DISCOVERY
BUILD_WITH_UNITS
UASERVER_GDS_PUSH
UASERVER_AUDITING
UASERVER_ENABLE_DESCRIPTIONS
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 synchronization and timers have to be set carefully.
UASTACK_USE_SYNCHRONIZATION
has to be enabled.UASTACK_USE_SYNCHRONIZATION
UASTACK_USE_TRACE_RAW
UASTACK_CLIENTAPI_ENABLED
ON
if the SDK is built with BUILD_WITH_DISCOVERY
or 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_SOCKETMANAGER_NUMBER_OF_SOCKETS
is UASTACK_NUMBER_OF_AVAILABLE_TIMERS
UASTACK_NUMBER_OF_AVAILABLE_TIMERS
is 15 + 3 + 5 = 23. 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_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 ANSI C SDK only works single-threaded, so this variant will be described below.
In single-threaded mode, an application has only one socketmanager. For a server, this means that we need the required sockets for all endpoints plus one internal socket. Each endpoint requires one socket for each connection plus one listen socket and one reserved socket.
For a client, we need one socket per connection plus one internal socket.
For an application that has both client and server functionality, we need the internal socket only once, and have to add the required sockets for all endpoints of the server part and the number of connections of the client part.
The following figure shows examples for each case. For a server with two endpoints, each accepting four connections, UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
is
For a client that can open three connections, UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
is
For an application that combines the functionality of the aforementioned server and client, UASTACK_SOCKETMANAGER_NUMBER_OF_SOCKETS
is
For historical data access, the data logger library delivered with the SDK can be used. Currently, it is delivered with an example file backend. The following options modify how it is built.
BUILD_DATA_LOGGER
BUILD_DATA_LOGGER_FILE_BACKEND
DATA_LOGGER_MAX_DATA_ITEMS
DATA_LOGGER_MAX_EVENT_ITEMS
DATA_LOGGER_MAX_STRINGNODEID_LENGTH
To reduce the size and resource consumption to a minimum, the following settings are of interest (leave all other settings at default):
BUILD_SHARED_STACK
UASTACK_MINIMAL_SMALL_VARIANT
UASTACK_MINIMAL_SMALL_DATAVALUE
UASTACK_MINIMAL_OMIT_TYPE_NAME
UASTACK_MINIMAL_DISABLE_TRACE
UASTACK_USE_SYNCHRONIZATION
UASTACK_WITH_OPENSSL
, UASTACK_WITH_PKI_WIN32
UASTACK_CLIENTAPI_ENABLED
, UASTACK_SERVERAPI_ENABLED
UABASE_ENABLE_ERROR_LOOKUP
UABASE_USE_FILESYSTEM
BUILD_UACLIENTC
, BUILD_UASERVERC
BUILD_DATA_LOGGER
BUILD_DI_PROVIDER
, BUILD_PLCOPEN_PROVIDER
BUILD_WITH_DISCOVERY
BUILD_WITH_UNITS
UASERVER_AUDITING
, UASERVER_CALL
, UASERVER_EVENTS
, UASERVER_HISTORYREAD
, UASERVER_HISTORYUPDATE
, UASERVER_GDS_PUSH
UASERVER_ENABLE_DESCRIPTIONS
CMAKE_BUILD_TYPE