Go to the first, previous, next, last section, table of contents.


osigfopen

int osigfopen(DB_Siginfo *siarray, unsigned int nsig)

Return:

>0
Success: the returned value is the number of output signals; this number should match nsig
-2
Failure: error in signal specification (fname or desc too long, illegal fmt or bsize, or incorrect signal group assignment)
-3
Failure: unable to open output signal(s)

This function opens output signals as does osigopen, but the signal specifications, including the signal file names, are supplied by the caller to osigfopen, rather than read from a `header' file as in osigopen. Any previously open output signals are closed by osigfopen. siarray is a pointer to an array of DB_Siginfo structures (see section Signal Information Structures), one for each signal to be opened. nsig is the number of DB_Siginfo structures in siarray; nsig must be no greater than DB_MAXSIG (a constant defined in `<ecg/db.h>').

Before invoking osigfopen, the caller must fill in the fields of the DB_Siginfo structures in siarray (see section Data Types; the initval, nsamp, and cksum fields may be left uninitialized, however). To make a multiplexed signal file, specify the same fname and group for each signal to be included (see section Multiplexed Signal Files). For ordinary (non-multiplexed) signal files, specify a unique fname and group for each signal. See section Example 8: Creating a New Database Record, for an illustration of the use of osigfopen.

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.


Go to the first, previous, next, last section, table of contents.



George B. Moody (george@hstbme.mit.edu)