nexatom-downloads

C API Function Reference

This chapter explains the public C API in the package’s include/nexatomtt_c_api.h. That shipped header is authoritative for exact declarations and record layouts. These pages cover 0.1.0-preview.22.62, while retaining the earlier manual’s reference structure.

While Chapter 5 focuses on the object-oriented Python abstractions, this chapter documents the raw hardware control endpoints, memory management rules, and pointer semantics required when integrating the SDK into C, C++, Rust, LabVIEW, or other Foreign Function Interface (FFI) environments.

Architectural Rules

Before utilizing the C API, developers must adhere to the following architectural constraints:

  1. Return Codes: Check the declared return type. For nexatom_error_code_t, NEXATOM_SUCCESS is success and a nonzero result must be handled. Some functions return strings or void instead.
  2. String Encodings: All string buffers (e.g., serial numbers, error messages) expect and return strictly UTF-8 encoded null-terminated character arrays.
  3. Callback ownership: Fixed by-value records can be copied into application storage. The versioned configuration-dump callback is a borrowed pointer/view exception and requires a deep copy of its records. Follow the exact typedef and callback ownership rules.

Chapter Contents

The reference is grouped by function. For complete processed/raw applications use examples/sdk/hardware.c or hardware.cpp and their shared acquisition code; see template anatomy.

Module Description
Library version and errors Native identity and diagnostics
Logging Structured logs, configuration, statistics and quiescent unregister
Discovery and lifecycle Device selection and handle ownership
Connection and profile Runtime readiness, authority and capabilities, automatic reconnection and pulled cables
System control Enable, reset, clock request and output selection
Field update Existing image slots, guarded loading, same-handle boot and boot read-back
Channel configuration Threshold, edge, delay, hysteresis and test pulses
Callbacks Data, telemetry/configuration views and callback lifetime
TIHI Normal/Fast TIHI and fitting
MFCO Patterns, result span and result quality
CORL/CORM Intensity correlation and normalization
DLS Host light-scattering analysis controls
FCS Host fluorescence-correlation analysis controls
DCS Host diffuse-correlation analysis controls
Telemetry and configuration Requests, available views, measurement abort, the latest configuration dump and DTC status/apply controls
Calibration Supported requests and automatic triggers
File saving Native raw/processed file sinks, save end, saving result and keeping up with the data
Binary reader Offline NXTT batches and series, time-tag export and Fast TIHI click files