bionic (3) msr_addblockette.3.gz

Provided by: libmseed-doc_2.19.5-1_all bug

NAME

       msr_addblockette - Add a blockette to the blockette chain of an MSRecord structure

SYNOPSIS

       #include <libmseed.h>

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

DESCRIPTION

       msr_addblockette  adds  a  blockette  to  a blockette chain of an MSRecord structure.  The chainpos value
       controls which end of the chain the blockette is added to.  If chainpos is 0 the blockette will be  added
       to  the  end  of  the  chain  (last blockette), other wise it will be added to the beginning of the chain
       (first blockette). A blockette chain is composed of linked BlktLink structures.  A blockette chain for  a
       given MSRecord structure begins at MSRecord.blkts.

       blktdata  should  be  the  blockette  body  (no  blockette type and next header) of length bytes and type
       blkttype.

       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  as it has an unknown data
       structure by definition and 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 as it allows the library
       to manipulate the blockette (swap byte order, etc.) and assures SEED 2.4 compatibility.

RETURN VALUE

       msr_addblockette returns a pointer to the BlktLink structure added to the blockette chain on  success  or
       NULL on error.

SEE ALSO

       ms_intro(3), msr_pack(3) and msr_unpack(3).

AUTHOR

       Chad Trabant
       IRIS Data Management Center