Skip to content

C API Enums

ZIResult_enum

Defines return value for all ziAPI functions. Divided into 3 regions: info, warning and error.

Name Value Description
ZI_INFO_BASE 0x0000 (0)
ZI_INFO_SUCCESS 0x0000 (0) Success (no error)
ZI_INFO_MAX
ZI_WARNING_BASE 0x4000 (16384)
ZI_WARNING_GENERAL 0x4000 (16384) Warning (general);.
ZI_WARNING_NOTFOUND 0x4003 (16387) Value or Node not found.
ZI_WARNING_INVALID_KEYWORD 0x4005 (16389) Unknown keyword.
ZI_WARNING_MAX
ZI_ERROR_BASE 0x8000 (32768)
ZI_ERROR_GENERAL 0x8000 (32768) Error (general)
ZI_ERROR_MALLOC 0x8002 (32770) Memory allocation failed.
ZI_ERROR_CONNECTION 0x800c (32780) Connection invalid.
ZI_ERROR_TIMEOUT 0x800d (32781) Command timed out.
ZI_ERROR_COMMAND 0x800e (32782) Command internally failed.
ZI_ERROR_SERVER_INTERNAL 0x800f (32783) Command failed in server.
ZI_ERROR_LENGTH 0x8010 (32784) Provided Buffer length is too small.
ZI_ERROR_FILE 0x8011 (32785) Can't open file or read from it.
ZI_ERROR_DUPLICATE 0x8012 (32786) There is already a similar entry.
ZI_ERROR_READONLY 0x8013 (32787) Attempt to set a read-only node.
ZI_ERROR_DEVICE_NOT_VISIBLE 0x8014 (32788) Device is not visible to the server.
ZI_ERROR_DEVICE_IN_USE 0x8015 (32789) Device is already connected by a different server.
ZI_ERROR_DEVICE_INTERFACE 0x8016 (32790) Device does currently not support the specified interface.
ZI_ERROR_DEVICE_CONNECTION_TIMEOUT 0x8017 (32791) Device connection timeout.
ZI_ERROR_DEVICE_DIFFERENT_INTERFACE 0x8018 (32792) Device already connected over a different Interface.
ZI_ERROR_DEVICE_NEEDS_FW_UPGRADE 0x8019 (32793) Device needs FW upgrade.
ZI_ERROR_ZIEVENT_DATATYPE_MISMATCH 0x801A (32794) Trying to get data from a poll event with wrong target data type.
ZI_ERROR_DEVICE_NOT_FOUND 0x801B (32795) Device not found.
ZI_ERROR_NOT_SUPPORTED 0x801C (32796) Provided arguments are not supported for the command.
ZI_ERROR_TOO_MANY_CONNECTIONS 0x801D (32797) Connection invalid.
ZI_ERROR_NOT_ON_HF2 0x801E (32798) Command not supported on HF2.
ZI_ERROR_INVALID_ARGUMENT 0x801F (32799) Invalid argument received.
ZI_ERROR_WRITEONLY 0x8020 (32800) Attempt to get a write-only node.
ZI_ERROR_SAMPLE_LOSS 0x8021 (32801) Sample loss detected.
ZI_ERROR_COM_NACK_BASE 0x9000 (36864) Errors reported by device.
ZI_ERROR_COM_NACK_NO_ERROR 0x9000 (36864)
ZI_ERROR_COM_NACK_INVALID_AP_ADDRESS 0x9001 (36865)
ZI_ERROR_COM_NACK_INVALID_AP_OFFSET 0x9002 (36866)
ZI_ERROR_COM_NACK_INVALID_AP_LENGTH 0x9003 (36867)
ZI_ERROR_COM_NACK_READONLY_AP 0x9004 (36868)
ZI_ERROR_COM_NACK_NOT_SERVED_AP 0x9005 (36869)
ZI_ERROR_COM_NACK_NOT_INDEXED_AP 0x9006 (36870)
ZI_ERROR_COM_NACK_INVALID_VECT_LEN 0x9007 (36871)
ZI_ERROR_COM_NACK_INVALID_VECT_FRAME 0x9008 (36872)
ZI_ERROR_COM_NACK_INVALID_VECT_OFFSET 0x9009 (36873)
ZI_ERROR_COM_NACK_INVALID_VECT_EXTRA 0x900a (36874)
ZI_ERROR_COM_NACK_INVALID_VECT_SEQUENCE 0x900b (36875)
ZI_ERROR_COM_NACK_INVALID_VECT_IDX_OFFSET 0x900c (36876)
ZI_ERROR_COM_NACK_INVALID_VECT_TYPE 0x900d (36877)
ZI_ERROR_COM_NACK_INVALID_VECT_DATA_LEN 0x900e (36878)
ZI_ERROR_COM_NACK_INVALID_VECT_EXTRA_LEN 0x900f (36879)
ZI_ERROR_COM_NACK_TIMEOUT 0x9010 (36880)
ZI_ERROR_COM_NACK_RESOURCE_INACTIVE 0x9011 (36881)
ZI_ERROR_COM_NACK_RESOURCE_BUSY 0x9012 (36882)
ZI_ERROR_COM_NACK_EXECUTION_ERROR 0x9013 (36883)
ZI_ERROR_COM_NACK_VECTOR_QUEUE_FULL 0x9014 (36884)
ZI_ERROR_COM_NACK_POSTPONED 0x9015 (36885)
ZI_ERROR_COM_NACK_ADJUSTED 0x9016 (36886)
ZI_ERROR_COM_NACK_VECTOR_CANCELED 0x9017 (36887)
ZI_ERROR_COM_NACK_INTERNAL_BASE 0x9100 (37120) SW-generated extension of device errors.
ZI_ERROR_COM_NACK_INTERNAL_NO_PAYLOAD 0x9101 (37121)
ZI_ERROR_COM_NACK_INTERNAL_TOO_MANY_PENDING 0x9102 (37122)
ZI_ERROR_COM_NACK_INTERNAL_UNRECOGNIZED 0x9103 (37123)
ZI_ERROR_MAX

