xiQ - Technical Manual Version 1.35
90
5.7.
Programming
5.7.1.
XIMEA APIs
•
- Streamlined API. The standard API for C/C++ based projects, see
•
- Managed .NET Common Language Runtime (CLR) API.
xiAPI.NET is designed as a wrapper around xiAPI and therefore shares most of its functionality.
•
– Integrated API into PYTHON.
5.7.2.
xiAPI Overview
xiAPI stands for XIMEA Application Programming Interface. It is a common interface for all XIMEA cameras.
Architecture
API is a software interface between the camera system driver and application.
•
On Windows: xiAPI is compiled into xiapi32.dll or xiapi64.dll
•
On Linux: xiAPI is compiled into /usr/lib/libm3api.so
Installation
xiAPI is part of all current XIMEA software packages for Windows, Linux and MacOS.
For information on the software packages, see Error! Reference source not found. Error! Reference source not found.
5.7.3.
xiAPI Functions Description
The core of xiAPI consists of the following functions, which allow controlling of the camera functionality.
// get the number of discovered devices.
XI_RETURN xiGetNumberDevices(OUT DWORD *pNumberDevices);
// open interface
XI_RETURN xiOpenDevice(IN DWORD DevId, OUT PHANDLE hDevice);
// get parameter
XI_RETURN xiGetParam(IN HANDLE hDevice,
const
char
* prm,
void
* val,
DWORD * size, XI_PRM_TYPE * type);
// set parameter
XI_RETURN xiSetParam(IN HANDLE hDevice,
const
char
* prm,
void
* val,
DWORD size, XI_PRM_TYPE type);
// start the data acquisition
XI_RETURN xiStartAcquisition(IN HANDLE hDevice);
// acquire image and return image information
XI_RETURN xiGetImage(IN HANDLE hDevice, IN DWORD TimeOut, INOUT XI_IMG
* img);
// stop the data acquisition
XI_RETURN xiStopAcquisition(IN HANDLE hDevice);
// close interface
XI_RETURN xiCloseDevice(IN HANDLE hDevice);