Introduction

The Simplex OPC UA SDK support you in writingDelphi/Pascal OPC UA Clients and Servers. The Simplex OPC UA SDK isnative Delphi/Pascal library.  The OPC UA SDK support UA binaryprotocol.


Clientand Server Getting Started

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

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


SoftwareRequirements

The SDK supports:

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

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


Licensingthe SDK

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

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

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

SimplexLicense RCDATAlicense.lic

3) Add file SimplexLecense.RC to you Delphiproject.

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;


Installruntime library

To install the libraryin your application you need to take thefollowing steps:

1) Download and unzipthe 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 - Runtimepackages - Link with runtime packages

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

Add runtimelibrary:

Project - Options - Packages - Runtimepackages - Runtime packages

(add SimplexOpcUa.dcp)

5) Copy to project outputdirectory:

- SimplexOpcUa.bpl for Win32, Win64

- libSimplexOpcUa.a for Android, iOSDevice32,iOSDevice64

- SimplexOpcUa.a for OSX32, iOSSimulator


Deployingthe Final Application

1) Deploy yourapplication 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:\ProgramFiles (x86)\Embarcadero\Studio\X.0\Redist"


P.S After purchase on request we provide dcu files for static linking


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, useSpxServerConfig.TraceLevelandSpxClientConfig.TraceLevel.


If you have any problems, pleaseset TraceLevel = tlDebugand sendthe question with trace data tosupport@simplexopcua.com.