Main Page Class Hierarchy Compound List File List Compound Members File Members

# sudsputaway.c File Reference

`#include <limits.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <earthworm.h>`
`#include <time.h>`
`#include <trace_buf.h>`
`#include <swap.h>`
`#include <ws_clientII.h>`
`#include <sudshead.h>`
`#include <pa_subs.h>`

Go to the source code of this file.

## Defines
#define | TAG_FILE '.tag'
#define | MAXTXT 150
## Functions
int | StructMakeLocal (void *, int, char, int)
int | SwapDo (void *, int)
int | SUDSPA_init (int OutBufferLen, char *OutDir, char *OutputFormat, int debug)
int | SUDSPA_next_ev (char *EventID, TRACE_REQ *ptrReq, int nReq, char *OutDir, char *EventDate, char *EventTime, char *EventSubnet, int debug)
int | SUDSPA_next (TRACE_REQ *getThis, double GapThresh, long OutBufferLen, int debug)
int | SUDSPA_end_ev (int debug)
int | SUDSPA_close (int debug)
## Variables
FILE * | SUDSfp
long * | SudsBuffer
short * | SudsBufferShort
char | SudsOutputFormat [MAXTXT]

## Define Documentation

#define MAXTXT 150

| Definition at line 74 of file sudsputaway.c.

#define TAG_FILE '.tag'

| Definition at line 73 of file sudsputaway.c.

## Function Documentation

int StructMakeLocal | ( | void * | ,
|  | int | ,
|  | char | ,
|  | int |
| ) | `[static]`

| Definition at line 714 of file sudsputaway.c. References EW_FAILURE, EW_SUCCESS, logit(), and SwapDo(). Referenced by SUDSPA_next().

int SUDSPA_close | ( | int | debug | ) |

| Definition at line 696 of file sudsputaway.c. Referenced by PA_close().

int SUDSPA_end_ev | ( | int | debug | ) |

| Definition at line 681 of file sudsputaway.c. References logit(). Referenced by PA_end_ev().

int SUDSPA_init | ( | int | OutBufferLen,
|  | char * | OutDir,
|  | char * | OutputFormat,
|  | int | debug
| ) |

| Allocate SudsBuffer and SudsBufferShort We waste RAM by allocating both the long and short buffers here at the beginning of the code because some fluke (feature?) of NT which I don't understand becomes unhappy if we do the allocation later. Win2000, of course, behaves differently, and is quite happy with buffer allocation after we have determined the format of the incoming data Definition at line 97 of file sudsputaway.c. References CreateDir(), EW_FAILURE, EW_SUCCESS, logit(), SudsBuffer, and SudsBufferShort. Referenced by PA_init().

int SUDSPA_next | ( | TRACE_REQ * | getThis,
|  | double | GapThresh,
|  | long | OutBufferLen,
|  | int | debug
| ) |

| Definition at line 238 of file sudsputaway.c. References TRACE_REQ::actLen, SUDS_DESCRIPTRACE::avenoise, SUDS_DESCRIPTRACE::begintime, TRACE_HEADER::chan, SUDS_STATIDENT::component, SUDS_STATIONCOMP::data_type, SUDS_STATIONCOMP::data_units, TRACE_HEADER::datatype, SUDS_DESCRIPTRACE::datatype, DESCRIPTRACE, SUDS_DESCRIPTRACE::dt_name, TRACE_HEADER::endtime, EW_FAILURE, EW_SUCCESS, SUDS_STRUCTTAG::id_struct, SUDS_STRUCTTAG::len_data, SUDS_STRUCTTAG::len_struct, SUDS_DESCRIPTRACE::length, logit(), SUDS_STRUCTTAG::machine, SUDS_DESCRIPTRACE::maxdata, min, SUDS_DESCRIPTRACE::mindata, TRACE_HEADER::net, SUDS_STATIDENT::network, TRACE_HEADER::nsamp, TRACE_REQ::pBuf, SUDS_DESCRIPTRACE::rate, TRACE_HEADER::samprate, SUDS_STATIONCOMP::sc_name, SUDS_STATIDENT::st_name, TRACE_HEADER::sta, TRACE_HEADER::starttime, STATIONCOMP, StructMakeLocal(), SudsBuffer, SudsBufferShort, SwapLong(), SwapShort(), SUDS_STRUCTTAG::sync, and WaveMsgMakeLocal(). Referenced by PA_next().

