home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / n / n002 / 4.ddi / ECLHEAD.ZIP / IM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-19  |  4.1 KB  |  94 lines

  1. #ifndef  ECL_IMHEAD
  2. #define  ECL_IMHEAD
  3.                               
  4. /* IM.h    Include file for IM.C module */
  5.   
  6. /* Status returns from IMODEM functions */
  7.  
  8. #define IM_RSP_EXCEED      -13     /* Maximum number of modem responses
  9.                                       for one command has been exceeded
  10.                                       Maximum = IM_MAX_NRESP */
  11. #define IM_MAXCRSP_EXCEED  -12     /* Maximum number of response charaters
  12.                                       for one command has been exceeded
  13.                                       Maximum = IM_MAX_RESP_CHARS */
  14. #define IM_HW_TIMEOUT      -11     /* Timeout due to hardware handshaking  */
  15. #define IM_TIMEOUT         -10     /* Timeout waiting for modem response */
  16. #define IM_RESP            -9      /* unrecognized modem response */
  17. #define IM_RING            -8      /* Ring indication */
  18. #define IM_NO_ANSWER       -7      /* No silence while dialing */
  19. #define IM_BUSY            -6      /* Engaged (busy) signal detected */
  20. #define IM_NO_DIALTONE     -5      /* No Dialtone detected */
  21. #define IM_INVALTYPE       -4      /* Invalid modem type */
  22. #define IM_NOCAR           -3      /* No carrier */
  23. #define IM_SESS            -2      /* No session in progress */
  24. #define IM_ERROR           -1      /* Invalid command, Command line length
  25.                                       exceeded */
  26. #define IM_OK               0      /* Success - acknowledgement */
  27. #define IM_CONCT            1      /* Connected */
  28.   
  29.   
  30. #define IM_SPKR_OFF         0       /* IM_Speaker speaker off */
  31. #define IM_SPKR_ONC         1       /* IM_Speaker - on till connect */
  32. #define IM_SPKR_ON          2       /* IM_Speaker speaker on always */
  33.  
  34. /* modem operating mode values */  
  35. #define IM_ONLINE          0           /* MODE - Connected to other CPU */
  36. #define IM_COMMAND         1           /* MODE - modem commands allowed */
  37.  
  38. /* old ECL ver 3.0- defines */
  39. #define SPKR_OFF         0       /* IM_Speaker speaker off */
  40. #define SPKR_ONC         1       /* IM_Speaker - on till connect */
  41. #define SPKR_ON          2       /* IM_Speaker speaker on always */
  42. #define ON_LINE         0           /* MODE - Connected to other CPU */
  43. #define COMMAND         1           /* MODE - modem commands allowed */
  44.  
  45. /* Modem default operating values */  
  46. #define IM_DTERM           '\015'  /* Default terminator character */
  47. #define IM_DESC            '+'     /* Escape back to command mode */
  48. #define IM_DESC_GUARD      25      /* Exceed 1 second */
  49. #define IM_D_ICDELAY        2      /* Default Intercharacter Delay (in clock ticks) */
  50. #define IM_NORM_TO         40      /* Normal command timeout ( 2.2 sec) */
  51. #define IM_DIAL_TO       1080      /* Dialing command timeout (60 sec) */
  52.   
  53.   
  54. /* maximum number of characters comprising any modem numrical response
  55.    (includes terminator character) */
  56. #define IM_MAX_RESP_CHARS     5
  57.   
  58. /* Modem types */
  59. #define IM_HAYES_ULTRA      0
  60. #define IM_USR_COURIER      1
  61. #define IM_MICROCOM_QX      2
  62. #define IM_UDS_FASTALK      2
  63. #define IM_TELEBIT          3
  64. #define IM_MULTITECH        4
  65. #define IM_GVC              5
  66. #define IM_VENTEL           6
  67. #define IM_DIGICOM_SYSTEMS  7
  68. #define IM_GENERIC_TYPE     8
  69.  
  70. #define IM_STANDARD_TYPE    9    /* Always equal to IM_MODEMTYPE_MAX */
  71. #define IM_MODEMTYPE_MAX    9
  72.  
  73.  
  74. /* Modem structure */
  75. typedef struct ecl_modem  {
  76.     char  in_progress;    /* session in progress on port: 0=no; 1=yes */
  77.     char  imodem_mode;    /* IM_ONLINE or IM_COMMAND modes */
  78.     char  terminator;     /* Terminator character */
  79.     char  escape;         /* Char to Escape back to command mode */
  80.     char  ic_delay;       /* intercharacter delay for sending comands */
  81.     int   escape_guard;   /* Used to enter COMMAND mode (Exceed 1 second) */
  82.     int   timeout;        /* command response timeout */
  83.     int   im_baud;        /* baud rate set by im_put, im_answ & im_dial */
  84.      int   modem_type;     /* determines: additional initialization string
  85.                              and filtering of modem responses.  */
  86. }ECL_MODEM;
  87.   
  88.   
  89. /* Intellegent Modem global variables. Defined in "im.c" */
  90. extern int im_baud;
  91. extern ECL_MODEM     im_modem[];
  92.   
  93. #endif
  94.