The siarray argument for isigopen, osigopen,
dbinit, and osigfopen is a pointer to an array of
objects of type DB_Siginfo. The first three of these functions
fill in the DB_Siginfo objects to which siarray points, but
the caller must supply initialized DB_Siginfo objects to
osigfopen. Each object specifies the attributes of a
signal:
char *fname
fname with each of the components of the
database path in turn (see section The Database Path). fname may include
relative or absolute path specifications if necessary; the use of an
absolute pathname, combined with an initial null component in DB,
reduces the time needed to find the signal file to a minimum. If
fname is `-', it refers to the standard input or
output.
char *desc
desc string is restricted to a maximum of DB_MAXDSL
(defined in `<ecg/db.h>') characters, not including the null.
char *units
units string is
restricted to a maximum of DB_MAXUSL (defined in
`<ecg/db.h>') characters (not including the null).
DB_Gain gain
gain is zero, no amplitude calibration is available; in this
case, a gain of DEFGAIN (defined in `<ecg/db.h>') may
be assumed.
DB_Sample initval
DB_Group group
DB_Siginfo structures are always kept ordered with respect
to the group number, so that signals belonging to the same group are
described by consecutive entries in siarray.
int fmt
int spf
spf may be between
2 and DB_MAXSPF (defined in `<ecg/db.h>'). Note that
non-integer values are not permitted (thus the frame rate must be chosen
such that all sampling frequencies used in the record are integer
multiples of the frame rate).
int bsize
bsize field
indicates how many bytes must be read or written at a time
(see section Signals That Are Not Stored in Disk Files). For ordinary disk files, bsize is zero.
All signals belonging to a given group have the same
bsize.
int adcres
int adczero
adczero is usually zero. For the MIT DB,
however, an offset binary ADC was used, and adczero was 1024.
int baseline
adczero is not synonymous with that of
baseline (the isoelectric or physical zero level of the signal); the
baseline is a characteristic of the signal, while
adczero is a characteristic of the digitizer. The value
of baseline need not necessarily lie within the output range of
the ADC; for example, if the units are `degrees_Kelvin',
and the ADC range is 200--300 degrees Kelvin, baseline corresponds to
absolute zero, and lies well outside the range of values actually produced
by the ADC.
long nsamp
nsamp is zero, the
number of samples is unspecified, and the cksum (see the next item)
is not used; this is useful for specifying signals that are obtained
from pipes, for which the length may not be known.
int cksum
newheader records checksums calculated by
putvec when it creates a new `header' file, and
getvec compares checksums that it calculates against cksum
at the end of the record, provided that the entire record was read
through without skipping samples.
The number of DB_Siginfo structures in siarray is given by
the nsig argument of the functions that open signal files. Input
and output signal numbers are assigned beginning with 0 in the order in
which the signals are given in siarray. Note that input signal 0
and output signal 0 are distinct. Input signal numbers are supplied to
aduphys, physadu, adumuv, and muvadu in
their first arguments. There may be no more than DB_MAXSIG
(defined in `<ecg/db.h>') input signals and DB_MAXSIG output
signals open at once. See section Example 5: Reading Signal Specifications, for an illustration of how to
read signal specifications from DB_Siginfo structures.
Go to the first, previous, next, last section, table of contents.