int SUDSPA_next_ev | ( | char * | EventID,
|  | TRACE_REQ * | ptrReq,
|  | int | nReq,
|  | char * | OutDir,
|  | char * | EventDate,
|  | char * | EventTime,
|  | char * | EventSubnet,
|  | int | debug
| ) |

| Definition at line 148 of file sudsputaway.c. References EVENTID_SIZE, EW_FAILURE, logit(), MAXTXT, TRACE_REQ::net, and SUDSfp. Referenced by PA_next_ev().

int SwapDo | ( | void * | ,
|  | int |
| ) | `[static]`

| Definition at line 758 of file sudsputaway.c. References SUDS_TRIGGERS::abs_lta, SUDS_TRIGGERS::abs_sta, SUDS_STATIONCOMP::atod_gain, SUDS_DESCRIPTRACE::avenoise, SUDS_STATIONCOMP::azim, SUDS_DESCRIPTRACE::begintime, SUDS_STATIONCOMP::channel, SUDS_STATIONCOMP::clip_value, SUDS_STATIONCOMP::clock_correct, SUDS_STATIONCOMP::con_mvolts, DESCRIPTRACE, DETECTOR, SUDS_DESCRIPTRACE::digi_by, SUDS_DESCRIPTRACE::dt_name, SUDS_STATIONCOMP::effective, SUDS_TIMECORRECTION::effective_time, SUDS_STATIONCOMP::elev, SUDS_DETECTOR::event_number, EW_FAILURE, EW_SUCCESS, SUDS_STRUCTTAG::id_struct, SUDS_STATIONCOMP::incid, SUDS_STATIDENT::inst_type, SUDS_STRUCTTAG::len_data, SUDS_STRUCTTAG::len_struct, SUDS_DESCRIPTRACE::length, SUDS_DESCRIPTRACE::localtime, logit(), SUDS_TRIGGERS::lta, SUDS_STATIONCOMP::max_gain, SUDS_DESCRIPTRACE::maxdata, SUDS_DESCRIPTRACE::mindata, SUDS_TRIGGERS::num_triggers, SUDS_DESCRIPTRACE::numclip, SUDS_DESCRIPTRACE::processed, SUDS_DESCRIPTRACE::rate, SUDS_TIMECORRECTION::rate_correct, SUDS_DESCRIPTRACE::rate_correct, SUDS_STATIONCOMP::rocktype, SUDS_STATIONCOMP::sc_name, SUDS_DETECTOR::spareL, SUDS_TIMECORRECTION::spareM, SUDS_STATIONCOMP::st_lat, SUDS_STATIONCOMP::st_long, SUDS_TRIGGERS::sta, SUDS_STATIONCOMP::station_delay, STATIONCOMP, STRUCTTAG, SwapDouble(), SwapFloat(), SwapLong(), SwapShort(), SUDS_TIMECORRECTION::time_correct, SUDS_DESCRIPTRACE::time_correct, TIMECORRECTION, SUDS_TIMECORRECTION::tm_name, SUDS_TRIGGERS::tr_name, SUDS_TRIGGERS::trig_time, SUDS_TRIGGERS::trig_value, TRIGGERS, and SUDS_DETECTOR::versionnum. Referenced by StructMakeLocal().

## Variable Documentation

long* SudsBuffer`[static]`

| Definition at line 79 of file sudsputaway.c. Referenced by SUDSPA_init(), and SUDSPA_next().

short* SudsBufferShort`[static]`

| Definition at line 80 of file sudsputaway.c. Referenced by SUDSPA_init(), and SUDSPA_next().

FILE* SUDSfp

| Definition at line 77 of file sudsputaway.c. Referenced by SUDSPA_next_ev().

char SudsOutputFormat[MAXTXT]`[static]`

| Definition at line 81 of file sudsputaway.c.