Getting Started
Prerequisites: Windows
Microsoft Visual Studio 2019 or 2022.
Free Community edition is sufficient.
Note
Component
Desktop development with C++
should be selected in Visual Studio Installer, and installed.CMake
Prerequisites: Linux (Ubuntu, Raspberry Pi, others)
GCC Compiler
CMake
How to use of the SDK.
For quick start, it is recommended to use the Sample Application project at GitHub (https://github.com/onewayautomation/ogamma-sdk-sample-app).
To clone the repository with sample application and build it, open terminal, navigate to the root folder where your source code repositories should be located, and run following below commands.
Clone the sample application project:
git clone https://github.com/onewayautomation/ogamma-sdk-sample-app.git
Cloned into folder
ogamma-sdk-sample-app
repository contains:in folder
sampleApp
- Sample Application, which uses OPC UA SDK as a dependenciy, and can be used as a base for your application project.
Unzip ogamma OPC UA Client C++ SDK distributable package into parent folder of the sample application source code. Note that SDK files inside zip file are organized in folder
ogamma-sdk
, so no need to create it manually.
Folder structure should be like this:
< Parent folder for source code > | |--- ogamma-sdk | |--- bin |--- include |--- lib |--- ogamma-sdk-sample-app | |--- sampleApp
Navigate to the folder
ogamma-sdk-sample-app
Create build folder and run build commands:
mkdir build pushd build cmake ../ make
Note: In Windows, skip
make
command, and open Visual Studio solution created at the build folder, and build it.In Windows, output file (executable binary) will be created in sub-folder
sampleApp\Release
of the build folder.In Linux, executable file will be located in sub-folder
sampleApp
.
Running of the sample application.
When you start the application that uses the OPC UA Client SDK, file Opc.Ua.xml
(located in the bin
folder of the SDK disributable package) must be located in the working directory to support complex types.
When the application starts first time, it will create application instance certificate, in folder ./data/PKI
, relative to the process working directory.
To connect in secured mode, the client application instance certificate should be copied to the folder data/PKI/trusted/certs
.
Log files will be created in folder data/logs
.