MS_SRCNAME(3)
π MS_SRCNAME(3) π
okay bestie, welcome to libmseed's little naming factory β this page is all about ms_srcname, the routine that figures out source names using the SEED naming nomenclature. it's giving "who even am I" but for seismic data records. π
β¨ NAME β¨
ms_srcname β determine source names using the SEED naming nomenclature. no cap, that's literally its whole job.
πΈ SYNOPSIS πΈ
#include <libmseed.h>
char *ms_recsrcname ( char *record, char *srcname, flag quality );
char *msr_srcname ( MSRecord *msr, char *srcname, flag quality );
char *mst_srcname ( MSTrace *mst, char *srcname, flag quality );
three whole functions, one tiny little vibe. π
π¦ DESCRIPTION π¦
so these routines generate a source name using the SEED naming nomenclature in the format 'NET_STA_LOC_CHAN' and store it in the buffer you hand over at srcname. and if the quality flag is true? the data quality character gets appended to the source name too, which gives you 'NET_STA_LOC_CHAN_QUAL'. iconic behavior honestly.
β οΈ the memory pointed to bysrcnamemust have enough room for the resulting string, bestie, i'm serious. as of SEED 2.4 that's a maximum of 18 characters including the terminating NULL. theMSRecordandMSTracestructs are capable of producing a source name of 42 characters (including the terminating NULL), andlibmseedcommonly allocates 50 characters for thesrcnamebuffer. so like... allocate generously, okay? π«Ά
ms_recsrcnameβ generates a source name string for the SEED data record atrecord. if thequalityflag is true, the quality character will be appended.msr_srcnameβ generates a source name string for the specifiedMSRecordstruct. if thequalityflag is true, the quality character will be appended.mst_srcnameβ generates a source name string in for the specifiedMSTracestruct. if thequalityflag is true andmst->dataqualityis not zero, the quality character will be appended. yes, it's a two-condition situation, she's high maintenance but she's worth it. π
π LOCATION IDS AND SPACES π
the source name produced by these routines never include spaces. periodt. the fixed format nature of SEED data records leads to blank or unused location IDs represented by spaces, and such blank location IDs will be collapsed to nothing in the resulting source names. so all that empty space just... vanishes. β¨ manifesting that energy for my room ngl.
π RETURN VALUES π
the routines return a pointer to the resulting string, or NULL on error. that's it. that's the whole thing. π
π AUTHOR π
Chad Trabant IRIS Data Management Center
and that's a wrap on the Libmseed API era of 2006/11/27, bestie β go forth and name your sources, you absolute main character. πβ¨πΈπ¦ππ
π«Ά
π¦ 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