📄 ms_find_reclen.3
字号:
.TH MS_FIND_RECLEN 3 2006/11/08 "Libmseed API".SH DESCRIPTIONDetermine SEED record data length.SH SYNOPSIS.nf.B #include <libmseed.h>.BI "int \fBms_find_reclen\fP ( const char *" recbuf ", int " recbuflen ",.BI " FILE " *fileptr " );.fi.SH DESCRIPTION\fBms_find_reclen\fP verifies that the specified \fIrecbuf\fP buffercontains a SEED data record by looking for data record signatures inthe fixed section data header and determines the data record length by1) searching the buffer up to \fIrecbuflen\fP bytes for a Blockette1000 and, failing that, 2) if \fIfileptr\fP is not NULL reading thenext 48 bytes from the file and looking for a data record signature(with detection of the next data record implying the length of thecurrent record). If data is read from \fIfileptr\fP the read positionis returned to it's position prior to this function call.The MS_ISVALIDHEADER macro is used to verify that the buffer containsa valid SEED data record. When searching for the next record headerto determine record length one of the macros MS_ISVALIDHEADER orMS_ISVALIDBLANK must test positively for a record to be detected.Blank/noise records are records with a valid SEED sequence numberfollowed by ASCII space characters to the end of the record.\fBms_find_reclen\fP will return 0 when it detects that the buffercontains a SEED data record but cannot determine the record length.This happens when no Blockette 1000 is not found within\fIrecbuflen\fP bytes and, assuming a valid \fIfileptr\fP is supplied,no record header is detected in the next 48 bytes of the file. Theidea is to then read more data from the file (i.e. the next larger,valid record length) and call \fBms_find_reclen\fP again and so onuntil the record length can be determined..SH RETURN VALUES\fBms_find_reclen\fP returns the length of the Mini-SEED record inbytes or 0 if a data record was detected but the length could not bedetermined or -1 when no data record was detected..SH SEE ALSO\fBms_readmsr(3)\fP, \fBms_readtraces(3)\fP and \fBmsr_unpack(3)\fP..SH AUTHOR.nfChad TrabantIRIS Data Management Center.fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -