ogamma OPC UA C++ Client SDK


This SDK is intended to extremely simplify the creation of OPC UA Client Applications in modern C++. Implements OPC UA communication stack and provides high-level classes to asynchronously send OPC UA requests and receive responses via callbacks or synchronously.

The primary target and narrow specialization of this SDK are high-performance OPC UA applications running in PC or cloud environments.

Key differentiators.

The key differentiators of this SDK from other existing in the market C++ SDKs:

  • Designed following "Low Code" philosophy: applications using it would need to write minimal code. Example of writing value to single node:
WriteRequest::Ptr req(new WriteRequest(WriteValue (NodeId("Demo.Static.Scalar.UInt32", 2), DataValue((uint32_t) 123))));

auto writeResult = connection->send(req).get();

if (writeResult->isGood())
  • Written in modern C++17;
  • Leverages existing open-source libraries (boost for asynchronous communication, Botan for cryptography) to shorten time to market and reduce development costs;
  • Does not depend on OPC Foundation's ANSI C Stack, has its own stack implementation.
  • Asynchronous and synchronous interface. Uses std::future to return results and optionally possible to handle result via callbacks defined as std::function. Callbacks are called from dedicated to those threads, so they do not affect other threads such as IO service threads. This simplifies using the SDK for GUI applications for example.
  • Automatic re-connection with automatic creation of subscriptions and adding monitored items.
  • Feature to create subscriptions and monitored items when the server is offline - they will be created on the server-side automatically when the server becomes online.
  • No server-side handles are exposed for subscriptions and monitored items - instead, the static client handles defined by the application are used, which simplifies mapping of received data changes to the right recipient after re-connections for example.


Currently following below features are implemented:

  • Establishing TCP connection and initial handshake (OPC UA Hello, Acknowledge, and Error messages);
  • Implemented OPC UA Services:
    • OpenSecureChannel
    • FindServers
    • GetEndpoints
    • CreateSession
    • ActivateSession
    • Call
    • Read
    • Write
    • HistoryRead
    • HistoryUpdate
    • Browse
    • BrowseNext
    • CreateSubscription
    • DeleteSubscriptions
    • CreateMonitoredItems (for Data Changes only, no Alarms/Events)
    • DeleteMonitoredItems;
    • Publish
    • CloseSession
    • CloseSecureChannel
  • Communication in secured mode and infrastructure to support it:
    • Automatically generating self-signed root certificate and application instance certificate signed by it;
    • Creation of secure channel in secured mode (sign and encryption).
    • Supported security policies:
      • Basic256Sha256
      • None
  • OPC Binary encoding/decoding is implemented for all data types required to send requests and receive responses for the functionality listed above. The Codec class is also accessible to use from the user application, this simplifies storing of OPC UA data values in databases. 
  • Support for complex data types: values received from the server can be decoded and converted by the SDK either to JSON formatted string or to special Variant type. Also possible to implement encoding and decoding of complex type values by the user application, so no need to modify the SDK to support unknown complex types.
  • Supported user identity token types:
    • Anonymous
    • Username/password


Two types of commercial licenses are available: header files with pre-built binary format library files and full source code. For detailed licensing information please refer to Developer's Guide, the section on licensing, here.

Demo version

To evaluate the SDK, use the sample application at https://github.com/onewayautomation/ogamma-sdk-sample-app When you build it, the SDK header files hosted at GitHub will be pulled automatically, and demo binary library will be downloaded.

Developer's Guide

Online Developer's Guide is available here

How to buy.

For quotes to purchase licenses please contact us.