ZIValueType_enum

Enumerates all types that data in a ZIEvent may have.

Name Value Description
ZI_VALUE_TYPE_NONE 0 No data type, event is invalid.
ZI_VALUE_TYPE_DOUBLE_DATA 1 ZIDoubleData type. Use the ZIEvent.value.doubleData pointer to read the data of the event.
ZI_VALUE_TYPE_INTEGER_DATA 2 ZIIntegerData type. Use the ZIEvent.value.integerData pointer to read the data of the event.
ZI_VALUE_TYPE_DEMOD_SAMPLE 3 ZIDemodSample type. Use the ZIEvent.value.demodSample pointer to read the data of the event.
ZI_VALUE_TYPE_SCOPE_WAVE_OLD 4 ScopeWave type, used in v1 compatibility mode. use the ZIEvent.value.scopeWaveOld pointer to read the data of the event.
ZI_VALUE_TYPE_AUXIN_SAMPLE 5 ZIAuxInSample type. Use the ZIEvent.value.auxInSample pointer to read the data of the event.
ZI_VALUE_TYPE_DIO_SAMPLE 6 ZIDIOSample type. Use the ZIEvent.value.dioSample pointer to read the data of the event.
ZI_VALUE_TYPE_BYTE_ARRAY 7 ZIByteArray type. Use the ZIEvent.value.byteArray pointer to read the data of the event.
ZI_VALUE_TYPE_PWA_WAVE 8 ZIPWAWave type. Use the ZIEvent.value.pwaWave pointer to read the data of the event.
ZI_VALUE_TYPE_TREE_CHANGE_DATA_OLD 16 TreeChange type - a list of added or removed nodes, used in v1 compatibility mode. Use the ZIEvent.value.treeChangeDataOld pointer to read the data of the event.
ZI_VALUE_TYPE_DOUBLE_DATA_TS 32 ZIDoubleDataTS type. Use the ZIEvent.value.doubleDataTS pointer to read the data of the event.
ZI_VALUE_TYPE_INTEGER_DATA_TS 33 ZIIntegerDataTS type. Use the ZIEvent.value.integerDataTS pointer to read the data of the event.
ZI_VALUE_TYPE_COMPLEX_DATA 34 ZIComplexData type. Use the ZIEvent.value.complexData pointer to read the data of the event.
ZI_VALUE_TYPE_SCOPE_WAVE 35 ZIScopeWave type. Use the ZIEvent.value.scopeWave pointer to read the data of the event.
ZI_VALUE_TYPE_SCOPE_WAVE_EX 36 ZIScopeWaveEx type. Use the ZIEvent.value.scopeWaveEx pointer to read the data of the event.
ZI_VALUE_TYPE_BYTE_ARRAY_TS 38 ZIByteArrayTS type. Use the ZIEvent.value.byteArrayTS pointer to read the data of the event.
ZI_VALUE_TYPE_CNT_SAMPLE 46 ZICntSample type. Use the ZIEvent.value.cntSample pointer to read the data of the event.
ZI_VALUE_TYPE_TRIG_SAMPLE 47 ZITrigSample type. Use the ZIEvent.value.trigSample pointer to read the data of the event.
ZI_VALUE_TYPE_TREE_CHANGE_DATA 48 ZITreeChangeData type - a list of added or removed nodes. Use the ZIEvent.value.treeChangeData pointer to read the data of the event.
ZI_VALUE_TYPE_ASYNC_REPLY 50 ZIAsyncReply type. Use the ZIEvent.value.asyncReply pointer to read the data of the event.
ZI_VALUE_TYPE_SWEEPER_WAVE 64 ZISweeperWave type. Use the ZIEvent.value.sweeperWave pointer to read the data of the event.
ZI_VALUE_TYPE_SPECTRUM_WAVE 65 ZISpectrumWave type. Use the ZIEvent.value.spectrumWave pointer to read the data of the event.
ZI_VALUE_TYPE_ADVISOR_WAVE 66 ZIAdvisorWave type. Use the ZIEvent.value.advisorWave pointer to read the data of the event.
ZI_VALUE_TYPE_VECTOR_DATA 67 ZIVectorData type. Use the ZIEvent.value.vectorData pointer to access the data of the event.
ZI_VALUE_TYPE_IMPEDANCE_SAMPLE 68 ZIImpedanceSample type. Use the ZIEvent.value.impedanceSample pointer to access the data of the event.
ZI_VALUE_TYPE_GENERATOR_WAVEFORM_VECTOR_DATA 69 ZIWaveformVectorData type. Use the ZIEvent.value.generatorWaveformVector pointer to access the data of the event.
ZI_VALUE_TYPE_RESULT_LOGGER_VECTOR_DATA 70 ZIResultLoggerVectorData type. Use the ZIEvent.value.resultLoggerVector pointer to access the data of the event.
ZI_VALUE_TYPE_SCOPE_VECTOR_DATA 71 ZIScopeOutputVectorData type. Use the ZIEvent.value.scopeVector pointer to access the data of the event.
ZI_VALUE_TYPE_DEMODULATOR_VECTOR_DATA 72 ZIDemodVector type. Use the ZIEvent.value.demodVector pointer to access the data of the event.
ZI_VALUE_TYPE_ERROR 73 ZIError type. Use the ZIEvent.value.error pointer to read the data of the event.
ZI_VALUE_TYPE_PID_VECTOR_DATA 74 ZIPIDVector type. Use the ZIEvent.value.pidVector pointer to access the data of the event.
ZI_VALUE_TYPE_UNSIGNED_INTEGER_DATA 75 ZIUnsignedIntegerData type. Use the ZIEvent.value.unsignedIntegerData pointer to access the data of the event.
ZI_VALUE_TYPE_BOXCAR_VECTOR_DATA 76 ZIBoxcarVector type. Use the ZIEvent.value.boxcarVector pointer to access the data of the event.

