NAME
msd_find_data_record - search in miniseed file for offset which matches miniseed data record header
SYNOPSIS
int msd_find_data_record ( Msd *msd, int unaligned, int verbose)
DESCRIPTION
msd_find_data_record starts at the current offset in the miniseed file opened in msd,
and looks for the next offset which matches a miniseed data record header.
Normally, these should be found at multiples of 512, 1024, 2048 or 5096 bytes, but occasionally
one runs across corrupt miniseed files where the offset is not some multiple of 2^9.
If the unaligned flag is non-zero, msd_find_data_record tries every offset (current, current+1,
current+2, ....) looking for a header. Otherwise, it checks only every 512 bytes from the
current position.
If verbose is non-zero, error messages are left on the error log; otherwise those messages
are created and flushed.
RETURN VALUES
-
-3
actual bytes in file are less than block record size
-
-2
fewer than MIN_SEED_RECORD_SIZE (512) bytes in remaining data
-
positive_value
Some combination of the following bit flags:
0x10 |
sequence number has illegal character(s) |
0x20 |
data quality code is invalid |
0x40 |
reserved byte at offset 7 is not space |
0x80 |
station/channel/network/loc not upper case alphanumeric. |
LIBRARY
$(TRLIBS)
ATTRIBUTES
MT-Safe
SEE ALSO
umsd(3)
AUTHOR
Daniel Quinlan