[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int osigopen(char *record, WFDB_Siginfo *siarray, unsigned int nsig) |
This function opens output signal files. Use it only if signals are to
be written using putvec
. The signal specifications,
including the file names, are read from the header file for a
specified record. Unmodified MIT or AHA database `hea' files
cannot be used, since osigopen
would attempt to overwrite the
(write-protected) signal files named within. If record begins
with `+', previously opened output signal files are left open, and
the record name is taken to be the remainder of record after
discarding the `+'. Otherwise, osigopen
closes any
previously opened output signal files, and takes all of record as
the record name. If the record name is `-', osigopen
reads
the standard input rather than a `hea' file. siarray is a
pointer to an uninitialized array of WFDB_Siginfo
structures;
siarray must contain at least nsig members. The caller must
allocate storage for the WFDB_Siginfo
structures. On return,
osigopen
will have filled in the WFDB_Siginfo
structures with
the signal specifications.
No more than nsig (additional) output signals will be opened by
osigopen
, even if the header file contains specifications for
more than nsig signals. For example, this code fragment
... WFDB_Siginfo s[2]; int i, nsig; nsig = osigopen("8l", s, 2); for (i = 0; i < nsig; i++) printf("signal %d will be written into `%s'\n", i, s[i].fname); ... |
creates 2 output signals named `data0' and `data1'
(see section 5.8 Piped and Local Records). See section Example 6: A Differentiator, and see section Example 7: A General-Purpose FIR Filter,
for illustrations of the use of osigopen
.
As a special case, if nsig is 0, siarray can be NULL
.
This can be useful to force open output signal files to be closed
without closing open annotation or input signal files.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |