niHWS_RetrieveDigitalWfmU8
C Function Prototype
tHWS_Status niHWS_RetrieveDigitalWfmU8 (const char filePath[], double* rate, long validSignalsSize, char validSignals[], long wfmBufferSize, unsigned char* wfmBuffer, long* numSamplesInWfm);
Purpose
Retrieves the digital waveform samples as 8-bit unsigned integers (U8) from the file specified.
Parameters
Name | Type | Description |
---|---|---|
filePath | const char[] | Specifies the path and filename 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. |
validSignalsSize | long | The number of characters that the string allocated for the
validSignals parameter can hold.
If validSignalsSize is 0 and no error occurs, the actual size of the validSignals string, including the end of string termination character, is returned in the status parameter. |
validSignals | char[] | The list of lines (or bits) in the digital samples that are valid. For example,
"0,3,6" means that only bits 0, 3, and 6 of each unsigned long digital sample
contain valid digital data.
The values in the string can receive any integer value between 0 and 7. Individual lines are separated by commas. You can use a hyphen to denote an inclusive range of lines. For example, "2-5" is equivalent to "2,3,4,5". |
wfmBufferSize | long | Specifies how many samples to read into wfmBuffer.
If wfmBufferSize is 0, the number of samples in the waveform is returned in numSamplesInWfm. |
wfmBuffer | 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 wfmBufferSize. |
numSamplesInWfm | long* | Reports the total number of samples in the waveform. |