Binary core API: Difference between revisions

From ADVACAM Wiki
Jump to navigation Jump to search
Line 1: Line 1:
= Core/basic API overview =
= Core/basic binary API introduction =


The PIXet is a multi-platform software developed in ADVACAM company. It is a basic software that allows measurement control and saving of measured data with Medipix detectors. It supports Medipix2, Medipix3, Timepix and Timepix3 detectors and all the readout-devices sold by ADVACAM company such as FitPIX, AdvaPIX, WidePIX, etc. It is written in C++ language and uses multi-platform Qt libraries.<br>
The PIXet is a multi-platform software developed in ADVACAM company. It is a basic software that allows measurement control and saving of measured data with Medipix detectors. It supports Medipix2, Medipix3, Timepix and Timepix3 detectors and all the readout-devices sold by ADVACAM company such as FitPIX, AdvaPIX, WidePIX, etc. It is written in C++ language and uses multi-platform Qt libraries.<br>
Line 12: Line 12:


And need some auxiliary files and directories:<br>
And need some auxiliary files and directories:<br>
See [[Pixet SDK#Auxilliary files|Pixet SDK: Auxilliary files]]
* See [[Pixet SDK#Auxilliary files|Pixet SDK: Auxilliary files]]
See [[Files and directories of the Pixet and SDK#Main directory of the API-using programs, independent on the Pixet|Files and directories: Main directory of the API-using programs]]
* See [[Files and directories of the Pixet and SDK#Main directory of the API-using programs, independent on the Pixet|Files and directories: Main directory of the API-using programs]]
 
= Requirements =
== Hardware ==
 
This API requires computer with x86 compatible architecture (no ARM), 64bit Windows or Linux and connected some Advacam hardware with imaging chip. Medipix3, Timepix, Timepix2, Timepix3, etc. Some functions are universal for all hardwares (pxcInitialize, pxcGetDeviceName, etc), some is specialized for only one chip type (pxcMeasureSingleFrameTpx3 is Timepix3 only).<br>
<br>
'''Specialized functions have names with chip type included:'''
* pxcSet'''Timepix'''CalibrationEnabled – Timepix only (no Timepix3)
* pxcMeasure'''Tpx3'''DataDrivenMode – Timepix3 only
* pxcMeasureSingleFrame'''Mpx3''' – Medipix3 only
 
The attempt to use the function if compatible hardware (in initialized state) not present, end with error.<br>
Return code is PXCERR_UNEXPECTED_ERROR.
 
== Software ==
All the API functions have heads in pxcapi.h, implemented for Windows in the pxcore.dll and for linking must use the pxcore.lib in the linker settings. Implementation for Linux is in the libcore.so.<br>
Compiled program need the pixet.ini file with proper hwlibs list inside, necessary hardware dll files (eq minipix.dll for Minipixes), optional special files (eq zestwpx.bit for Widepixes), subdirectory “factory” with default config files for all present imaging devices (eq MiniPIX-I08-W0060.xml) and the Pixet core will create subdirectory “configs” to save changed configs on exit.<br>
<br>
Usually, for build, just set the compiler to use 64bit and the linker to use the pxcore.lib file.<br>
<br>
In Microsoft visual studio, it is also necessary to insert the use of WIN32 definition into the project settings (C/C++ / Preprocessor / Preprocessor definitions):<br>
[[File:VisualStudio-PrjSettings.png|frame|none|alt=Visual Studio Project Settings|Visual Studio Project Settings]]

Revision as of 13:34, 7 June 2023

Core/basic binary API introduction

The PIXet is a multi-platform software developed in ADVACAM company. It is a basic software that allows measurement control and saving of measured data with Medipix detectors. It supports Medipix2, Medipix3, Timepix and Timepix3 detectors and all the readout-devices sold by ADVACAM company such as FitPIX, AdvaPIX, WidePIX, etc. It is written in C++ language and uses multi-platform Qt libraries.

This document describes a developer interface of the PIXet software. This developer interface consists of dynamic linked library pxcore.dll (Windows) or libpxcore.so (Mac or Linux), the corresponding header file for the library pxcapi.h and few other supporting libraries (fitpix.dll, Visual Studio runtime libraries, etc.)

The core API with the pxcore library, allowing basic measurements and device settings.
Files:

  • pxcapi.h API header file
  • pxcore.dll or pxcore.so binary libraries for Windows or Linux
  • pxcore.lib static linging file for easier using on Windows (compile time only)

And need some auxiliary files and directories:

Requirements

Hardware

This API requires computer with x86 compatible architecture (no ARM), 64bit Windows or Linux and connected some Advacam hardware with imaging chip. Medipix3, Timepix, Timepix2, Timepix3, etc. Some functions are universal for all hardwares (pxcInitialize, pxcGetDeviceName, etc), some is specialized for only one chip type (pxcMeasureSingleFrameTpx3 is Timepix3 only).

Specialized functions have names with chip type included:

  • pxcSetTimepixCalibrationEnabled – Timepix only (no Timepix3)
  • pxcMeasureTpx3DataDrivenMode – Timepix3 only
  • pxcMeasureSingleFrameMpx3 – Medipix3 only

The attempt to use the function if compatible hardware (in initialized state) not present, end with error.
Return code is PXCERR_UNEXPECTED_ERROR.

Software

All the API functions have heads in pxcapi.h, implemented for Windows in the pxcore.dll and for linking must use the pxcore.lib in the linker settings. Implementation for Linux is in the libcore.so.
Compiled program need the pixet.ini file with proper hwlibs list inside, necessary hardware dll files (eq minipix.dll for Minipixes), optional special files (eq zestwpx.bit for Widepixes), subdirectory “factory” with default config files for all present imaging devices (eq MiniPIX-I08-W0060.xml) and the Pixet core will create subdirectory “configs” to save changed configs on exit.

Usually, for build, just set the compiler to use 64bit and the linker to use the pxcore.lib file.

In Microsoft visual studio, it is also necessary to insert the use of WIN32 definition into the project settings (C/C++ / Preprocessor / Preprocessor definitions):

Visual Studio Project Settings
Visual Studio Project Settings