Function ziAPIModCreate#
Defined in File ziAPI.h
-
ZIResult_enum ziAPIModCreate(ZIConnection conn, ZIModuleHandle *handle, const char *moduleId)#
Create a ZIModuleHandle that can be used for asynchronous measurement tasks.
This function initializes a ziCore module and provides a pointer (handle) with which to access and work with it. Note that this function does not start the module’s thread. Before the thread can be started (with ziAPIModExecute):
the device serial (e.g., “dev100”) to be used with module must be specified via ziAPIModSetByteArray.
the desired data (node paths) to record during the measurement must be specified via ziAPIModSubscribe. The module’s thread is stopped with ziAPIModClear.
See also
- Parameters:
conn – [in] The ZIConnection which should be used to initialize the module.
handle – [out] Pointer to the initialized ZIModuleHandle, which from then on can be used to reference the module.
moduleId – [in] The name specifying the type the module to create (only the following ziCore Modules are currently supported in ziAPI):
”sweep” to initialize an instance of the Sweeper Module.
”record” to initialize an instance of the Software Trigger (Recorder) Module.
”zoomFFT” to initialize an instance of the Spectrum Module.
”deviceSettings” to initialize an instance to save/load device settings.
”pidAdvisor” to initialize an instance of the PID Advisor Module.
”awgModule” to initialize an instance of the AWG Compiler Module.
”impedanceModule” to initialize an instance of the Impedance Compensation Module.
”scopeModule” to initialize an instance of the Scope Module to assembly scope shots.
”multiDeviceSyncModule” to initialize an instance of the Device Synchronization Module.
”dataAcquisitionModule” to initialize an instance of the Data Acquisition Module.
”precompensationAdvisor” to initialize an instance of the Precompensation Advisor Module.
”quantumAnalyzerModule” to initialize an instance of the Quantum Analyzer Module.
- Returns:
ZI_INFO_SUCCESS On success.
ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred.
ZI_WARNING_NOTFOUND if the provided moduleId was invalid.
Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.