int dacConvertData (short* buf, float* data, int chnnum, int len) Converts data arrays stored in channel format into DAC buffer format
Converts data arrays stored in channel format into DAC buffer format. The DAC buffer must be of length (number of channels) * (number of data points). The buffer should be initialized to zero before the first call. The data array represents a single channel. Since the DAC requires the data sample-by-sample rather than channel-by-channel, the typical conversion operration is performed as follows:for (k = 0; k < len; k++) { val = floor (dac_conversion_factor * data[k]); if (fabs(val) >= dac_max) { buf[k * number_of_channels + chnnum] = (val > 0) ? dac_max : -dac_max; } else { buf[k * number_of_channels + chnnum] = (short) val; } }
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++