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

# imp_exp_gen.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: imp__exp__gen_8h-source.html,v 1.1 2006/05/19 16:55:02 paulf Exp $
    00007  *
    00008  *    Revision history:
    00009  *     $Log: imp__exp__gen_8h-source.html,v $
    00009  *     Revision 1.1  2006/05/19 16:55:02  paulf
    00009  *     first inclusion
    00009  *
    00010  *     Revision 1.2  2000/07/24 18:54:14  lucky
    00011  *     Added MAX_ALIVE_STR definition so that import and export can
    00012  *     agree on the max length.
    00013  *
    00014  *     Revision 1.1  2000/02/14 20:05:54  lucky
    00015  *     Initial revision
    00016  *
    00017  *
    00018  */
    00019
    00020 #ifndef IMP_EXP_GEN_H
    00021 #define IMP_EXP_GEN_H
    00022
    00023 /* This is the include file for import_generic and export_generic, created
    00024    to deal with  binary messages . Alex 10/10/96 */
    00025 /*
    00026 Modified to read binary messages, alex 10/10/96:
    00027 The scheme (I got it from Carl) is define some sacred characters. Sacred characters
    00028 are the start-of-message and end-of-message framing characters, and an
    00029 escape character. The sender's job is to cloak unfortunate bit patterns
    00030 in the data which look like sacred characters by inserting before
    00031 them an 'escape' character.  Our problem here is to recognize,
    00032 and use, the 'real' start- and end-of-messge characters,
    00033 and to 'decloak' any unfortunate look-alikes within the message body.
    00034 */
    00035
    00036 /* Modified to only accept a SocketTimeout parameter if there are no
    00037    heartbeat messages, that is the SenderHeartRate or RcvAliveInt is
    00038    set to 0, otherwise the SocketTimeout is based on the heartrate interval
    00039    as prescribed in the config file by RcvAliveInt or SenderHeartRate
    00040    12/16/97 Davidk
    00041 */
    00042
    00043
    00044 #define         MAX_ALIVE_STR   256     /* max size of the alive string */
    00045
    00046
    00047 /* The sacred characters: */
    00048
    00049 #define STX 2     /* Start Transmission: used to frame beginning of message */
    00050 #define ETX 3     /* End Transmission: used to frame end of message */
    00051 #define ESC 27    /* Escape: used to 'cloak' unfortunate binary bit patterns which look like sacred characters */
    00052
    00053 /* Define States for Socket Message Receival */
    00054 #      define SEARCHING_FOR_MESSAGE_START 0
    00055 #      define EXPECTING_MESSAGE_START 1
    00056 #      define ASSEMBLING_MESSAGE 2
    00057
    00058 /* Define Buffer Size for Socket Receiving Buffer */
    00059 #      define INBUFFERSIZE 100
    00060
    00061 #endif