FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/aci/cmh_smsq.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : CMH_SMSQ | |
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 : This module provides the query functions related to the | |
18 | protocol stack adapter for short message service. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef CMH_SMSQ_C | |
23 #define CMH_SMSQ_C | |
24 #endif | |
25 | |
26 #include "config.h" | |
27 #include "fixedconf.h" | |
28 #include "condat-features.h" | |
29 #include "aci_conf.h" | |
30 | |
31 #include "aci_all.h" | |
32 /*==== INCLUDES ===================================================*/ | |
33 #include "aci_cmh.h" | |
34 #include "ati_cmd.h" | |
35 #include "aci_cmd.h" | |
36 | |
37 #ifdef FAX_AND_DATA | |
38 #include "aci_fd.h" | |
39 #endif /* of #ifdef FAX_AND_DATA */ | |
40 | |
41 | |
42 #include "aci.h" | |
43 #include "psa.h" | |
44 #include "psa_sms.h" | |
45 #include "cmh.h" | |
46 #include "cmh_sms.h" | |
47 | |
48 /*==== CONSTANTS ==================================================*/ | |
49 | |
50 /*==== EXPORT =====================================================*/ | |
51 | |
52 /*==== VARIABLES ==================================================*/ | |
53 | |
54 /* parameter block for delayed rAT_PlusCPMS call */ | |
55 LOCAL struct qAT_PlusCPMS_buffer { | |
56 T_ACI_CMD_SRC srcId; | |
57 T_ACI_SMS_STOR_OCC m1; | |
58 T_ACI_SMS_STOR_OCC m2; | |
59 T_ACI_SMS_STOR_OCC m3; | |
60 } qAT_PlusCPMS_buffer; | |
61 | |
62 | |
63 /*==== PROTOTYPES =================================================*/ | |
64 LOCAL UCHAR qAT_PlusCPMS_delayed (void* arg); | |
65 | |
66 /*==== FUNCTIONS ==================================================*/ | |
67 /* | |
68 +--------------------------------------------------------------------+ | |
69 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
70 | STATE : code ROUTINE : qAT_PlusCSMP | | |
71 +--------------------------------------------------------------------+ | |
72 | |
73 PURPOSE : This is the functional counterpart to the +CSMP? | |
74 AT command which returns the current settings of the | |
75 text mode parameter. | |
76 | |
77 <fo>: first octet of SMS-SUBMIT | |
78 <vprel>: relative validity period | |
79 <vpabs>: absolute validity period | |
80 <vpenh>: enhanced validity period | |
81 <pid>: TP-Protocol-Identifier | |
82 <dcs>: SMS data coding scheme | |
83 */ | |
84 GLOBAL T_ACI_RETURN qAT_PlusCSMP ( T_ACI_CMD_SRC srcId, | |
85 SHORT* fo, | |
86 SHORT* vprel, | |
87 T_ACI_VP_ABS* vpabs, | |
88 T_ACI_VP_ENH* vpenh, | |
89 SHORT* pid, | |
90 SHORT* dcs ) | |
91 { | |
92 T_SMS_SET_PRM * pSMSSetPrm; /* points to SMS parameter set */ | |
93 | |
94 TRACE_FUNCTION ("qAT_PlusCSMP ()"); | |
95 | |
96 /* | |
97 *----------------------------------------------------------------- | |
98 * check command source | |
99 *----------------------------------------------------------------- | |
100 */ | |
101 if(!cmh_IsVldCmdSrc (srcId)) | |
102 { | |
103 return( AT_FAIL ); | |
104 } | |
105 | |
106 /* | |
107 *----------------------------------------------------------------- | |
108 * check if command executable | |
109 *----------------------------------------------------------------- | |
110 */ | |
111 if(!cmhSMS_checkSIM ()) | |
112 return AT_FAIL; | |
113 | |
114 pSMSSetPrm = smsShrdPrm.pSetPrm[srcId]; | |
115 | |
116 /* | |
117 *----------------------------------------------------------------- | |
118 * fill in parameters | |
119 *----------------------------------------------------------------- | |
120 */ | |
121 *fo = pSMSSetPrm -> msgType; | |
122 | |
123 *vprel = pSMSSetPrm -> vpRel; | |
124 | |
125 if (vpabs) | |
126 cmhSMS_setVpabsCmh ( vpabs, &pSMSSetPrm -> vpAbs ); | |
127 | |
128 if (vpenh) | |
129 cmhSMS_setVpenhCmh ( vpenh, &pSMSSetPrm -> vpEnh ); | |
130 | |
131 *pid = pSMSSetPrm -> pid; | |
132 *dcs = pSMSSetPrm -> dcs; | |
133 | |
134 return ( AT_CMPL ); | |
135 } | |
136 | |
137 /* | |
138 +--------------------------------------------------------------------+ | |
139 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
140 | STATE : code ROUTINE : qAT_PlusCPMS | | |
141 +--------------------------------------------------------------------+ | |
142 | |
143 PURPOSE : This is the functional counterpart to the +CPMS? | |
144 AT command which returns the current settings and usage | |
145 of the memory for writing, reading, ... of SMS. | |
146 | |
147 <mem1>: memory information, reading, deleting | |
148 <mem2>: memory information, writing, sending | |
149 <mem3>: memory information, storing | |
150 */ | |
151 GLOBAL T_ACI_RETURN qAT_PlusCPMS ( T_ACI_CMD_SRC srcId ) | |
152 { | |
153 T_ACI_RETURN ret; /* AT response code */ | |
154 | |
155 | |
156 TRACE_FUNCTION ("qAT_PlusCPMS ()"); | |
157 | |
158 /* | |
159 *----------------------------------------------------------------- | |
160 * check if command executable | |
161 *----------------------------------------------------------------- | |
162 */ | |
163 if(!cmhSMS_checkAccess (srcId, &ret)) | |
164 return ret; | |
165 | |
166 if (!cmh_set_delayed_call (qAT_PlusCPMS_delayed, &qAT_PlusCPMS_buffer)) | |
167 return AT_BUSY; | |
168 | |
169 /* | |
170 *----------------------------------------------------------------- | |
171 * Fills the T_ACI_SMS_STOR_OCC structure with data from the | |
172 * shared parameter buffer (used mem, total mem). | |
173 *----------------------------------------------------------------- | |
174 */ | |
175 qAT_PlusCPMS_buffer.srcId = srcId; | |
176 cmhSMS_setStorOcc ( &qAT_PlusCPMS_buffer.m1, smsShrdPrm.mem1 ); | |
177 cmhSMS_setStorOcc ( &qAT_PlusCPMS_buffer.m2, smsShrdPrm.mem2 ); | |
178 cmhSMS_setStorOcc ( &qAT_PlusCPMS_buffer.m3, smsShrdPrm.mem3 ); | |
179 | |
180 #ifdef FF_ATI | |
181 cpmsCallType = QAT_CALL; | |
182 #endif /* FF_ATI */ | |
183 TRACE_EVENT("delayed return requested: 100 ms"); | |
184 cmh_start_delayed_call (100); | |
185 | |
186 return( AT_EXCT ); | |
187 } | |
188 | |
189 /* | |
190 +--------------------------------------------------------------------+ | |
191 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
192 | STATE : code ROUTINE : qAT_PlusCPMS | | |
193 +--------------------------------------------------------------------+ | |
194 | |
195 PURPOSE : This is the functional counterpart to the +CPMS? | |
196 AT command which returns the current settings and usage | |
197 of the memory for writing, reading, ... of SMS. | |
198 | |
199 <sim_total>: memory information, total available in SIM | |
200 <sim_used>: memory information, Used in SIM | |
201 <me_total>: memory information, total available in ME | |
202 <me_used> memory information, Used in ME | |
203 */ | |
204 /* provide immediate return in case of reading */ | |
205 GLOBAL T_ACI_RETURN qAT_PlusCPMS_ext ( T_ACI_CMD_SRC srcId, UBYTE *sim_total, UBYTE *sim_used, UBYTE *me_total, UBYTE *me_used ) | |
206 { | |
207 TRACE_FUNCTION ("qAT_PlusCPMS_ext()"); | |
208 | |
209 *sim_total = smsShrdPrm.aci_sms_parameter.simTotal; | |
210 *sim_used = smsShrdPrm.aci_sms_parameter.simUsed; | |
211 *me_total = smsShrdPrm.aci_sms_parameter.meTotal; | |
212 *me_used = smsShrdPrm.aci_sms_parameter.meUsed; | |
213 | |
214 TRACE_EVENT_P4("sim_total = %d, sim_used = %d, me_total = %d, me_used = %d", *sim_total , *sim_used, *me_total, *me_used); | |
215 return AT_CMPL; | |
216 } | |
217 | |
218 /* function for delivering delayed rAT_PlusCPMS callback */ | |
219 LOCAL UCHAR qAT_PlusCPMS_delayed (void* arg) | |
220 { | |
221 struct qAT_PlusCPMS_buffer* p = (struct qAT_PlusCPMS_buffer*) arg; | |
222 TRACE_EVENT("delayed delivery of RAT_CPMS after qAT_PlusCPMS"); | |
223 R_AT ( RAT_CPMS, p->srcId ) ( &p->m1, &p->m2, &p->m3 ); | |
224 R_AT ( RAT_OK, p->srcId ) ( AT_CMD_CPMS ); | |
225 return FALSE; /* single-shot */ | |
226 } | |
227 | |
228 /* | |
229 +--------------------------------------------------------------------+ | |
230 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
231 | STATE : code ROUTINE : qAT_PlusCSMS | | |
232 +--------------------------------------------------------------------+ | |
233 | |
234 PURPOSE : This is the functional counterpart to the +CSMS? | |
235 AT command which returns the current settings of the | |
236 message service. | |
237 | |
238 <service>: message service | |
239 <mt>: mobile terminated messages | |
240 <mo>: mobile originated messages | |
241 <bm>: broadcast type messages | |
242 */ | |
243 GLOBAL T_ACI_RETURN qAT_PlusCSMS ( T_ACI_CMD_SRC srcId, | |
244 T_ACI_CSMS_SERV *service, | |
245 T_ACI_CSMS_SUPP *mt, | |
246 T_ACI_CSMS_SUPP *mo, | |
247 T_ACI_CSMS_SUPP *bm ) | |
248 { | |
249 TRACE_FUNCTION ("qAT_PlusCSMS ()"); | |
250 | |
251 /* | |
252 *----------------------------------------------------------------- | |
253 * check command source | |
254 *----------------------------------------------------------------- | |
255 */ | |
256 if( ! cmh_IsVldCmdSrc (srcId) ) | |
257 { | |
258 return ( AT_FAIL ); | |
259 } | |
260 | |
261 /* | |
262 *----------------------------------------------------------------- | |
263 * check if command executable | |
264 *----------------------------------------------------------------- | |
265 */ | |
266 if(!cmhSMS_checkSIM ()) | |
267 return AT_FAIL; | |
268 | |
269 /* | |
270 *----------------------------------------------------------------- | |
271 * fill in parameters | |
272 *----------------------------------------------------------------- | |
273 */ | |
274 *service = smsShrdPrm.CSMSservice; | |
275 *mt = smsShrdPrm.CSMSmt; | |
276 *mo = smsShrdPrm.CSMSmo; | |
277 *bm = smsShrdPrm.CSMSbm; | |
278 | |
279 return ( AT_CMPL ); | |
280 } | |
281 | |
282 /* | |
283 +--------------------------------------------------------------------+ | |
284 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
285 | STATE : code ROUTINE : qAT_PlusCMGF | | |
286 +--------------------------------------------------------------------+ | |
287 | |
288 PURPOSE : This is the functional counterpart to the +CMGF? | |
289 AT command which returns the current settings of the | |
290 message format. | |
291 | |
292 <mode>: indicates the message format | |
293 */ | |
294 GLOBAL T_ACI_RETURN qAT_PlusCMGF ( T_ACI_CMD_SRC srcId, | |
295 T_ACI_CMGF_MOD* mode ) | |
296 { | |
297 T_SMS_SET_PRM * pSMSSetPrm; /* points to SMS parameter set */ | |
298 | |
299 TRACE_FUNCTION ("qAT_PlusCMGF ()"); | |
300 | |
301 | |
302 /* | |
303 *----------------------------------------------------------------- | |
304 * check command source | |
305 *----------------------------------------------------------------- | |
306 */ | |
307 if( ! cmh_IsVldCmdSrc (srcId) ) | |
308 { | |
309 return ( AT_FAIL ); | |
310 } | |
311 | |
312 pSMSSetPrm = smsShrdPrm.pSetPrm[srcId]; | |
313 | |
314 /* | |
315 *----------------------------------------------------------------- | |
316 * fill in parameters | |
317 *----------------------------------------------------------------- | |
318 */ | |
319 *mode = pSMSSetPrm -> CMGFmode; | |
320 | |
321 return ( AT_CMPL ); | |
322 } | |
323 | |
324 /* | |
325 +--------------------------------------------------------------------+ | |
326 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
327 | STATE : code ROUTINE : qAT_PercentSMBS | | |
328 +--------------------------------------------------------------------+ | |
329 | |
330 PURPOSE : This is the functional counterpart to the %SMBS? | |
331 <mode>: indicates whether presenting of both text and pdu modes is enabled | |
332 */ | |
333 #ifdef FF_MMI_RIV | |
334 GLOBAL T_ACI_RETURN qAT_PercentSMBS ( T_ACI_CMD_SRC srcId, | |
335 T_ACI_PERC_SMBS_MOD *mode ) | |
336 { | |
337 TRACE_FUNCTION ("qAT_PercentSMBS ()"); | |
338 | |
339 /* check command source */ | |
340 if( ! cmh_IsVldCmdSrc (srcId) ) | |
341 { | |
342 return ( AT_FAIL ); | |
343 } | |
344 | |
345 /* fill in parameters */ | |
346 *mode = smsShrdPrm.perccmgf_smbs_mode; | |
347 | |
348 return ( AT_CMPL ); | |
349 } | |
350 #endif /* #ifdef FF_MMI_RIV */ | |
351 | |
352 /* | |
353 +--------------------------------------------------------------------+ | |
354 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
355 | STATE : code ROUTINE : qAT_PlusCSCA | | |
356 +--------------------------------------------------------------------+ | |
357 | |
358 PURPOSE : This is the functional counterpart to the +CSCA? | |
359 AT command which returns the current settings of the | |
360 service center address. | |
361 | |
362 <sca>: service center address | |
363 <tosca>: type of service center address | |
364 */ | |
365 GLOBAL T_ACI_RETURN qAT_PlusCSCA ( T_ACI_CMD_SRC srcId, | |
366 CHAR* sca, | |
367 T_ACI_TOA* tosca ) | |
368 { | |
369 T_SMS_SET_PRM * pSMSSetPrm; /* points to SMS parameter set */ | |
370 | |
371 TRACE_FUNCTION ("qAT_PlusCSCA ()"); | |
372 | |
373 /* | |
374 *----------------------------------------------------------------- | |
375 * check command source | |
376 *----------------------------------------------------------------- | |
377 */ | |
378 if(srcId NEQ (T_ACI_CMD_SRC)OWN_SRC_SAT) | |
379 { | |
380 if(!cmh_IsVldCmdSrc (srcId)) | |
381 { | |
382 return( AT_FAIL ); | |
383 } | |
384 } | |
385 /* | |
386 *----------------------------------------------------------------- | |
387 * check if command executable | |
388 *----------------------------------------------------------------- | |
389 */ | |
390 if(!cmhSMS_checkSIM ()) | |
391 return AT_FAIL; | |
392 | |
393 pSMSSetPrm = smsShrdPrm.pSetPrm[srcId]; | |
394 | |
395 /* | |
396 *----------------------------------------------------------------- | |
397 * fill in parameters | |
398 *----------------------------------------------------------------- | |
399 */ | |
400 tosca -> ton = cmhSMS_getTon ( pSMSSetPrm -> sca.ton ); | |
401 tosca -> npi = cmhSMS_getNpi ( pSMSSetPrm -> sca.npi ); | |
402 | |
403 cmhSMS_getAdrStr ( sca, | |
404 MAX_SMS_NUM_LEN - 1, | |
405 pSMSSetPrm -> sca.num, | |
406 pSMSSetPrm -> sca.c_num ); | |
407 | |
408 return ( AT_CMPL ); | |
409 } | |
410 | |
411 /* | |
412 +--------------------------------------------------------------------+ | |
413 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
414 | STATE : code ROUTINE : qAT_PlusCNMI | | |
415 +--------------------------------------------------------------------+ | |
416 | |
417 PURPOSE : This is the functional counterpart to the +CNMI? | |
418 AT command which returns the current settings of the | |
419 new message indication parameter. | |
420 | |
421 <mt>: indication routing for SMS-DELIVER | |
422 <bm>: indication routing for CBM | |
423 <ds>: indication routing for SMS-STATUS-REPORT | |
424 */ | |
425 GLOBAL T_ACI_RETURN qAT_PlusCNMI ( T_ACI_CMD_SRC srcId, | |
426 T_ACI_CNMI_MT* mt, | |
427 T_ACI_CNMI_BM* bm, | |
428 T_ACI_CNMI_DS* ds) | |
429 { | |
430 TRACE_FUNCTION ("qAT_PlusCNMI ()"); | |
431 | |
432 | |
433 /* | |
434 *----------------------------------------------------------------- | |
435 * check command source | |
436 *----------------------------------------------------------------- | |
437 */ | |
438 if(!cmh_IsVldCmdSrc (srcId)) | |
439 { | |
440 return( AT_FAIL ); | |
441 } | |
442 | |
443 /* | |
444 *----------------------------------------------------------------- | |
445 * check if command executable | |
446 *----------------------------------------------------------------- | |
447 */ | |
448 if(!cmhSMS_checkSIM ()) | |
449 return AT_FAIL; | |
450 | |
451 /* | |
452 *----------------------------------------------------------------- | |
453 * fill in parameters | |
454 *----------------------------------------------------------------- | |
455 */ | |
456 *mt = smsShrdPrm.CNMImt; | |
457 *bm = smsShrdPrm.CNMIbm; | |
458 *ds = smsShrdPrm.CNMIds; | |
459 | |
460 return ( AT_CMPL ); | |
461 } | |
462 | |
463 /* | |
464 +--------------------------------------------------------------------+ | |
465 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
466 | STATE : code ROUTINE : qAT_PlusCSCB | | |
467 +--------------------------------------------------------------------+ | |
468 | |
469 PURPOSE : This is the functional counterpart to the +CSCB? | |
470 AT command which returns the current selected cell | |
471 broadcast message types. | |
472 | |
473 <mode>: acception mode | |
474 <mids>: message identifiers | |
475 <dcss>: data coding schemes | |
476 */ | |
477 GLOBAL T_ACI_RETURN qAT_PlusCSCB ( T_ACI_CMD_SRC srcId, | |
478 T_ACI_CSCB_MOD* mode, | |
479 USHORT* mids, | |
480 UBYTE* dcss) | |
481 { | |
482 | |
483 TRACE_FUNCTION ("qAT_PlusCSCB ()"); | |
484 | |
485 /* | |
486 *----------------------------------------------------------------- | |
487 * check command source | |
488 *----------------------------------------------------------------- | |
489 */ | |
490 if(!cmh_IsVldCmdSrc (srcId)) | |
491 { | |
492 return( AT_FAIL ); | |
493 } | |
494 | |
495 /* | |
496 *----------------------------------------------------------------- | |
497 * check if command executable | |
498 *----------------------------------------------------------------- | |
499 */ | |
500 if(!cmhSMS_checkSIM ()) | |
501 return AT_FAIL; | |
502 | |
503 /* | |
504 *----------------------------------------------------------------- | |
505 * fill in parameters | |
506 *----------------------------------------------------------------- | |
507 */ | |
508 memcpy ( ( CHAR * ) mids, ( CHAR * ) smsShrdPrm.cbmPrm.msgId, | |
509 sizeof ( smsShrdPrm.cbmPrm.msgId ) ); | |
510 | |
511 memcpy ( ( CHAR * ) dcss, ( CHAR * ) smsShrdPrm.cbmPrm.dcsId, | |
512 sizeof ( smsShrdPrm.cbmPrm.dcsId ) ); | |
513 | |
514 if (smsShrdPrm.cbmPrm.cbmMode NEQ CBCH_IGNORE) | |
515 *mode = CSCB_MOD_Accept; | |
516 else | |
517 *mode = CSCB_MOD_NotAccept; | |
518 | |
519 return ( AT_CMPL ); | |
520 } | |
521 | |
522 | |
523 #ifdef FF_HOMEZONE | |
524 /* | |
525 +--------------------------------------------------------------------+ | |
526 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
527 | STATE : code ROUTINE : qAT_PercentCBHZ | | |
528 +--------------------------------------------------------------------+ | |
529 | |
530 PURPOSE : This is the functional counterpart to the %CBHZ? | |
531 AT command which returns the current selected homezone | |
532 parameters. | |
533 | |
534 <mode> : acctivation mode | |
535 <dcs> : data coding scheme for homezone period | |
536 <timeout>: timeout period for homezone CBM | |
537 */ | |
538 GLOBAL T_ACI_RETURN qAT_PercentCBHZ ( T_ACI_CMD_SRC srcId, | |
539 T_ACI_CBHZ_MOD* mode, | |
540 T_ACI_CS* dcs, | |
541 UBYTE* timeout) | |
542 { | |
543 | |
544 TRACE_FUNCTION ("qAT_PercentCBHZ()"); | |
545 | |
546 /* | |
547 *----------------------------------------------------------------- | |
548 * check command source | |
549 *----------------------------------------------------------------- | |
550 */ | |
551 if(!cmh_IsVldCmdSrc (srcId)) | |
552 { | |
553 return( AT_FAIL ); | |
554 } | |
555 | |
556 /* | |
557 *----------------------------------------------------------------- | |
558 * check if command executable | |
559 *----------------------------------------------------------------- | |
560 */ | |
561 if(!cmhSMS_checkSIM ()) | |
562 return AT_FAIL; | |
563 | |
564 /* | |
565 *----------------------------------------------------------------- | |
566 * fill in parameters | |
567 *----------------------------------------------------------------- | |
568 */ | |
569 *mode = (T_ACI_CBHZ_MOD)smsShrdPrm.cbmPrm.hzMode; | |
570 *dcs = (T_ACI_CS)smsShrdPrm.cbmPrm.hzDcs; | |
571 *timeout = smsShrdPrm.cbmPrm.hzTimeout; | |
572 | |
573 return ( AT_CMPL ); | |
574 } | |
575 | |
576 #endif /* FF_HOMEZONE */ | |
577 | |
578 #ifdef REL99 | |
579 /* | |
580 +--------------------------------------------------------------------+ | |
581 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
582 | STATE : code ROUTINE : qAT_PercentCMGRS | | |
583 +--------------------------------------------------------------------+ | |
584 | |
585 PURPOSE : This is the functional counterpart to the %CMGRS? | |
586 AT command which returns the current settings of the | |
587 auto retransmission flag. | |
588 | |
589 */ | |
590 GLOBAL T_ACI_RETURN qAT_PercentCMGRS ( T_ACI_CMD_SRC srcId, | |
591 UBYTE *auto_rep_flag ) | |
592 { | |
593 TRACE_FUNCTION ("qAT_PercentCMGRS ()"); | |
594 | |
595 /* | |
596 *----------------------------------------------------------------- | |
597 * check command source | |
598 *----------------------------------------------------------------- | |
599 */ | |
600 if( ! cmh_IsVldCmdSrc (srcId) ) | |
601 { | |
602 return ( AT_FAIL ); | |
603 } | |
604 | |
605 /* | |
606 *----------------------------------------------------------------- | |
607 * check if command executable | |
608 *----------------------------------------------------------------- | |
609 */ | |
610 if(!cmhSMS_checkSIM ()) | |
611 return AT_FAIL; | |
612 | |
613 /* | |
614 *----------------------------------------------------------------- | |
615 * fill in parameters | |
616 *----------------------------------------------------------------- | |
617 */ | |
618 *auto_rep_flag = smsShrdPrm.auto_repeat_flag; | |
619 | |
620 return ( AT_CMPL ); | |
621 } | |
622 #endif | |
623 | |
624 /* | |
625 +--------------------------------------------------------------------+ | |
626 | PROJECT : GSM-PS (6147) MODULE : CMH_SMSQ | | |
627 | STATE : code ROUTINE : qAT_PlusCMMS | | |
628 +--------------------------------------------------------------------+ | |
629 | |
630 PURPOSE : This is the functional counterpart to the +CMMS? | |
631 AT command which returns the current mode setting. | |
632 | |
633 <mode>: mode for +CMMS | |
634 | |
635 */ | |
636 GLOBAL T_ACI_RETURN qAT_PlusCMMS ( T_ACI_CMD_SRC srcId, | |
637 UBYTE* mode) | |
638 { | |
639 | |
640 | |
641 TRACE_FUNCTION ("qAT_PlusCMMS ()"); | |
642 | |
643 /* | |
644 *----------------------------------------------------------------- | |
645 * check command source | |
646 *----------------------------------------------------------------- | |
647 */ | |
648 if(!cmh_IsVldCmdSrc (srcId)) | |
649 { | |
650 return( AT_FAIL ); | |
651 } | |
652 | |
653 *mode = smsShrdPrm.CMMSmode; | |
654 | |
655 return ( AT_CMPL ); | |
656 } | |
657 | |
658 | |
659 | |
660 | |
661 | |
662 /*==== EOF ========================================================*/ |