ZITreeAction_enum

Defines the actions that are performed on a tree, as returned in the ZITreeChangeData::action or ZITreeChangeDataOld::action.

Name Value Description
ZI_TREE_ACTION_REMOVE 0 A node has been removed.
ZI_TREE_ACTION_ADD 1 A node has been added.
ZI_TREE_ACTION_CHANGE 2 A node has been changed.

ZIScopeSampleFormat_enum

Defines the data format of scope samples:

Name Value Description
ZI_SCOPE_SAMPLE_FORMAT_INT16 0 Int16 Non-Interleaved, the samples for each enabled scope channel are stored together one channel after the other, e.g. channel0-sample0, channel0-sample1...channel0-sampleN, channel1-sample0, channel1-sample1...channel1-sampleN.
ZI_SCOPE_SAMPLE_FORMAT_INT32 1 Int32, Non-Interleaved.
ZI_SCOPE_SAMPLE_FORMAT_FLOAT 2 Float, Non-Interleaved.
ZI_SCOPE_SAMPLE_FORMAT_INT16_INTERLEAVED 4 Int16 Interleave d, the samples for each enabled scope channel are stored in successive elements in the data buffer, e.g. channel0-sample0,channel1-sample0,channel0-sample1,channel1-sample1,channel0-sample2,channel1-sample2.
ZI_SCOPE_SAMPLE_FORMAT_INT32_INTERLEAVED 5 Int32 Interleaved as described for ZI_SCOPE_SAMPLE_FORMAT_INT16INTERLEAVED.
ZI_SCOPE_SAMPLE_FORMAT_FLOAT_INTERLEAVED 6 Float Interleaved as described for ZI_SCOPE_SAMPLE_FORMAT_INT16INTERLEAVED.

