trputwf - save waveform data (deprecated)
int trputwf ( Dbptr db, float *data );
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.
see antelopeenv(5)
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).
$(TRLIBS)
-
Unknown datatype
The specified datatype was not recognized
-
Can't create directories to write trace data
The specified directories couldn't be created.
-
Can't open filename to write trace data
Couldn't open the file
-
Can't seek xx bytes in filename to write trace data
Couldn't seek in the file
-
Wrote %d of %d bytes to %s (%s:%s at %s).\n
Could not write the entire data file
-
Couldn't truncate %s (%s:%s at %s) to %d bytes.\n
Could not truncate the file
-
Couldn't close %s (%s:%s at %s).\n
The file did not close properly.
trgetwf(3)
dbintro(3)
trintro(3)
This interface is deprecated in favor of the more flexible trsave_wf(3).
Daniel Quinlan
Table of Contents
Antelope Release 4.9 Darwin 8.10.0 2007-10-19
Boulder Real Time Technologies, Inc
For more information, contact support@brtt.com