Teledyne LeCroy WaveExpert 100H Operators Manual User Manual
Page 202

Operator’s Manual
200
WE-OM-E Rev A
for(i = 0; i < 4; ++i)
printf("%f ", (m_lpWaveform[i] * descHeader->verGain) + descHeader->verOffset);
// compute the mean of all data values, while computing the abs value of the waveform
in-place
double sum = 0.0;
for(i = 0; i < descHeader->numSamples; ++i)
{
sum += (m_lpWaveform[i] * descHeader->verGain) + descHeader->verOffset;
m_lpWaveform[i] = abs(m_lpWaveform[i]);
}
sum /= descHeader->numSamples;
// modify the output units, set to Amps
strcpy(descHeader->verUnit, "A");
// print the mean, numer of samples, trigger time in seconds, and the segment index
printf(" (%f) %d %d %d\n", sum, descHeader->numSamples, (int)
(descHeader->trigTime / lecTimeStampOneSecond), descHeader->segmentIndex);
// use to flag that the output is not valid, increasing performance when
// it is not necessary to read data back into the DSO
//descHeader->flags &= ~FLAGS_OUTPUT_VALID;
// flag that processing is complete
SetEvent(m_hProcessingComplete);
}
return 0;
}
Header Description
int descVersion; // header version number
int flags; // misc. flags indicating the status of input, and how to treat the output
int headerSize; // size of the header, data starts immediately after the hdr.
int windowSize; // total size of the window (header + data)
int numSamples; // total number of samples in the input waveform
int segmentIndex; // index of this segment, usually zero when input waveform is not a sequence