niHWS_RetrieveDigitalWfmWDT
Specific Function
C Function Prototype
tHWS_Status niHWS_RetrieveDigitalWfmWDT (const char filePath[], double *rate, tHWS_DigitalWDTDataLayout data_layout, long waveformBufferSize, unsigned char waveformBuffer[], long *number_ofSignals_inWaveform, long *number_ofSamples_inWaveform);
Purpose
Retrieves the digital waveform data type samples from the file specified.
Parameters
Name | Type | Description |
---|---|---|
filePath | const char[] | Specifies the path and file name of the HWS file to create or open. The .hws extension is typically used for HWS files although using this extension is optional. |
rate | double* | The rate of the sample clock used to capture the waveform. |
dataLayout | tHWS_DigitalWDTDataLayout | Describes the layout of the waveform data. Defined Values niHWS_Val_GroupBySample—specifies that consecutive samples in waveformBuffer are such that the array contains the first sample from every signal in the operation, then the second sample from every signal, up to the last sample from every signal. niHWS_Val_GroupBySignal—specifies that consecutive samples in waveformBuffer are such that the array contains all the samples from the first signal in the operation, then all the samples from the second signal, up to all samples from the last signal. |
waveformBufferSize | long | Specifies the size of waveformBuffer, in samples. Allocate enough memory for the entire waveform to be read, then pass the pre-allocated array and the size of that array to this function. |
waveformBuffer | unsigned char[] | Contains the data for the waveform. This array must be large enough to contain at least the amount of data indicated by the value assigned to the Waveform Buffer Size parameter. |
numberofSignalsinWaveform | long* | Reports the number of signals in the waveform.
If the waveformBufferSize parameter is 0, the number of signals in the waveform is returned in the numberofSignalsinWaveform parameter. |
numberofSamplesinWaveform | long* | Reports the number of samples in the waveform.
If the waveformBufferSize parameter is 0, the number of samples in the waveform is returned in the numberofSamplesinWaveform parameter. |