Skip to content

C API ZIScopeWave StructΒΆ

The structure used to hold scope data (when using API Level 4). Note that ZIScopeWave does not contain the structure member channelOffset, whereas ZIScopeWaveEx does. The data may be formatted differently, depending on settings. See the description of the structure members for details.

Name Type Description
timeStamp ZITimeStamp The timestamp of the last sample in this data block.
triggerTimeStamp ZITimeStamp The timestamp of the trigger (may also fall between samples and in another block)
dt double Time difference between samples in seconds.
channelEnable uint8_t Up to four channels: if channel is enabled, corresponding element is non-zero.
channelInput uint8_t Specifies the input source for each of the scope four channels.
Value of channelInput and corresponding input source:
  • 0 = Signal Input 1,
  • 1 = Signal Input 2,
  • 2 = Trigger Input 1,
  • 3 = Trigger Input 2,
  • 4 = Aux Output 1,
  • 5 = Aux Output 2,
  • 6 = Aux Output 3,
  • 7 = Aux Output 4,
  • 8 = Aux Input 1,
  • 9 = Aux Input 2.
triggerEnable uint8_t Non-zero if trigger is enabled:
Bit encoded:
  • Bit (0): 1 = Trigger on rising edge,
  • Bit (1): 1 = Trigger on falling edge.
triggerInput uint8_t Trigger source (same values as for channel input)
reserved0 uint8_t
channelBWLimit uint8_t Bandwidth-limit flag, per channel.
Bit encoded:
  • Bit (0): 1 = Enable bandwidth limiting.
  • Bit (7...1): Reserved
channelMath uint8_t Enable/disable math operations such as averaging or FFT.
Bit encoded:
  • Bit(0): 1 = Perform averaging,
  • Bit(1): 1 = Perform FFT,
  • Bit(2): 1 = Data originates from a channel-collapsing transform, e.g.
channelScaling float Data scaling factors for up to 4 channels.
sequenceNumber uint32_t Current scope shot sequence number. Identifies a scope shot.
segmentNumber uint32_t Current segment number.
blockNumber uint32_t Current block number from the beginning of a scope shot. Large scope shots are split into blocks, which need to be concatenated to obtain the complete scope shot.
totalSamples uint64_t Total number of samples in one channel in the current scope shot, same for all channels.
dataTransferMode uint8_t Data transfer mode.
Value and the corresponding data transfer mode:
  • 0 - SingleTransfer,
  • 1 - BlockTransfer,
  • 3 - ContinuousTransfer. Other values are reserved.
blockMarker uint8_t Block marker:
Bit encoded:
  • Bit (0): 1 = End marker for continuous or multi-block transfer,
  • Bit (7..0): Reserved.
flags uint8_t Indicator Flags.
Bit encoded:
  • Bit (0): 1 = Data loss detected (samples are 0),
  • Bit (1): 1 = Missed trigger,
  • Bit (2): 1 = Transfer failure (corrupted data).
sampleFormat uint8_t Data format of samples:
Value is one of ZIScopeSampleFormat_enum
sampleCount uint32_t Number of samples in one channel in the current block, same for all channels.
dataInt16 int16_t Wave data when sampleFormat==0 or sampleFormat==4.
dataInt32 int32_t Wave data when sampleFormat==1 or sampleFormat==5.
dataFloat float Wave data when sampleFormat==2 or sampleFormat==6.
data union ZIScopeWave::@0 Wave data, access via union member dataInt16, dataInt32 or dataFloat depending on sampleFormat. Indexing scheme also depends on sampleFormat.
Example for interleaved int16 wave, 4096 samples, 2 channels:
  • data.dataInt16[0] - sample 0 of channel 0,
  • data.dataInt16[1] - sample 0 of channel 1,
  • data.dataInt16[2] - sample 1 of channel 0,
  • data.dataInt16[3] - sample 1 of channel 1,
  • ...
  • data.dataInt16[8190] - sample 4095 of channel 0,
  • data.dataInt16[8191] - sample 4095 of channel 1.
Example for non-interleaved int16 wave, 4096 samples, 2 channels:
  • data.dataInt16[0] - sample 0 of channel 0,
  • data.dataInt16[1] - sample 1 of channel 0,
  • .. - ...
  • data.dataInt16[4095] - sample 4095 of channel 0,
  • data.dataInt16[4096] - sample 0 of channel 1,
  • data.dataInt16[4097] - sample 1 of channel 1,
  • ...
  • data.dataInt16[8191] - sample 4095 of channel 1.