ZIScopeSampleFormatMask_enum

Helper enum to enable testing certain properties of the scope sample format.

Name Value Description
ZI_SCOPE_SAMPLE_FORMAT_MASK_DATA_TYPE 3 Mask to enable determining only the data type in ZIScopeSampleFormat_enum.
ZI_SCOPE_SAMPLE_FORMAT_MASK_INTERLEAVED 4 Mask to test the interleaved bit in ZIScopeSampleFormat_enum.

ZIImpFlags_enum

Enumerates the bits set in an ZIImpedanceSample's flags.

Name Value Description
ZI_IMP_FLAGS_NONE 0x00000000 (0)
ZI_IMP_FLAGS_VALID_INTERNAL 0x00000001 (1) Internal calibration is applied.
ZI_IMP_FLAGS_VALID_USER 0x00000002 (2) User compensation is applied.
ZI_IMP_FLAGS_AUTORANGE_GATING 0x00000004 (4) Reserved for future use.
ZI_IMP_FLAGS_OVERFLOW_VOLTAGE 0x00000010 (16) Overflow on voltage input.
ZI_IMP_FLAGS_OVERFLOW_CURRENT 0x00000020 (32) Overflow on current input.
ZI_IMP_FLAGS_UNDERFLOW_VOLTAGE 0x00000040 (64) Underflow on voltage input.
ZI_IMP_FLAGS_UNDERFLOW_CURRENT 0x00000080 (128) Underflow on current input.
ZI_IMP_FLAGS_FREQ_EXACT 0x00000100 (256) Reserved for future use.
ZI_IMP_FLAGS_FREQ_INTERPOLATION 0x00000200 (512) Reserved for future use.
ZI_IMP_FLAGS_FREQ_EXTRAPOLATION 0x00000400 (1024) Reserved for future use.
ZI_IMP_FLAGS_LOWDUT2T 0x00000800 (2048) LowDUT impedance detected.
ZI_IMP_FLAGS_SUPPRESSION_PARAM0 0x00001000 (4096) Suppression of first parameter PARAM0.
ZI_IMP_FLAGS_SUPPRESSION_PARAM1 0x00002000 (8192) Suppression of second parameter PARAM1.
ZI_IMP_FLAGS_FREQLIMIT_RANGE_VOLTAGE 0x00004000 (16384) Reserved for future use.
ZI_IMP_FLAGS_FREQLIMIT_RANGE_CURRENT 0x00008000 (32768) Frequency bigger than the frequency limit of active current input range.
ZI_IMP_FLAGS_STRONGCOMPENSATION_PARAM0 0x00010000 (65536) Strong compensation detected on PARAM0.
ZI_IMP_FLAGS_STRONGCOMPENSATION_PARAM1 0x00020000 (131072) Strong compensation detected on PARAM1.
ZI_IMP_FLAGS_NEGATIVE_QFACTOR 0x00040000 (262144) Non-reasonable values for Q/D measurement.
ZI_IMP_FLAGS_ONE_PERIOD 0x00080000 (524288) One-period measurement enabled.
ZI_IMP_FLAGS_ONE_PERIOD_INVALID 0x00100000 (1048576) One-period measurement values are invalid.
ZI_IMP_FLAGS_BWC_BIT1 0x00200000 (2097152) Reserved for future use.
ZI_IMP_FLAGS_BWC_BIT2 0x00400000 (4194304) Reserved for future use.
ZI_IMP_FLAGS_BWC_BIT3 0x00800000 (8388608) Reserved for future use.
ZI_IMP_FLAGS_BWC_MASK 0x00f00000 (15728640) Reserved for future use.
ZI_IMP_FLAGS_OPEN_DETECTION 0x01000000 (16777216) Open detected on 4T measurement.
ZI_IMP_FLAGS_OVERFLOW_SIGIN0 0x04000000 (67108864) Overflow on sigin0.
ZI_IMP_FLAGS_OVERFLOW_SIGIN1 0x08000000 (134217728) Overflow on sigin1.
ZI_IMP_FLAGS_MODEL_MASK 0xf0000000 (4026531840) Model selected for the measurement.

