3.4 Embedding the PDA Into Own Applications |
To use the Process Data Analyzer API in your code, you will need an instance of the PDA client. This chapter will describe the different ways of creating such a client instance and how to add them to your project.
The recommended way for .NET users is to reference the supplied ClientLib. Of course, a custom creation of the PDA API as described below is also possible but by using the ClientLib, some you will gain access to a range of convenience functions which will shorten your boiler plate code and overall lines of code.
To use the ClientLib, either reference it from the installation folder C:\Program Files\RAYLASE\ProcessDataAnalyzer\API\Library\CSharpClient\ or add the NuGet package to your project. It is recommended to copy the referenced files to a folder with read and write permissions first, to prevent access violation exceptions, as the standard installation directory has restricted access on most Windows machines.
That was it already. The PDA API should now be available in your project in the RAYLASE.PDA.API namespace. For the API usage, please also refer to chapter 3.3 Modes of Operation.
Examples of this use case are implemented in the 4.1.1 Standalone API Tutorial and the 4.1.2 Client API Tutorial.
Please refer to the gRPC documentation for your programming language on how to generate a language specific API from proto files.
The basic step will be adding the proto files, which can be found in the installation directory under C:\Program Files\RAYLASE\ProcessDataAnalyzer\API\Library\Protos\ . Please note that under .NET for example, the added files might not be added as Protobuf type automatically. In that case, manually adopt the include type of the proto files for your project
Next the gRPC references will need to be added. This should in most cases already suffice so that build of the project will automatically generate the API for all proto files.
The PDA API should now be available in your project in the RAYLASE.PDA.API namespace. For the API usage, please also refer to chapter 3.3 Modes of Operation.
An example of this use case is implemented in the 4.1.3 Proto Client API Tutorial.