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

# wave_client.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
    00004  *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
    00005  *
    00006  *    $Id: wave__client_8h-source.html,v 1.1 2006/05/19 16:55:02 paulf Exp $
    00007  *
    00008  *    Revision history:
    00009  *     $Log: wave__client_8h-source.html,v $
    00009  *     Revision 1.1  2006/05/19 16:55:02  paulf
    00009  *     first inclusion
    00009  *
    00010  *     Revision 1.1  2000/02/14 20:05:54  lucky
    00011  *     Initial revision
    00012  *
    00013  *
    00014  */
    00015
    00016 /*
    00017  *  wave_client.h
    00018  */
    00019
    00020 /* Parameters read in from a configuration file
    00021 ***********************************************/
    00022 static char ServerIPAdr[20];   /* IP address of waveform server           */
    00023 static int  ServerPort;        /* wave_server's well-known port number    */
    00024
    00025 /* Prototypes for functions in wave_client.c
    00026 ********************************************/
    00027 int  wave_request( double,   double,   char * );
    00028 int  wave_inquire( double *, double *,
    00029                    unsigned char *, unsigned char *, unsigned char * );
    00030 void wave_client_config( char * );
    00031 int  wave_client_setup ( char *, int );
    00032
    00033 /* Error codes returned by functions in wave_client.c:
    00034    wave_request() returns # buffers received (>0) or an error code (<0)
    00035    wave_inquire() returns 0 on success or an error code (<0) on failure
    00036 ***********************************************************************/
    00037 #define ERR_ALLOC     -1       /* error allocating memory buffer        */
    00038 #define ERR_NOHOST    -2       /* trouble getting server's host info    */
    00039 #define ERR_SOCKET    -3       /* error with socket connect, send, recv */
    00040 #define ERR_FILEIO    -4       /* error opening or writing to file      */
    00041 #define ERR_NODATA    -5       /* data requested is not in tank         */
    00042 #define ERR_OVRFLW    -6       /* data buffer length > BufferSize       */
    00043 #define ERR_NOCONFIG  -7       /* configuration file has not been read  */
    00044 #define ERR_STRIO     -8       /* error doing string i/o                */
    00045
    00046 /* Error strings to accompany error codes;
    00047    indexed by absolute value of error number
    00048 ********************************************/
    00049 static char *Wave_Client_Error[] =
    00050 { "",                                       /* no error     */
    00051   "error allocating memory",                /* ERR_ALLOC    */
    00052   "error getting wave_server's host info",  /* ERR_NOHOST   */
    00053   "trouble with socket",                    /* ERR_SOCKET   */
    00054   "error on file i/o",                      /* ERR_FILEIO   */
    00055   "time period not in tank",                /* ERR_NODATA   */
    00056   "wave_server reply overflows target",     /* ERR_OVERFLW  */
    00057   "wave_client configfile not read",        /* ERR_NOCONFIG */
    00058   "error decoding wave_server response",    /* ERR_STRIO    */
    00059 };