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


dbinit

int dbinit(char *record, DB_Anninfo *aiarray, unsigned int nann,
           DB_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 Annotator Information Structures)

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

n = dbinit(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 dbinit. See section osigopen, and see section osigfopen, for methods of opening output signal files.


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



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