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

setmsheader

 
int setmsheader(char *record, char *snarray[], unsigned int nsegments)
Return:

0
Success
-1
Failure: illegal record name, or no segments specified, or header not writable
-2
Failure: segment name too long, or insufficient memory
-3
Failure: attempt to nest multi-segment records, or unreadable segment header
-4
Failure: segment length unspecified, or numbers of signals or sampling frequencies don't match between segments

This function creates a header file (in the current directory) for a multi-segment record (see section 5.5 Multi-Segment Records. snarray contains the names of the segments, each of which must be an existing (single-segment) record; nsegments specifies the number of segments in snarray. Once a header has been created by setmsheader, any WFDB application can read the concatenated signal files of the constituent segment simply by opening the multi-segment record (using isigopen or wfdbinit). Note that the signal files themselves are not modified in any way, nor are they copied; rather, the other WFDB library functions that read signals (getvec, getframe, isigsettime, and isgsettime) automatically switch among the signal files of the segments as required. For an example of the use of setmsheader, see `app/wfdbcollate.c' in the WFDB Software Package. (This function was first introduced in WFDB library version 9.1.)



George B. Moody (george@mit.edu)