NAME

trputwf - save waveform data (deprecated)

SYNOPSIS

int trputwf ( Dbptr db, float *data );

DESCRIPTION

trputwf saves waveform data into a file. The input database pointer db must point to a record in a wfdisc table (or another table with the necessary fields). This record should be completely filled out; in particular, the fields nsamp, datatype, foff, and dir and dfile must be specified. trputwf uses this information to write the data to the output file. The data is converted from float to the specified output type (datatype), and written to the specified file at the specified offset foff. Any header is not overwritten, but the file is truncated following the written data. trputwf will attempt to create any necessary directories which do not already exist.

ENVIRONMENT

see antelopeenv(5)

RETURN VALUES

trputwf returns 0 for success, -1 if an error occurs. It may also return positive values if packing the waveform data into the output format resulted in truncation or clipping. When the result is positive, the bits TR_CLIPPED and TR_TRUNCATED should be tested to distinguish the problems (both might occur). Data is clipped when the values are too large to fit into the output data format. Data is truncated when it contains non-integer values, but is being saved into an integer format (e.g., steim compressed data is an integer format).

LIBRARY

$(TRLIBS)

DIAGNOSTICS

SEE ALSO

trgetwf(3)
dbintro(3)
trintro(3)

BUGS AND CAVEATS

This interface is deprecated in favor of the more flexible trsave_wf(3).

AUTHOR

Daniel Quinlan

Table of Contents
Antelope Release 4.9 Linux SuSE 9.3 (i586) 2.6.11.4 2007-10-19
Boulder Real Time Technologies, Inc For more information, contact support@brtt.com