logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ms_lookup - Look up libmseed and Mini-SEED related information

Author

       Chad Trabant
       IRIS Data Management Center

Libmseed API                                       2006/12/12                                       MS_LOOKUP(3)

Description

ms_errorstr  returns a pointer to a string describing the specified libmseed error code.  The error codes
       are defined in libmseed.h and returned by various functions.

       ms_samplesize returns the sample size based on the specified sampletype.  In general  libmseed  uses  the
       following character sample types:

       "a" = 1 byte (ASCII)
       "i" = 4 bytes (integer)
       "f" = 4 bytes (float)
       "d" = 8 bytes (double)

       ms_encoding returns a pointer to a string describing the specified data encoding format.  If the encoding
       format is unknown an appropriate string is return stating just that.

       ms_blktdesc  returns  a  pointer  to a string describing the specified blockette type (blkttype).  If the
       blockette type is unknown NULL is returned.

       ms_blktlen returns the total length of the specified blockette type (blkttype) in bytes.   A  pointer  to
       the  blockette  itself  (blkt) should also be provided along with a swapflag that should be set to 1 when
       the blockette is known to have a different byte order  than  the  host  computer.   The  length  returned
       includes both the blockette "header" (type and next fields) and "body".

       Technically a pointer to blockette and the swapflag only need to be supplied when the blockette type is a
       variable  length  blockette  and the length is contained within the blockette itself (e.g. blockette type
       2000).  For blockettes of known fixed length (most of them) the blkt pointer and swapflag are not used.

       In the case of blockette type 405 that is variable length and not self describing 0 will be returned.  In
       the case of blockette type 2000 that is variable length and self describing the length will be read  from
       a known offset into the blockette data.

Name

       ms_lookup - Look up libmseed and Mini-SEED related information

Return Values

ms_errorstr returns a pointer to a static string.

       ms_samplesize returns the sample size in bytes or 0 for unknown sample type.

       ms_encoding returns a pointer to a static string.

       ms_blktdesc returns a pointer to a static string or NULL if the blockette type is unknown.

       ms_blktlen returns the total length of the specified blockette type or 0 for unknown type.

Synopsis

#include<libmseed.h>char*ms_errorstr(interrorcode);uint8_tms_samplesize(constcharsampletype);char*ms_encodingstr(constcharencoding);char*ms_blktdesc(uint16_tblkttype);uint16_tms_blktlen(uint16_tblkttype,constchar*blktdata,flagswapflag);

See Also