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
ZI_INFO_SUCCESS 0x0000 Success (no error)
ZI_INFO_MAX
ZI_WARNING_BASE 0x4000
ZI_WARNING_GENERAL 0x4000 Warning (general);.
ZI_WARNING_NOTFOUND 0x4003 Value or Node not found.
ZI_WARNING_INVALID_KEYWORD 0x4005 Unknown keyword.
ZI_WARNING_MAX
ZI_ERROR_BASE 0x8000
ZI_ERROR_GENERAL 0x8000 Error (general)
ZI_ERROR_MALLOC 0x8002 Memory allocation failed.
ZI_ERROR_CONNECTION 0x800c Connection invalid.
ZI_ERROR_TIMEOUT 0x800d Command timed out.
ZI_ERROR_COMMAND 0x800e Command internally failed.
ZI_ERROR_SERVER_INTERNAL 0x800f Command failed in server.
ZI_ERROR_LENGTH 0x8010 Provided Buffer length is too small.
ZI_ERROR_FILE 0x8011 Can't open file or read from it.
ZI_ERROR_DUPLICATE 0x8012 There is already a similar entry.
ZI_ERROR_READONLY 0x8013 Attempt to set a read-only node.
ZI_ERROR_DEVICE_NOT_VISIBLE 0x8014 Device is not visible to the server.
ZI_ERROR_DEVICE_IN_USE 0x8015 Device is already connected by a different server.
ZI_ERROR_DEVICE_INTERFACE 0x8016 Device does currently not support the specified interface.
ZI_ERROR_DEVICE_CONNECTION_TIMEOUT 0x8017 Device connection timeout.
ZI_ERROR_DEVICE_DIFFERENT_INTERFACE 0x8018 Device already connected over a different Interface.
ZI_ERROR_DEVICE_NEEDS_FW_UPGRADE 0x8019 Device needs FW upgrade.
ZI_ERROR_ZIEVENT_DATATYPE_MISMATCH 0x801A Trying to get data from a poll event with wrong target data type.
ZI_ERROR_DEVICE_NOT_FOUND 0x801B Device not found.
ZI_ERROR_NOT_SUPPORTED 0x801C Provided arguments are not supported for the command.
ZI_ERROR_TOO_MANY_CONNECTIONS 0x801D Connection invalid.
ZI_ERROR_NOT_ON_HF2 0x801E Command not supported on HF2.
ZI_ERROR_INVALID_ARGUMENT 0x801F Invalid argument received.
ZI_ERROR_WRITEONLY 0x8020 Attempt to get a write-only node.
ZI_ERROR_SAMPLE_LOSS 0x8021 Sample loss detected.
ZI_ERROR_COM_NACK_BASE 0x9000 Errors reported by device.
ZI_ERROR_COM_NACK_NO_ERROR 0x9000
ZI_ERROR_COM_NACK_INVALID_AP_ADDRESS
ZI_ERROR_COM_NACK_INVALID_AP_OFFSET
ZI_ERROR_COM_NACK_INVALID_AP_LENGTH
ZI_ERROR_COM_NACK_READONLY_AP
ZI_ERROR_COM_NACK_NOT_SERVED_AP
ZI_ERROR_COM_NACK_NOT_INDEXED_AP
ZI_ERROR_COM_NACK_INVALID_VECT_LEN
ZI_ERROR_COM_NACK_INVALID_VECT_FRAME
ZI_ERROR_COM_NACK_INVALID_VECT_OFFSET
ZI_ERROR_COM_NACK_INVALID_VECT_EXTRA
ZI_ERROR_COM_NACK_INVALID_VECT_SEQUENCE
ZI_ERROR_COM_NACK_INVALID_VECT_IDX_OFFSET
ZI_ERROR_COM_NACK_INVALID_VECT_TYPE
ZI_ERROR_COM_NACK_INVALID_VECT_DATA_LEN
ZI_ERROR_COM_NACK_INVALID_VECT_EXTRA_LEN
ZI_ERROR_COM_NACK_TIMEOUT
ZI_ERROR_COM_NACK_RESOURCE_INACTIVE
ZI_ERROR_COM_NACK_RESOURCE_BUSY
ZI_ERROR_COM_NACK_EXECUTION_ERROR
ZI_ERROR_COM_NACK_VECTOR_QUEUE_FULL
ZI_ERROR_COM_NACK_POSTPONED
ZI_ERROR_COM_NACK_INTERNAL_BASE 0x9100 SW-generated extension of device errors.
ZI_ERROR_COM_NACK_INTERNAL_NO_PAYLOAD
ZI_ERROR_COM_NACK_INTERNAL_TOO_MANY_PENDING
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_SHF_GENERATOR_WAVEFORM_VECTOR_DATA 69 ZISHFWaveformVectorData type. Use the ZIEvent.value.vectorData pointer to access the data of the event.
ZI_VALUE_TYPE_SHF_RESULT_LOGGER_VECTOR_DATA 70 ZISHFResultLoggerVectorData type. Use the ZIEvent.value.vectorData pointer to access the data of the event.
ZI_VALUE_TYPE_SHF_SCOPE_VECTOR_DATA 71 ZISHFScopeOutputVectorData type. Use the ZIEvent.value.vectorData pointer to access the data of the event.
ZI_VALUE_TYPE_SHF_DEMODULATOR_VECTOR_DATA 72 ZISHFDemodulatorVectorData type. Use the ZIEvent.value.vectorData 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.

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,.
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
ZI_IMP_FLAGS_VALID_INTERNAL 0x00000001 Internal calibration is applied.
ZI_IMP_FLAGS_VALID_USER 0x00000002 User compensation is applied.
ZI_IMP_FLAGS_AUTORANGE_GATING 0x00000004 Reserved for future use.
ZI_IMP_FLAGS_OVERFLOW_VOLTAGE 0x00000010 Overflow on voltage input.
ZI_IMP_FLAGS_OVERFLOW_CURRENT 0x00000020 Overflow on current input.
ZI_IMP_FLAGS_UNDERFLOW_VOLTAGE 0x00000040 Underflow on voltage input.
ZI_IMP_FLAGS_UNDERFLOW_CURRENT 0x00000080 Underflow on current input.
ZI_IMP_FLAGS_FREQ_EXACT 0x00000100 Reserved for future use.
ZI_IMP_FLAGS_FREQ_INTERPOLATION 0x00000200 Reserved for future use.
ZI_IMP_FLAGS_FREQ_EXTRAPOLATION 0x00000400 Reserved for future use.
ZI_IMP_FLAGS_LOWDUT2T 0x00000800 LowDUT impedance detected.
ZI_IMP_FLAGS_SUPPRESSION_PARAM0 0x00001000 Suppression of first parameter PARAM0.
ZI_IMP_FLAGS_SUPPRESSION_PARAM1 0x00002000 Suppression of second parameter PARAM1.
ZI_IMP_FLAGS_FREQLIMIT_RANGE_VOLTAGE 0x00004000 Reserved for future use.
ZI_IMP_FLAGS_FREQLIMIT_RANGE_CURRENT 0x00008000 Frequency bigger than the frequency limit of active current input range.
ZI_IMP_FLAGS_STRONGCOMPENSATION_PARAM0 0x00010000 Strong compensation detected on PARAM0.
ZI_IMP_FLAGS_STRONGCOMPENSATION_PARAM1 0x00020000 Strong compensation detected on PARAM1.
ZI_IMP_FLAGS_NEGATIVE_QFACTOR 0x00040000 Non-reasonable values for Q/D measurement.
ZI_IMP_FLAGS_ONE_PERIOD 0x00080000 One-period measurement enabled.
ZI_IMP_FLAGS_ONE_PERIOD_INVALID 0x00100000 One-period measurement values are invalid.
ZI_IMP_FLAGS_BWC_BIT1 0x00200000 Reserved for future use.
ZI_IMP_FLAGS_BWC_BIT2 0x00400000 Reserved for future use.
ZI_IMP_FLAGS_BWC_BIT3 0x00800000 Reserved for future use.
ZI_IMP_FLAGS_BWC_MASK 0x00f00000 Reserved for future use.
ZI_IMP_FLAGS_OPEN_DETECTION 0x01000000 Open detected on 4T measurement.
ZI_IMP_FLAGS_OVERFLOW_SIGIN0 0x04000000 Overflow on sigin0.
ZI_IMP_FLAGS_OVERFLOW_SIGIN1 0x08000000 Overflow on sigin1.
ZI_IMP_FLAGS_MODEL_MASK 0xf0000000 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 Default, return a simple listing of the given node immediate descendants.
ZI_LIST_NODES_RECURSIVE 0x01 List the nodes recursively.
ZI_LIST_NODES_ABSOLUTE 0x02 Return absolute paths.
ZI_LIST_NODES_LEAVESONLY 0x04 Return only leaf nodes, which means the nodes at the outermost level of the tree.
ZI_LIST_NODES_SETTINGSONLY 0x08 Return only nodes which are marked as setting.
ZI_LIST_NODES_STREAMINGONLY 0x10 Return only streaming nodes (nodes that can be pushed from the device at a high data rate)
ZI_LIST_NODES_SUBSCRIBEDONLY 0x20 Return only nodes that are subscribed to in the API session.
ZI_LIST_NODES_BASECHANNEL 0x40 Return only one instance of a node in case of multiple channels.
ZI_LIST_NODES_GETONLY 0x80 Return only nodes which can be used with the get command.
ZI_LIST_NODES_EXCLUDESTREAMING 0x100000 Exclude streaming nodes.
ZI_LIST_NODES_EXCLUDEVECTORS 0x1000000 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 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 Unused.
ZI_CHUNK_HEADER_FLAG_DATALOSS 0x00000004 Indicates that dataloss has occurred.
ZI_CHUNK_HEADER_FLAG_VALID 0x00000008 Indicates that the data is valid.
ZI_CHUNK_HEADER_FLAG_DATA 0x00000010 Indicates whether then chunk contains data (opposite to setting).
ZI_CHUNK_HEADER_FLAG_DISPLAY 0x00000020 Internal use only.
ZI_CHUNK_HEADER_FLAG_FREQDOMAIN 0x00000040 chunk contains frequency domain data, opposite to time domain.
ZI_CHUNK_HEADER_FLAG_SPECTRUM 0x00000080 chunk recorded in spectrum mode.
ZI_CHUNK_HEADER_FLAG_OVERLAPPED 0x00000100 chunk results overlap with neighboring chunks, see spectrum.
ZI_CHUNK_HEADER_FLAG_ROWFINISHED 0x00000200 indicates that the current row is finished - useful for row first averaging.
ZI_CHUNK_HEADER_FLAG_ONGRIDSAMPLING 0x00000400 exact sampling was used.
ZI_CHUNK_HEADER_FLAG_ROWREPETITION 0x00000800 row first averaging is enabled.
ZI_CHUNK_HEADER_FLAG_PREVIEW 0x00001000 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 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
ZI_DEVICE_STATUS_FREE 0x0002
ZI_DEVICE_STATUS_IN_USE_BY 0x0004
ZI_DEVICE_STATUS_FW_UPGRADE_USB 0x0008
ZI_DEVICE_STATUS_FW_UPGRADE_REQUIRED 0x0010
ZI_DEVICE_STATUS_FW_UPGRADE_AVAILABLE 0x0020
ZI_DEVICE_STATUS_FW_DOWNGRADE_REQUIRED 0x0040
ZI_DEVICE_STATUS_FW_DOWNGRADE_AVAILABLE 0x0080
ZI_DEVICE_STATUS_FW_UPDATE_IN_PROGRESS 0x0100
ZI_DEVICE_STATUS_DEVICE_UNKNOWN 0x0200

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