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

# rw_mag.h File Reference

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

Go to the source code of this file.

## Compounds
struct | _MAG_CHAN_INFO
struct | _MAG_INFO
## Defines
#define | MAG_ALG_LEN 8
#define | MAG_NAME_LEN 6
## Typedefs
typedef _MAG_INFO | MAG_INFO
typedef _MAG_CHAN_INFO | MAG_CHAN_INFO
## Functions
int | rd_mag (char *msg, int msglen, MAG_INFO *pMag)
int | rd_chan_mag (char *msg, int msglen, MAG_CHAN_INFO *pMci, int size_ml)
int | wr_mag (MAG_INFO *pMag, char *buf, int buflen)
int | wr_chan_mag (MAG_CHAN_INFO *pMci, int nchannels, char *buf, int buflen)
int | rd_mag_sum (char *magMsg, int msgSize, MAG_INFO *magSum)
int | rd_mag_sta (char *magMsg, int msgSize, int nxtChar, MAG_CHAN_INFO *magSta)

## Define Documentation

#define MAG_ALG_LEN 8

| Definition at line 84 of file rw_mag.h.

#define MAG_NAME_LEN 6

| Definition at line 85 of file rw_mag.h.

## Typedef Documentation

typedef struct _MAG_CHAN_INFO MAG_CHAN_INFO

typedef struct _MAG_INFO MAG_INFO

## Function Documentation

int rd_chan_mag | ( | char * | msg,
|  | int | msglen,
|  | MAG_CHAN_INFO * | pMci,
|  | int | size_ml
| ) |

| Definition at line 155 of file rw_mag.c. References _MAG_CHAN_INFO::Amp2, _MAG_CHAN_INFO::comp, _MAG_CHAN_INFO::net, _MAG_CHAN_INFO::Period2, _MAG_CHAN_INFO::sta, _MAG_CHAN_INFO::Time2, tokenlength(), TRACE_CHAN_LEN, TRACE_NET_LEN, and TRACE_STA_LEN. Referenced by rd_mag().

int rd_mag | ( | char * | msg,
|  | int | msglen,
|  | MAG_INFO * | pMag
| ) |

| Definition at line 87 of file rw_mag.c. References _MAG_INFO::algorithm, _MAG_INFO::azimuth, _MAG_INFO::error, _MAG_INFO::imagtype, _MAG_INFO::mag, _MAG_INFO::mindist, _MAG_INFO::nchannels, _MAG_INFO::nstations, _MAG_INFO::origin_version, _MAG_INFO::pMagAux, _MAG_INFO::qauthor, _MAG_INFO::qdds_version, _MAG_INFO::qid, _MAG_INFO::quality, rd_chan_mag(), _MAG_INFO::size_aux, and _MAG_INFO::szmagtype.

int rd_mag_sta | ( | char * | magMsg,
|  | int | msgSize,
|  | int | nxtChar,
|  | MAG_CHAN_INFO * | magSta
| ) |

int rd_mag_sum | ( | char * | magMsg,
|  | int | msgSize,
|  | MAG_INFO * | magSum
| ) |

int wr_chan_mag | ( | MAG_CHAN_INFO * | pMci,
|  | int | nchannels,
|  | char * | buf,
|  | int | buflen
| ) |

| Definition at line 298 of file rw_mag.c. References strappend(). Referenced by wr_mag().

int wr_mag | ( | MAG_INFO * | pMag,
|  | char * | buf,
|  | int | buflen
| ) |

| Definition at line 239 of file rw_mag.c. References _MAG_INFO::algorithm, _MAG_INFO::azimuth, _MAG_INFO::error, _MAG_INFO::imagtype, _MAG_INFO::mag, _MAG_INFO::mindist, _MAG_INFO::nchannels, _MAG_INFO::nstations, _MAG_INFO::origin_version, _MAG_INFO::pMagAux, _MAG_INFO::qauthor, _MAG_INFO::qdds_version, _MAG_INFO::qid, _MAG_INFO::quality, strappend(), _MAG_INFO::szmagtype, and wr_chan_mag().