Next: ANNOT(5) Up: WFDB Applications Guide Previous: WFDB(3)On This Page

Name

wfdbf - Waveform Database library wrappers for Fortran

Synopsis

implicit integer(a-z)
real aduphys, getbasecount, getcfreq, getifreq, sampfreq
character aux(256), desc(80), filetype(32), fname(40), name(20), pathname(80), record(16), string(32), units(20)
integer a, adcres, adczero, ampl, anntyp, baseline, bsize, caltype, chan, cksum, date, dummy, fmt, group, initval, microvolts, mode, nann, nsamp, nsig, num, s, spf, stat, subtyp, time, v(32), value
real gain, frequency, high, low, scale

setanninfo(a, name, stat)
getsiginfo(s, fname, desc, units, gain, initval, group, fmt, spf, bsize, adcres, adczero, baseline, nsamp, cksum)
setsiginfo(s, fname, desc, units, gain, initval, group, fmt, spf, bsize, adcres, adczero, baseline, nsamp, cksum)
annopen(record, nann)
isigopen(record, nsig)
osigopen(record, nsig)
osigfopen(nsig)
wfdbinit(record, nann, nsig)
setgvmode(mode)
getspf(dummy)
getvec(v)
getframe(v)
putvec(v)
getann(a, time, anntyp, subtyp, chan, num, aux)
ungetann(a, time, anntyp, subtyp, chan, num, aux)
putann(a, time, anntyp, subtyp, chan, num, aux)
isigsettime(time)
isgsettime(group, time)
iannsettime(time)
ecgstr(code, string)
strecg(string)
setecgstr(code, string)
annstr(code, string)
strann(string)
setannstr(code, string)
anndesc(code, string)
setanndesc(code, string)
iannclose(a)
oannclose(a)
timstr(time, string)
mstimstr(time, string)
strtim(string)
datstr(date, string)
strdat(string)
adumuv(s, ampl)
muvadu(s, microvolts)
aduphys(s, ampl)
physadu(s, value)
calopen(fname)
getcal(desc, units, low, high, scale, caltype)
putcal(desc, units, low, high, scale, caltype)
newcal(fname)
flushcal(dummy)
getinfo(record, string)
putinfo(string)
newheader(record)
setheader(record, nsig)
wfdbgetskew(s)
wfdbsetskew(s, value)
wfdbgetstart(s)
wfdbsetstart(s, value)
wfdbquit(dummy)
sampfreq(record)
setsampfreq(frequency)
getcfreq(dummy)
setcfreq(frequency)
getifreq(dummy)
setifreq(frequency)
getbasecount(dummy)
setbasecount(frequency)
setbasetime(string)
wfdbquiet(dummy)
wfdbverbose(dummy)
wfdberror(string)
setwfdb(string)
getwfdb(string)
setibsize(value)
setobsize(value)
wfdbfile(filetype, record, pathname)
wfdbflush(dummy)
isann(anntyp)
isqrs(anntyp)
setisqrs(anntyp, value)
map1(anntyp)
setmap1(anntyp, value)
map2(anntyp)
setmap2(anntyp, value)
ammap(anntyp)
mamap(anntyp, subtyp)
annpos(anntyp)
setannpos(anntyp, value)

Description

Fortran programs can use the WFDB library to read and write waveform database files. Differences in argument-passing conventions between Fortran and C (the language of the WFDB library) require the use of a set of wrappers as an interface between the library and Fortran code that invokes its functions. These wrappers are contained within ’wfdbf.c’, provided in the ’fortran’ directory of the WFDB software package. When the WFDB Software Package is installed, a copy of ’wfdbf.c’ is placed in the same directory as ’wfdb.h’ (normally, /usr/include/wfdb).

Most of these wrapper subroutines behave like their similarly-named counterparts in the WFDB library. The functions setanninfo, setsiginfo, and getsiginfo do not have direct equivalents in the WFDB library; they are provided in order to permit Fortran programs to read and write data structures passed to and from several of the WFDB library functions. Since the contents of these structures are directly accessible by C programs, these functions are not needed in the C library.

Before using annopen, set up the annotation information structures using setanninfo. After using isigopen or osigopen, use getsiginfo to obtain the contents of the signal information structures if necessary. Before using osigfopen or setheader, use setsiginfo to set the contents of the signal information structures. Before using wfdbinit, use setanninfo and setsiginfo to set the contents of the annotation and signal information structures.

To use these wrappers, call them as shown above, then compile your code together with wfdbf.c and link to the WFDB library. If you are using the GNU g77 compiler (recommended), do so using a command such as:
   g77 -o foo foo.f -DFIXSTRINGS /usr/include/wfdb/wfdbf.c -lwfdb

The wrappers include optionally compiled code that converts traditional space-terminated Fortran strings to null-terminated C strings and vice versa. This code is compiled if the symbol FIXSTRINGS is defined, as in the g77 command above. If you use a different Fortran compiler, this code may not be necessary. See ’fortran/README’ for further information about using the WFDB Fortran wrappers.

See Also

WFDB Programmer’s Guide
On systems that support GNU emacs, the Guide may be available on-line using emacs info; from within emacs, type control-H followed by i to find out. An HTML version may be installed on your system (in /usr/help/html/wpg); the most recent version can be viewed on-line at http://www.physionet.org/physiotools/wpg/.

Author

George B. Moody (george@mit.edu)

Sources

http://www.physionet.org/physiotools/wfdb/fortran/wfdbf.c


Table of Contents

Up: WFDB Applications Guide


Please e-mail your comments and suggestions to webmaster@physionet.org, or post them to:

PhysioNet
MIT Room E25-505A
77 Massachusetts Avenue
Cambridge, MA 02139 USA

Updated 28 May 2015