The fname
component of a DB_Siginfo
object can be any
string acceptable as a file name to your operating system. Under UNIX,
for example, signals can be read from (or written to) `special' files
such as `/dev/rmt0' (the raw tape drive). If I/O must be performed
in fixed-size blocks (such as for UNIX character devices), the
bsize
component of the DB_Siginfo
object must contain the
appropriate block size in bytes. In such cases, the DB library must
obtain (using malloc
(see K&R, page 167) an amount of
memory equal to the size of one block when the signal file is first
opened. For large programs running on 16-bit machines, this can cause
problems if signal files with large block sizes are read. (In such
cases, isigopen
or osigopen
will not open the signal file
if there is not enough memory to allocate a buffer.) Under UNIX, if
this problem occurs, use the "piped records" (see section Piped and Local Records) instead. The usual method is to read or write the signal file
using a utility such as UNIX's dd
and to pipe the data to or from
the application program. Although this approach is flexible, there are
a few drawbacks:
isigsettime
or isgsettime
cannot perform
backward skips on piped input, and forward skips can be quite slow.
Several special-purpose `header' files allow application programs to read data directly from 9-track tape. The names of most of these records (`512', `1024', `4096', `10240') specify the block size in bytes. These use 16-bit format, 250 Hz samples, 12 bit ADC with zero ADC offset, two signals multiplexed into one, and data to be read from `/dev/rmt0'. Record `b' uses 8-bit difference format, 6144 bytes/block, and is otherwise similar to the others. Records `ahatape' and `mittape' can be used to read or write an AHA-format signal file on a 9-track tape that has been positioned to the beginning of the correct file; the signal file for these is `/dev/nrmt0' (the non-rewinding raw tape drive). If the tape density is encoded into the tape drive name on your system, additional `header' files may be needed.
Go to the first, previous, next, last section, table of contents.