Introduction to logic analyzer API

The logic analyzer API (also called IHWAPI, short for Ikalogic Hardware API) is an ecosystem of libraries (DLL or SO for linux/Mac) that allows a user to interface with our Logic Analyzer devices from their own software. The libraries are ABI compatible, meaning that it can be interfaced with a wide range of programming languages and environments, like C, C++, C# or Visual Basic. That being said, we Currently only provide C header files. If other formats are needed, we’re glad to hear from you and see how it can be ported to other languages.

Note: This API is a work in progress, and not all logic analyzer devices are supported. That being said, we’re actively working on it, so don’t hesitate to check back regularly or subscribe to newsletter to be informed when new APIs are released.

In general, we try to have a homogeneous and consistent set of APIs that are similar to each others. That being said, given the differences between different devices, this is not always possible.

Principle of operation of the API

The life cycle of the interactions with the device (via the API) usually follow this scheme:

  1. List the device(s) available on the USB bus
  2. Open the device (or a device from the list if there are several ones connected to the computer)
  3. Start a capture
  4. retrieve captured samples
  5. Close the device.

It is not mandatory to close the device after retrieving captured samples. If you intend to repeat the operation of capturing samples several times, you can keep the device open for as long as it’s needed. It’s also possible to poll the status of the device to ensure it’s still connected to the USB port when a capture is requested.

Header files

Each device has 3 header files that need to be included in your project to use the library correctly:

  1. ihwapi_common_types.h As its name implies this file is the same for all logic analyzer devices. it groups the C declarations of custom types and structures that are needed across all different APIs
  2. *DEVICE*_types.h where *DEVICE* is to be replaced by the name of the specific device. This file includes C declarations of the custom types and structures that are specific to a particular device.
  3. *DEVICE*api.h where *DEVICE* is to be replaced by the name of the specific device. This header file list all the functions that are included in the API.