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

📄 atextend.c

📁 free sources for gsm
💻 C
📖 第 1 页 / 共 3 页
字号:
/* Copyright (C) 1997 Optimay GmbH. All Rights Reserved.

File:   ui\uif\at\atextend.c
Desc:   Implements handling of extened AT commands.
Author: Sunna Darcy
Date:   15.03.99
Notes:

    The category 'extended AT Commands' look like this:

            These commands come in four flavors:
                - the execute command (e.g. AT +CMND)
                - the set command     (e.g. AT +CMND=<params>)
                - the read command    (e.g. AT +CMND?)
                - the test command    (e.g. AT +CMND=?)

            This set of commands have the following properties:
            - The command name is composed of a '+' followed by any number
              of alphanumeric characters.
            - The execute, read and test commands may NOT be followed with
              a parameter.
            - A specific command may only support some of the four types.
              Often the execute form of the command is really a set command
              with an assumed a default parameter.
            - The set command MUST be followed with a parameter.  The
              parameter may be a complex multi-part parameter with optional
              components.  Extended 'set' command handler functions are
              simply passed a string pointer to the parameters, and it is
              up to the handler routine to parse them.
            - Individual commands ARE terminated on the command line with
              a ';' or carriage return.

    TO EXTEND THE COMMAND SET:

    To add a command which follows the format of an extended command, simply
    add its name and handler routines to the following gExtendATCommands[]
    array.  If you wish to add extended commands which use a different
    preceding symbol character, you must also add the new character to the
    gExtendedSym[] array.
    NOTE: You may not create basic and extended commands which both use the
          same preceding symbol character in their names.


   $Source \proj\rfo03.prv\base\ui\uif\at\atextend.c  (Clearcase Element) $
   $Author RFONTANA $

$Log: $
 * RFONTANA         18. Sep. 2000  17:58:23  RB: rb_gsmms2, IB: REL_MGMT_004, PB: rfo03, Rev: 1
 *   Updates on GS and AT commands
 *
 * RFONTANA         15. Jun. 2000  12:54:27  RB: rb_gsmms2, IB: gprs_smg31, PB: ric103, Rev: 1
 *   Other updates on AT commands
 *
 * FAIOUAZ          27. Apr. 2000  9:25:15  RB: rb_gsmms2, IB: gprs_smg28, PB: FAI00004, Rev: 1
 *   Removed obsolete AT command series reference about RLC Duplex Mode.
 *
 * ANOCK            10. Apr. 2000  13:48:47  RB: rb_gsmms2, IB: gprs_smg28, PB: ANO00031, Rev: 1
 *   Introduced Fred's changes for the merge of GSMMS2 and GPRS.
 *
 * ANOCK            3. Apr. 2000  22:33:09  RB: rb_gsmms2, IB: gprs_smg28, PB: ANO00030, Rev: 1
 *   Updated with latest merged version of GPRS group.
 *
 * ANOCK            15. Mar. 2000  12:37:14  RB: rb_gsmms2, IB: gprs_smg28, PB: ANO00029, Rev: 1
 *   Synchronised with GSMMS2.
 *
 * RFONTANA         1. Mar. 2000  18:22:03  RB: rb_gsmms2, IB: gprs_smg28, PB: ric07, Rev: 1
 *   Riccardo F. update for GPRS AT commands
 *
 * Commented CSCS as UNSUPPORTED.
 * SMS commands are now protected with #ifdef AT_SMS.
 * Spelling correction in CMGW command.
 * Added help text for SMS commands.
 *
 * Revision 1.5  1999/05/28  19:40:33  kassu
 * Several AT-commands #defined out from gExtendATCommands array, since
 * there were only hooks in place, but no real implementation of commands.
 * This resulted the MS to respond to these commands as they were implemented.
 * Updated the help strings to match the current state of implementation.
 *
 * Revision 1.4  1999/05/01  14:55:19  sunna
 * Commented +CGMR, +CGMI and +CGMM in in extended help text.
 *
 * Revision 1.3  1999/03/25  10:51:53  susanne
 * Extended extended help text
 *
 * Revision 1.2  1999/03/23  11:34:17  Optimay
 * Added include atextern.h to remove warnings.
 *
 * Revision 1.1  1999/03/15  19:05:45  Optimay
 * Initial revision
 *
 *
 *
*/

