MSR_ADDBLOCKETTE(3)

✨ MSR_ADDBLOCKETTE ✨

okay bestie, welcome to msr_addblockette(3) β€” it's a library function from the Library Functions Manual and it's literally about hooking a blockette onto the blockette chain of an MSRecord structure πŸ’…


πŸŽ€ NAME πŸŽ€

msr_addblockette β€” bestie, it adds a blockette to the blockette chain of an MSRecord structure. that's it. that's the whole job. iconic behavior honestly.


🌸 SYNOPSIS 🌸

#include <libmseed.h>

BlktLink  *msr_addblockette ( MSRecord *msr, char *blktdata,
                              int length, int blkttype, int chainpos );

πŸ¦‹ DESCRIPTION πŸ¦‹

so msr_addblockette adds a blockette to a blockette chain of an MSRecord structure. slay.

the chainpos value controls which end of the chain the blockette gets added to:

  • if chainpos is 0 β†’ the blockette goes to the end of the chain (last blockette) πŸ“
  • other wise β†’ it goes to the beginning of the chain (first blockette) πŸ‘‘

a blockette chain is composed of linked BlktLink structures, and a blockette chain for a given MSRecord structure begins at MSRecord.blkts. no cap.

blktdata should be the blockette body (no blockette type and next header) of length bytes and type blkttype. yes bestie, body only, don't be sneaking headers in there πŸ™ˆ

data structures for all SEED 2.4 data blockette types are defined in libmseed.h, with these minor exceptions:

  • Blockette 2000 (opaque data) is only partially represented, because it has an unknown data structure by definition πŸ’€
  • Blockette 405, which depends on full SEED for a full data description
it is highly recommended to use these provided data structures when adding blockettes, because it lets the library manipulate the blockette (swap byte order, etc.) and assures SEED 2.4 compatibility. fr fr, do the recommended thing. 🫢

⭐ RETURN VALUE ⭐

msr_addblockette returns a pointer to the BlktLink structure added to the blockette chain on success, or NULL on error. that's your vibe check right there β€” pointer means we ate, NULL means we did not 😭


🌈 SEE ALSO 🌈


πŸ’– AUTHOR πŸ’–

Chad Trabant IRIS Data Management Center


and that's the whole page, bestie!! 🧚 this little writeup is from the Libmseed API, dated 2006/02/27, and it's the MSR_ADDBLOCKETTE(3) page β€” go forth and chain those blockettes responsibly πŸ’œβœ¨