ZIVectorElementType_enum

Enumerates all the types that a ZIVectorData::elementType may have.

Name Value Description
ZI_VECTOR_ELEMENT_TYPE_UINT8 0
ZI_VECTOR_ELEMENT_TYPE_UINT16 1
ZI_VECTOR_ELEMENT_TYPE_UINT32 2
ZI_VECTOR_ELEMENT_TYPE_UINT64 3
ZI_VECTOR_ELEMENT_TYPE_FLOAT 4
ZI_VECTOR_ELEMENT_TYPE_DOUBLE 5
ZI_VECTOR_ELEMENT_TYPE_ASCIIZ 6
ZI_VECTOR_ELEMENT_TYPE_COMPLEX_FLOAT 7
ZI_VECTOR_ELEMENT_TYPE_COMPLEX_DOUBLE 8

ZIErrorKind_enum

Enumerates all the used error kinds that are supported within the ZIError. The error kind advises the user on how to handle the error.

Name Value Description
ZI_ERROR_KIND_OK 0
ZI_ERROR_KIND_CANCELLED 1
ZI_ERROR_KIND_UNKNOWN 2
ZI_ERROR_KIND_NOT_FOUND 3
ZI_ERROR_KIND_OVERWHELMED 4
ZI_ERROR_KIND_BAD_REQUEST 5
ZI_ERROR_KIND_UNIMPLEMENTED 6
ZI_ERROR_KIND_INTERNAL 7
ZI_ERROR_KIND_UNAVAILABLE 8
ZI_ERROR_KIND_TIMEOUT 9

ZIAPIVersion_enum

Name Value Description
ZI_API_VERSION_0 0
ZI_API_VERSION_1 1
ZI_API_VERSION_4 4
ZI_API_VERSION_5 5
ZI_API_VERSION_6 6
ZI_API_VERSION_MAX ZI_API_VERSION_6

ZIListNodes_enum

Defines the values of the flags used in ziAPIListNodes.

Name Value Description
ZI_LIST_NODES_ALL 0x00 (0) Default, return a simple listing of the given node immediate descendants.
ZI_LIST_NODES_RECURSIVE 0x01 (1) List the nodes recursively.
ZI_LIST_NODES_ABSOLUTE 0x02 (2) Return absolute paths.
ZI_LIST_NODES_LEAVESONLY 0x04 (4) Return only leaf nodes, which means the nodes at the outermost level of the tree.
ZI_LIST_NODES_SETTINGSONLY 0x08 (8) Return only nodes which are marked as setting.
ZI_LIST_NODES_STREAMINGONLY 0x10 (16) Return only streaming nodes (nodes that can be pushed from the device at a high data rate)
ZI_LIST_NODES_SUBSCRIBEDONLY 0x20 (32) Return only nodes that are subscribed to in the API session.
ZI_LIST_NODES_BASECHANNEL 0x40 (64) Return only one instance of a node in case of multiple channels.
ZI_LIST_NODES_GETONLY 0x80 (128) Return only nodes which can be used with the get command.
ZI_LIST_NODES_EXCLUDESTREAMING 0x100000 (1048576) Exclude streaming nodes.
ZI_LIST_NODES_EXCLUDEVECTORS 0x1000000 (16777216) Exclude node vectors.

