Omega Speaker Systems TC-08 Network Card User Manual


 
TC-08 User's Guide32
3.3.3.4
usb_tc08_get_temp
long usb_tc08_get_temp
(
short handle,
float * temp_buffer,
long * times_ms_buffer,
long buffer_length,
short * overflow,
short channel,
short units,
short fill_missing
)
Once you open the driver and set up some channels, you can call the usb_tc08_run
routine. The driver will then begin to continually take readings from the USB TC-08.
Use the usb_tc08_get_temp routine to retrieve readings from the driver's buffer
periodically. You must call the function at least once per minute to avoid losing data
(the driver's buffer is circular, so the oldest readings will be overwritten first).
Streaming mode relies on the driver to buffer readings without interruption. If the
driver does not get enough share of the PC's processor time (the most frequent cause
of which is too many applications running at the same time), readings will be dropped
and the sample buffer will be padded with QNaN floating integers.
Warning: The padding of the buffer is also dependent on the performance of the PC
and under very heavy processor loading, padding may not always be accurate.
Arguments
handle
Specifies the USB TC-08 unit.
temp_buffer
Pointer to a location where the readings are to be placed.
times_ms_buffer
Returns the time that the first channel was converted
(optional.)
buffer_length
Length of data buffers.
overflow
Pointer to a variable that will be assigned a value of 1 if
an overflow occured on any of the readings copied into
temp_buffer, or 0 if an overflow did not occur. An
overflow occurs when the input signal is higher than the
measuring range of the USB TC-08.
channel
Specifies the channel to read the temperature from.
units
Specifies the temperature units for returned data:
0: USBTC08_UNITS_CENTIGRADE
1: USBTC08_UNITS_FAHRENHEIT
2: USBTC08_UNITS_KELVIN
3: USBTC08_UNITS_RANKINE
Voltages are always returned in millivolts
fill_missing
Choose whether or not to replace QNaN values with the
last known value:
0 - Use QNaNs to represent missing readings
1 - Fill missing readings with previous good reading.
Returns
-1
An error occurred, use usb_tc08_get_last_error to get the
code.
0
Currently no readings to collect.
> 0
Number of readings copied into array (there may still be
more readings in the driver's internal buffer.)