C++ Based OPC UA Client/Server/PubSub SDK  1.8.3.628
Server SDK Introduction

This part of the documentation contains general information about the OPC Server SDK.

The following pages provide further information on the Server SDK:

Introduction

SDK simplifies the UA stack APIs, implements common UA functionality needed in most or all UA applications, provides base functionality and helper functions, implements the security handling and provides samples for common use cases.

The C++ OPC UA Server SDK provides a C++ class library used to develop OPC UA Servers providing a standard interface to vendor specific systems. The OPC UA Server is normally used to describe the available information from a vendor system and to provide access to the data for external systems in a standard way.

To make the implementation of C++ based OPC UA Servers as easy as possible, the SDK

  • implements all common UA functionality as reference implementation,
  • defines interfaces to integrate the vendor system data into the OPC UA Server,
  • provides base and helper classes implementing often used functionality for a vendor system integration,
  • provides wrapper classes for all system functionality and OPC UA structures,
  • provides sample implementations and make files for Windows and Linux,
  • and provides UA stack platform layers for Windows and Linux.

As additional feature the SDK itself is platform independent and depends only on the OPC UA Ansi C Stack and its platform layer and the crypto API defined by the stack. There is no dependency to other libraries than the OPC UA ANSI C Stack and its dependencies.

The following figure shows the main modules of the SDK and the integration into a server application.

UA functionality that is common for all UA Servers is implemented in the following C++ OPC UA Server SDK modules. These modules are highlighted in the figure. It is not required to know the internals of these modules or to change classes inside these modules. The user of the SDK needs to know only the interfaces and helper classes provided by the modules. All user specific code is implemented in the SystemIntegration Module.

Base

The Base Module implements base functionality necessary for C++ OPC UA Client and Server applications. This base functionality contains wrapper classes for system functionality like threads, mutex and semaphore and wrapper classes for UA types like string, extension object or other often used UA structures. The C++ classes in the Base Module are using the UA structures and the platform layer defined by the OPC UA ANSI C Stack. For all system specific functionality that is not provided by the UA Stack like functions to rename files or for trace functionality, the Base Module implements its own platform layer. The platform layer is not only used to provide implementations for different platforms, it allows also changing functionality based on product requirements like the trace functionality.

Core Module

The Core Module manages the address space of the OPC UA Server and implements the base functionality of a Server like Session management and the OPC Foundation defined part of the address space. The Core Module defines also the interfaces used by the implementer of the OPC UA Server to integrate the vendor specific system with the UA Server SDK and manages the access to the vendor system integration.

The structure of the address space and the functionality is optimized for OPC UA but the core module can also provide its data via other interfaces like COM Data Access or XML Data Access.

UA Module

The UA Module implements the functionality necessary for OPC UA Client/Server communication on the OPC UA Server side like OPC UA Service implementations and Subscription handling.

The implementation of the UA Services is using the Core Module to access the data provided by the OPC UA Server. The UA Module is using the OPC UA Ansi C Stack for communication with the OPC UA Client.

PubSub Module

The PubSub Module implements the functionality necessary for OPC UA PubSub communication. It enables an OPC UA Server to act as OPC UA Publisher or OPC UA Subscriber. The default Publisher or Subscriber functionality can be configured to send or receive information out of the existing OPC UA Server address space.

See PubSub SDK Introduction for more details.

Server Application

The OPC UA server can be integrated into an existing application or can run as stand alone application. The integration is trivial and requires only loading the core module and the UA module during start up of the application and to unload the modules during shut down of the application.

System Integration

UA functionality that is specific to the product is implemented in the SystemIntegration part of the OPC UA Server. The SDK defines interfaces like the required interfaces ServerConfig, NodeManager and IOManager and the optional interfaces MethodManager, EventManager and HistoryManager to plug in the integration of the vendor system into the Core Module. Helper classes and base classes are provided by the SDK for the implementation of the required interfaces.

The Server Configuration section describes the different options to provide the interface ServerConfig including the simple file based default implementations.

The Server Address Space describes the different options to create the server address space and to provide the interfaces NodeManager and IOManager including the available helper classes and simplifications.

The Tutorials for Server development provide different examples for implementing the necessary system integration for an OPC UA server.

The OPC UA Server can be a stand alone application or can be part of an existing application. In both cases the application must load and start the Core Module, the System Integration and the UA Module during start up of the application and must shut down and unload these modules during shut down of the application. The OPC UA ANSI C Stack is loaded by the UA Module during start up.

The OPC UA ANSI C Stack is provided by the OPC Foundation and implements the serialization, the security and the transport functionality for the UA messages exchanged between OPC Client and OPC Server applications. The stack provides APIs for the Client and Server applications and hides all the message transport functionality.

The following pages provide further information on the Server SDK: