comparison gsm-fw/g23m-aci/aci/aci_cmd.h @ 775:eedbf248bac0

gsm-fw/g23m-aci subtree: initial import from LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 12 Oct 2014 01:45:14 +0000
parents
children
comparison
equal deleted inserted replaced
774:40a721fd9854 775:eedbf248bac0
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-F&D (8411)
4 | Modul : ACI
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Definitions for the AT Command Interpreter
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef ACI_CMD_H
22 #define ACI_CMD_H
23
24 #ifdef FF_ATI
25 #include "ati_cmd.h"
26 #endif /* FF_ATI */
27
28 #define KEY 15 /* Length of "+CBLA: " for instance */
29 #define LONG_LTH 10 /* Max length of a number of type long in a string */
30 #define SHORT_LTH 5
31 #define BYTE_LTH 3
32 #define HEX_LTH 8
33
34 typedef struct
35 {
36 char *name;
37 T_ACI_SMS_STOR stor;
38 } SMS_Memory;
39
40 typedef struct
41 {
42 char *name;
43 T_ACI_DBG_INFO stor;
44 } DBG_Memory;
45
46 #if (defined (ACI_CMD_C)) OR (defined (CMH_SIMF_C) AND !defined (FF_ATI))
47 GLOBAL const T_ACI_LAN_SUP lngs [] =
48 {
49 {"au", CLAN_LNG_AUT},
50 {"en", CLAN_LNG_ENG},
51 {"fr", CLAN_LNG_FRE},
52 {"de", CLAN_LNG_GER},
53 {"da", CLAN_LNG_DUT},
54 {"it", CLAN_LNG_ITA},
55 {"es", CLAN_LNG_SPA},
56 {"sv", CLAN_LNG_SWE},
57 {"pt", CLAN_LNG_POR},
58 {"fi", CLAN_LNG_FIN},
59 {"no", CLAN_LNG_NOR},
60 {"el", CLAN_LNG_GRE},
61 {"tr", CLAN_LNG_TUR},
62 {"hu", CLAN_LNG_HUN},
63 {"sl", CLAN_LNG_SLO},
64 {"pl", CLAN_LNG_POL},
65 {"ru", CLAN_LNG_RUS},
66 {"in", CLAN_LNG_IND},
67 {"cs", CLAN_LNG_CZE},
68 {"zh", CLAN_LNG_CHI},
69 {"ca", CLAN_LNG_CAN},
70 {"mn", CLAN_LNG_MAN},
71 {"tw", CLAN_LNG_TAI},
72 {"ar", CLAN_LNG_ARA},
73 {NULL, CLAN_LNG_ENG}
74 };
75 #else
76 EXTERN const T_ACI_LAN_SUP lngs [];
77 #endif
78
79
80
81 /*--- +CMEE -------------------------------------------------------*/
82
83 typedef enum
84 {
85 CMEE_MOD_NotPresent = -1,
86 CMEE_MOD_Disable,
87 CMEE_MOD_Numeric,
88 CMEE_MOD_Verbose
89 }
90 T_ACI_CMEE_MOD;
91
92 /*----------- +CSCS -----------------------------------------------*/
93
94 typedef enum
95 {
96 CSCS_CHSET_NotPresent = -1,
97 CSCS_CHSET_Ira = 0,
98 CSCS_CHSET_Pcdn = 1,
99 CSCS_CHSET_8859_1 = 2,
100 CSCS_CHSET_Pccp_437 = 3,
101 CSCS_CHSET_Gsm = 4,
102 CSCS_CHSET_Hex = 5,
103 CSCS_CHSET_Ucs2 = 6,
104 CSCS_CHSET_Tables = 5
105 }
106 T_ACI_CSCS_CHSET;
107
108 /*----------- alphabets -------------------------------------------*/
109
110 typedef enum /* see DCS in Rec. GSM 03.38 */
111 {
112 CSCS_ALPHA_7_Bit = 0,
113 CSCS_ALPHA_8_Bit = 1,
114 CSCS_ALPHA_16_Bit = 2,
115 CSCS_ALPHA_Reserved = 3
116 }
117 T_ACI_CSCS_ALPHA;
118
119 typedef enum
120 {
121 CSCS_DIR_GsmToIra = 0,
122 CSCS_DIR_IraToGsm = 1
123 }
124 T_ACI_CSCS_DIR;
125
126 typedef enum
127 {
128 GSM_ALPHA_Def,
129 GSM_ALPHA_Int
130 }
131 T_ACI_GSM_ALPHA;
132
133 /*----------- +CNMI -----------------------------------------------*/
134
135 typedef enum
136 {
137 CNMI_MOD_NotPresent = -1,
138 CNMI_MOD_Buffer,
139 CNMI_MOD_DiscardOrForward,
140 CNMI_MOD_BufferAndFlush
141 }
142 T_ACI_CNMI_MOD;
143
144 typedef enum
145 {
146 CNMI_BFR_NotPresent = -1,
147 CNMI_BFR_Flush,
148 CNMI_BFR_Clear
149 }
150 T_ACI_CNMI_BFR;
151
152 /*----------- other -----------------------------------------------*/
153
154 typedef enum
155 {
156 atOk = 0,
157 atConnect,
158 atRing,
159 atNoCarrier,
160 atError,
161 atNoDialtone,
162 atBusy,
163 atNoAnswer,
164 atConnect1
165 } AtErrCode;
166
167 typedef enum
168 {
169 copsUnknown = 0,
170 copsAvail = 1,
171 copsCurrent = 2,
172 copsForbidden = 3
173 } CopsState;
174
175 typedef enum
176 {
177 ppSimVerify = 1
178 } PinPending;
179
180 typedef struct
181 {
182 struct
183 {
184 UBYTE atV;
185 UBYTE atL;
186 UBYTE atM;
187 }s1415;
188 struct /* presentation flags */
189 {
190 UBYTE COLP_stat;
191 UBYTE CCWA_stat;
192 UBYTE CCBS_stat;
193 }flags;
194 UBYTE S[10+1]; /* Caution: for S[0..n] we need S[n+1] to be declared here!!! */
195
196 /* the following registers above 10 are not index based and only defined if needed */
197 UBYTE S30;
198 #ifdef GPRS
199 UBYTE S99; /* Rings until Automatic Context Rejection */
200 #endif /* GPRS */
201
202 UBYTE CNMI_mode;
203 UBYTE CNMI_bfr;
204 struct /* ringing parameters */
205 {
206 UBYTE srcID_S0;
207 #ifdef GPRS
208 char srcID_CGAUTO;
209 #endif
210 UBYTE rngCnt;
211 UBYTE isRng;
212 T_ACI_CRING_MOD mode;
213 T_ACI_CRING_SERV_TYP type1;
214 T_ACI_CRING_SERV_TYP type2;
215 } rngPrms;
216 struct /* CLIP parameters */
217 {
218 T_ACI_CLIP_STAT stat;
219 CHAR number[MAXIMUM(MNCC_MAX_CC_CALLING_NUMBER, MNCC_MAX_CC_REDIR_NUMBER)+1];
220 T_ACI_TOA type;
221 U8 validity;
222 CHAR subaddr[MNCC_SUB_LENGTH+1];
223 T_ACI_TOS satype;
224 #ifdef NO_ASCIIZ
225 T_ACI_PB_TEXT alpha;
226 #else
227 CHAR alpha[MAX_PHB_NUM_LEN+1];
228 #endif
229 }clipPrms;
230 } AciCmdVars;
231
232
233 /* sub structure concerning AT+CREG command in ATI */
234 typedef enum
235 {
236 CREG_MOD_NotPresent = -1,
237 CREG_MOD_OFF = 0, /* disable network registration unsolicited result code */
238 CREG_MOD_ON = 1, /* enable network registration unsolicited result code */
239 CREG_MOD_LOC_INF_ON = 2, /* enable network registration and location information unsolicited result code */
240 CREG_MOD_LOC_INF_ON_CTXACT = 3 /* enable network registration and location information unsolicited result code
241 and information about activated/deactivated PDP context(s) */
242 }
243 T_ATI_CREG_MOD /* for +CREG / +CGREG / %CGREG */;
244
245 typedef struct
246 {
247 T_ATI_CREG_MOD pres_mode;
248 USHORT last_presented_lac;
249 USHORT last_presented_cid;
250 } T_ATI_REG_MOD_LAC_CID;
251
252 typedef struct
253 {
254 T_ATI_REG_MOD_LAC_CID mod_lac_cid;
255 T_ACI_CREG_STAT last_presented_state;
256 } T_ATI_CREG;
257
258 #define LOC_INFO_STRLTH (15)
259 /* ACI-SPR-17218: enable the indication of GPRS info */
260 #define GPRS_INFO_STRLTH (5)
261 #define COVERAGE_INFO_STRLTH (5)
262
263 typedef enum
264 {
265 CMD_NotPresent = -1,
266 CREG_CMD,
267 PercentCREG_CMD
268 #ifdef GPRS
269 ,
270 PlusCGREG_CMD,
271 PercentCGREG_CMD
272 #endif /* GPRS */
273 } T_ACI_CREG_CMD;
274
275 typedef enum
276 {
277 CNAP_DISABLED = 0,
278 CNAP_ENABLED = 1
279 } T_ATI_CNAP_MODE;
280
281 typedef struct
282 {
283 UBYTE atE;
284 UBYTE atQ;
285 UBYTE atX;
286
287 UBYTE CR_stat;
288 UBYTE CRC_stat;
289 UBYTE CLIP_stat;
290 UBYTE CDIP_stat;
291
292 UBYTE DR_stat;
293 UBYTE ILRR_stat;
294 UBYTE CSDH_stat;
295 UBYTE CSSI_stat;
296 BYTE CSSU_stat;
297 UBYTE CUSD_stat;
298 UBYTE CPI_stat;
299 UBYTE CCWE_stat;
300 UBYTE CAOC_stat;
301 UBYTE CMEE_stat;
302 UBYTE CTTY_stat;
303 UBYTE CSTAT_stat;
304 UBYTE SIMIND_stat;
305 T_ACI_CSCS_CHSET cscsChset;
306 #ifdef GPRS
307 UBYTE Percent_CGEREP_stat;
308 UBYTE CGEREP_mode;
309 UBYTE CGEREP_bfr;
310 #endif
311
312 T_ACI_CCWV_CHRG CCWV_charging;
313
314 T_ATI_CREG creg;
315 T_ATI_CREG percent_creg;
316 T_ATI_CNAP_MODE cnap_mode;
317 UBYTE CPRI_stat; /* Holds the status of %CPRI */
318 #ifdef FF_CPHS_REL4
319 UBYTE MWI_stat; /* Holds the status of %MWI */
320 #endif /* FF_CPHS_REL4 */
321
322 }
323 T_ATI_USER_OUTPUT_CFG;
324
325 /* ACI-SPR-17218: Extended by gprs_ind paramter */
326 EXTERN void r_plus_percent_CREG ( UBYTE srcId,
327 int status,
328 USHORT lac,
329 USHORT cid,
330 T_ACI_CREG_CMD cmd,
331 T_ACI_P_CREG_GPRS_IND gprs_ind,
332 U8 rt,
333 BOOL bActiveContext );
334
335 #define CPIN_MAX_LTH (12)
336 /* all following lengths definitions include the null termination */
337 #define MAX_PWD_LENGTH (32) /* max length for passwords */
338 #define MAX_PPU_LENGTH (20) /* max length for ppu */
339 #define MAX_CM_LENGTH (7) /* max length for call meter values */
340
341 /* To allow for: 'yyyy/MM/dd,hh:mm:ss+zz' or 'yyyy/MM/dd,hh:mm:ss-zz' date time format */
342 /* To allow for: 'yy/MM/dd,hh:mm:ss+zz' or ' yy/MM/dd,hh:mm:ss-zz' date time format */
343 #define DATE_TIME_LENGTH (22)
344 #ifdef FF_ATI
345 EXTERN UBYTE aci_init (T_ATI_SRC_TYPE src_type);
346 #endif /* FF_ATI */
347
348 EXTERN void aci_finit (UBYTE src_id);
349
350 EXTERN void ati_cmd_init();
351 EXTERN void ati_creg_init( BYTE srcId, T_ACI_CREG_CMD cmd );
352
353 BOOL aciCmdInit (AciCmdVars *v);
354
355 #ifdef FF_ATI
356 int cmdCommand (T_ATI_SRC_PARAMS *src_params);
357 #endif /* FF_ATI */
358
359 EXTERN void utl_chsetToGsm ( UBYTE* in,
360 USHORT inLen,
361 UBYTE* out,
362 USHORT* outLen,
363 #ifdef REL99
364 USHORT outBufLen,
365 #endif /* REL99 */
366 T_ACI_GSM_ALPHA gsm );
367 EXTERN void utl_chsetToSim ( UBYTE* in,
368 USHORT inLen,
369 UBYTE* out,
370 USHORT* outLen,
371 T_ACI_GSM_ALPHA gsm );
372 EXTERN void utl_ucs2ToSim ( UBYTE* in,
373 USHORT inLen,
374 UBYTE* out,
375 USHORT* outLen,
376 T_ACI_GSM_ALPHA gsm,
377 T_ACI_CSCS_ALPHA alphabet );
378 EXTERN void utl_ConvUcs2ToGSM ( UBYTE* in,
379 USHORT inLen,
380 UBYTE* out,
381 USHORT* outLen,
382 T_ACI_GSM_ALPHA gsm,
383 T_ACI_CSCS_ALPHA alphabet );
384 EXTERN void utl_Ucs2InFormat1 ( UBYTE* in,
385 USHORT inLen,
386 UBYTE* out,
387 USHORT* outLen );
388 EXTERN void utl_Ucs2InFormat2 ( UBYTE* in,
389 USHORT inLen,
390 UBYTE* out,
391 USHORT* outLen );
392 EXTERN void utl_hexFromUCS2 ( UBYTE *in,
393 UBYTE *out,
394 USHORT maxOutlen,
395 USHORT *outlen,
396 T_ACI_GSM_ALPHA gsm );
397 EXTERN USHORT utl_chsetFromGsm ( UBYTE* in,
398 USHORT inLen,
399 UBYTE* out,
400 USHORT maxOutLen,
401 USHORT* outLen,
402 T_ACI_GSM_ALPHA gsm );
403 EXTERN USHORT utl_ucs2FromGsm_ussd ( UBYTE* in,
404 USHORT inLen,
405 UBYTE* out,
406 USHORT maxOutLen,
407 USHORT* outLen,
408 T_ACI_GSM_ALPHA gsm,
409 T_ACI_CSCS_ALPHA alphabet );
410 EXTERN void utl_chsetFromSim ( UBYTE* in,
411 USHORT inLen,
412 UBYTE* out,
413 USHORT maxOutLen,
414 USHORT* outLen,
415 T_ACI_GSM_ALPHA gsm );
416 EXTERN void utl_hexToGsm ( UBYTE* in,
417 USHORT inLen,
418 UBYTE* out,
419 USHORT* outLen,
420 T_ACI_GSM_ALPHA gsm,
421 T_ACI_CSCS_ALPHA alphabet );
422 EXTERN void utl_ucs2ToGsm ( UBYTE* in,
423 USHORT inLen,
424 UBYTE* out,
425 USHORT* outLen,
426 T_ACI_GSM_ALPHA gsm,
427 T_ACI_CSCS_ALPHA alphabet );
428 EXTERN USHORT utl_hexFromGsm ( UBYTE* in,
429 USHORT inLen,
430 UBYTE* out,
431 USHORT maxOutLen,
432 USHORT* outLen,
433 T_ACI_GSM_ALPHA gsm,
434 T_ACI_CSCS_ALPHA alphabet );
435 EXTERN BOOL utl_cvtGsmIra ( UBYTE* in,
436 USHORT inLen,
437 UBYTE* out,
438 USHORT outLen,
439 T_ACI_CSCS_DIR dir );
440 EXTERN USHORT sprints ( CHAR* buf,
441 CHAR* arg,
442 USHORT len );
443 EXTERN USHORT sprintq ( CHAR* buf,
444 CHAR* arg,
445 USHORT len );
446 EXTERN void utl_smDtaFromTe ( UBYTE* in,
447 USHORT inLen,
448 UBYTE* out,
449 USHORT* outLen,
450 #ifdef REL99
451 USHORT outBufLen,
452 #endif /* REL99 */
453 UBYTE fo,
454 UBYTE dcs );
455 EXTERN void utl_smDtaToTe ( UBYTE* in,
456 USHORT inLen,
457 UBYTE* out,
458 USHORT maxOutLen,
459 USHORT* outLen,
460 UBYTE fo,
461 UBYTE dcs );
462 EXTERN void utl_cbmDtaToTe ( UBYTE* in,
463 USHORT inLen,
464 UBYTE* out,
465 USHORT maxOutLen,
466 USHORT* outLen,
467 UBYTE fo,
468 UBYTE dcs );
469 EXTERN void utl_ussdDtaFromTe ( UBYTE* in,
470 USHORT inLen,
471 UBYTE* out,
472 USHORT* outLen,
473 #ifdef REL99
474 USHORT outBufLen,
475 #endif /* REL99 */
476 UBYTE dcs );
477 EXTERN USHORT utl_ussdDtaToTe ( UBYTE* in,
478 USHORT inLen,
479 UBYTE* out,
480 USHORT maxOutLen,
481 USHORT* outLen,
482 UBYTE dcs );
483 EXTERN void utl_binToHex ( UBYTE* in,
484 SHORT inLen,
485 CHAR* out );
486 EXTERN USHORT utl_HexStrToBin (UBYTE* in,
487 USHORT inLen,
488 UBYTE* out,
489 USHORT outLen);
490 EXTERN void RetrieveLeftCmd ( void );
491
492 EXTERN void trace_cmd_line ( char *prefix,
493 char *output,
494 UBYTE srcId,
495 USHORT output_len );
496
497 #ifdef FF_ATI
498 EXTERN void trace_cmd_state ( UBYTE srcId,
499 T_ATI_CMD_STATE old_state,
500 T_ATI_CMD_STATE new_state);
501 #endif /* FF_ATI */
502
503 EXTERN int utl_create_pco (UBYTE* buffer,
504 USHORT* length,
505 ULONG content,
506 UBYTE config_prot,
507 USHORT auth_prot,
508 UBYTE* user_name,
509 UBYTE* password,
510 ULONG dns1,
511 ULONG dns2);
512 EXTERN int utl_analyze_pco (UBYTE* buffer,
513 USHORT length,
514 ULONG* dns1,
515 ULONG* dns2,
516 ULONG* gateway);
517 GLOBAL int utl_strcasecmp (const char *s1,
518 const char *s2);
519
520 #if defined (FF_ATI) || defined (FF_BAT)
521 #define CONVERT_STRING TRUE
522 GLOBAL void rci_display_USSD (UBYTE srcId,
523 T_ACI_CUSD_MOD mode,
524 UBYTE *ussd_str,
525 UBYTE ussd_len,
526 BOOL cvtStr,
527 SHORT dcs );
528
529 GLOBAL void utl_cb_percentKSIR (U8 srcId, T_ACI_KSIR *ksStat);
530 #endif /* defined (FF_ATI) || defined (FF_BAT) */
531
532 /*
533 *-------------------------------------------------------------------
534 * The following types, definitions and variables are needed for
535 * storing of new message indications while the serial interface is
536 * reserved for data transmission.
537 *-------------------------------------------------------------------
538 * START
539 *-------------------------------------------------------------------
540 */
541 #define NONE_CALL 0
542 #define SAT_CALL 1
543 #define QAT_CALL 2
544 #define TAT_CALL 3
545
546 #define CNMI_NONE 0
547 #define CNMI_CMT 1
548 #define CNMI_CMTI 2
549 #define CNMI_CBM 3
550 #define CNMI_CDS 4
551
552 #define CNMI_BUF_SIZE 4
553 #define CIEV_BUF_SIZE 2
554
555 #define T_CMT T_MNSMS_MESSAGE_IND
556 typedef struct /* new message indication AT+CMTI: */
557 {
558 T_ACI_SMS_STOR mem;
559 UBYTE index;
560 }
561 T_CMTI;
562 #define T_CBM T_MMI_CBCH_IND
563 #define T_CDS T_MNSMS_STATUS_IND
564
565 typedef union /* used for the different messages indications */
566 {
567 T_CMT cmt;
568 T_CMTI cmti;
569 T_CBM cbm;
570 T_CDS cds;
571 }
572 T_CNMI_IND;
573
574 /* Removed source ID from this structure to make
575 the bufferinf source independent */ /* Issue 25033 */
576 typedef struct
577 {
578 UBYTE type;
579 T_CNMI_IND indct;
580 }
581 T_CNMI_BUFFER_ELEMENT;
582
583 typedef struct
584 {
585 UBYTE next;
586 T_CNMI_BUFFER_ELEMENT sCnmiElement[CNMI_BUF_SIZE];
587 }
588 T_CNMI_BUFFER;
589
590 typedef struct
591 {
592 char* name;
593 T_ACI_SMS_STAT stat;
594 } SMS_Stat;
595
596 #ifdef ACI_CMD_C
597 GLOBAL const SMS_Stat sms_stat [] =
598 {
599 {"REC UNREAD", SMS_STAT_RecUnread },
600 {"REC READ", SMS_STAT_RecRead },
601 {"STO UNSENT", SMS_STAT_StoUnsent },
602 {"STO SENT", SMS_STAT_StoSent },
603 {"ALL", SMS_STAT_All },
604 {NULL, SMS_STAT_NotPresent}
605 };
606 #else
607 EXTERN const SMS_Stat sms_stat [];
608 #endif
609
610 #ifdef DTI
611 EXTERN void cmd_addCnmiNtry ( UBYTE type, T_CNMI_IND* newInd );
612 #endif
613 EXTERN void aci_encodeVpenh ( CHAR* vpenh_str, T_ACI_VP_ENH* vpenh );
614 EXTERN void rCI_IoMode ( void );
615
616 #ifdef FF_ATI
617 EXTERN UBYTE cpmsCallType;
618 #endif /* FF_ATI */
619 EXTERN BOOL cnmiFlushInProgress;
620
621 EXTERN T_ACI_SMS_STAT cmglStat;
622
623 typedef struct
624 {
625 UBYTE uiLastIndex;
626 T_ACI_CIND_SIGNAL_TYPE asBufferValues[CIEV_BUF_SIZE];
627 } T_CIEV_SIGNAL_BUFFER;
628
629 typedef struct
630 {
631 UBYTE uiLastIndex;
632 T_ACI_CIND_SMSFULL_TYPE asBufferValues[CIEV_BUF_SIZE];
633 } T_CIEV_SMSFULL_BUFFER;
634
635 typedef struct
636 {
637 char* name;
638 T_ACI_SMS_READ rdmode;
639 } SMS_RdMode;
640
641 #ifdef ACI_CMD_C
642 GLOBAL const SMS_RdMode sms_rdmode [] =
643 {
644 {"READ NORMAL", SMS_READ_Normal },
645 {"READ PREVIEW", SMS_READ_Preview },
646 {"STATUS CHANGE", SMS_READ_StatusChange },
647 {NULL, SMS_READ_NotPresent}
648 };
649 #else
650 EXTERN const SMS_RdMode sms_rdmode [];
651 #endif
652
653 /*
654 *-------------------------------------------------------------------
655 * END
656 *-------------------------------------------------------------------
657 */
658 EXTERN void aci_sendPString (UBYTE srcId, CHAR* buffer);
659 EXTERN void cmd_flushCnmiBuf(void);
660 EXTERN void cmd_flushCnmiBufOneByOne(void);
661 EXTERN UINT16 cmd_getNumberOfCnmiEntrys(void);
662 EXTERN T_CNMI_BUFFER_ELEMENT* cmd_getFirstCnmiMessage(void);
663 EXTERN T_CNMI_BUFFER_ELEMENT* cmd_getCnmiMessage(UINT16 uiIndex);
664 EXTERN BOOL cmd_clearCnmiMessage(UINT16 uiIndex);
665 EXTERN BOOL cmd_clearFirstCnmiMessage(void);
666 EXTERN BOOL cmd_clearFirstMsgWithSrcIdInCnmiBuf(T_ACI_CMD_SRC srcId);
667 EXTERN void cmd_flushCievBuf(UBYTE srcId);
668 EXTERN void cmd_clearCievBuf(UBYTE srcId);
669 EXTERN BOOL cmd_storeNextCnmiBufMsgToSim();
670 EXTERN void cmd_clearCnmiBuf (void);
671 EXTERN UBYTE aci_timeout (USHORT handle);
672 EXTERN void aciRingTimeout (void);
673 EXTERN void aciCnmaTimeout (void);
674 EXTERN void cmd_handleCnmaTimeout (void);
675 EXTERN void ci_remTrailCom (CHAR* outLine, USHORT len);
676 EXTERN UBYTE toa_merge (T_ACI_TOA type);
677 EXTERN T_ACI_TOA toa_demerge (SHORT type);
678 EXTERN T_ACI_TOA toa_sms_demerge (SHORT type);
679 EXTERN SHORT tos_merge (T_ACI_TOS type);
680 EXTERN T_ACI_TOS tos_demerge (SHORT type);
681 EXTERN CHAR * sms_status (T_ACI_SMS_STAT stat);
682 EXTERN void cmd_PlusCOPN_CB ( UBYTE src_id );
683 EXTERN BOOL cmd_readCOPNBlock ( SHORT startIdx, UBYTE src_id);
684 EXTERN T_ACI_RETURN cmd_readCPBRBlock (UBYTE srcId);
685 EXTERN void cmd_PlusCPBR_CB(UBYTE srcId);
686
687 #define SMS_TEXT_MODE_NONE 0
688 #define SMS_TEXT_MODE_CMGS 1
689 #define SMS_TEXT_MODE_CMGW 2
690 #define SMS_TEXT_MODE_CMGC 3
691 #define SMS_PDU_MODE_CMGS 4
692 #define SMS_PDU_MODE_CMGC 5
693 #define SMS_PDU_MODE_CMGW 6
694 #define SMS_PDU_MODE_CNMA 7
695 #define SMS_TEXT_MODE_READ 8
696
697 #ifdef ACI_CMD_C
698 GLOBAL AciCmdVars at;
699 /* next variable is aimed at containing the user defined configuration
700 for the output format through AT interpreter
701 (it will eventually replace "GLOBAL AciCmdVars at;")*/
702 #ifdef FF_ATI
703 GLOBAL T_ATI_USER_OUTPUT_CFG ati_user_output_cfg[CMD_SRC_MAX];
704 #endif
705
706 GLOBAL UBYTE SMS_TEXT_MODE; /* +CMGS sets 1 - +CMGW sets 2 in PDU mode 4,5 or 6*/
707
708 GLOBAL T_ACI_SMS_READ smsReadMode = SMS_READ_Normal;
709 #ifdef WIN32
710 GLOBAL T_ACI_CPOL_MOD cpolMode = CPOL_MOD_NotPresent;
711 GLOBAL SHORT cpolIdx2 = ACI_NumParmNotPresent;
712 #endif /* WIN32 */
713
714 #else /* ACI_CMD_C */
715 EXTERN AciCmdVars at;
716 /* next variable is aimed at containing the user defined configuration
717 for the output format through AT interpreter
718 (it will eventually replace "GLOBAL AciCmdVars at;")*/
719
720 #ifdef FF_ATI
721 EXTERN T_ATI_USER_OUTPUT_CFG ati_user_output_cfg[CMD_SRC_MAX];
722 #endif /* FF_ATI */
723
724 EXTERN UBYTE SMS_TEXT_MODE;
725
726
727 EXTERN T_ACI_SMS_READ smsReadMode;
728 #ifdef WIN32
729 EXTERN T_ACI_CPOL_MOD cpolMode;
730 EXTERN SHORT cpolIdx2;
731 #endif /* WIN32 */
732 #endif /* ACI_CMD_C */
733
734 #endif
735
736