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.18.2, 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
System control Enable, reset, clock request and output selection
Field update Existing image slots, guarded loading and same-handle boot
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 and DTC status/apply controls
Calibration Supported requests and automatic triggers
File saving Native raw/processed file sinks
Binary reader Offline NXTT batches and series