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

global_loc_rw.h File Reference

#include <earthworm_defs.h>
#include <trace_buf.h>
#include <global_msg.h>

Go to the source code of this file.

Compounds

struct  _GLOBAL_AMPLINE_STRUCT
struct  _GLOBAL_PHSLINE_STRUCT
struct  GLOBAL_LOC_DATA

Defines

#define GLOBAL_AMPLINE_MAXBUFSIZE   (122 + BUFF_OVERRUN_SIZE)
#define MAX_AMPS_PER_GLOBALPHASE   (AMPTYPE_COUNT - 1)
#define GLOBAL_PHSLINE_SUM_MAXSIZE   (119+ BUFF_OVERRUN_SIZE)
#define GLOBAL_PHSLINE_MAXBUFSIZE   (GLOBAL_PHSLINE_SUM_MAXSIZE + (MAX_AMPS_PER_GLOBALPHASE * GLOBAL_AMPLINE_MAXBUFSIZE) )
#define GLOBAL_LOC_SUM_MAXSIZE   (127 + BUFF_OVERRUN_SIZE)
#define GLOBAL_LOC_MAXPHS   250
#define GLOBAL_LOC_MAXBUFSIZE   (GLOBAL_LOC_SUM_MAXSIZE + (GLOBAL_LOC_MAXPHS * GLOBAL_PHSLINE_MAXBUFSIZE) )

Typedefs

typedef char GLOBAL_AMPLINE_BUFFER [GLOBAL_AMPLINE_MAXBUFSIZE+1]
typedef _GLOBAL_AMPLINE_STRUCT GLOBAL_AMPLINE_STRUCT
typedef char GLOBAL_PHSLINE_SUM_BUFFER [GLOBAL_PHSLINE_SUM_MAXSIZE+1]
typedef char GLOBAL_PHSLINE_BUFFER [GLOBAL_PHSLINE_MAXBUFSIZE+1]
typedef _GLOBAL_PHSLINE_STRUCT GLOBAL_PHSLINE_STRUCT
typedef char GLOBAL_LOC_SUM_BUFFER [GLOBAL_LOC_SUM_MAXSIZE+1]
typedef char GLOBAL_LOC_BUFFER [GLOBAL_LOC_MAXBUFSIZE+1]
typedef GLOBAL_LOC_DATA GLOBAL_LOC_STRUCT

Functions

GLOBAL_MSG_STATUS InitGlobalAmpLine (GLOBAL_AMPLINE_STRUCT *p_struct)
GLOBAL_MSG_STATUS InitGlobalPhaseLine (GLOBAL_PHSLINE_STRUCT *p_struct)
GLOBAL_MSG_STATUS InitGlobalLoc (GLOBAL_LOC_STRUCT *p_struct)
GLOBAL_MSG_STATUS WriteAmpLineToBuffer (GLOBAL_AMPLINE_STRUCT *p_struct, char *p_buffer, unsigned int p_length)
GLOBAL_MSG_STATUS WritePhaseLineToBuffer (GLOBAL_PHSLINE_STRUCT *p_struct, char *p_buffer, unsigned int p_length)
GLOBAL_MSG_STATUS WriteLocToBuffer (GLOBAL_LOC_STRUCT *p_struct, char *p_buffer, unsigned int p_length)
GLOBAL_MSG_STATUS StringToAmpLine (GLOBAL_AMPLINE_STRUCT *p_amp, char *p_string)
GLOBAL_MSG_STATUS StringToPhaseLine (GLOBAL_PHSLINE_STRUCT *p_phase, char *p_string)
GLOBAL_MSG_STATUS StringToLoc (GLOBAL_LOC_STRUCT *p_loc, char *p_string)
int AddAmpLineToPhase (GLOBAL_PHSLINE_STRUCT *p_phase, GLOBAL_AMPLINE_STRUCT *p_amp)
int AddPhaseLineToLoc (GLOBAL_LOC_STRUCT *p_loc, GLOBAL_PHSLINE_STRUCT *p_phase)
int GetLocPhaseIndex (GLOBAL_LOC_STRUCT *p_loc, GLOBAL_PHSLINE_STRUCT *p_phase)
GLOBAL_MSG_STATUS ClearAmpLines (GLOBAL_PHSLINE_STRUCT *p_phase)
GLOBAL_MSG_STATUS ClearPhaseLines (GLOBAL_LOC_STRUCT *p_loc)