#ifdef SEC_AT
/**************************************************************************/
/**     INCLUDES                                                         **/
/**************************************************************************/
#include "ker_port.h"
#include "..\config\mboxes.h"
#include "..\system\sysarith.h"
#include "..\global\decprims.h"
#include "..\global\gsmerror.h" /* tracer and MEMPut... */
#include "..\global\txif.h"
#include "..\global\useif.h"
#include "..\global\gsmtimer.h"
#include "..\global\gldata.h"
#include "..\config\tgconfig.h"
#include "..\app\at\uiat.h"
#include "..\app\at\atintern.h"
#include "..\app\at\atextern.h"
#include "..\app\at\atextend.h"
#include "..\app\at\atglobal.h"
#include "..\app\at\atgprsdb.h"

static ATCMD_RESULT HndlATtXXX( void );
static ATCMD_RESULT HndlATsWS46( INT8 * paramStrPtr );
static ATCMD_RESULT HndlATrWS46( void );
static ATCMD_RESULT HndlATtWS46( void );




/**************************************************************************/
/**     GLOBALS                                                          **/
/**************************************************************************/


/**************************************************************************/
/**     Extended AT Commands                                             **/
/**************************************************************************/
/*
    Table of the Extended Set of AT Commands -
    The customer may modify the supported set of AT commands by adding or
    deleting AT command handlers from the table without needing to modify
    the command interpreter code itself.

    Note: Superset commands should also be added to this table.
*/
INT8  gExtendedSym[] =
   {
   '+',

   /* Add symbols to signify an extended command type here... */

   '\0'                         /* Required as last item to terminate the array */
   };
/* INDENT OFF */
const ExtendATCmd gExtendTestATCommands[] =
    {
        {"+CGMSACT",  HndlATexMSACT,  NULL,              HndlATtMSACT  },                            
        {"END", NULL, NULL, NULL }
    };
