source: trunk/include/wave_client.h @ 5054

Revision 1111, 2.6 KB checked in by lombard, 16 years ago (diff)

Protected from multiple includes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2/*
3 *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
4 *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
5 *
6 *    $Id$
7 *
8 *    Revision history:
9 *     $Log$
10 *     Revision 1.2  2002/11/03 00:22:11  lombard
11 *     Protected from multiple includes.
12 *
13 *     Revision 1.1  2000/02/14 20:05:54  lucky
14 *     Initial revision
15 *
16 *
17 */
18
19#ifndef WAVE_CLIENT_H
20#define WAVE_CLIENT_H
21
22/* 
23 *  wave_client.h
24 */
25
26/* Parameters read in from a configuration file
27***********************************************/
28static char ServerIPAdr[20];   /* IP address of waveform server           */
29static int  ServerPort;        /* wave_server's well-known port number    */
30
31/* Prototypes for functions in wave_client.c
32********************************************/
33int  wave_request( double,   double,   char * );
34int  wave_inquire( double *, double *, 
35                   unsigned char *, unsigned char *, unsigned char * );
36void wave_client_config( char * );
37int  wave_client_setup ( char *, int );
38
39/* Error codes returned by functions in wave_client.c:
40   wave_request() returns # buffers received (>0) or an error code (<0)
41   wave_inquire() returns 0 on success or an error code (<0) on failure
42***********************************************************************/
43#define ERR_ALLOC     -1       /* error allocating memory buffer        */
44#define ERR_NOHOST    -2       /* trouble getting server's host info    */
45#define ERR_SOCKET    -3       /* error with socket connect, send, recv */
46#define ERR_FILEIO    -4       /* error opening or writing to file      */
47#define ERR_NODATA    -5       /* data requested is not in tank         */
48#define ERR_OVRFLW    -6       /* data buffer length > BufferSize       */ 
49#define ERR_NOCONFIG  -7       /* configuration file has not been read  */
50#define ERR_STRIO     -8       /* error doing string i/o                */
51
52/* Error strings to accompany error codes;
53   indexed by absolute value of error number
54********************************************/
55static char *Wave_Client_Error[] = 
56{ "",                                       /* no error     */
57  "error allocating memory",                /* ERR_ALLOC    */
58  "error getting wave_server's host info",  /* ERR_NOHOST   */
59  "trouble with socket",                    /* ERR_SOCKET   */
60  "error on file i/o",                      /* ERR_FILEIO   */
61  "time period not in tank",                /* ERR_NODATA   */
62  "wave_server reply overflows target",     /* ERR_OVERFLW  */
63  "wave_client configfile not read",        /* ERR_NOCONFIG */
64  "error decoding wave_server response",    /* ERR_STRIO    */
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.