Define Documentation

#define GLOBAL_AMPLINE_MAXBUFSIZE   (122 + BUFF_OVERRUN_SIZE)
 

Definition at line 45 of file global_loc_rw.h.

Referenced by StringToAmpLine(), and WriteAmpLineToBuffer().

#define GLOBAL_LOC_MAXBUFSIZE   (GLOBAL_LOC_SUM_MAXSIZE + (GLOBAL_LOC_MAXPHS * GLOBAL_PHSLINE_MAXBUFSIZE) )
 

Definition at line 128 of file global_loc_rw.h.

Referenced by WriteLocToBuffer().

#define GLOBAL_LOC_MAXPHS   250
 

Definition at line 126 of file global_loc_rw.h.

Referenced by AddPhaseLineToLoc(), InitGlobalLoc(), and StringToLoc().

#define GLOBAL_LOC_SUM_MAXSIZE   (127 + BUFF_OVERRUN_SIZE)
 

Definition at line 121 of file global_loc_rw.h.

Referenced by WriteLocToBuffer().

#define GLOBAL_PHSLINE_MAXBUFSIZE   (GLOBAL_PHSLINE_SUM_MAXSIZE + (MAX_AMPS_PER_GLOBALPHASE * GLOBAL_AMPLINE_MAXBUFSIZE) )
 

Definition at line 85 of file global_loc_rw.h.

Referenced by WriteLocToBuffer(), and WritePhaseLineToBuffer().

#define GLOBAL_PHSLINE_SUM_MAXSIZE   (119+ BUFF_OVERRUN_SIZE)
 

Definition at line 81 of file global_loc_rw.h.

Referenced by StringToPhaseLine().

#define MAX_AMPS_PER_GLOBALPHASE   (AMPTYPE_COUNT - 1)
 

Definition at line 79 of file global_loc_rw.h.

Referenced by AddAmpLineToPhase(), AddPhaseLineToLoc(), ClearAmpLines(), InitGlobalPhaseLine(), and WriteLocToBuffer().


Typedef Documentation

typedef char GLOBAL_AMPLINE_BUFFER[GLOBAL_AMPLINE_MAXBUFSIZE+1]
 

Definition at line 47 of file global_loc_rw.h.

Referenced by StringToAmpLine(), and WriteLocToBuffer().

typedef struct _GLOBAL_AMPLINE_STRUCT GLOBAL_AMPLINE_STRUCT
 

typedef char GLOBAL_LOC_BUFFER[GLOBAL_LOC_MAXBUFSIZE+1]
 

Definition at line 130 of file global_loc_rw.h.

typedef struct GLOBAL_LOC_DATA GLOBAL_LOC_STRUCT
 

typedef char GLOBAL_LOC_SUM_BUFFER[GLOBAL_LOC_SUM_MAXSIZE+1]
 

Definition at line 123 of file global_loc_rw.h.

Referenced by StringToLoc().

typedef char GLOBAL_PHSLINE_BUFFER[GLOBAL_PHSLINE_MAXBUFSIZE+1]
 

Definition at line 87 of file global_loc_rw.h.

Referenced by WriteLocToBuffer().

typedef struct _GLOBAL_PHSLINE_STRUCT GLOBAL_PHSLINE_STRUCT
 

typedef char GLOBAL_PHSLINE_SUM_BUFFER[GLOBAL_PHSLINE_SUM_MAXSIZE+1]
 

Definition at line 83 of file global_loc_rw.h.

