niHWS_ReadDigital2DU16

NI-HWS C Function Reference

niHWS_ReadDigital2DU16

Specific Function

C Function Prototype

tHWS_Status niHWS_ReadDigital2DU16  (tHWS_WfmRef wfmReference, long numSamplesToReadPerRow, unsigned short* wfmBuffer, long* actualSamplesReadPerRow);

Purpose

Returns digital waveform samples as a two-dimensional array of 16-bit unsigned integers (U16) beginning at the current read/write position.

A read moves the read/write position so that it points to the next unread sample in the waveform.

Parameters

Name Type Description
wfmReference tHWS_WfmRef A reference to the waveform. Waveforms are identified by reference for purposes of setting and getting waveform attributes and reading and writing data.
numSamplesToReadPerRow long Specifies how many samples to read into the wfmBuffer.

If the numSamplesToReadPerRow parameter is 0, the number of samples in the waveform is returned in the actualSamplesReadPerRow parameter.

wfmBuffer unsigned short* The array that contains the data for the waveform. It is assumed that this array is big enough to contain at least the amount of data indicated by the value assigned to the numSamplesToReadPerRow parameter times the number of rows of the 2D waveform. You can get the number of rows using the niHWS_GetWfmI32Attribute function to get the niHWS_Attr_NumRows attribute.
actualSamplesReadPerRow long* Reports the number of samples read per row.

If the numSamplesToReadPerRow parameter is 0, the number of samples in the waveform is returned in the actualSamplesReadPerRow parameter.

Return Value