Click or drag to resize

3.2.1 Service/Server/Client API

For the Process Data Analyzer API to work, both a running service or server and a connected client are needed. The concepts of their interaction are described here.

Server/Service/Client API Interaction

The overview shows how server or service and client form the Process Data Analyzer API and enable interaction between one or more connected cards, the PDA and a custom application.

Overview of PDA API inner workings.
Server Service ClientAPI

A C# Windows service or standalone server is connected over the local host to a supplied or custom created client. Both service and client are proto based, which describes the interface contract. When your application calls the PDA API, the call is mapped (ClientLib convenience call) or directly sent as proto message to the service. The service in turn handles the call on the PDA and connected cards and returns a proto response to the connected client(s). The clients react by forwarding the received response to your application over the supplied or custom created PDA API.

API generation from proto files

You can (auto) generate your own Process Data Analyzer API for your favorite language in a few steps. For a custom API, please refer to 3.4 Embedding the PDA Into Own Applications. The idea is, that the interface contract defined in the supplied proto files can be used to generate an API which can interact with the proto interface. The API generation can then be done for a multitude of different programming languages.

Custom PDA API generation.
CustomAPIGeneration

All available methods for the proto interface are listed in the service's base implementation classes e.g. AcquisitionAcquisitionBase .

ClientLib: Pre-Generated .NET PDA API with convenience functions

For the supplied ClientLib (see C:\Program Files\RAYLASE\ProcessDataAnalyzer\API\Library\CSharpClient\ ), above auto-generation step has already taken place. Additionally it supplies a range of convenient functionality to shorten your code. Some basic functionality like calls with empty gRPC requests or gRPC requests with only a path argument are mapped to a more convenient C# syntax.

ClientLib PDA API.
NETAPIClient Lib

Wrapped functionality can be referenced in the service's client implementation classes e.g. AcquisitionAcquisitionClient .