Referenced by StringToPhaseLine().


Function Documentation

int AddAmpLineToPhase GLOBAL_PHSLINE_STRUCT   p_phase,
GLOBAL_AMPLINE_STRUCT   p_amp
 

Definition at line 939 of file global_loc_rw.c.

References _GLOBAL_AMPLINE_STRUCT::adcounts, _GLOBAL_AMPLINE_STRUCT::amp_time, _GLOBAL_PHSLINE_STRUCT::amps, _GLOBAL_AMPLINE_STRUCT::amptype, _GLOBAL_AMPLINE_STRUCT::channel, GLOBAL_AMPLINE_VERSION, GLOBAL_MSG_BADAMPTYPE, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_NULL, GLOBAL_MSG_VERSINVALID, GLOBAL_PHSLINE_VERSION, MSG_LOGO::instid, _GLOBAL_AMPLINE_STRUCT::location, _GLOBAL_AMPLINE_STRUCT::logo, MAX_AMPS_PER_GLOBALPHASE, MSG_LOGO::mod, _GLOBAL_AMPLINE_STRUCT::network, _GLOBAL_AMPLINE_STRUCT::period, _GLOBAL_AMPLINE_STRUCT::pick_sequence, _GLOBAL_AMPLINE_STRUCT::station, MSG_LOGO::type, _GLOBAL_AMPLINE_STRUCT::version, and _GLOBAL_PHSLINE_STRUCT::version.

Referenced by AddPhaseLineToLoc(), and StringToLoc().

int AddPhaseLineToLoc GLOBAL_LOC_STRUCT   p_loc,
GLOBAL_PHSLINE_STRUCT   p_phase
 

Definition at line 990 of file global_loc_rw.c.

References AddAmpLineToPhase(), _GLOBAL_PHSLINE_STRUCT::amps, _GLOBAL_PHSLINE_STRUCT::channel, GLOBAL_LOC_MAXPHS, GLOBAL_LOC_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_MAXCHILDREN, GLOBAL_MSG_NULL, GLOBAL_MSG_VERSINVALID, GLOBAL_PHSLINE_VERSION, MSG_LOGO::instid, _GLOBAL_PHSLINE_STRUCT::location, _GLOBAL_AMPLINE_STRUCT::logo, _GLOBAL_PHSLINE_STRUCT::logo, MAX_AMPS_PER_GLOBALPHASE, MSG_LOGO::mod, _GLOBAL_PHSLINE_STRUCT::network, GLOBAL_LOC_DATA::nphs, _GLOBAL_PHSLINE_STRUCT::phase_name, GLOBAL_LOC_DATA::phases, _GLOBAL_PHSLINE_STRUCT::pick_time, _GLOBAL_PHSLINE_STRUCT::polarity, _GLOBAL_PHSLINE_STRUCT::quality, _GLOBAL_PHSLINE_STRUCT::sequence, _GLOBAL_PHSLINE_STRUCT::station, MSG_LOGO::type, _GLOBAL_PHSLINE_STRUCT::version, and GLOBAL_LOC_DATA::version.

GLOBAL_MSG_STATUS ClearAmpLines GLOBAL_PHSLINE_STRUCT   p_phase
 

Definition at line 1085 of file global_loc_rw.c.

References _GLOBAL_PHSLINE_STRUCT::amps, GLOBAL_LOC_VERSION, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, InitGlobalAmpLine(), MAX_AMPS_PER_GLOBALPHASE, and _GLOBAL_PHSLINE_STRUCT::version.

GLOBAL_MSG_STATUS ClearPhaseLines GLOBAL_LOC_STRUCT   p_loc
 

Definition at line 1106 of file global_loc_rw.c.

References GLOBAL_LOC_VERSION, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, GLOBAL_LOC_DATA::nphs, and GLOBAL_LOC_DATA::version.

int GetLocPhaseIndex GLOBAL_LOC_STRUCT   p_loc,
GLOBAL_PHSLINE_STRUCT   p_phase
 

