Introduction

The Simplex OPC UA SDK support you in writing Delphi/Pascal OPC UA Clients and Servers. The Simplex OPC UA SDK is native Delphi/Pascal library.  The OPC UA SDK support UA binary protocol.


Client and Server Getting Started

The Simplex OPC UA SDK contains several examples on how to build an OPC UA client/server using the SDK. The corresponding Delphi projects are included as well and can serve as a basis for your own projects.

The lessons provided in Getting Started describe how to develop a full-featured OPC UA client/server step by step based on a simple building automation scenario. Lesson 1 starts with an empty OPC UA client/server, and commonly used features are added step by step in the following lessons.


Software Requirements

The SDK supports:

Platforms - Win32, Win64, Android, iOSDevice32, iOSDevice64, iOSSimulator, OSX32

IDE - Delphi: XE10.1, XE10, XE8, XE7, XE6, XE5, XE4, XE3, XE2


Licensing the SDK

After purchasing the Simplex OPC UA SDK you will receive your personal license file (license.lic). To activate the license in your application you need to take the following steps:

1) Copy the license file (license.lic) to the Delphi project directory.

2)
Create an text file SimplexLecense.RC, then add line like:

SimplexLicense RCDATA license.lic

3) Add file SimplexLecense.RC to you Delphi project.

4) Use the following code to add licenses:

...
uses Classes, Windows, Simplex.License;
...
function AddLicense(): boolean;
var Stream: TResourceStream;
  License: TBytes;
begin
  Result := False;
  try

    Stream := TResourceStream.Create(hInstance, 'SimplexLicense', RT_RCDATA);
    SetLength(License, Stream.Size);
    Stream.Read(License[0], Stream.Size);
    Stream.Free();

    if (AddLicence(License) = False) then Exit;

    Result := True;
  except
  end;
end;


Install runtime library

To install the library in your application you need to take the following steps:

1) Download and unzip the SDK:

http://www.simplexopcua.com/downloads/

2) Open your Delphi project (Console, VCL, Firemonkey or other)

3) Set to true "Link with runtime packages":

Project - Options - Packages - Runtime packages - Link with runtime packages

4) Copy SimplexOpcUa.dcp for your IDE and Platform to project directory.

Add runtime library:

Project - Options - Packages - Runtime packages - Runtime packages

(add SimplexOpcUa.dcp)

5) Copy to project output directory:

- SimplexOpcUa.bpl for Win32, Win64

- libSimplexOpcUa.a for Android, iOSDevice32, iOSDevice64

- SimplexOpcUa.a for OSX32, iOSSimulator


Deploying the Final Application

1) Deploy your application with:

- SimplexOpcUa.bpl for Win32, Win64

- libSimplexOpcUa.a for Android, iOSDevice32, iOSDevice64

- SimplexOpcUa.a for OSX32, iOSSimulator

2)  Deploy OpenSSL Library:

- libeay32.dll

- ssleay32.dll

3) Deploy Microsoft Runtime Library:

- msvcp120.dll

- msvcr120.dll

4) List of all Delphi packages for deploy:

- Select from menu "Project" - "Information for ..." - "Packages Used"

- Packages are in the "Redist" directory. For example: "C:\Program Files (x86)\Embarcadero\Studio\X.0\Redist"


Troubleshooting

The SDK comes with a built-in tracing mechanism. Trace data coming through:

SpxClientCallback.OnLog(AMessage: string);
SpxClientCallback.OnLogWarning(AMessage: string);
SpxClientCallback.OnLogError(AMessage: string);
SpxClientCallback.OnLogException(AMessage: string; AException: Exception);

To set the trace level, use SpxServerConfig.TraceLevel and SpxClientConfig. TraceLevel.


If you have any problems, please set TraceLevel = tlDebug and send the question with trace data to support@simplexopcua.com.