MS_WRITEMSEED - Online Linux Manual PageSection : 3
Updated : 2011/01/06
Source : Libmseed API

NAMEms_writemseed - Write Mini-SEED records to files.

SYNOPSIS#include <libmseed.h> int msr_writemseed ( MSRecord *msr, char *msfile, flag overwrite, int reclen, flag encoding, flag byteorder, flag verbose ); int mst_writemseed ( MSTrace *mst, char *msfile, flag overwrite, int reclen, flag encoding, flag byteorder, flag verbose ); int mst_writemseedgroup ( MSTraceGroup *msr, char *msfile, flag overwrite, int reclen, flag encoding, flag byteorder, flag verbose );

DESCRIPTIONThese routines will packed the data contained in the MSRecord, MSTrace or MSTraceGroup into Mini-SEED records and write them to the specified file. The overwrite flag controls whether the output file is overwritten or appended to. Mini-SEED records are created using the specified record length (reclen), Mini-SEED encoding and byteorder. Default values will be used for any of the key characteristics of record length, encoding format and byte order that are specified as -1. The default values are: reclen = 4096 bytes, encoding = 11 (Steim2) and byteorder = 1 (MSBF or big-endian). reclen should be set to the desired data record length in bytes which must be expressible as 2 raised to the power of X where X is between (and including) 8 to 20. encoding should be set to one of the following supported Mini-SEED data encoding formats: DE_ASCII (0), DE_INT16 (1), DE_INT32 (3), DE_FLOAT32 (4), DE_FLOAT64 (5), DE_STEIM1 (10) and DE_STEIM2 (11). The encoding aliases are defined in libmseed.h. MSTrace.sampletype should indicated the sample type as either 'a' (ASCII), 'i' (32-bit integers), 'f' (32-bit floats) or 'd' (64-bit doubles). The encoding format must be appropriate for the sample type of the MSTrace samples. For example, Steim compression and integer encoding formats require integer samples and float encoding formats require the appropriate size floats as input. As a counter example, float samples cannot be packed using Steim compression or integer encoding formats. byteorder must be either 0 (LSBF or little-endian) or 1 (MBF or big-endian). The verbose flag controls verbosity, a value of zero will result in no diagnostic output.

RETURN VALUESAll of these routines return the number of records written on success and -1 on error.

EXAMPLESkeleton code for writing Mini-SEED records with msr_writemseed(3): main() { MSRecord *msr; int precords; msr = msr_init (NULL); /* Populate MSRecord values */ strcpy (msr->network, "XX"); strcpy (msr->station, "TEST"); strcpy (msr->channel, "BHE"); msr->starttime = ms_seedtimestr2hptime ("2004,350,00:00:00.00"); msr->samprate = 40.0; msr->datasamples = dataptr; /* pointer to 32-bit integer data samples */ msr->numsamples = 1234; msr->sampletype = 'i'; /* declare type to be 32-bit integers */ /* Write record(s) with 4096-byte length, Steim-2 compression, big-endian */ precords = msr_writemseed (msr, "output.mseed", 1, 4096, DE_STEIM2, 1, 0); ms_log (0, "Wrote %d records\n", precords); msr_free (&msr); }

SEE ALSOms_intro(3), msr_pack(3) and mst_pack(3).

AUTHORChad Trabant IRIS Data Management Center
0
Johanes Gumabo
Data Size   :   10,802 byte
man-msr_writemseed.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 183,973
Visitor ID   :     :  
Visitor IP   :   18.227.209.89   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_nr_x|149|m___sr_writemseed.3|86|\n", precords);| ms_log (0, "Wrote %d records\n", precords); )