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

# global_amp_rw.h File Reference

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

Go to the source code of this file.

## Compounds
struct | GLOBAL_AMP_MSG
## Defines
#define | GLOBAL_AMP_MAXBUFSIZE (118 + BUFF_OVERRUN_SIZE)
## Typedefs
typedef char | GLOBAL_AMP_BUFFER [GLOBAL_AMP_MAXBUFSIZE+1]
typedef GLOBAL_AMP_MSG | GLOBAL_AMP_STRUCT
## Functions
GLOBAL_MSG_STATUS | InitGlobalAmp (GLOBAL_AMP_STRUCT *p_struct)
GLOBAL_MSG_STATUS | WriteAmpToBuffer (GLOBAL_AMP_STRUCT *p_struct, char *p_buffer, unsigned int p_length)
GLOBAL_MSG_STATUS | StringToAmp (GLOBAL_AMP_STRUCT *p_struct, char *p_string)

## Define Documentation

#define GLOBAL_AMP_MAXBUFSIZE (118 + BUFF_OVERRUN_SIZE)

| Definition at line 29 of file global_amp_rw.h. Referenced by WriteAmpToBuffer().

## Typedef Documentation

typedef char GLOBAL_AMP_BUFFER[GLOBAL_AMP_MAXBUFSIZE+1]

| Definition at line 31 of file global_amp_rw.h.

typedef struct GLOBAL_AMP_MSG GLOBAL_AMP_STRUCT

## Function Documentation

GLOBAL_MSG_STATUS InitGlobalAmp | ( | GLOBAL_AMP_STRUCT * | p_struct | ) |

| Definition at line 19 of file global_amp_rw.c. References GLOBAL_AMP_MSG::adcounts, GLOBAL_AMP_MSG::amp_time, GLOBAL_AMP_MSG::amptype, AMPTYPE_NONE, GLOBAL_AMP_MSG::channel, GLOBAL_AMP_VERSION, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, MSG_LOGO::instid, GLOBAL_AMP_MSG::location, GLOBAL_AMP_MSG::logo, MSG_LOGO::mod, GLOBAL_AMP_MSG::network, GLOBAL_AMP_MSG::period, GLOBAL_AMP_MSG::sequence, GLOBAL_AMP_MSG::station, MSG_LOGO::type, and GLOBAL_AMP_MSG::version. Referenced by StringToAmp().

GLOBAL_MSG_STATUS StringToAmp | ( | GLOBAL_AMP_STRUCT * | p_struct,
|  | char * | p_string
| ) |

| Definition at line 93 of file global_amp_rw.c. References GLOBAL_AMP_MSG::adcounts, GLOBAL_AMP_MSG::amp_time, GLOBAL_AMP_MSG::amptype, AMPTYPE_COUNT, GLOBAL_AMP_MSG::channel, DecodeAuthor(), GLOBAL_AMP_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_FORMATERROR, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_VERSINVALID, InitGlobalAmp(), k_err(), k_long(), k_put(), k_str(), k_val(), GLOBAL_AMP_MSG::location, GLOBAL_AMP_MSG::logo, GLOBAL_AMP_MSG::network, GLOBAL_AMP_MSG::period, GLOBAL_AMP_MSG::sequence, GLOBAL_AMP_MSG::station, and GLOBAL_AMP_MSG::version.

GLOBAL_MSG_STATUS WriteAmpToBuffer | ( | GLOBAL_AMP_STRUCT * | p_struct,
|  | char * | p_buffer,
|  | unsigned int | p_length
| ) |

| Definition at line 44 of file global_amp_rw.c. References GLOBAL_AMP_MSG::adcounts, GLOBAL_AMP_MSG::amp_time, GLOBAL_AMP_MSG::amptype, GLOBAL_AMP_MSG::channel, EncodeAuthor(), GLOBAL_AMP_MAXBUFSIZE, GLOBAL_AMP_VERSION, GLOBAL_MSG_BADPARAM, GLOBAL_MSG_NULL, GLOBAL_MSG_STATUS, GLOBAL_MSG_SUCCESS, GLOBAL_MSG_TOOSMALL, GLOBAL_MSG_VERSINVALID, GLOBAL_AMP_MSG::location, GLOBAL_AMP_MSG::logo, GLOBAL_AMP_MSG::network, GLOBAL_AMP_MSG::period, GLOBAL_AMP_MSG::sequence, GLOBAL_AMP_MSG::station, and GLOBAL_AMP_MSG::version.