Definition at line 1057 of file global_loc_rw.c.

References MSG_LOGO::instid, _GLOBAL_PHSLINE_STRUCT::logo, MSG_LOGO::mod, GLOBAL_LOC_DATA::nphs, GLOBAL_LOC_DATA::phases, and _GLOBAL_PHSLINE_STRUCT::sequence.

GLOBAL_MSG_STATUS InitGlobalAmpLine GLOBAL_AMPLINE_STRUCT   p_struct
 

Definition at line 31 of file global_loc_rw.c.

References _GLOBAL_AMPLINE_STRUCT::adcounts, _GLOBAL_AMPLINE_STRUCT::amp_time, _GLOBAL_AMPLINE_STRUCT::amptype, AMPTYPE_NONE, _GLOBAL_AMPLINE_STRUCT::channel, GLOBAL_AMPLINE_VERSION, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, MSG_LOGO::instid, _GLOBAL_AMPLINE_STRUCT::location, _GLOBAL_AMPLINE_STRUCT::logo, MSG_LOGO::mod, _GLOBAL_AMPLINE_STRUCT::network, _GLOBAL_AMPLINE_STRUCT::period, _GLOBAL_AMPLINE_STRUCT::pick_sequence, _GLOBAL_AMPLINE_STRUCT::station, MSG_LOGO::type, and _GLOBAL_AMPLINE_STRUCT::version.

Referenced by ClearAmpLines(), InitGlobalPhaseLine(), and StringToAmpLine().

GLOBAL_MSG_STATUS InitGlobalLoc GLOBAL_LOC_STRUCT   p_struct
 

Definition at line 89 of file global_loc_rw.c.

References GLOBAL_LOC_DATA::depth, GLOBAL_LOC_DATA::dmin, GLOBAL_LOC_DATA::event_id, GLOBAL_LOC_DATA::gap, GLOBAL_LOC_MAXPHS, GLOBAL_LOC_VERSION, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, InitGlobalPhaseLine(), MSG_LOGO::instid, GLOBAL_LOC_DATA::lat, GLOBAL_LOC_DATA::logo, GLOBAL_LOC_DATA::lon, MSG_LOGO::mod, GLOBAL_LOC_DATA::nphs, GLOBAL_LOC_DATA::origin_id, GLOBAL_LOC_DATA::origin_time, GLOBAL_LOC_DATA::phases, GLOBAL_LOC_DATA::pick_count, GLOBAL_LOC_DATA::rms, MSG_LOGO::type, and GLOBAL_LOC_DATA::version.

Referenced by StringToLoc().

GLOBAL_MSG_STATUS InitGlobalPhaseLine GLOBAL_PHSLINE_STRUCT   p_struct
 

Definition at line 57 of file global_loc_rw.c.

References _GLOBAL_PHSLINE_STRUCT::amps, _GLOBAL_PHSLINE_STRUCT::channel, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_PHSLINE_VERSION, InitGlobalAmpLine(), MSG_LOGO::instid, _GLOBAL_PHSLINE_STRUCT::location, _GLOBAL_PHSLINE_STRUCT::logo, MAX_AMPS_PER_GLOBALPHASE, MSG_LOGO::mod, _GLOBAL_PHSLINE_STRUCT::network, _GLOBAL_PHSLINE_STRUCT::phase_name, _GLOBAL_PHSLINE_STRUCT::pick_time, _GLOBAL_PHSLINE_STRUCT::polarity, _GLOBAL_PHSLINE_STRUCT::quality, _GLOBAL_PHSLINE_STRUCT::sequence, _GLOBAL_PHSLINE_STRUCT::station, MSG_LOGO::type, and _GLOBAL_PHSLINE_STRUCT::version.

Referenced by InitGlobalLoc(), and StringToPhaseLine().

GLOBAL_MSG_STATUS StringToAmpLine GLOBAL_AMPLINE_STRUCT   p_amp,
char *    p_string
 

