Install the SDK
The PDComm SDKs come as archives without an installer. Extract one, let your application find its libraries, and put the license file in place, and you’re done. Virtual serial ports use their own installers.
What you receive
Section titled “What you receive”pdcomm-secsgem-windows-x64-<version>.zip or pdcomm-secsgem-linux-x64-<version>.tar.gz
| Path | Contents |
|---|---|
bin/ |
The prebuilt examples pdcomm-tutorial and PDComm.Tutorial.dll (C#) |
sdk/bin/ |
The license tool pdcomm-license (pdcomm-license.exe on Windows) |
sdk/include/ |
C headers (pdcomm*.h) and C++ headers (pdcomm*.hpp) |
sdk/lib/ |
The native library: pdcomm_ffi.dll with its import library pdcomm_ffi.dll.lib on Windows, libpdcomm_ffi.so on Linux |
sdk/managed/PDComm.dll |
The .NET binding (net10.0) |
sdk/examples/tutorial/ |
C++ and C# example sources |
simulator/ |
The simulator GUI (pdcomm-simulator), headless and MCP front ends, Qt libraries, and license notices. On Linux they’re split into simulator/bin and simulator/lib. |
manifest.json |
Version, ABI, operating system, and the SHA-256 of every file |
The top-level folder is pdcomm-modbus on Windows and Linux, and pdcomm-modbus-macos-arm64 on macOS.
| Path | Contents |
|---|---|
bin/ |
The headless simulator pdcomm-modbus-headless, the MCP server pdcomm-modbus-mcp, and the license tool pdcomm-license; packages with the GUI also contain pdcomm-modbus-simulator. |
lib/ |
The native library (pdcomm_modbus_ffi.dll with .dll.lib, libpdcomm_modbus_ffi.so, or libpdcomm_modbus_ffi.dylib) and the runtimes it needs |
include/pdcomm/modbus/ |
C and C++ headers |
bindings/ |
.NET binding source (dotnet/PDComm.Modbus), Qt helpers (qt/), and MFC helpers (mfc/) |
licenses/ |
Third-party licenses |
manifest.json |
Protocol, features, ABI, operating system, and the SHA-256 of every file |
The examples come in a separate ZIP, in the practice/ folder: a CMake project, a C# project, and scenario files.
Archives are named pdcomm-opcua-<profile>-<os>-<arch>: .zip on Windows, .tar.gz elsewhere. Take only the profiles you need.
| Profile | Contents |
|---|---|
native |
C and C++ headers, the native library, the OpenSSL 3 runtime, and C and C++ examples. The Windows package also has the MFC helper (bindings/mfc/). |
qt |
The native contents plus the Qt helper header and Qt examples |
dotnet |
The .NET assembly (lib/dotnet/PDComm.OpcUa.dll) with its source, the native library, and .NET examples |
apps |
The simulator GUI, the headless front end (pdcomm-opcua-headless), and the MCP server |
Headers are in include/pdcomm/opcua/, examples in examples/opcua/, and the license tool pdcomm-license in bin/. The native library is in bin/ on Windows and in lib/ elsewhere. licenses/ and NOTICE.txt hold the third-party notices, and manifest.json lists the profile, ABI, exported functions, and the SHA-256 of every file.
Verify the integrity
Section titled “Verify the integrity”-
Compare the SHA-256 of the archive with the value you received:
터미널 창 shasum -a 256 <package file> # macOSsha256sum <package file> # LinuxIn Windows PowerShell, use
Get-FileHash <package file> -Algorithm SHA256. -
After extracting, compare every file with the hashes in
manifest.json, from the SDK’s top-level folder. The command printsOKwhen all match:터미널 창 python3 -c 'import hashlib, json; m = json.load(open("manifest.json")); bad = [p for p, h in m["files"].items() if hashlib.sha256(open(p, "rb").read()).hexdigest() != h]; print("OK" if not bad else bad)' -
Check that the operating system and architecture are right:
터미널 창 python3 -c 'import json; m = json.load(open("manifest.json")); print(m["protocol"], hex(m["abi"]), m["os"], m["architecture"])'A Modbus SDK for macOS prints something like
modbus 0x10001 Darwin arm64.
Where to put the files
Section titled “Where to put the files”- Extract into a path without spaces, and keep the folder layout. The simulators need their Qt plugins, license notices, and runtime libraries next to them.
- Don’t mix files for different operating systems or architectures; don’t copy a Windows DLL into a Linux folder, for example.
- If you move the SDK, rebuild your applications, because a build can record the SDK’s library path.
Set the library path
Section titled “Set the library path”When your application runs, the operating system must find the native library.
In PowerShell, put the library folder at the front of PATH: sdk\lib for SECS/GEM, lib for Modbus, and bin for OPC UA.
$env:PATH = "C:\PDComm\pdcomm-modbus\lib;$env:PATH"If an error says that VCRUNTIME140.dll or MSVCP140.dll is missing, install the x64 Visual C++ Redistributable.
Add the library folder to LD_LIBRARY_PATH, or record the path at build time with -Wl,-rpath:
export LD_LIBRARY_PATH="$HOME/PDComm/pdcomm-modbus/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"The Linux simulators in the packages come with launch scripts that set their library and Qt paths themselves.
The libraries locate themselves through @rpath. Pass -Wl,-rpath,<SDK>/lib when you build; to run a program you just built, setting DYLD_LIBRARY_PATH also works.
c++ -std=c++14 -I "$MODBUS_SDK/include" main.cpp -L "$MODBUS_SDK/lib" -lpdcomm_modbus_ffi -Wl,-rpath,"$MODBUS_SDK/lib" -o mainInstall the license
Section titled “Install the license”The SDK libraries check the license when you start new communication. Without a license, SECS/GEM refuses with status 16 (PDCOMM_LICENSE_REQUIRED), OPC UA with status 11, and Modbus with the error code license_required. The simulators and the virtual serial port tools work without a license.
-
Save the license file you received (evaluation, developer, or runtime) as
pdcomm.licensenext to your application’s executable. During development you can also set the environment variablePDCOMM_LICENSE_FILEto the path of the file.터미널 창 export PDCOMM_LICENSE_FILE="$HOME/pdcomm/pdcomm.license"In Windows PowerShell, use
$env:PDCOMM_LICENSE_FILE = "$HOME\pdcomm\pdcomm.license". -
Check that the license is valid on this computer with the
pdcomm-licensecommand from the SDK package. Granted modules showlicensedorevaluation.터미널 창 pdcomm-license verify "$PDCOMM_LICENSE_FILE" -
To get a license bound to host ids, such as a SECS/GEM runtime license, run
pdcomm-license host-idon that computer and send the value it prints.
If you received PDComm as one ZIP, license/README.txt at its top level summarizes how to install the license. The licenses/ folder of each package holds the third-party notices and has nothing to do with the PDComm license file. Install and check a license covers the locations, the APIs, checking the status, and troubleshooting.
Build settings
Section titled “Build settings”| Product | C/C++ | .NET |
|---|---|---|
| SECS/GEM | Compiler flags -I <sdk>/include and -L <sdk>/lib -lpdcomm_ffi (pdcomm_ffi.dll.lib on Windows) |
-p:PDCommSdk=<sdk folder>; the project references <sdk>/managed/PDComm.dll. |
| Modbus | CMake -DPDCOMM_MODBUS_SDK=<SDK folder> |
-p:PdcommModbusSdk=<SDK folder>; the project references bindings/dotnet/PDComm.Modbus. |
| OPC UA | CMake -DPDCOMM_OPCUA_SDK=<SDK folder> |
-p:PdcommOpcUaSdk=<SDK folder> |
The .NET bindings aren’t NuGet packages; your project references the assembly or source in the SDK folder directly.
.NET programs name the native library by its absolute path. For SECS/GEM, call PdcommRuntime.Initialize("/opt/pdcomm/sdk/lib/libpdcomm_ffi.so") once when your program starts. The Modbus examples register the path they receive on the command line with NativeLibrary.SetDllImportResolver.