⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdm_defs.h

📁 PPP协议C语言源程序
💻 H
字号:
/************************************************************************
*
*        Copyright (c) 1997 - 2001 by Accelerated Technology, Inc.
*
* PROPRIETARY RIGHTS of Accelerated Technology are involved in the
* subject matter of this material.  All manufacturing, reproduction,
* use, and sales rights pertaining to this subject matter are governed
* by the license agreement.  The recipient of this software implicitly
* accepts the terms of the license.
*
*************************************************************************
*************************************************************************
*
*   FILE NAME                                           VERSION
*
*       MDM_DEFS.H                                      2.4
*
*   COMPONENT
*
*       MODEM
*
*   DESCRIPTION
*
*       This file contains constant definitions for the modem module
*       of PPP.
*
*   DATA STRUCTURES
*
*       MDM_BUFFER      The terminal mode receive buffer.
*       MDM_LAYER       All data needed by the modem layer to function.
*                       Mainly consisting of the terminal mode RX buffer.
*
*   DEPENDENCIES
*
*       None
*
*************************************************************************/

/* Check to see if the file has been included already.  */

#ifndef MDM_DEFS_H
#define MDM_DEFS_H

typedef struct _MDM_BUFFER
{
    CHAR    *mdm_head;
    CHAR    *mdm_tail;
    CHAR    *mdm_read;
    CHAR    *mdm_write;
    INT     mdm_buffer_status;
} MDM_BUFFER;

typedef struct _MDM_LAYER_STRUCT
{
    MDM_BUFFER  recv_buffer;
    CHAR        dial_prefix[41];
    UINT8       hangup_attempts;
    UINT8       num_rings;
} MDM_LAYER;

/* The modem can be used in two different modes: a terminal mode and network
   communication mode.  The following definitions are used to control which mode
   is in use. */
#define MDM_NETWORK_COMMUNICATION       1
#define MDM_TERMINAL_COMMUNICATION      2

/* This is the size of the receive buffer when in terminal mode. */
#define     MDM_RECV_BUFFER_SIZE        100

/* This is the size of the modem reponse buffer used for connecting
   the local modem to a remote modem. */
#define     MDM_RESPONSE_SIZE           81

/* These are the possible values for the mdm_buffer_status. */
#define     MDM_BUFFER_EMPTY            1  /* No data in the buffer. */
#define     MDM_BUFFER_FULL             2  /* The buffer is full. */
#define     MDM_BUFFER_DATA             3  /* There is data in the buffer. */

#define     MDM_DIAL_PREFIX             "ATDT"
#define     MDM_HANGUP_STRING           "~~~+++~~~ATH0^M"
#define     MDM_IGNORE_CALLS            "ATS0=0^M"
#define     MDM_ATTENTION               "AT^M"


/* How many rings before the phone is answered. To change this simply
   change the 2 to the number of rings that is required.
*/
#define     MDM_ACCEPT_CALL             "ATS0="  /* Number of rings will
                                                    be specified by the user. */
#define     MDM_STRING_TERMINATOR       "^M"

/* How many times to try to hangup the modem up before giving up. */
#define     MDM_MAX_HANGUP_ATTEMPTS     5

/* How many times to loop waiting for the modem to repond. This
   pertains to the MDM_Modem_Connected function. Each loop
   we wait one second. */
#define     MDM_MAX_DETECTION_WAIT_LOOPS    3



#define NU_Change_Communication_Mode        MDM_Change_Communication_Mode
#define NU_Terminal_Data_Ready              MDM_Data_Ready
#define NU_Modem_Control_String             MDM_Control_String
#define NU_Get_Terminal_Char                MDM_Get_Char
#define NU_Purge_Terminal_Buffer            MDM_Purge_Input_Buffer
#define NU_Put_Terminal_Char                MDM_Put_Char
#define NU_Carrier                          MDM_Carrier
#define NU_Modem_Rings_To_Answer            MDM_Rings_To_Answer

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -