MS_LOOKUP(3)
π MS_LOOKUP(3) β the libmseed β¨lookupβ¨ girlies (Library Functions Manual)
okay bestie, welcome to ms_lookup, it's a whole collection of little helper functions from libmseed that just... look stuff up for you. no cap. it's giving "reference desk at the library but make it C". π
πΈ NAME πΈ
ms_lookup β go look up libmseed and Mini-SEED related info, periodt π
β¨ SYNOPSIS β¨
#include <libmseed.h>
char *ms_errorstr ( int errorcode );
uint8_t ms_samplesize ( const char sampletype );
char *ms_encodingstr ( const char encoding );
char *ms_blktdesc ( uint16_t blkttype );
uint16_t ms_blktlen ( uint16_t blkttype, const char *blktdata,
flag swapflag );
like, five little functions, five little besties, all doing their own thing π«Ά
π DESCRIPTION π
okay so let's go one by one, i got you:
ms_errorstr hands you back a pointer to a string that describes the libmseed error code you passed in. those error codes are defined in libmseed.h and they get returned by a bunch of different functions, so this is your translator when something goes wrong π
ms_samplesize tells you the sample size based on the sampletype you give it. in general libmseed rolls with these 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 data encoding format you specified. and if the encoding format is unknown? it still returns an appropriate string, one that just... says that. iconic honestly, it always answers π
ms_blktdesc returns a pointer to a string describing the blockette type (blkttype) you passed. if the blockette type is unknown, it returns NULL. sad but honest π
ms_blktlen returns the total length of the specified blockette type (blkttype), in bytes. you also gotta hand over a pointer to the blockette itself (blkt) plus a swapflag β set that swapflag to 1 when you know the blockette has a different byte order than the host computer. and btw the length it gives back includes both the blockette "header" (the type and next fields) and the "body". full package deal π
π¦ the little technical caveat, listen up π¦
technically?? you only need to supply the blockette pointer and the swapflag when the blockette type is a variable length blockette and the length lives inside the blockette itself (like, say, blockette type 2000). for blockettes of known fixed length β which is most of them, bestie β the blkt pointer and swapflag just don't get used. so don't stress π§
β οΈ and here's the spicy part: for blockette type405, which is variable length but not self describing,0will be returned. meanwhile for blockette type2000, which is variable length and self describing, the length gets read from a known offset into the blockette data. different vibes, different rules, iykyk π₯
π RETURN VALUES π
ms_errorstrreturns a pointer to a static string.ms_samplesizereturns the sample size in bytes, or0for an unknown sample type.ms_encodingreturns a pointer to a static string.ms_blktdescreturns a pointer to a static string, orNULLif the blockette type is unknown.ms_blktlenreturns the total length of the specified blockette type, or0for an unknown type.
π AUTHOR π
Chad Trabant IRIS Data Management Center
and that's the whole page, bestie!! πβ¨π¦πΈ this libmseed API moment is dated 2006/12/12, so yeah she's a vintage icon and we love her for it. mwah π π
π¦ where this page comes from
- debian bookworm: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- debian trixie: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- ubuntu jammy: libmseed-doc 2.19.6-3 Β· LGPL-3.0-or-later
- ubuntu noble: libmseed-doc 2.19.8-1ubuntu2 Β· LGPL-3.0-or-later
- ubuntu questing: libmseed-doc 2.19.8-1ubuntu2
- ubuntu resolute: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- ubuntu stonking: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms