niHWS_WriteDigitalWDT

NI-HWS C Function Reference

niHWS_WriteDigitalWDT

C Function Prototype

tHWS_Status niHWS_WriteDigitalWDT (tHWS_WfmRef waveformReference, tHWS_DigitalWDTDataLayout data_layout, long number_ofSignals, long number_ofSamples, const unsigned char* waveformData);

Purpose

Writes waveform data type data into the waveform at the current read/write position.

A write moves the read/write position such that it points to the next sample. Repeated writes to the same waveform concatenate data to that 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.
dataLayout tHWS_DigitalWDTDataLayout Describes the layout of the waveform data.

Defined Values

niHWS_Val_GroupBySample—specifies that consecutive samples in wfmData 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 wfmData 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.
numSignals long The number of signals in wfmData to write to the file.
numSamples long The number of samples in wfmData to write to the file.
wfmData const unsigned char* The array containing 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 numSamples times the value of numSignals.

Return Value