Definition at line 345 of file global_loc_rw.c.

References _GLOBAL_AMPLINE_STRUCT::adcounts, _GLOBAL_AMPLINE_STRUCT::amp_time, _GLOBAL_AMPLINE_STRUCT::amptype, _GLOBAL_AMPLINE_STRUCT::channel, DecodeAuthor(), GLOBAL_AMPLINE_BUFFER, GLOBAL_AMPLINE_MAXBUFSIZE, GLOBAL_AMPLINE_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_FORMATERROR, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, InitGlobalAmpLine(), k_err(), k_long(), k_put(), k_str(), k_val(), _GLOBAL_AMPLINE_STRUCT::location, logit(), _GLOBAL_AMPLINE_STRUCT::logo, _GLOBAL_AMPLINE_STRUCT::network, _GLOBAL_AMPLINE_STRUCT::period, _GLOBAL_AMPLINE_STRUCT::pick_sequence, _GLOBAL_AMPLINE_STRUCT::station, and _GLOBAL_AMPLINE_STRUCT::version.

Referenced by StringToLoc().

GLOBAL_MSG_STATUS StringToLoc GLOBAL_LOC_STRUCT   p_loc,
char *    p_string
 

Definition at line 622 of file global_loc_rw.c.

References AddAmpLineToPhase(), DecodeAuthor(), GLOBAL_LOC_DATA::depth, GLOBAL_LOC_DATA::dmin, GLOBAL_LOC_DATA::event_id, GLOBAL_LOC_DATA::gap, GLOBAL_LOC_MAXPHS, GLOBAL_LOC_SUM_BUFFER, GLOBAL_LOC_VERSION, GLOBAL_MSG_BADCHILD, GLOBAL_MSG_FORMATERROR, GLOBAL_MSG_MAXCHILDREN, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, InitGlobalLoc(), k_err(), k_long(), k_put(), k_str(), k_val(), GLOBAL_LOC_DATA::lat, logit(), GLOBAL_LOC_DATA::logo, GLOBAL_LOC_DATA::lon, GLOBAL_LOC_DATA::nphs, GLOBAL_LOC_DATA::origin_id, GLOBAL_LOC_DATA::origin_time, GLOBAL_LOC_DATA::phases, GLOBAL_LOC_DATA::pick_count, GLOBAL_LOC_DATA::rms, StringToAmpLine(), StringToPhaseLine(), and GLOBAL_LOC_DATA::version.

GLOBAL_MSG_STATUS StringToPhaseLine GLOBAL_PHSLINE_STRUCT   p_phase,
char *    p_string
 

Definition at line 482 of file global_loc_rw.c.

References _GLOBAL_PHSLINE_STRUCT::channel, DecodeAuthor(), GLOBAL_MSG_BADPARAM, GLOBAL_MSG_FORMATERROR, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, GLOBAL_PHSLINE_SUM_BUFFER, GLOBAL_PHSLINE_SUM_MAXSIZE, GLOBAL_PHSLINE_VERSION, InitGlobalPhaseLine(), k_err(), k_long(), k_put(), k_str(), k_val(), _GLOBAL_PHSLINE_STRUCT::location, logit(), _GLOBAL_PHSLINE_STRUCT::logo, _GLOBAL_PHSLINE_STRUCT::network, _GLOBAL_PHSLINE_STRUCT::phase_name, _GLOBAL_PHSLINE_STRUCT::pick_time, _GLOBAL_PHSLINE_STRUCT::polarity, _GLOBAL_PHSLINE_STRUCT::quality, _GLOBAL_PHSLINE_STRUCT::sequence, _GLOBAL_PHSLINE_STRUCT::station, and _GLOBAL_PHSLINE_STRUCT::version.

Referenced by StringToLoc().

GLOBAL_MSG_STATUS WriteAmpLineToBuffer GLOBAL_AMPLINE_STRUCT   p_struct,
char *    p_buffer,
unsigned int    p_length
 