ExtendATCmd gExtendATCommands[] =
    {
/************************************************************************/
/*                          7.07 Commands                               */
/*                     implemented in several files                     */
/* General commands          at707gen.c                                 */
/* Call control              at707cc.c                                  */
/* Network service           at707ns.c                                  */
/* Audio Data                at707ad.c                                  */
/* Mobile equipment & status at707me.c                                  */
/************************************************************************/

/************************ General commands ******************************/
        {"+CGMI",   HndlATsCGMI,   HndlATrCGMI,           HndlATtXXX   }, //LIM_test
        {"+CGMM",   HndlATsCGMM,   HndlATrCGMM,           HndlATtXXX   },
        {"+CGMR",   HndlATsCGMR,   HndlATrCGMR,           HndlATtXXX   },
        {"+CGSN",   HndlATsCGSN,   NULL,           HndlATtXXX   },
        {"+CSCS",   HndlATsCSCS,   HndlATrCSCS,    HndlATtCSCS  },  /* Set unsupported */

/********************* Call control commands ****************************/
        {"+CSTA",   HndlATsCSTA,   HndlATrCSTA,    HndlATtCSTA  },
#if 0
        {"+CMOD",   HndlATsCMOD,   HndlATrCMOD,    HndlATtCMOD  },
#endif
        {"+CHUP",   HndlATsCHUP,   NULL,           HndlATtCHUP  },
        {"+CBST",   HndlATsCBST,   HndlATrCBST,    HndlATtCBST  },
        {"+CRLP",   HndlATsCRLP,   HndlATrCRLP,    HndlATtCRLP  },
        {"+CR",     HndlATsCR,     HndlATrCR,      HndlATtCR    },
        {"+CEER",   HndlATsCEER,   NULL,           HndlATtCEER  },
        {"+CRC",    HndlATsCRC,    HndlATrCRC,     HndlATtCRC   },
#if 0
        {"+CPWD",   HndlATsCPWD,   NULL,           HndlATtCPWD  },
#endif
        {"+CLCC",   HndlATsCLCC,   NULL,           HndlATtCLCC  },

/************** Network service related commands *********************/
        {"+CNUM",   HndlATsCNUM,   NULL,           HndlATtCNUM  },
        {"+CREG",   HndlATsCREG,   HndlATrCREG,    HndlATtCREG  },
        {"+COPS",   HndlATsCOPS,   HndlATrCOPS,    HndlATtCOPS  },
#if 0
        {"+CLCK",   HndlATsCLCK,   NULL,           HndlATtCLCK  },
#endif
        {"+CLIP",   HndlATsCLIP,   HndlATrCLIP,    HndlATtCLIP  },
        {"+CLIR",   HndlATsCLIR,   HndlATrCLIR,    HndlATtCLIR  },
        {"+COLP",   HndlATsCOLP,   HndlATrCOLP,    HndlATtCOLP  },
#if 0
        {"+CCUG",   HndlATsCCUG,   HndlATrCCUG,    HndlATtCCUG  },
        {"+CCFC",   HndlATsCCFC,   NULL,           HndlATtCCFC  },
#endif
        {"+CCWA",   HndlATsCCWA,   HndlATrCCWA,    HndlATtCCWA  },
        {"+CHLD",   HndlATsCHLD,   NULL,           HndlATtCHLD  },
        {"+CTFR",   HndlATsCTFR,   NULL,           HndlATtCTFR  },
        {"+CUSD",   HndlATsCUSD,   HndlATrCUSD,    HndlATtCUSD  },
        {"+CAOC",   HndlATsCAOC,   NULL,           HndlATtCAOC  },
        {"+CSSN",   HndlATsCSSN,   HndlATrCSSN,    HndlATtCSSN  },

        /* Used in automatic testing on Anite to clean the FPLMN list on SIM card */
        {"+FPLMNL",   HndlATsFPLMNL,   NULL,           HndlATtFPLMNL},


/********************** Audio data commands **************************/
        {"+VBT",    HndlATsVBT,    HndlATrVBT,     HndlATtVBT   },
        {"+VCID",   HndlATsVCID,   HndlATrVCID,    HndlATtVCID  },
        {"+VGR",    HndlATsVGR,    HndlATrVGR,     HndlATtVGR   },
        {"+VGT",    HndlATsVGT,    HndlATrVGT,     HndlATtVGT   },
        {"+VIP",    HndlATsVIP,    NULL,           HndlATtVIP   },
        {"+VIT",    HndlATsVIT,    HndlATrVIT,     HndlATtVIT   },
        {"+VLS",    HndlATsVLS,    HndlATrVLS,     HndlATtVLS   },
        {"+VRX",    HndlATsVRX,    NULL,           NULL         },
        {"+VSM",    HndlATsVSM,    HndlATrVSM,     HndlATtVSM   },
        {"+VTD",    HndlATsVTD,    HndlATrVTD,     HndlATtVTD   },
        {"+VTS",    HndlATsVTS,    NULL,           HndlATtVTS   },
        {"+VTX",    HndlATsVTX,    NULL,           NULL         },

/*****************Mobile equipment and status commands ***************/
        {"+CPAS",   HndlATsCPAS,   NULL,           HndlATtCPAS  },
#if 0
        {"+CFUN",   HndlATsCFUN,   HndlATrCFUN,    HndlATtCFUN  },
#endif
        {"+CPIN",   HndlATsCPIN,   HndlATrCPIN,    HndlATtCPIN  },
#if 0
        {"+CBC",    HndlATsCBC,    NULL,           HndlATtCBC   },
#endif
        {"+CSQ",    HndlATsCSQ,    NULL,           HndlATtCSQ   },
        {"+CMEC",   HndlATsCMEC,   HndlATrCMEC,    HndlATtCMEC  },
        {"+CKPD",   HndlATsCKPD,   NULL,           HndlATtCKPD  },
        {"+CDIS",   HndlATsCDIS,   HndlATrCDIS,    HndlATtCDIS  },
        {"+CIMI",   HndlATsCIMI,   NULL,     HndlATtCIMI  },
        {"+CIND",   HndlATsCIND,   HndlATrCIND,    HndlATtCIND  },
        {"+CMER",   HndlATsCMER,   HndlATrCMER,    HndlATtCMER  },
#ifdef EasyGPRS        
        {"+CPBS",   HndlATsCPBS,   HndlATrCPBS,    HndlATtCPBS  },
        {"+CPBR",   HndlATsCPBR,   NULL,           HndlATtCPBR  },
        {"+CPBF",   HndlATsCPBF,   NULL,           HndlATtCPBF  },
        {"+CPBW",   HndlATsCPBW,   NULL,           HndlATtCPBW  },
#endif // EasyGPRS        
        {"+CCLK",   HndlATsCCLK,   HndlATrCCLK,    HndlATtXXX   },
        {"+CALA",   HndlATsCALA,   HndlATrCALA,    HndlATtCALA  },
#ifdef SEC_AT
        {"+CLAC",   HndlATsCLAC,   NULL,           HndlATtCLAC  },     //  31Apr01  jkt
#endif        
        {"+CSIM",   HndlATsCSIM,   NULL,           HndlATtCSIM  },
        {"+CRSM",   HndlATsCRSM,   NULL,           HndlATtCRSM  },
        {"+CLVL",   HndlATsCLVL,   HndlATrCLVL,    HndlATtCLVL  },

⌨️ 快捷键说明

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