Struct ZIScopeWave#

struct ZIScopeWave#

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.

Public Members

ZITimeStamp timeStamp#

The timestamp of the last sample in this data block.

ZITimeStamp triggerTimeStamp#

The timestamp of the trigger (may also fall between samples and in another block)

double dt#

Time difference between samples in seconds.

uint8_t channelEnable[4]#

Up to four channels: if channel is enabled, corresponding element is non-zero.

uint8_t channelInput[4]#

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.

uint8_t triggerEnable#

Non-zero if trigger is enabled:

Bit encoded:

  • Bit (0): 1 = Trigger on rising edge,

  • Bit (1): 1 = Trigger on falling edge.

uint8_t triggerInput#

Trigger source (same values as for channel input)

uint8_t reserved0[2]#
uint8_t channelBWLimit[4]#

Bandwidth-limit flag, per channel.

Bit encoded:

  • Bit (0): 1 = Enable bandwidth limiting.

  • Bit (7…1): Reserved

uint8_t channelMath[4]#

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. |ch0+i*ch1|

  • Bit(7…3): Reserved

float channelScaling[4]#

Data scaling factors for up to 4 channels.

uint32_t sequenceNumber#

Current scope shot sequence number. Identifies a scope shot.

uint32_t segmentNumber#

Current segment number.

uint32_t blockNumber#

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.

uint64_t totalSamples#

Total number of samples in one channel in the current scope shot, same for all channels.

uint8_t dataTransferMode#

Data transfer mode.

Value and the corresponding data transfer mode:

  • 0 - SingleTransfer,

  • 1 - BlockTransfer,

  • 3 - ContinuousTransfer. Other values are reserved.

uint8_t blockMarker#

Block marker:

Bit encoded:

  • Bit (0): 1 = End marker for continuous or multi-block transfer,

  • Bit (7..0): Reserved.

uint8_t flags#

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).

uint8_t sampleFormat#

Data format of samples:

Value is one of ZIScopeSampleFormat_enum

uint32_t sampleCount#

Number of samples in one channel in the current block, same for all channels.

int16_t dataInt16[0]#

Wave data when sampleFormat==0 or sampleFormat==4.

int32_t dataInt32[0]#

Wave data when sampleFormat==1 or sampleFormat==5.

float dataFloat[0]#

Wave data when sampleFormat==2 or sampleFormat==6.

union ZIScopeWave::[anonymous] data#

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.