Definition at line 128 of file global_loc_rw.c.

References _GLOBAL_AMPLINE_STRUCT::adcounts, _GLOBAL_AMPLINE_STRUCT::amp_time, _GLOBAL_AMPLINE_STRUCT::amptype, _GLOBAL_AMPLINE_STRUCT::channel, EncodeAuthor(), GLOBAL_AMPLINE_MAXBUFSIZE, GLOBAL_AMPLINE_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_TOOSMALL, GLOBAL_MSG_VERSINVALID, _GLOBAL_AMPLINE_STRUCT::location, _GLOBAL_AMPLINE_STRUCT::logo, _GLOBAL_AMPLINE_STRUCT::network, _GLOBAL_AMPLINE_STRUCT::period, _GLOBAL_AMPLINE_STRUCT::pick_sequence, _GLOBAL_AMPLINE_STRUCT::station, and _GLOBAL_AMPLINE_STRUCT::version.

Referenced by WriteLocToBuffer().

GLOBAL_MSG_STATUS WriteLocToBuffer GLOBAL_LOC_STRUCT   p_struct,
char *    p_buffer,
unsigned int    p_length
 

Definition at line 226 of file global_loc_rw.c.

References _GLOBAL_PHSLINE_STRUCT::amps, GLOBAL_LOC_DATA::depth, GLOBAL_LOC_DATA::dmin, EncodeAuthor(), GLOBAL_LOC_DATA::event_id, GLOBAL_LOC_DATA::gap, GLOBAL_AMPLINE_BUFFER, GLOBAL_LOC_MAXBUFSIZE, GLOBAL_LOC_SUM_MAXSIZE, GLOBAL_LOC_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_DEFINESMALL, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_TOOSMALL, GLOBAL_MSG_VERSINVALID, GLOBAL_PHSLINE_BUFFER, GLOBAL_PHSLINE_MAXBUFSIZE, GLOBAL_LOC_DATA::lat, _GLOBAL_AMPLINE_STRUCT::logo, GLOBAL_LOC_DATA::logo, GLOBAL_LOC_DATA::lon, MAX_AMPS_PER_GLOBALPHASE, GLOBAL_LOC_DATA::nphs, GLOBAL_LOC_DATA::origin_id, GLOBAL_LOC_DATA::origin_time, GLOBAL_LOC_DATA::phases, GLOBAL_LOC_DATA::pick_count, GLOBAL_LOC_DATA::rms, MSG_LOGO::type, GLOBAL_LOC_DATA::version, WriteAmpLineToBuffer(), and WritePhaseLineToBuffer().

GLOBAL_MSG_STATUS WritePhaseLineToBuffer GLOBAL_PHSLINE_STRUCT   p_struct,
char *    p_buffer,
unsigned int    p_length
 

Definition at line 177 of file global_loc_rw.c.

References _GLOBAL_PHSLINE_STRUCT::channel, EncodeAuthor(), GLOBAL_MSG_BADPARAM, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_TOOSMALL, GLOBAL_MSG_VERSINVALID, GLOBAL_PHSLINE_MAXBUFSIZE, GLOBAL_PHSLINE_VERSION, _GLOBAL_PHSLINE_STRUCT::location, _GLOBAL_PHSLINE_STRUCT::logo, _GLOBAL_PHSLINE_STRUCT::network, _GLOBAL_PHSLINE_STRUCT::phase_name, _GLOBAL_PHSLINE_STRUCT::pick_time, _GLOBAL_PHSLINE_STRUCT::polarity, _GLOBAL_PHSLINE_STRUCT::quality, _GLOBAL_PHSLINE_STRUCT::sequence, _GLOBAL_PHSLINE_STRUCT::station, and _GLOBAL_PHSLINE_STRUCT::version.

Referenced by WriteLocToBuffer().


Generated on Tue May 6 09:16:16 2003 for Earthworm Libs by doxygen1.3-rc3