1MS_LOOKUP(3)               Library Functions Manual               MS_LOOKUP(3)
2
3
4

NAME

6       ms_lookup - Look up libmseed and Mini-SEED related information
7
8

SYNOPSIS

10       #include <libmseed.h>
11
12       char    *ms_errorstr ( int errorcode );
13
14       uint8_t  ms_samplesize ( const char sampletype );
15
16       char    *ms_encodingstr ( const char encoding );
17
18       char    *ms_blktdesc ( uint16_t blkttype );
19
20       uint16_t ms_blktlen ( uint16_t blkttype, const char *blktdata,
21                             flag swapflag );
22
23

DESCRIPTION

25       ms_errorstr  returns  a  pointer  to  a string describing the specified
26       libmseed error code.  The error codes are  defined  in  libmseed.h  and
27       returned by various functions.
28
29       ms_samplesize  returns  the  sample size based on the specified sample‐
30       type.  In general libmseed uses the following character sample types:
31
32       "a" = 1 byte (ASCII)
33       "i" = 4 bytes (integer)
34       "f" = 4 bytes (float)
35       "d" = 8 bytes (double)
36
37       ms_encoding returns a pointer to a string describing the specified data
38       encoding  format.   If  the  encoding  format is unknown an appropriate
39       string is return stating just that.
40
41       ms_blktdesc returns a pointer to  a  string  describing  the  specified
42       blockette  type  (blkttype).   If the blockette type is unknown NULL is
43       returned.
44
45       ms_blktlen returns the total length of  the  specified  blockette  type
46       (blkttype)  in  bytes.  A pointer to the blockette itself (blkt) should
47       also be provided along with a swapflag that should be set to 1 when the
48       blockette  is  known  to have a different byte order than the host com‐
49       puter.  The length returned includes both the blockette "header"  (type
50       and next fields) and "body".
51
52       Technically  a  pointer  to  blockette and the swapflag only need to be
53       supplied when the blockette type is a variable length blockette and the
54       length  is  contained  within the blockette itself (e.g. blockette type
55       2000).  For blockettes of known fixed length (most of  them)  the  blkt
56       pointer and swapflag are not used.
57
58       In  the case of blockette type 405 that is variable length and not self
59       describing 0 will be returned.  In the case of blockette type 2000 that
60       is  variable  length and self describing the length will be read from a
61       known offset into the blockette data.
62
63
64

RETURN VALUES

66       ms_errorstr returns a pointer to a static string.
67
68       ms_samplesize returns the sample size in bytes or 0 for unknown  sample
69       type.
70
71       ms_encoding returns a pointer to a static string.
72
73       ms_blktdesc  returns a pointer to a static string or NULL if the block‐
74       ette type is unknown.
75
76       ms_blktlen returns the total length of the specified blockette type  or
77       0 for unknown type.
78
79

AUTHOR

81       Chad Trabant
82       IRIS Data Management Center
83
84
85
86Libmseed API                      2006/12/12                      MS_LOOKUP(3)
Impressum