Changes between Initial Version and Version 1 of Waveform_Message_Format


Ignore:
Timestamp:
01/19/12 16:17:48 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Waveform_Message_Format

    v1 v1  
     1{{{ 
     2 
     3Waveform Format 
     4 
     5(last revised January 7, 1999) 
     6/* 
     7 * Trace_buf.h 
     8 * 
     9 * Header file for Earthworm packets that allow demultiplexed data 
     10 *  from various sources to be handled efficiently. Added to 
     11 *  Earthworm system by 
     12 * Kent Lindquist and Roger Hansen 
     13 * Geophysical Institute 
     14 * University of Alaska, Fairbanks 
     15 * 
     16 * February, 1996 
     17 * 
     18 * November 1996: KGL Added net and quality fields to accommodate 
     19 *  needs expressed by Alex Bittenbinder and the Earthworm team 
     20 * February 1997: KGL Added pad field as used by Earthworm team 
     21 */ 
     22 
     23#ifndef TRACE_BUF_H 
     24#define TRACE_BUF_H 
     25 
     26#define NETWORK_NULL_STRING "-" 
     27 
     28typedef struct { 
     29        int     pinno;          /* Pin number */ 
     30        int     nsamp;          /* Number of samples in packet */ 
     31        double  starttime;      /* time of first sample in epoch seconds 
     32                                   (seconds since midnight 1/1/1970) */ 
     33        double  endtime;        /* Time of last sample in epoch seconds */ 
     34        double  samprate;       /* Sample rate; nominal */ 
     35        char    sta[7];         /* Site name */ 
     36        char    net[9];         /* Network name */ 
     37        char    chan[9];        /* Component/channel code */ 
     38        char    datatype[3];    /* Data format code */ 
     39        char    quality[2];     /* Data-quality field */ 
     40        char    pad[2];         /* padding */ 
     41} TRACE_HEADER; 
     42 
     43#define MAX_TRACEBUF_SIZ 4096   /* define maximum size of trace message buffer */ 
     44 
     45typedef union { 
     46        char    msg[MAX_TRACEBUF_SIZ]; 
     47        TRACE_HEADER trh; 
     48        int     i; 
     49} TracePacket; 
     50 
     51/* Byte 0 of data quality flags, as in SEED format 
     52   ***********************************************/ 
     53#define AMPLIFIER_SATURATED    0x01 
     54#define DIGITIZER_CLIPPED      0x02 
     55#define SPIKES_DETECTED        0x04 
     56#define GLITCHES_DETECTED      0x08 
     57#define MISSING_DATA_PRESENT   0x10 
     58#define TELEMETRY_SYNCH_ERROR  0x20 
     59#define FILTER_CHARGING        0x40 
     60#define TIME_TAG_QUESTIONABLE  0x80 
     61 
     62/* CSS datatype codes 
     63   ******************/ 
     64/* 
     65        t4      SUN IEEE single precision real 
     66        t8      SUN IEEE double precision real 
     67        s4      SUN IEEE integer 
     68        s2      SUN IEEE short integer 
     69        f4      VAX/Intel IEEE single precision real 
     70        f8      VAX/Intel IEEE double precision real 
     71        i4      VAX/Intel IEEE integer 
     72        i2      VAX/Intel IEEE short integer 
     73        g2      NORESS gain-ranged 
     74*/ 
     75#endif 
     76 
     77}}}