Skip to content

C API Sequence Compiler Functions


ZICompileResult* ziAPIAllocateCompileResult(void)

Allocates ZICompileResult structure and returns a pointer to it.

This function allocates a ZICompileResult structure and returns a pointer to it. The memory must be freed using ziAPIDeallocateCompileResult. ziAPIDeallocateCompileResult


void ziAPIDeallocateCompileResult(ZICompileResult *result)

Deallocates ZICompileResult structure created with ziAPIAllocateCompileResult.

This function is the complement to ziAPIAllocateCompileResult. ziAPIAllocateCompileResult


Name Type Direction Description
result ZICompileResult * in Pointer to ZICompileResult structure to be deallocated.


ZIResult_enum ziAPICompileSeqC(const char *source, const char *deviceType, const char *deviceOptions, unsigned int coreIndex, const char *kwargs, ZICompileResult *result)

Compile a SeqC program for a sequencer.

Compile the sequencer program and return the ELF data for upload to an instrument. Keyword arguments (JSON):

  • samplerate (float): target sample rate of the sequencer. Mandatory and only respected for HDAWG. Should match the value set on the device:/dev.../system/clocks/sampleclock/freq.
  • sequencer (str): one ofqa,sg, orauto. Mandatory for SHFQC.
  • wavepath (str): path to directory with waveforms. Defaults to path used by LabOne UI or AWG Module.
  • waveforms (str | null): list of CSV waveform files separated by;. Defaults to an empty list. Set tonull to include all CSV files inwavepath. Defaults to all CSV files inwavepath.
  • filename (str): name of embedded ELF filename.
ziAPIAllocateCompileResult, ziAPIDeallocateCompileResult, ZICompileResult


Name Type Direction Description
source const char * in SeqC input
deviceType const char * in Target device type, e.g., HDAWG8, SHFQC
deviceOptions const char * in List of device options, separated by newlines as returned by node/dev.../features/options.
coreIndex unsigned int in Index of the AWG core
kwargs const char * in JSON object with keyword arguments.
result ZICompileResult * out Structure to populate with compiler result. Holds the ELF data and extra output as JSON.


  • ZI_INFO_SUCCESS on success
  • ZI_ERROR_GENERAL if an error occurred during compilation
  • ZI_ERROR_INVALID_ARGUMENT if an invalid argument was provided
  • In case of error, the "message" property in the extra output contains the precise error reason.