cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp
changeset 47 9e2a905b887f
parent 45 b0aebde9b1fb
child 51 625f43ae9362
equal deleted inserted replaced
45:b0aebde9b1fb 47:9e2a905b887f
    65     _LIT8(KAtCgmr, "AT+CGMR");
    65     _LIT8(KAtCgmr, "AT+CGMR");
    66     _LIT8(KAtCgmi, "AT+CGMI");
    66     _LIT8(KAtCgmi, "AT+CGMI");
    67     _LIT8(KAtCmgw, "AT+CMGW");
    67     _LIT8(KAtCmgw, "AT+CMGW");
    68 	_LIT8(KAtCmgd, "AT+CMGD");
    68 	_LIT8(KAtCmgd, "AT+CMGD");
    69 	_LIT8(KAtCmgf, "AT+CMGF");
    69 	_LIT8(KAtCmgf, "AT+CMGF");
       
    70 	_LIT8(KAtiBase, "ATI");
       
    71 	_LIT8(KAti0, "ATI0");
       
    72 	_LIT8(KAti1, "ATI1");
       
    73 	_LIT8(KAti2, "ATI2");
       
    74 	_LIT8(KAti3, "ATI3");
       
    75 	_LIT8(KAti4, "ATI4");
       
    76 	_LIT8(KAtGmr, "AT+GMR");
       
    77 	_LIT8(KAtGmi, "AT+GMI");
       
    78 	_LIT8(KAtGsn, "AT+GSN");
       
    79 	_LIT8(KAtCgmm, "AT+CGMM");
       
    80 	_LIT8(KAtGmm, "AT+GMM");
       
    81 	_LIT8(KAtScpbr, "AT^SCPBR");
       
    82 	_LIT8(KAtScpbw, "AT^SCPBW");
    70 #endif
    83 #endif
    71     
    84     
    72     Trace(KDebugPrintS, "token: ", &token);
    85     Trace(KDebugPrintS, "token: ", &token);
    73     // Determine the AT command type
    86     // Determine the AT command type
    74     if(!token.CompareF(KAtCfun))
    87     if(!token.CompareF(KAtCfun))
    97         }
   110         }
    98     else if(!token.CompareF(KAtCnum))
   111     else if(!token.CompareF(KAtCnum))
    99         {
   112         {
   100         iCmdType = ECmdAtCnum;
   113         iCmdType = ECmdAtCnum;
   101         }
   114         }
   102     else if(!token.Compare(KAtCmee))
   115     else if(!token.CompareF(KAtCmee))
   103         {
   116         {
   104         iCmdType = ECmdAtCmee;
   117         iCmdType = ECmdAtCmee;
   105 		}
   118 		}
   106 #ifdef PROTOCOL_TDSCDMA
   119 #ifdef PROTOCOL_TDSCDMA
   107     else if(!token.CompareF(KAtHver))
   120     else if(!token.CompareF(KAtHver))
   110         }
   123         }
   111     else if(!token.CompareF(KAtCgsn))
   124     else if(!token.CompareF(KAtCgsn))
   112         {
   125         {
   113         iCmdType = ECmdAtCgsn;
   126         iCmdType = ECmdAtCgsn;
   114         }
   127         }
       
   128     else if(!token.CompareF(KAtGsn))
       
   129         {
       
   130         iCmdType = ECmdAtGsn;
       
   131         }
   115     else if(!token.CompareF(KAtCgmr))
   132     else if(!token.CompareF(KAtCgmr))
   116         {
   133         {
   117         iCmdType = ECmdAtCgmr;
   134         iCmdType = ECmdAtCgmr;
   118         }
   135         }
       
   136     else if(!token.CompareF(KAtGmr))
       
   137         {
       
   138         iCmdType = ECmdAtGmr;
       
   139         }
   119     else if(!token.CompareF(KAtCgmi))
   140     else if(!token.CompareF(KAtCgmi))
   120         {
   141         {
   121         iCmdType = ECmdAtCgmi;
   142         iCmdType = ECmdAtCgmi;
   122         }       
   143         }    
       
   144     else if(!token.CompareF(KAtGmi))
       
   145         {
       
   146         iCmdType = ECmdAtGmi;
       
   147         } 
   123     else if(!token.CompareF(KAtCmgw))
   148     else if(!token.CompareF(KAtCmgw))
   124         {
   149         {
   125         iCmdType = ECmdAtCmgw;
   150         iCmdType = ECmdAtCmgw;
   126         }
   151         }
   127     else if(!token.CompareF(KAtCmgd))
   152     else if(!token.CompareF(KAtCmgd))
   129         iCmdType = ECmdAtCmgd;
   154         iCmdType = ECmdAtCmgd;
   130         }
   155         }
   131     else if(!token.CompareF(KAtCmgf))
   156     else if(!token.CompareF(KAtCmgf))
   132         {
   157         {
   133         iCmdType = ECmdAtCmgf;
   158         iCmdType = ECmdAtCmgf;
       
   159         }
       
   160     else if(!token.CompareF(KAtCgmm))
       
   161         {
       
   162         iCmdType = ECmdAtCgmm;
       
   163         }
       
   164     else if(!token.CompareF(KAtGmm))
       
   165         {
       
   166         iCmdType = ECmdAtGmm;
       
   167         }
       
   168     else if(!token.CompareF(KAtiBase))
       
   169         {
       
   170         iCmdType = ECmdAtI;
       
   171         }
       
   172     else if(!token.CompareF(KAti0))
       
   173         {
       
   174         iCmdType = ECmdAtI0;
       
   175         }
       
   176     else if(!token.CompareF(KAti1))
       
   177         {
       
   178         iCmdType = ECmdAtI1;
       
   179         }
       
   180     else if(!token.CompareF(KAti2))
       
   181         {
       
   182         iCmdType = ECmdAtI2;
       
   183         }
       
   184     else if(!token.CompareF(KAti3))
       
   185         {
       
   186         iCmdType = ECmdAtI3;
       
   187         }
       
   188     else if(!token.CompareF(KAti4))
       
   189         {
       
   190         iCmdType = ECmdAtI4;
       
   191         }
       
   192 	else if(!token.CompareF(KAtScpbr))
       
   193         {
       
   194         iCmdType = ECmdAtScpbr;
       
   195         } 
       
   196     else if(!token.CompareF(KAtScpbw))
       
   197         {
       
   198         iCmdType = ECmdAtScpbw;
   134         }
   199         }
   135 #endif    
   200 #endif    
   136     else
   201     else
   137         {
   202         {
   138         iCmdType = EUnknown;
   203         iCmdType = EUnknown;