ANSI C UA Server SDK  1.5.2.328
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Configuring the SDK

Overview

When building the SDK using CMake, it can be configured in a number of ways using the CMake options described below.

Note
Please read the section UaStack carefully if the SDK is used in a multithreaded application.

SDK Configuration

The following options influence whether the SDK and/or the UaStack are built as shared libraries or statically.

BUILD_SHARED_STACK
Build the UaStack as a shared library.
BUILD_SHARED_LIBS
Build the SDK and all of its modules as shared libraries.

The following options enable or disable modules that are included in the SDK. Set an option to OFF to disable the according module.

BUILD_UASERVERC
Enable building the SDK. This option always has to be ON.
BUILD_AUTH_INTERNAL / BUILD_AUTH_WIN32 / BUILD_AUTH_PAM / BUILD_AUTH_SASL
Enables the respective Authentication module.
BUILD_AUTHORIZATION
Enable the Authorization module. At least one authentication module has to be enabled to use authorization.
BUILD_DI_PROVIDER
Enable the DI address space in the SDK.
BUILD_PLCOPEN_PROVIDER
Enable the PlcOpen address space in the SDK.
BUILD_SERVER_PROVIDER
Enable the server provider. This option always has to be ON.
BUILD_WITH_DISCOVERY
Enable support for registering at an LDS.
BUILD_WITH_ERROR_LOOKUP
Enable the utility function UaBase_StatusCode_ToString.

Options that enable modules contained in the professional version of the SDK.

UASERVER_CALL
Enable the UA method call service (examples can be found in Lesson 4: Adding Support for Methods).
UASERVER_EVENTS
Enable the alarms & events module of the SDK (examples can be found in Lesson 5: Adding Support for Events and Lesson 6: Adding Support for Alarms & Conditions).
UASERVER_HISTORYREAD
Enable the UA history read service (examples can be found in Lesson 7: Adding Support for Historical Access).
UASERVER_HISTORYUPDATE
Enable the UA history update service.
BUILD_BASIC_CONFIG
Setting this option to OFF disables all modules only included in the professional version of the SDK (all modules in this list).

The next set of options enable or disable features in the SDK, aiming to influence the resulting code and binary size of the SDK.

BUILD_NS0_WITH_DESCRIPTIONS
Enable node descriptions for nodes in namespace 0. Disable this option to reduce code size by omitting the description strings.

UaStack

The UaStack can also be configured in a number of ways, especially the options regarding synchronization and timers have to be set carefully.

Note
If any of the SDK’s callback functions (UaServer_ReadComplete, UaServer_WriteComplete etc., UaServer_NewItemValue) are called from another thread than the SDK’s main thread (the one calling UaServer_DoCom), UASTACK_USE_SYNCHRONIZATION has to be enabled.
UASTACK_SUPPORT_ENC_OBJ_EXTENSIONS
Include copy and compare functions for all UA types. This option always has to be ON.
UASTACK_USE_THREADS
Build the UaStack in multithreaded mode. This option always has to be OFF, as the SDK is developed to tun in singlethreaded mode.
UASTACK_USE_SYNCHRONIZATION
Build the UaStack with synchronization support.
NUMBER_OF_AVAILABLE_TIMERS
The number of OpcUa_Timers that can be created. The SDK including the UaStack needs 13 timers and one additional per configured endpoint. Depending on the number of timers created in providers and the application, this setting has to be set.
UASTACK_CLIENTAPI_ENABLED
Enable the client API of the UaStack. This option has to be ON if the SDK is built with BUILD_WITH_DISCOVERY set to ON.
UASTACK_SERVERAPI_ENABLED
Enable the server API of the UaStack. This option always has to be ON.
UASTACK_STATIC_PLATFORM
This option always has to be ON.
USE_STATIC_CRT
Build against the static C runtime.

The following options configure the security and encryption abilities of the UaStack.

UASTACK_SUPPORT_SECURITYPOLICY_NONE
Enable support for the None security policy.
UASTACK_SUPPORT_SECURITYPOLICY_BASIC128RSA15
Enable support for the Basic128Rsa15 security policy. Only available if UASTACK_WITH_OPENSSL is set to ON.
UASTACK_SUPPORT_SECURITYPOLICY_BASIC256
Enable support for the Basic256 security policy. Only available if UASTACK_WITH_OPENSSL is set to ON.
UASTACK_WITH_OPENSSL
Enable support for encryption and signing.
UASTACK_WITH_HTTPS
Enable experimental support for HTTPS.
UASTACK_WITH_TLS
Set this to ON if you enabled UASTACK_WITH_HTTPS.
UASTACK_WITH_PKI_WIN32
Enable support for using the Windows certificate store.

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
Disable the trace functionality.
UASTACK_MINIMAL_OMIT_TYPE_NAME
Omit the type name string of encodeable types.
UASTACK_MINIMAL_SMALL_DATAVALUE
Reduce the size of OpcUa_DataValue by removing the picoseconds in timestamps.
UASTACK_MINIMAL_SMALL_VARIANT
Reduce the size of OpcUa_Variant by disabling matrix values and reducing the string size.

Data Logger Library

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
Enables the data logger module (an example can be found in Lesson 7: Adding Support for Historical Access).
BUILD_DATA_LOGGER_FILE_BACKEND
Enables the file backend of the data logger module.