ZIChunkHeaderFlags_enum

Defines the flags returned in the chunk header for all modules.

Name Value Description
ZI_CHUNK_HEADER_FLAG_FINISHED 0x00000001 (1) Indicates that the chunk data is complete. This flag will be set if data is read out from the module before the measurement (e.g. sweep) has finished.
ZI_CHUNK_HEADER_FLAG_ROLLMODE 0x00000002 (2) Unused.
ZI_CHUNK_HEADER_FLAG_DATALOSS 0x00000004 (4) Indicates that dataloss has occurred.
ZI_CHUNK_HEADER_FLAG_VALID 0x00000008 (8) Indicates that the data is valid.
ZI_CHUNK_HEADER_FLAG_DATA 0x00000010 (16) Indicates whether then chunk contains data (opposite to setting).
ZI_CHUNK_HEADER_FLAG_DISPLAY 0x00000020 (32) Internal use only.
ZI_CHUNK_HEADER_FLAG_FREQDOMAIN 0x00000040 (64) chunk contains frequency domain data, opposite to time domain.
ZI_CHUNK_HEADER_FLAG_SPECTRUM 0x00000080 (128) chunk recorded in spectrum mode.
ZI_CHUNK_HEADER_FLAG_OVERLAPPED 0x00000100 (256) chunk results overlap with neighboring chunks, see spectrum.
ZI_CHUNK_HEADER_FLAG_ROWFINISHED 0x00000200 (512) indicates that the current row is finished - useful for row first averaging.
ZI_CHUNK_HEADER_FLAG_ONGRIDSAMPLING 0x00000400 (1024) exact sampling was used.
ZI_CHUNK_HEADER_FLAG_ROWREPETITION 0x00000800 (2048) row first averaging is enabled.
ZI_CHUNK_HEADER_FLAG_PREVIEW 0x00001000 (4096) chunk contains preview (fft with less points).

ZIChunkHeaderModuleFlags_enum

Defines flags returned in the chunk header that only apply for certain modules.

Name Value Description
ZI_CHUNK_HEADER_MODULE_FLAGS_WINDOW 0x00000003 (3) Data Acquisition Module FFT Window used in the Data Acquisition Module: 0 - Rectangular, 1 - Hann, 2 - Hamming, 3 - Blackmanharris, 4 - Exponential, 5 - Cosine, 6 - CosineSquare.

ZIDeviceStatus_enum

Defines the values of the Discovery property 'statusflags' retrieved by ziAPIDiscoveryGetValueI.

Name Value Description
ZI_DEVICE_STATUS_NOT_YET_READY 0x0001 (1)
ZI_DEVICE_STATUS_FREE 0x0002 (2)
ZI_DEVICE_STATUS_IN_USE_BY 0x0004 (4)
ZI_DEVICE_STATUS_FW_UPGRADE_USB 0x0008 (8)
ZI_DEVICE_STATUS_FW_UPGRADE_REQUIRED 0x0010 (16)
ZI_DEVICE_STATUS_FW_UPGRADE_AVAILABLE 0x0020 (32)
ZI_DEVICE_STATUS_FW_DOWNGRADE_REQUIRED 0x0040 (64)
ZI_DEVICE_STATUS_FW_DOWNGRADE_AVAILABLE 0x0080 (128)
ZI_DEVICE_STATUS_FW_UPDATE_IN_PROGRESS 0x0100 (256)
ZI_DEVICE_STATUS_DEVICE_UNKNOWN 0x0200 (512)

TREE_ACTION

TREE_ACTION defines the values for the TreeChange::Action Variable.

Name Value Description
TREE_ACTION_REMOVE_DUMMY_FOR_ANSI_C 0
TREE_ACTION_ADD_DUMMY_FOR_ANSI_C 1
TREE_ACTION_CHANGE_DUMMY_FOR_ANSI_C 2