[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

wfdbinit

 
int wfdbinit(char *record, WFDB_Anninfo *aiarray, unsigned int nann,
           WFDB_Siginfo *siarray, unsigned int nsig)
Return:

>0
Success: the returned value is the number of input signals (i.e., the number of valid entries in siarray)
0
Annotation files opened successfully, input signals unavailable (not an error for programs that don't need them; no error message is printed if nsig is 0)
-1
Failure: unable to read header file (probably incorrect record name)
-2
Failure: incorrect header file format
-3
Failure: unable to open input annotation file
-4
Failure: unable to open output annotation file
-5
Failure: illegal stat (in aiarray) specified for annotation file (see section 3.3 Annotator Information Structures)

This function opens database files other than output signal files for a selected record. The code

 
n = wfdbinit(record, a, na, s, ns);

is exactly equivalent to

 
n = annopen(record, a, na);
if (n == 0)
    n = isigopen(record, s, ns);

See section Example 9: A Signal Averager, for an illustration of the use of wfdbinit. See section osigopen, and see section osigfopen, for methods of opening output signal files.



George B. Moody (george@mit.edu)