comparison src/g23m-aci/aci/ati_fd.c @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul : J:\g23m-aci\aci\ati_fd.c
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 :
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef ACI_FD_CMD_C
22 #define ACI_FD_CMD_C
23 #endif
24
25 #include "aci_all.h"
26 #include "dti.h" /* functionality of the dti library */
27
28 #include "aci_lst.h"
29 #include "aci_cmh.h"
30 #include "ati_cmd.h"
31 #include "aci_io.h"
32 #include "aci_cmd.h"
33
34 #include "aci_fd.h"
35
36 #include "aci_mem.h"
37 #include "aci_prs.h"
38
39 #include "ati_int.h"
40
41 #ifdef FF_ATI_BAT
42
43 #include "typedefs.h"
44 #include "gdd.h"
45 #include "bat.h"
46
47 #include "ati_bat.h"
48
49 #endif /* FF_ATI_BAT */
50
51 #define RPT_LEN (20) /* hex report length per line */
52 #define SIZE_TMP_BUF (5)
53
54 LOCAL void OutHexReport( UBYTE srcId, USHORT len, UBYTE * buf );
55 EXTERN T_ATI_RSLT setflowCntr(CHAR* cl, UBYTE srcId);
56 EXTERN T_ATI_RSLT queflowCntr(CHAR* cl, UBYTE srcId);
57
58 #ifdef FF_FAX
59 /*
60 +--------------------------------------------------------------------+
61 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
62 | STATE : code ROUTINE : atPlusFLO |
63 +--------------------------------------------------------------------+
64
65 PURPOSE : +FLO command (DTE DCE / DCE DTE flow control)
66 */
67
68 GLOBAL T_ATI_RSLT setatPlusFLO(char *cl, UBYTE srcId)
69 {
70 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
71
72 #ifdef FF_ATI_BAT
73 {
74 T_BAT_cmd_send cmd;
75 T_BAT_cmd_set_plus_flo my_bat_set_plus_flo;
76
77 T_ACI_RX_FLOW_CTRL DCE_by_DTE = RX_FLOW_NotPresent; /* by TE: Rx flow control */
78 T_ACI_RX_FLOW_CTRL DTE_by_DCE = TX_FLOW_NotPresent; /* by TA: Tx flow control */
79
80 TRACE_FUNCTION("setatPlusFLO() calls bat_send() <=== as APPLICATION");
81
82 cl = parse (cl, "dd", &DCE_by_DTE, &DTE_by_DCE);
83
84 if(!cl)
85 {
86 cmdAtError(atError);
87 return ATI_FAIL;
88 }
89
90 memset(&my_bat_set_plus_flo, 0, sizeof(my_bat_set_plus_flo));
91 cmd.ctrl_params = BAT_CMD_SET_PLUS_FLO;
92 cmd.params.ptr_set_plus_flo = &my_bat_set_plus_flo;
93
94 my_bat_set_plus_flo.flo_c = DCE_by_DTE;
95
96 bat_send(ati_bat_get_client(srcId), &cmd);
97
98 return ATI_EXCT; /* executing, because response is passed by callback function */
99 }
100 #else /* OLD FUNCTION BODY */
101
102 TRACE_FUNCTION("setatPlusFLO()");
103
104 src_params->curAtCmd = AT_CMD_FLO;
105 return setflowCntr(cl, srcId);
106
107 #endif /* no FF_ATI_BAT*/
108 }
109
110 /*
111 +--------------------------------------------------------------------+
112 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
113 | STATE : code ROUTINE : atPlusFLO |
114 +--------------------------------------------------------------------+
115
116 PURPOSE : +FLO command (DTE DCE / DCE DTE flow control)
117 */
118
119 GLOBAL T_ATI_RSLT queatPlusFLO(char *cl, UBYTE srcId)
120 {
121 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
122 TRACE_FUNCTION("queatPlusFLO()");
123
124 src_params->curAtCmd = AT_CMD_FLO;
125 return queflowCntr(cl, srcId);
126 }
127 #endif
128
129 /************************************************************************
130 ************ Fax and Data only commands...
131 ************************************************************************/
132
133 #if defined (FAX_AND_DATA) AND defined (DTI)
134
135 /*
136 +--------------------------------------------------------------------+
137 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
138 | STATE : code ROUTINE : atO |
139 +--------------------------------------------------------------------+
140
141 PURPOSE : O command (return to online state)
142 */
143
144 GLOBAL T_ATI_RSLT atO(char *cl, UBYTE srcId)
145 {
146 TRACE_FUNCTION("atO()");
147
148 return (map_aci_2_ati_rslt(sAT_O((T_ACI_CMD_SRC)srcId)));
149 }
150
151 /*
152 +--------------------------------------------------------------------+
153 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
154 | STATE : code ROUTINE : atPlusDR |
155 +--------------------------------------------------------------------+
156
157 PURPOSE : +DR command (Select DATA Compression reporting)
158 */
159 GLOBAL T_ATI_RSLT setatPlusDR (char *cl, UBYTE srcId)
160 {
161 SHORT val;
162 TRACE_FUNCTION("setatPLusDR()");
163
164 switch(*cl)
165 {
166 case('0'):
167 case('1'):
168 {
169 val=*cl - '0';
170 break;
171 }
172 default:
173 {
174 cmdAtError(atError);
175 return ATI_FAIL;
176 }
177 }
178 cl++;
179 if (!(*cl EQ 0 OR *cl EQ ';'))
180 {
181 cmdAtError(atError);
182 return ATI_FAIL;
183 }
184 ati_user_output_cfg[srcId].DR_stat=(UBYTE)val;
185 return ATI_CMPL;
186 }
187
188 GLOBAL T_ATI_RSLT queatPlusDR (char *cl, UBYTE srcId)
189 {
190 TRACE_FUNCTION("queatPLusDR()");
191
192 resp_disp(srcId, cl,"b",&ati_user_output_cfg[srcId].DR_stat);
193 return ATI_CMPL;
194 }
195
196 /*
197 +--------------------------------------------------------------------+
198 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
199 | STATE : code ROUTINE : atPlusDS |
200 +--------------------------------------------------------------------+
201
202 PURPOSE : +DS command (Select DATA Compression)
203 */
204
205 GLOBAL T_ATI_RSLT setatPlusDS (char *cl, UBYTE srcId)
206 {
207 T_ACI_RETURN ret = AT_FAIL;
208 T_ACI_DS_DIR dir = DS_DIR_NotPresent;
209 T_ACI_DS_COMP comp = DS_COMP_NotPresent;
210 LONG maxDict = ACI_NumParmNotPresent;
211 SHORT maxStr = ACI_NumParmNotPresent ;
212
213 cl = parse(cl, "dddr", &dir, &comp, &maxDict, &maxStr);
214 if (!cl)
215 {
216 cmdAtError(atError);
217 return ATI_FAIL;
218 }
219 #ifdef FF_ATI_BAT
220 {
221 T_BAT_cmd_send cmd;
222 T_BAT_cmd_set_plus_ds my_bat_set_plus_ds;
223
224 TRACE_FUNCTION("atPLusDS() calls bat_send() <=== as APPLICATION");
225
226 memset(&my_bat_set_plus_ds, 0, sizeof(my_bat_set_plus_ds));
227 cmd.ctrl_params = BAT_CMD_SET_PLUS_DS;
228 cmd.params.ptr_set_plus_ds = &my_bat_set_plus_ds;
229
230 my_bat_set_plus_ds.dir = dir;
231 my_bat_set_plus_ds.neg ;
232 my_bat_set_plus_ds.p1;
233 my_bat_set_plus_ds.p2;
234
235 bat_send(ati_bat_get_client(srcId), &cmd);
236
237 return ATI_EXCT; /* executing, because response is passed by callback function */
238 }
239 #else /* OLD FUNCTION BODY */
240
241 TRACE_FUNCTION("atPLusDS()");
242
243 ret = sAT_PlusDS((T_ACI_CMD_SRC)srcId,dir,comp,maxDict,maxStr);
244
245 if (ret EQ AT_FAIL)
246 {
247 cmdAtError(atError);
248 }
249 return (map_aci_2_ati_rslt(ret));
250
251 #endif /* no FF_ATI_BAT*/
252 }
253
254 GLOBAL T_ATI_RSLT queatPlusDS (char *cl, UBYTE srcId)
255 {
256 T_ACI_RETURN ret = AT_FAIL;
257 T_ACI_DS_DIR dir=DS_DIR_NotPresent;
258 T_ACI_DS_COMP comp=DS_COMP_NotPresent;
259 LONG maxDict=ACI_NumParmNotPresent;
260 SHORT maxStr=ACI_NumParmNotPresent ;
261
262 TRACE_FUNCTION("atPLusDS()");
263
264 ret = qAT_PlusDS((T_ACI_CMD_SRC)srcId,&dir,&comp,&maxDict,&maxStr);
265 if (ret EQ AT_CMPL)
266 {
267 resp_disp(srcId, cl,"eels",&dir,&comp,&maxDict,&maxStr);
268 }
269 if (ret EQ AT_FAIL)
270 {
271 cmdAtError(atError);
272 }
273 return (map_aci_2_ati_rslt(ret));
274 }
275
276 /*
277 +--------------------------------------------------------------------+
278 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
279 | STATE : code ROUTINE : atPlusCRLP |
280 +--------------------------------------------------------------------+
281
282 PURPOSE : +CRLP command (Select RADIO LINK Protokoll)
283 */
284
285 GLOBAL T_ATI_RSLT setatPlusCRLP(char *cl, UBYTE srcId)
286 {
287 T_ACI_RETURN ret = AT_FAIL;
288 SHORT iws =- 1, mws = -1, t1 = -1, n2 = -1; /* !!! */
289
290 cl = parse(cl, "rrrr", &iws, &mws, &t1, &n2);
291 if (!cl)
292 {
293 cmdCmeError(CME_ERR_OpNotAllow);
294 return ATI_FAIL;
295 }
296
297 #ifdef FF_ATI_BAT
298 {
299 T_BAT_cmd_send cmd;
300 T_BAT_cmd_set_plus_crlp my_bat_set_plus_crlp;
301
302 TRACE_FUNCTION("setatPLusCRLP() calls bat_send() <=== as APPLICATION");
303
304 memset(&my_bat_set_plus_crlp, 0, sizeof(my_bat_set_plus_crlp));
305 cmd.ctrl_params = BAT_CMD_SET_PLUS_CRLP;
306 cmd.params.ptr_set_plus_crlp = &my_bat_set_plus_crlp;
307
308 my_bat_set_plus_crlp.iws = iws;
309 my_bat_set_plus_crlp.mws = mws;
310 my_bat_set_plus_crlp.t1 = t1;
311 my_bat_set_plus_crlp.n2 = n2;
312
313 bat_send(ati_bat_get_client(srcId), &cmd);
314
315 return ATI_EXCT; /* executing, because response is passed by callback function */
316 }
317 #else /* OLD FUNCTION BODY */
318
319 TRACE_FUNCTION("setatPLusCRLP()");
320
321 ret = sAT_PlusCRLP((T_ACI_CMD_SRC)srcId,iws,mws,t1,n2);
322 if (ret EQ AT_FAIL)
323 {
324 cmdCmeError(CME_ERR_Unknown);
325 }
326 return (map_aci_2_ati_rslt(ret));
327
328 #endif /* no FF_ATI_BAT*/
329 }
330
331 GLOBAL T_ATI_RSLT queatPlusCRLP(char *cl, UBYTE srcId)
332 {
333 T_ACI_RETURN ret = AT_FAIL;
334 SHORT iws=-1,mws=-1,t1=-1,n2=-1; /* !!! */
335
336 TRACE_FUNCTION("queatPLusCRLP()");
337
338 ret = qAT_PlusCRLP((T_ACI_CMD_SRC)srcId,&iws,&mws,&t1,&n2);
339 if (ret EQ AT_CMPL)
340 {
341 resp_disp(srcId, cl,"ssss",&iws,&mws,&t1,&n2);
342 }
343 if (ret EQ AT_FAIL)
344 {
345 cmdCmeError(CME_ERR_Unknown);
346 }
347 return (map_aci_2_ati_rslt(ret));
348 }
349
350 #ifdef FF_FAX
351
352 /*
353 *
354 *
355 *---------------------------------------- FAX Commands ------------------------------------------
356 *
357 *
358 */
359 /*
360 +--------------------------------------------------------------------+
361 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
362 | STATE : code ROUTINE : atPlusFAP |
363 +--------------------------------------------------------------------+
364
365 PURPOSE : +FAP command (address and polling capabilities )
366 */
367
368 GLOBAL T_ATI_RSLT setatPlusFAP (char *cl, UBYTE srcId)
369 {
370 T_ACI_RETURN ret = AT_FAIL;
371 T_ACI_FAP_VAL sub=FAP_VAL_NotPresent,
372 sep=FAP_VAL_NotPresent,
373 pwd=FAP_VAL_NotPresent;
374
375 cl = parse(cl,"ddd",&sub,&sep,&pwd);
376 if (!cl)
377 {
378 cmdAtError(atError);
379 return ATI_FAIL;
380 }
381
382 #ifdef FF_ATI_BAT
383 {
384 T_BAT_cmd_send cmd;
385 T_BAT_cmd_set_plus_fap my_bat_set_plus_fap;
386
387 TRACE_FUNCTION("setatPlusFAP() calls bat_send() <=== as APPLICATION");
388
389 memset(&my_bat_set_plus_fap, 0, sizeof(my_bat_set_plus_fap));
390 cmd.ctrl_params = BAT_CMD_SET_PLUS_FAP;
391 cmd.params.ptr_set_plus_fap = &my_bat_set_plus_fap;
392
393 my_bat_set_plus_fap.sub = sub;
394 my_bat_set_plus_fap.sep = sep;
395 my_bat_set_plus_fap.pwd = pwd;
396
397 bat_send(ati_bat_get_client(srcId), &cmd);
398
399 return ATI_EXCT; /* executing, because response is passed by callback function */
400 }
401 #else /* OLD FUNCTION BODY */
402
403 TRACE_FUNCTION("setatPlusFAP()");
404
405 ret = sAT_PlusFAP((T_ACI_CMD_SRC)srcId,sub,sep,pwd);
406 if (ret EQ AT_FAIL)
407 {
408 cmdAtError(atError);
409 }
410 return (map_aci_2_ati_rslt(ret));
411
412 #endif /* no FF_ATI_BAT*/
413 }
414
415 GLOBAL T_ATI_RSLT queatPlusFAP (char *cl, UBYTE srcId)
416 {
417 T_ACI_RETURN ret = AT_FAIL;
418 T_ACI_FAP_VAL sub=FAP_VAL_NotPresent,
419 sep=FAP_VAL_NotPresent,
420 pwd=FAP_VAL_NotPresent;
421
422 TRACE_FUNCTION("queatPlusFAP()");
423
424 ret = qAT_PlusFAP((T_ACI_CMD_SRC)srcId,&sub,&sep,&pwd);
425 if (ret EQ AT_CMPL)
426 {
427 sprintf(g_sa,"+FAP:%d,%d,%d",sub,sep,pwd);
428 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
429 }
430 else
431 {
432 cmdAtError(atError);
433 }
434 return (map_aci_2_ati_rslt(ret));
435 }
436
437 /*
438 +--------------------------------------------------------------------+
439 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
440 | STATE : code ROUTINE : atPlusFBU |
441 +--------------------------------------------------------------------+
442
443 PURPOSE : +FBU
444 */
445
446 GLOBAL T_ATI_RSLT setatPlusFBU(char *cl, UBYTE srcId)
447 {
448 SHORT fbu = -1;
449
450 cl = parse(cl,"r",&fbu);
451 if (!cl OR fbu > 1)
452 {
453 cmdAtError(atError);
454 return ATI_FAIL;
455 }
456
457 #ifdef FF_ATI_BAT
458 {
459 T_BAT_cmd_send cmd;
460 T_BAT_cmd_set_plus_fbu my_bat_set_plus_fbu;
461
462 TRACE_FUNCTION("setatPlusFBU() calls bat_send() <=== as APPLICATION");
463
464 memset(&my_bat_set_plus_fbu, 0, sizeof(my_bat_set_plus_fbu));
465 cmd.ctrl_params = BAT_CMD_SET_PLUS_FBU;
466 cmd.params.ptr_set_plus_fbu = &my_bat_set_plus_fbu;
467
468 my_bat_set_plus_fbu.value = fbu;
469
470 bat_send(ati_bat_get_client(srcId), &cmd);
471
472 return ATI_EXCT; /* executing, because response is passed by callback function */
473 }
474 #else /* OLD FUNCTION BODY */
475
476 TRACE_FUNCTION("setatPlusFBU()");
477
478 if (fbu NEQ -1)
479 {
480 fd.FBU_stat = (char) fbu;
481 }
482 return ATI_CMPL;
483
484 #endif /* no FF_ATI_BAT*/
485 }
486
487 GLOBAL T_ATI_RSLT queatPlusFBU(char *cl, UBYTE srcId)
488 {
489
490 TRACE_FUNCTION("queatPlusFBU()");
491
492 sprintf(g_sa,"+FBU:%d",fd.FBU_stat);
493 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
494 return ATI_CMPL;
495 }
496
497 /*
498 +--------------------------------------------------------------------+
499 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
500 | STATE : code ROUTINE : atPlusFCC |
501 +--------------------------------------------------------------------+
502
503 PURPOSE :
504
505 ITU-T.32/8.5.1.1 DCE capabilities parameters, +FCC
506
507 – Write syntax: +FCC=VR,BR,WD,LN,DF,EC,BF,ST,JP
508 – Valid values: see Table 21
509 – Default values: set by manufacturer
510 – Mandatory values: as required by Recommendation T.30
511
512 +FCC allows the DTE to sense and constrain the capabilities of the facsimile DCE,
513 from the choices defined in Table 2/T.30.
514 When +FCC is modified by the DTE, the DCE shall copy +FCC into +FIS.
515
516 */
517
518 GLOBAL T_ATI_RSLT setatPlusFCC (char *cl, UBYTE srcId)
519 {
520 T_ACI_RETURN ret = AT_FAIL;
521
522 T_ACI_F_VR vr = F_VR_NotPresent;
523 T_ACI_F_BR br = F_BR_NotPresent;
524 T_ACI_F_WD wd = F_WD_NotPresent;
525 T_ACI_F_LN ln = F_LN_NotPresent;
526 T_ACI_F_DF df = F_DF_NotPresent;
527 T_ACI_F_EC ec = F_EC_NotPresent;
528 T_ACI_F_BF bf = F_BF_NotPresent;
529 T_ACI_F_ST st = F_ST_NotPresent;
530 T_ACI_F_JP jp = F_JP_NotPresent;
531
532 UBYTE bvr = NOT_PRESENT_8BIT,
533 bbf = NOT_PRESENT_8BIT,
534 bjp = NOT_PRESENT_8BIT;
535
536 cl = parse(cl,"xdddddxdx",&bvr,&br,&wd,&ln,&df,&ec,&bbf,&st,&bjp);
537
538 if ( !cl )
539 {
540 cmdAtError(atError);
541 return ATI_FAIL;
542 }
543
544 if (bvr NEQ NOT_PRESENT_8BIT)
545 {
546 vr = (T_ACI_F_VR)bvr;
547 }
548 if (bbf NEQ NOT_PRESENT_8BIT)
549 {
550 bf = (T_ACI_F_BF)bbf;
551 }
552 if (bjp NEQ NOT_PRESENT_8BIT)
553 {
554 jp = (T_ACI_F_JP)bjp;
555 }
556
557 #ifdef FF_ATI_BAT
558 {
559 T_BAT_cmd_send cmd;
560 T_BAT_cmd_set_plus_fcc my_bat_set_plus_fcc;
561
562 TRACE_FUNCTION("setatPlusFCC() calls bat_send() <=== as APPLICATION");
563
564 memset(&my_bat_set_plus_fcc, 0, sizeof(my_bat_set_plus_fcc));
565 cmd.ctrl_params = BAT_CMD_SET_PLUS_FCC;
566 cmd.params.ptr_set_plus_fcc = &my_bat_set_plus_fcc;
567
568 my_bat_set_plus_fcc.vr = vr;
569 my_bat_set_plus_fcc.br = br;
570 my_bat_set_plus_fcc.wd = wd;
571 my_bat_set_plus_fcc.ln = ln;
572 my_bat_set_plus_fcc.df = df;
573 my_bat_set_plus_fcc.ec = ec;
574 my_bat_set_plus_fcc.bf = bf;
575 my_bat_set_plus_fcc.st = st;
576 my_bat_set_plus_fcc.jp = jp;
577
578 bat_send(ati_bat_get_client(srcId), &cmd);
579
580 return ATI_EXCT; /* executing, because response is passed by callback function */
581 }
582 #else /* OLD FUNCTION BODY */
583
584 TRACE_FUNCTION("setatPlusFCC()");
585
586 ret = sAT_PlusFCC((T_ACI_CMD_SRC)srcId,vr,br,wd,ln,df,ec,bf,st,jp);
587 if (ret EQ AT_FAIL)
588 {
589 cmdAtError(atError);
590 }
591 return (map_aci_2_ati_rslt(ret));
592
593 #endif /* no FF_ATI_BAT*/
594 }
595
596 GLOBAL T_ATI_RSLT queatPlusFCC (char *cl, UBYTE srcId)
597 {
598 T_ACI_RETURN ret = AT_FAIL;
599 T_ACI_F_VR vr = F_VR_NotPresent;
600 T_ACI_F_BR br = F_BR_NotPresent;
601 T_ACI_F_WD wd = F_WD_NotPresent;
602 T_ACI_F_LN ln = F_LN_NotPresent;
603 T_ACI_F_DF df = F_DF_NotPresent;
604 T_ACI_F_EC ec = F_EC_NotPresent;
605 T_ACI_F_BF bf = F_BF_NotPresent;
606 T_ACI_F_ST st = F_ST_NotPresent;
607 T_ACI_F_JP jp = F_JP_NotPresent;
608
609 TRACE_FUNCTION("queatPlusFCC()");
610
611 ret = qAT_PlusFCC((T_ACI_CMD_SRC)srcId, &vr,&br,&wd,&ln,&df,&ec,&bf,&st,&jp);
612 if (ret EQ AT_CMPL)
613 {
614 sprintf(g_sa,"+FCC:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
615 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
616 }
617 else
618 {
619 cmdAtError(atError);
620 }
621 return (map_aci_2_ati_rslt(ret));
622 }
623
624 /*
625 +--------------------------------------------------------------------+
626 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
627 | STATE : code ROUTINE : atPlusFCLASS |
628 +--------------------------------------------------------------------+
629
630 PURPOSE : +FCLASS command (Service Class Indication)
631 */
632
633 GLOBAL T_ATI_RSLT setatPlusFCLASS (char *cl, UBYTE srcId)
634 {
635 T_ACI_RETURN ret = AT_FAIL;
636 T_ACI_FCLASS_CLASS class_type = FCLASS_CLASS_NotPresent;
637
638 switch (*cl)
639 {
640 case('0'):
641 {
642 cl++;
643 class_type = FCLASS_CLASS_Data;
644 break;
645 }
646 case('2'):
647 {
648 cl++;
649 if (*cl EQ '.')
650 {
651 cl++;
652 if (*cl EQ '0')
653 {
654 cl++;
655 class_type = FCLASS_CLASS_Fax20;
656 break;
657 }
658 }
659 cmdAtError(atError);
660 return ATI_FAIL;
661 }
662 case('8'):
663 {
664 cl++;
665 class_type = FCLASS_CLASS_Voice;
666 break;
667 }
668 default:
669 {
670 cmdAtError(atError);
671 return ATI_FAIL;
672 }
673 }
674 if (*cl NEQ '\0' AND *cl NEQ ';')
675 {
676 cmdAtError(atError);
677 return ATI_FAIL;
678 }
679
680 #ifdef FF_ATI_BAT
681 {
682 T_BAT_cmd_send cmd;
683 T_BAT_cmd_set_plus_fclass my_bat_set_plus_fclass;
684
685 TRACE_FUNCTION("setatPlusFCLASS() calls bat_send() <=== as APPLICATION");
686
687 memset(&my_bat_set_plus_fclass, 0, sizeof(my_bat_set_plus_fclass));
688 cmd.ctrl_params = BAT_CMD_SET_PLUS_FCLASS;
689 cmd.params.ptr_set_plus_fclass = &my_bat_set_plus_fclass;
690
691 my_bat_set_plus_fclass.n = class_type;
692
693 bat_send(ati_bat_get_client(srcId), &cmd);
694
695 return ATI_EXCT; /* executing, because response is passed by callback function */
696 }
697 #else /* OLD FUNCTION BODY */
698
699 TRACE_FUNCTION("setatPlusFCLASS()");
700
701 ret = sAT_PlusFCLASS((T_ACI_CMD_SRC)srcId, class_type);
702 if (ret EQ AT_FAIL)
703 {
704 cmdAtError(atError);
705 }
706 return (map_aci_2_ati_rslt(ret));
707
708 #endif /* no FF_ATI_BAT*/
709 }
710
711 GLOBAL T_ATI_RSLT queatPlusFCLASS (char *cl, UBYTE srcId)
712 {
713 T_ACI_RETURN ret = AT_FAIL;
714 T_ACI_FCLASS_CLASS class_type = FCLASS_CLASS_NotPresent;
715
716 TRACE_FUNCTION("atPlusFCLASS()");
717
718 ret = qAT_PlusFCLASS((T_ACI_CMD_SRC)srcId, &class_type);
719 if (ret EQ AT_CMPL)
720 {
721 if (class_type EQ 20)
722 {
723 sprintf(g_sa,"%s","2.0");
724 }
725 else
726 {
727 sprintf(g_sa,"%d",class_type);
728 }
729 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
730 }
731 else
732 {
733 cmdAtError(atError);
734 }
735 return (map_aci_2_ati_rslt(ret));
736 }
737
738 /*
739 +--------------------------------------------------------------------+
740 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
741 | STATE : code ROUTINE : atPlusFCQ |
742 +--------------------------------------------------------------------+
743
744 PURPOSE : +FCQ command (quality control)
745 */
746
747 GLOBAL T_ATI_RSLT setatPlusFCQ (char *cl, UBYTE srcId)
748 {
749 T_ACI_RETURN ret = AT_FAIL;
750 T_ACI_FCQ_RQ rq=FCQ_RQ_NotPresent;
751 T_ACI_FCQ_TQ tq=FCQ_TQ_NotPresent;
752
753 cl = parse(cl,"dd",&rq,&tq);
754 if ( !cl )
755 {
756 cmdAtError(atError);
757 return ATI_FAIL;
758 }
759
760 #ifdef FF_ATI_BAT
761 {
762 T_BAT_cmd_send cmd;
763 T_BAT_cmd_set_plus_fcq my_bat_set_plus_fcq;
764
765 TRACE_FUNCTION("setatPlusFCQ() calls bat_send() <=== as APPLICATION");
766
767 memset(&my_bat_set_plus_fcq, 0, sizeof(my_bat_set_plus_fcq));
768 cmd.ctrl_params = BAT_CMD_SET_PLUS_FCQ;
769 cmd.params.ptr_set_plus_fcq = &my_bat_set_plus_fcq;
770
771 my_bat_set_plus_fcq.rq = rq;
772 my_bat_set_plus_fcq.tq = tq;
773
774 bat_send(ati_bat_get_client(srcId), &cmd);
775
776 return ATI_EXCT; /* executing, because response is passed by callback function */
777 }
778 #else /* OLD FUNCTION BODY */
779
780 TRACE_FUNCTION("setatPlusFCQ()");
781
782 ret = sAT_PlusFCQ((T_ACI_CMD_SRC)srcId,rq,tq);
783 if (ret EQ AT_FAIL)
784 {
785 cmdAtError(atError);
786 }
787 return (map_aci_2_ati_rslt(ret));
788
789 #endif /* no FF_ATI_BAT*/
790 }
791
792 GLOBAL T_ATI_RSLT queatPlusFCQ (char *cl, UBYTE srcId)
793 {
794 T_ACI_RETURN ret = AT_FAIL;
795 T_ACI_FCQ_RQ rq=FCQ_RQ_NotPresent;
796 T_ACI_FCQ_TQ tq=FCQ_TQ_NotPresent;
797
798 TRACE_FUNCTION("queatPlusFCQ()");
799
800 ret = qAT_PlusFCQ((T_ACI_CMD_SRC)srcId, &rq,&tq);
801 if (ret EQ AT_CMPL)
802 {
803 sprintf(g_sa,"%s%d,%d","+FCQ:",rq,tq);
804 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
805 }
806 else
807 {
808 cmdAtError(atError);
809 }
810 return (map_aci_2_ati_rslt(ret));
811 }
812
813 /*
814 +--------------------------------------------------------------------+
815 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
816 | STATE : code ROUTINE : atPlusFCR |
817 +--------------------------------------------------------------------+
818
819 PURPOSE : +FCR command (Receive capability)
820 */
821
822 GLOBAL T_ATI_RSLT setatPlusFCR (char *cl, UBYTE srcId)
823 {
824 T_ACI_RETURN ret = AT_FAIL;
825 T_ACI_FCR_VAL val = FCR_VAL_NotPresent;
826
827 cl = parse(cl,"d",&val);
828 if ( !cl )
829 {
830 cmdAtError(atError);
831 return ATI_FAIL;
832 }
833
834 #ifdef FF_ATI_BAT
835 {
836 T_BAT_cmd_send cmd;
837 T_BAT_cmd_set_plus_fcr my_bat_set_plus_fcr;
838
839 TRACE_FUNCTION("setatPlusFCR() calls bat_send() <=== as APPLICATION");
840
841 memset(&my_bat_set_plus_fcr, 0, sizeof(my_bat_set_plus_fcr));
842 cmd.ctrl_params = BAT_CMD_SET_PLUS_FCR;
843 cmd.params.ptr_set_plus_fcr = &my_bat_set_plus_fcr;
844
845 my_bat_set_plus_fcr.value = val;
846
847 bat_send(ati_bat_get_client(srcId), &cmd);
848
849 return ATI_EXCT; /* executing, because response is passed by callback function */
850 }
851 #else /* OLD FUNCTION BODY */
852
853 TRACE_FUNCTION("setatPlusFCR()");
854
855 ret = sAT_PlusFCR((T_ACI_CMD_SRC)srcId,val);
856 if (ret EQ AT_FAIL)
857 {
858 cmdAtError(atError);
859 }
860 return (map_aci_2_ati_rslt(ret));
861
862 #endif /* no FF_ATI_BAT*/
863 }
864
865 GLOBAL T_ATI_RSLT queatPlusFCR (char *cl, UBYTE srcId)
866 {
867 T_ACI_RETURN ret = AT_FAIL;
868 T_ACI_FCR_VAL val = FCR_VAL_NotPresent;
869
870 TRACE_FUNCTION("queatPlusFCR()");
871
872 ret = qAT_PlusFCR((T_ACI_CMD_SRC)srcId, &val);
873 if (ret EQ AT_CMPL)
874 {
875 sprintf(g_sa,"+FCR:%d",val);
876 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
877 }
878 else
879 {
880 cmdAtError(atError);
881 }
882 return (map_aci_2_ati_rslt(ret));
883 }
884
885 /*
886 +--------------------------------------------------------------------+
887 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
888 | STATE : code ROUTINE : atPlusFCS |
889 +--------------------------------------------------------------------+
890
891 PURPOSE:
892
893 ITU-T.32/8.5.1.3 Current session results, +FCS
894
895 – Read syntax: +FCS?
896 – DCE response: VR,BR,WD,LN,DF,EC,BF,ST,JP
897 – Valid values: see Table 21
898 – Default values: 0,0,0,0,0,0,0,0,0
899 – Mandatory values: as required by Recommendation T.30
900
901 The +FCS parameter is loaded with the negotiated T.30 parameters for the current session.
902 A transmitting DCE generates DCS;
903 a receiving DCE gets DCS from the remote station.
904
905 The DTE may only read this parameter.
906 The DCE shall set the +FCS parameter to the default values on DCE initialization,
907 on +FIP command execution, and at the end of a session.
908
909 The contents of +FCS are spontaneously reported
910 during execution of +FDR (8.3.4) or +FDT (8.3.3) commands,
911 by the +FCS:VR,BR,WD,LN,DF,EC,BF,ST,JP response,
912 using the same compound parameter format. See 8.4.2.1.
913
914 NOTE – The use of additional subparameters for the +FCS,
915 in order to support future T.30 features, is for further study.
916 */
917
918 GLOBAL T_ATI_RSLT queatPlusFCS(char *cl, UBYTE srcId)
919 {
920 T_ACI_RETURN ret = AT_FAIL;
921 T_ACI_F_VR vr;
922 T_ACI_F_BR br;
923 T_ACI_F_WD wd;
924 T_ACI_F_LN ln;
925 T_ACI_F_DF df;
926 T_ACI_F_EC ec;
927 T_ACI_F_BF bf;
928 T_ACI_F_ST st;
929 T_ACI_F_JP jp;
930
931 TRACE_FUNCTION("queatPlusFCS()");
932
933 ret = qAT_PlusFCS((T_ACI_CMD_SRC)srcId,&vr,&br,&wd,&ln,&df,&ec,&bf,&st,&jp);
934
935 if(ret EQ AT_CMPL)
936 {
937 sprintf(g_sa,"+FCS:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
938 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
939 }
940 else
941 {
942 cmdAtError(atError);
943 }
944 return (map_aci_2_ati_rslt(ret));
945 }
946
947 /*
948 +--------------------------------------------------------------------+
949 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
950 | STATE : code ROUTINE : atPlusFEA |
951 +--------------------------------------------------------------------+
952
953 PURPOSE : +FEA
954 */
955
956 GLOBAL T_ATI_RSLT setatPlusFEA(char *cl, UBYTE srcId)
957 {
958 SHORT fea = -1;
959
960 cl = parse(cl, "r", &fea);
961 if (!cl)
962 {
963 cmdAtError(atError);
964 return ATI_FAIL;
965 }
966
967 #ifdef FF_ATI_BAT
968 {
969 T_BAT_cmd_send cmd;
970 T_BAT_cmd_set_plus_fea my_bat_set_plus_fea;
971
972 TRACE_FUNCTION("setatPlusFEA() calls bat_send() <=== as APPLICATION");
973
974 memset(&my_bat_set_plus_fea, 0, sizeof(my_bat_set_plus_fea));
975 cmd.ctrl_params = BAT_CMD_SET_PLUS_FEA;
976 cmd.params.ptr_set_plus_fea = &my_bat_set_plus_fea;
977
978 my_bat_set_plus_fea.value = fea;
979
980 bat_send(ati_bat_get_client(srcId), &cmd);
981
982 return ATI_EXCT; /* executing, because response is passed by callback function */
983 }
984 #else /* OLD FUNCTION BODY */
985
986 TRACE_FUNCTION("setatPlusFEA()");
987
988 if (fea NEQ -1)
989 {
990 fd.FEA_stat = (char) fea;
991 }
992 return ATI_CMPL;
993
994 #endif /* no FF_ATI_BAT*/
995 }
996
997 GLOBAL T_ATI_RSLT queatPlusFEA(char *cl, UBYTE srcId)
998 {
999
1000 TRACE_FUNCTION("queatPlusFEA()");
1001
1002 sprintf(g_sa,"+FEA:%d", fd.FEA_stat);
1003 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1004 return ATI_CMPL;
1005 }
1006
1007 /*
1008 +--------------------------------------------------------------------+
1009 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1010 | STATE : code ROUTINE : atPlusFFC |
1011 +--------------------------------------------------------------------+
1012
1013 PURPOSE : +FFC command (format conversion)
1014 */
1015
1016 GLOBAL T_ATI_RSLT setatPlusFFC (char *cl, UBYTE srcId)
1017 {
1018 T_ACI_RETURN ret = AT_FAIL;
1019 T_ACI_FFC_VRC vrc=FFC_VRC_NotPresent;
1020 T_ACI_FFC_DFC dfc=FFC_DFC_NotPresent;
1021 T_ACI_FFC_LNC lnc=FFC_LNC_NotPresent;
1022 T_ACI_FFC_WDC wdc=FFC_WDC_NotPresent;
1023
1024 cl = parse(cl,"dddd",&vrc,&dfc,&lnc,&wdc);
1025 if ( !cl )
1026 {
1027 cmdAtError(atError);
1028 return ATI_FAIL;
1029 }
1030
1031 #ifdef FF_ATI_BAT
1032 {
1033 T_BAT_cmd_send cmd;
1034 T_BAT_cmd_set_plus_ffc my_bat_set_plus_ffc;
1035
1036 TRACE_FUNCTION("setatPlusFFC() calls bat_send() <=== as APPLICATION");
1037
1038 memset(&my_bat_set_plus_ffc, 0, sizeof(my_bat_set_plus_ffc));
1039 cmd.ctrl_params = BAT_CMD_SET_PLUS_FFC;
1040 cmd.params.ptr_set_plus_ffc = &my_bat_set_plus_ffc;
1041
1042 my_bat_set_plus_ffc.vrc = vrc;
1043 my_bat_set_plus_ffc.dfc = dfc;
1044 my_bat_set_plus_ffc.lnc = lnc;
1045 my_bat_set_plus_ffc.wdc = wdc;
1046
1047 bat_send(ati_bat_get_client(srcId), &cmd);
1048
1049 return ATI_EXCT; /* executing, because response is passed by callback function */
1050 }
1051 #else /* OLD FUNCTION BODY */
1052
1053 TRACE_FUNCTION("setatPlusFFC()");
1054
1055 ret = sAT_PlusFFC((T_ACI_CMD_SRC)srcId,vrc,dfc,lnc,wdc);
1056 if (ret EQ AT_FAIL)
1057 {
1058 cmdAtError(atError);
1059 }
1060 return (map_aci_2_ati_rslt(ret));
1061
1062 #endif /* no FF_ATI_BAT*/
1063 }
1064
1065 GLOBAL T_ATI_RSLT queatPlusFFC (char *cl, UBYTE srcId)
1066 {
1067 T_ACI_RETURN ret = AT_FAIL;
1068 T_ACI_FFC_VRC vrc=FFC_VRC_NotPresent;
1069 T_ACI_FFC_DFC dfc=FFC_DFC_NotPresent;
1070 T_ACI_FFC_LNC lnc=FFC_LNC_NotPresent;
1071 T_ACI_FFC_WDC wdc=FFC_WDC_NotPresent;
1072
1073 TRACE_FUNCTION("atPlusFFC()");
1074
1075 ret = qAT_PlusFFC((T_ACI_CMD_SRC)srcId,&vrc,&dfc,&lnc,&wdc);
1076 if (ret EQ AT_CMPL)
1077 {
1078 sprintf(g_sa,"+FFC:%d,%d,%d,%d",vrc,dfc,lnc,wdc);
1079 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1080 }
1081 else
1082 {
1083 cmdAtError(atError);
1084 }
1085 return (map_aci_2_ati_rslt(ret));
1086 }
1087
1088 /*
1089 +--------------------------------------------------------------------+
1090 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1091 | STATE : code ROUTINE : atPlusFHS |
1092 +--------------------------------------------------------------------+
1093
1094 PURPOSE : +FHS command (query termination status)
1095 */
1096
1097 GLOBAL T_ATI_RSLT queatPlusFHS(char *cl, UBYTE srcId)
1098 {
1099 T_ACI_RETURN ret = AT_FAIL;
1100 T_ACI_FHS_STAT stat;
1101
1102 TRACE_FUNCTION("queatPlusFHS()");
1103
1104 ret = qAT_PlusFHS((T_ACI_CMD_SRC)srcId,&stat);
1105 if (ret EQ AT_CMPL)
1106 {
1107 sprintf(g_sa,"+FHS:%02X",stat);
1108 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1109 }
1110 else
1111 {
1112 cmdAtError(atError);
1113 }
1114 return (map_aci_2_ati_rslt(ret));
1115 }
1116 /*
1117 +--------------------------------------------------------------------+
1118 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1119 | STATE : code ROUTINE : atPlusFIE |
1120 +--------------------------------------------------------------------+
1121
1122 PURPOSE : +FIE command (procedure interrupt enable)
1123 */
1124
1125 GLOBAL T_ATI_RSLT setatPlusFIE (char *cl, UBYTE srcId)
1126 {
1127 T_ACI_RETURN ret = AT_FAIL;
1128 T_ACI_FIE_VAL val=FIE_VAL_NotPresent;
1129
1130 cl = parse(cl,"d",&val);
1131 if ( !cl )
1132 {
1133 cmdAtError(atError);
1134 return ATI_FAIL;
1135 }
1136
1137 #ifdef FF_ATI_BAT
1138 {
1139 T_BAT_cmd_send cmd;
1140 T_BAT_cmd_set_plus_fie my_bat_set_plus_fie;
1141
1142 TRACE_FUNCTION("setatPlusFIE() calls bat_send() <=== as APPLICATION");
1143
1144 memset(&my_bat_set_plus_fie, 0, sizeof(my_bat_set_plus_fie));
1145 cmd.ctrl_params = BAT_CMD_SET_PLUS_FIE;
1146 cmd.params.ptr_set_plus_fie = &my_bat_set_plus_fie;
1147
1148 my_bat_set_plus_fie.value = val;
1149
1150 bat_send(ati_bat_get_client(srcId), &cmd);
1151
1152 return ATI_EXCT; /* executing, because response is passed by callback function */
1153 }
1154 #else /* OLD FUNCTION BODY */
1155
1156 TRACE_FUNCTION("atPlusFIE()");
1157
1158 ret = sAT_PlusFIE((T_ACI_CMD_SRC)srcId,val);
1159 if (ret EQ AT_FAIL)
1160 {
1161 cmdAtError(atError);
1162 }
1163 return (map_aci_2_ati_rslt(ret));
1164
1165 #endif /* no FF_ATI_BAT*/
1166 }
1167
1168 GLOBAL T_ATI_RSLT queatPlusFIE (char *cl, UBYTE srcId)
1169 {
1170 T_ACI_RETURN ret = AT_FAIL;
1171 T_ACI_FIE_VAL val=FIE_VAL_NotPresent;
1172
1173 TRACE_FUNCTION("queatPlusFIE()");
1174
1175 ret = qAT_PlusFIE((T_ACI_CMD_SRC)srcId, &val);
1176 if (ret EQ AT_CMPL)
1177 {
1178 sprintf(g_sa,"+FIE:%d",val);
1179 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1180 }
1181 else
1182 {
1183 cmdAtError(atError);
1184 }
1185 return (map_aci_2_ati_rslt(ret));
1186 }
1187
1188 /*
1189 +--------------------------------------------------------------------+
1190 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1191 | STATE : code ROUTINE : atPlusFIS |
1192 +--------------------------------------------------------------------+
1193
1194 PURPOSE :
1195
1196 ITU-T.32/8.5.1.2 Current session parameters, +FIS
1197
1198 – Write syntax: +FIS=VR,BR,WD,LN,DF,EC,BF,ST,JP
1199 – Valid values: see Table 21
1200 – Default values: set by manufacturer
1201 – Mandatory values: as required by Recommendation T.30.
1202
1203 The +FIS parameter allows the DTE to sense and constrain
1204 the capabilities used for the current session.
1205 The DCE uses +FIS to generate DIS or DTC messages directly,
1206 and uses +FIS and received DIS messages to generate DCS messages.
1207
1208 The DCE shall set the +FIS parameter from the +FCC parameter
1209 on DCE initialization,
1210 upon +FIP command execution, when +FCC is written,
1211 and at the end of a session.
1212 */
1213
1214 GLOBAL T_ATI_RSLT setatPlusFIS (char *cl, UBYTE srcId)
1215 {
1216 T_ACI_RETURN ret = AT_FAIL;
1217 T_ACI_F_VR vr = F_VR_NotPresent;
1218 T_ACI_F_BR br = F_BR_NotPresent;
1219 T_ACI_F_WD wd = F_WD_NotPresent;
1220 T_ACI_F_LN ln = F_LN_NotPresent;
1221 T_ACI_F_DF df = F_DF_NotPresent;
1222 T_ACI_F_EC ec = F_EC_NotPresent;
1223 T_ACI_F_BF bf = F_BF_NotPresent;
1224 T_ACI_F_ST st = F_ST_NotPresent;
1225 T_ACI_F_JP jp = F_JP_NotPresent;
1226
1227 UBYTE bvr = NOT_PRESENT_8BIT,
1228 bbf = NOT_PRESENT_8BIT,
1229 bjp = NOT_PRESENT_8BIT;
1230
1231
1232 cl = parse(cl,"xdddddxdx",&bvr,&br,&wd,&ln,&df,&ec,&bbf,&st,&bjp);
1233
1234 if (bvr NEQ NOT_PRESENT_8BIT)
1235 vr = (T_ACI_F_VR)bvr;
1236
1237 if (bbf NEQ NOT_PRESENT_8BIT)
1238 bf=(T_ACI_F_BF)bbf;
1239
1240 if (bjp NEQ NOT_PRESENT_8BIT)
1241 jp=(T_ACI_F_JP)bjp;
1242
1243 if ( !cl )
1244 {
1245 cmdAtError(atError);
1246 return ATI_FAIL;
1247 }
1248
1249 #ifdef FF_ATI_BAT
1250 {
1251 T_BAT_cmd_send cmd;
1252 T_BAT_cmd_set_plus_fis my_bat_set_plus_fis;
1253
1254 TRACE_FUNCTION("setatPlusFIS() calls bat_send() <=== as APPLICATION");
1255
1256 memset(&my_bat_set_plus_fis, 0, sizeof(my_bat_set_plus_fis));
1257 cmd.ctrl_params = BAT_CMD_SET_PLUS_FIS;
1258 cmd.params.ptr_set_plus_fis = &my_bat_set_plus_fis;
1259
1260 my_bat_set_plus_fis.vr = vr;
1261 my_bat_set_plus_fis.br = br;
1262 my_bat_set_plus_fis.wd = wd;
1263 my_bat_set_plus_fis.ln = ln;
1264 my_bat_set_plus_fis.df = df;
1265 my_bat_set_plus_fis.ec = ec;
1266 my_bat_set_plus_fis.bf = bf;
1267 my_bat_set_plus_fis.st = st;
1268 my_bat_set_plus_fis.jp = jp;
1269
1270 bat_send(ati_bat_get_client(srcId), &cmd);
1271
1272 return ATI_EXCT; /* executing, because response is passed by callback function */
1273 }
1274 #else /* OLD FUNCTION BODY */
1275
1276 TRACE_FUNCTION("setatPlusFIS()");
1277
1278 ret = sAT_PlusFIS((T_ACI_CMD_SRC)srcId,vr,br,wd,ln,df,ec,bf,st,jp);
1279 if (ret EQ AT_FAIL)
1280 {
1281 cmdAtError(atError);
1282 }
1283 return (map_aci_2_ati_rslt(ret));
1284
1285 #endif /* no FF_ATI_BAT*/
1286 }
1287
1288 GLOBAL T_ATI_RSLT queatPlusFIS (char *cl, UBYTE srcId)
1289 {
1290 T_ACI_RETURN ret = AT_FAIL;
1291 T_ACI_F_VR vr = F_VR_NotPresent;
1292 T_ACI_F_BR br = F_BR_NotPresent;
1293 T_ACI_F_WD wd = F_WD_NotPresent;
1294 T_ACI_F_LN ln = F_LN_NotPresent;
1295 T_ACI_F_DF df = F_DF_NotPresent;
1296 T_ACI_F_EC ec = F_EC_NotPresent;
1297 T_ACI_F_BF bf = F_BF_NotPresent;
1298 T_ACI_F_ST st = F_ST_NotPresent;
1299 T_ACI_F_JP jp = F_JP_NotPresent;
1300
1301 TRACE_FUNCTION("queatPlusFIS()");
1302
1303 ret = qAT_PlusFIS((T_ACI_CMD_SRC)srcId, &vr,&br,&wd,&ln,&df,&ec,&bf,&st,&jp);
1304 if (ret EQ AT_CMPL)
1305 {
1306 sprintf(g_sa,"+FIS:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
1307 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1308 }
1309 else
1310 {
1311 cmdAtError(atError);
1312 }
1313 return (map_aci_2_ati_rslt(ret));
1314 }
1315
1316 /*
1317 +--------------------------------------------------------------------+
1318 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1319 | STATE : code ROUTINE : atPlusFLI |
1320 +--------------------------------------------------------------------+
1321
1322 PURPOSE : +FLI command (Local Station ID)
1323 */
1324
1325 GLOBAL T_ATI_RSLT setatPlusFLI (char *cl, UBYTE srcId)
1326 {
1327 T_ACI_RETURN ret = AT_FAIL;
1328 char idstr[MAX_ID_CHAR]={0};
1329
1330 cl = parse(cl, "s", (LONG)MAX_ID_CHAR, idstr);
1331 if ( !cl )
1332 {
1333 cmdAtError(atError);
1334 return ATI_FAIL;
1335 }
1336 #ifdef FF_ATI_BAT
1337 {
1338 T_BAT_cmd_send cmd;
1339 T_BAT_cmd_set_plus_fli my_bat_set_plus_fli;
1340
1341 TRACE_FUNCTION("setatPlusFLI() calls bat_send() <=== as APPLICATION");
1342
1343 memset(&my_bat_set_plus_fli, 0, sizeof(my_bat_set_plus_fli));
1344 cmd.ctrl_params = BAT_CMD_SET_PLUS_FLI;
1345 cmd.params.ptr_set_plus_fli = &my_bat_set_plus_fli;
1346
1347 my_bat_set_plus_fli.c_id_str = strlen(idstr);
1348 memcpy(my_bat_set_plus_fli.id_str, idstr, my_bat_set_plus_fli.c_id_str);
1349
1350 bat_send(ati_bat_get_client(srcId), &cmd);
1351
1352 return ATI_EXCT; /* executing, because response is passed by callback function */
1353 }
1354 #else /* OLD FUNCTION BODY */
1355
1356 TRACE_FUNCTION("setatPlusFLI()");
1357
1358 ret = sAT_PlusFLI((T_ACI_CMD_SRC)srcId,idstr);
1359 if (ret EQ AT_FAIL)
1360 {
1361 cmdAtError(atError);
1362 }
1363 return (map_aci_2_ati_rslt(ret));
1364
1365 #endif /* no FF_ATI_BAT*/
1366 }
1367
1368 GLOBAL T_ATI_RSLT queatPlusFLI (char *cl, UBYTE srcId)
1369 {
1370 T_ACI_RETURN ret = AT_FAIL;
1371 char idstr[MAX_ID_CHAR]={0};
1372
1373 TRACE_FUNCTION("queatPlusFLI()");
1374
1375 ret = qAT_PlusFLI((T_ACI_CMD_SRC)srcId, idstr);
1376 if (ret EQ AT_CMPL)
1377 {
1378 sprintf(g_sa,"+FLI:\"%s\"",idstr);
1379 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1380 }
1381 else
1382 {
1383 cmdAtError(atError);
1384 }
1385 return (map_aci_2_ati_rslt(ret));
1386 }
1387
1388 /*
1389 +--------------------------------------------------------------------+
1390 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1391 | STATE : code ROUTINE : atPlusFLP |
1392 +--------------------------------------------------------------------+
1393
1394 PURPOSE : +FLP command (document to poll indication)
1395 */
1396
1397 GLOBAL T_ATI_RSLT setatPlusFLP (char *cl, UBYTE srcId)
1398 {
1399 T_ACI_RETURN ret = AT_FAIL;
1400 T_ACI_FLP_VAL val=FLP_VAL_NotPresent;
1401
1402 cl = parse(cl,"d",&val);
1403 if ( !cl)
1404 {
1405 cmdAtError(atError);
1406 return ATI_FAIL;
1407 }
1408 #ifdef FF_ATI_BAT
1409 {
1410 T_BAT_cmd_send cmd;
1411 T_BAT_cmd_set_plus_flp my_bat_set_plus_flp;
1412
1413 TRACE_FUNCTION("setatPlusFLP() calls bat_send() <=== as APPLICATION");
1414
1415 memset(&my_bat_set_plus_flp, 0, sizeof(my_bat_set_plus_flp));
1416 cmd.ctrl_params = BAT_CMD_SET_PLUS_FLP;
1417 cmd.params.ptr_set_plus_flp = &my_bat_set_plus_flp;
1418
1419 my_bat_set_plus_flp.value = val;
1420
1421 bat_send(ati_bat_get_client(srcId), &cmd);
1422
1423 return ATI_EXCT; /* executing, because response is passed by callback function */
1424 }
1425 #else /* OLD FUNCTION BODY */
1426
1427 TRACE_FUNCTION("setatPlusFLP()");
1428
1429 ret = sAT_PlusFLP((T_ACI_CMD_SRC)srcId,val);
1430 if (ret EQ AT_FAIL)
1431 {
1432 cmdAtError(atError);
1433 }
1434 return (map_aci_2_ati_rslt(ret));
1435
1436 #endif /* no FF_ATI_BAT*/
1437 }
1438
1439 GLOBAL T_ATI_RSLT queatPlusFLP (char *cl, UBYTE srcId)
1440 {
1441 T_ACI_RETURN ret = AT_FAIL;
1442 T_ACI_FLP_VAL val=FLP_VAL_NotPresent;
1443
1444 TRACE_FUNCTION("queatPlusFLP()");
1445
1446 ret = qAT_PlusFLP((T_ACI_CMD_SRC)srcId, &val);
1447 if (ret EQ AT_CMPL)
1448 {
1449 sprintf(g_sa,"+FLP:%d",val);
1450 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1451 }
1452 else
1453 {
1454 cmdAtError(atError);
1455 }
1456 return (map_aci_2_ati_rslt(ret));
1457 }
1458
1459 /*
1460 +--------------------------------------------------------------------+
1461 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1462 | STATE : code ROUTINE : atPlusFMS |
1463 +--------------------------------------------------------------------+
1464
1465 PURPOSE : +FMS command (minimum phase C speed)
1466 */
1467
1468 GLOBAL T_ATI_RSLT setatPlusFMS (char *cl, UBYTE srcId)
1469 {
1470 T_ACI_RETURN ret = AT_FAIL;
1471 T_ACI_F_BR val=F_BR_NotPresent;
1472
1473 cl = parse(cl,"d",&val);
1474 if ( !cl)
1475 {
1476 cmdAtError(atError);
1477 return ATI_FAIL;
1478 }
1479 #ifdef FF_ATI_BAT
1480 {
1481 T_BAT_cmd_send cmd;
1482 T_BAT_cmd_set_plus_fms my_bat_set_plus_fms;
1483
1484 TRACE_FUNCTION("setatPlusFMS() calls bat_send() <=== as APPLICATION");
1485
1486 memset(&my_bat_set_plus_fms, 0, sizeof(my_bat_set_plus_fms));
1487 cmd.ctrl_params = BAT_CMD_SET_PLUS_FMS;
1488 cmd.params.ptr_set_plus_fms = &my_bat_set_plus_fms;
1489
1490 my_bat_set_plus_fms.value = val;
1491
1492 bat_send(ati_bat_get_client(srcId), &cmd);
1493
1494 return ATI_EXCT; /* executing, because response is passed by callback function */
1495 }
1496 #else /* OLD FUNCTION BODY */
1497
1498 TRACE_FUNCTION("setatPlusFMS()");
1499
1500 ret = sAT_PlusFMS((T_ACI_CMD_SRC)srcId, val);
1501 if (ret EQ AT_FAIL)
1502 {
1503 cmdAtError(atError);
1504 }
1505 return (map_aci_2_ati_rslt(ret));
1506
1507 #endif /* no FF_ATI_BAT*/
1508 }
1509
1510 GLOBAL T_ATI_RSLT queatPlusFMS (char *cl, UBYTE srcId)
1511 {
1512 T_ACI_RETURN ret = AT_FAIL;
1513 T_ACI_F_BR val=F_BR_NotPresent;
1514
1515 TRACE_FUNCTION("queatPlusFMS()");
1516
1517 ret=qAT_PlusFMS((T_ACI_CMD_SRC)srcId, &val);
1518 if (ret EQ AT_CMPL)
1519 {
1520 sprintf(g_sa,"+FMS:%d",val);
1521 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1522 }
1523 else
1524 {
1525 cmdAtError(atError);
1526 }
1527 return (map_aci_2_ati_rslt(ret));
1528 }
1529
1530 /*
1531 +--------------------------------------------------------------------+
1532 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1533 | STATE : code ROUTINE : atPlusFNR |
1534 +--------------------------------------------------------------------+
1535
1536 PURPOSE : +FNR
1537 */
1538
1539 GLOBAL T_ATI_RSLT setatPlusFNR(char *cl, UBYTE srcId)
1540 {
1541 SHORT r=-1,t=-1,i=-1,n=-1;
1542
1543 cl = parse(cl,"rrrr",&r,&t,&i,&n);
1544 if (!cl OR r > 1 OR t > 1 OR i > 1 OR n > 1
1545 OR (r EQ -1 AND t EQ -1 AND i EQ -1 AND n EQ -1))
1546 {
1547 cmdAtError(atError);
1548 return ATI_FAIL;
1549 }
1550 #ifdef FF_ATI_BAT
1551 {
1552 /*
1553 T_BAT_cmd_send cmd;
1554 T_BAT_cmd_set_plus_fnr my_bat_set_plus_fnr; //???
1555
1556 TRACE_FUNCTION("setatPlusFNR() calls bat_send() <=== as APPLICATION");
1557
1558 memset(&my_bat_set_plus_fnr, 0, sizeof(my_bat_set_plus_fnr));
1559 cmd.ctrl_params = BAT_CMD_SET_PLUS_FNR;
1560 cmd.params.ptr_set_plus_fnr = &my_bat_set_plus_fnr;
1561
1562 my_bat_set_plus_fnr.value = val;
1563 bat_send(ati_bat_get_client(srcId), &cmd);
1564
1565 return ATI_EXCT;
1566 */
1567 TRACE_EVENT("setatPlusFNR(): is obsolete ? <=== !!! consult KJF");
1568 return ATI_FAIL;
1569 }
1570 #else /* OLD FUNCTION BODY */
1571
1572 TRACE_FUNCTION("setatPlusFNR()");
1573 if(r NEQ -1)
1574 fd.FNR.rpr_stat = (char) r;
1575 if(t NEQ -1)
1576 fd.FNR.tpr_stat = (char) t;
1577 if(i NEQ -1)
1578 fd.FNR.idr_stat = (char) i;
1579 if(n NEQ -1)
1580 fd.FNR.nsr_stat = (char) n;
1581 return ATI_CMPL;
1582
1583 #endif /* no FF_ATI_BAT*/
1584 }
1585
1586 GLOBAL T_ATI_RSLT queatPlusFNR(char *cl, UBYTE srcId)
1587 {
1588
1589 TRACE_FUNCTION("queatPlusFNR()");
1590 sprintf(g_sa,"+FNR:%d,%d,%d,%d",fd.FNR.rpr_stat,fd.FNR.tpr_stat,fd.FNR.idr_stat,fd.FNR.nsr_stat);
1591 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1592 return ATI_CMPL;
1593 }
1594
1595 /*
1596 +--------------------------------------------------------------------+
1597 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1598 | STATE : code ROUTINE : atPlusFND |
1599 +--------------------------------------------------------------------+
1600
1601 PURPOSE : +FND command (NSF message data indication)
1602 */
1603
1604 GLOBAL T_ATI_RSLT setatPlusFND (char *cl, UBYTE srcId)
1605 {
1606 T_ACI_RETURN ret = AT_FAIL;
1607 T_ACI_FND_VAL val=FND_VAL_NotPresent;
1608
1609 cl = parse(cl,"d",&val);
1610 if ( !cl)
1611 {
1612 cmdAtError(atError);
1613 return ATI_FAIL;
1614 }
1615 #ifdef FF_ATI_BAT
1616 {
1617 /*
1618 T_BAT_cmd_send cmd;
1619 T_BAT_cmd_set_plus_fnd my_bat_set_plus_fnd; //???
1620
1621 TRACE_FUNCTION("setatPlusFND() calls bat_send() <=== as APPLICATION");
1622
1623 memset(&my_bat_set_plus_fnd, 0, sizeof(my_bat_set_plus_fnd));
1624 cmd.ctrl_params = BAT_CMD_SET_PLUS_FND;
1625 cmd.params.ptr_set_plus_fnd = &my_bat_set_plus_fnd;
1626
1627 my_bat_set_plus_fnd.value = val;
1628 bat_send(ati_bat_get_client(srcId), &cmd);
1629
1630 return ATI_EXCT;
1631 */
1632 TRACE_EVENT("setatPlusFND(): is obsolete ? <=== !!! consult KJF");
1633 return ATI_FAIL;
1634 }
1635 #else /* OLD FUNCTION BODY */
1636
1637 TRACE_FUNCTION("setatPlusFND()");
1638
1639 ret = sAT_PlusFND((T_ACI_CMD_SRC)srcId,val);
1640 if (ret EQ AT_FAIL)
1641 {
1642 cmdAtError(atError);
1643 }
1644 return (map_aci_2_ati_rslt(ret));
1645
1646 #endif /* no FF_ATI_BAT*/
1647 }
1648
1649 GLOBAL T_ATI_RSLT queatPlusFND (char *cl, UBYTE srcId)
1650 {
1651 T_ACI_RETURN ret = AT_FAIL;
1652 T_ACI_FND_VAL val=FND_VAL_NotPresent;
1653
1654 TRACE_FUNCTION("queatPlusFND()");
1655
1656 ret = qAT_PlusFND((T_ACI_CMD_SRC)srcId, &val);
1657 if (ret EQ AT_CMPL)
1658 {
1659 sprintf(g_sa,"+FND:%d",val);
1660 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1661 }
1662 else
1663 {
1664 cmdAtError(atError);
1665 }
1666 return (map_aci_2_ati_rslt(ret));
1667 }
1668
1669 /*
1670 +--------------------------------------------------------------------+
1671 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1672 | STATE : code ROUTINE : atPlusFNS |
1673 +--------------------------------------------------------------------+
1674
1675 PURPOSE : +FNS command (non standard facilities)
1676 */
1677
1678 GLOBAL T_ATI_RSLT setatPlusFNS (char *cl, UBYTE srcId)
1679 {
1680 char *me="+FNS:"; /* weird...!! */
1681 T_ACI_RETURN ret = AT_FAIL;
1682 UBYTE len=0;
1683 UBYTE nsf[90];
1684 LOCAL char nsf_str[269]={0};
1685 char buf [3];
1686 SHORT i=0;
1687
1688 cl = parse(cl, "s", (LONG)269, nsf_str);
1689 if ( !cl )
1690 {
1691 cmdAtError(atError);
1692 return ATI_FAIL;
1693 }
1694
1695 compact(nsf_str,(USHORT)strlen(nsf_str));
1696 while (nsf_str[i] NEQ '\0')
1697 {
1698 buf[0]=nsf_str[i++];
1699 buf[1]=nsf_str[i++];
1700 buf[2]='\0';
1701 me = parse (buf, "x", &nsf[len++]);
1702 if (!me)
1703 {
1704 cmdAtError(atError);
1705 return ATI_FAIL;
1706 }
1707 }
1708 #ifdef FF_ATI_BAT
1709 {
1710 T_BAT_cmd_send cmd;
1711 T_BAT_cmd_set_plus_fns my_bat_set_plus_fns;
1712
1713 TRACE_FUNCTION("setatPlusFNS() calls bat_send() <=== as APPLICATION");
1714
1715 memset(&my_bat_set_plus_fns, 0, sizeof(my_bat_set_plus_fns));
1716 cmd.ctrl_params = BAT_CMD_SET_PLUS_FNS;
1717 cmd.params.ptr_set_plus_fns = &my_bat_set_plus_fns;
1718
1719 my_bat_set_plus_fns.v_nsf = TRUE;
1720 my_bat_set_plus_fns.c_nsf = len;
1721 memcpy(my_bat_set_plus_fns.nsf, nsf, len);
1722
1723 bat_send(ati_bat_get_client(srcId), &cmd);
1724
1725 return ATI_EXCT; /* executing, because response is passed by callback function */
1726 }
1727 #else /* OLD FUNCTION BODY */
1728
1729 TRACE_FUNCTION("setatPlusFNS()");
1730
1731 ret = sAT_PlusFNS((T_ACI_CMD_SRC)srcId, len, nsf);
1732 if (ret EQ AT_FAIL)
1733 {
1734 cmdAtError(atError);
1735 }
1736 return (map_aci_2_ati_rslt(ret));
1737
1738 #endif /* no FF_ATI_BAT*/
1739 }
1740
1741 GLOBAL T_ATI_RSLT queatPlusFNS (char *cl, UBYTE srcId)
1742 {
1743 T_ACI_RETURN ret = AT_FAIL;
1744 UBYTE len=0;
1745 UBYTE nsf[90];
1746
1747 TRACE_FUNCTION("queatPlusFNS()");
1748
1749 ret=qAT_PlusFNS((T_ACI_CMD_SRC)srcId, &len, nsf);
1750 if (ret EQ AT_CMPL)
1751 {
1752 strcpy(g_sa,"+FNS:");
1753 OutHexReport(srcId, (USHORT)len, nsf);
1754 }
1755 else
1756 {
1757 cmdAtError(atError);
1758 }
1759 return (map_aci_2_ati_rslt(ret));
1760 }
1761
1762 /*
1763 +--------------------------------------------------------------------+
1764 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1765 | STATE : code ROUTINE : atPlusFPA |
1766 +--------------------------------------------------------------------+
1767
1768 PURPOSE : +FPA command (selective polling address string)
1769 */
1770
1771 GLOBAL T_ATI_RSLT setatPlusFPA (char *cl, UBYTE srcId)
1772 {
1773 T_ACI_RETURN ret = AT_FAIL;
1774 char sepstr[MAX_ID_CHAR]={0};
1775
1776 cl =parse(cl,"s",(LONG)MAX_ID_CHAR,sepstr);
1777 if (!cl)
1778 {
1779 cmdAtError(atError);
1780 return ATI_FAIL;
1781 }
1782 #ifdef FF_ATI_BAT
1783 {
1784 T_BAT_cmd_send cmd;
1785 T_BAT_cmd_set_plus_fpa my_bat_set_plus_fpa;
1786
1787 TRACE_FUNCTION("setatPlusFPA() calls bat_send() <=== as APPLICATION");
1788
1789 memset(&my_bat_set_plus_fpa, 0, sizeof(my_bat_set_plus_fpa));
1790 cmd.ctrl_params = BAT_CMD_SET_PLUS_FPA;
1791 cmd.params.ptr_set_plus_fpa = &my_bat_set_plus_fpa;
1792
1793 my_bat_set_plus_fpa.c_spa_str = strlen(sepstr);
1794 memcpy(my_bat_set_plus_fpa.spa_str, sepstr, my_bat_set_plus_fpa.c_spa_str);
1795
1796 bat_send(ati_bat_get_client(srcId), &cmd);
1797
1798 return ATI_EXCT; /* executing, because response is passed by callback function */
1799 }
1800 #else /* OLD FUNCTION BODY */
1801
1802 TRACE_FUNCTION("setatPlusFPA()");
1803
1804 ret = sAT_PlusFPA((T_ACI_CMD_SRC)srcId, sepstr);
1805 if (ret EQ AT_FAIL)
1806 {
1807 cmdAtError(atError);
1808 }
1809 return (map_aci_2_ati_rslt(ret));
1810
1811 #endif /* no FF_ATI_BAT*/
1812 }
1813
1814 GLOBAL T_ATI_RSLT queatPlusFPA (char *cl, UBYTE srcId)
1815 {
1816 T_ACI_RETURN ret = AT_FAIL;
1817 char sepstr[MAX_ID_CHAR]={0};
1818
1819 TRACE_FUNCTION("atPlusFPA()");
1820
1821 ret = qAT_PlusFPA((T_ACI_CMD_SRC)srcId, sepstr);
1822 if (ret EQ AT_CMPL)
1823 {
1824 sprintf(g_sa,"+FPA:\"%s\"",sepstr);
1825 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1826 }
1827 else
1828 {
1829 cmdAtError(atError);
1830 }
1831 return (map_aci_2_ati_rslt(ret));
1832 }
1833
1834 /*
1835 +--------------------------------------------------------------------+
1836 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1837 | STATE : code ROUTINE : atPlusFPI |
1838 +--------------------------------------------------------------------+
1839
1840 PURPOSE : +FPI command (local fax station id string)
1841 */
1842
1843 GLOBAL T_ATI_RSLT setatPlusFPI (char *cl, UBYTE srcId)
1844 {
1845 T_ACI_RETURN ret = AT_FAIL;
1846 char idstr[MAX_ID_CHAR] = {0};
1847
1848 cl = parse(cl, "s", (LONG)MAX_ID_CHAR, idstr);
1849 if (!cl)
1850 {
1851 cmdAtError(atError);
1852 return ATI_FAIL;
1853 }
1854 #ifdef FF_ATI_BAT
1855 {
1856 T_BAT_cmd_send cmd;
1857 T_BAT_cmd_set_plus_fpi my_bat_set_plus_fpi;
1858
1859 TRACE_FUNCTION("setatPlusFPI() calls bat_send() <=== as APPLICATION");
1860
1861 memset(&my_bat_set_plus_fpi, 0, sizeof(my_bat_set_plus_fpi));
1862 cmd.ctrl_params = BAT_CMD_SET_PLUS_FPI;
1863 cmd.params.ptr_set_plus_fpi = &my_bat_set_plus_fpi;
1864
1865 my_bat_set_plus_fpi.c_id_str = strlen(idstr);
1866 memcpy(my_bat_set_plus_fpi.id_str, idstr, my_bat_set_plus_fpi.c_id_str);
1867
1868 bat_send(ati_bat_get_client(srcId), &cmd);
1869
1870 return ATI_EXCT; /* executing, because response is passed by callback function */
1871 }
1872 #else /* OLD FUNCTION BODY */
1873
1874 TRACE_FUNCTION("setatPlusFPI()");
1875
1876 ret = sAT_PlusFPI((T_ACI_CMD_SRC)srcId, idstr);
1877 if (ret EQ AT_FAIL)
1878 {
1879 cmdAtError(atError);
1880 }
1881 return (map_aci_2_ati_rslt(ret));
1882
1883 #endif /* no FF_ATI_BAT*/
1884 }
1885
1886 GLOBAL T_ATI_RSLT queatPlusFPI (char *cl, UBYTE srcId)
1887 {
1888 T_ACI_RETURN ret = AT_FAIL;
1889 char idstr[MAX_ID_CHAR]={0};
1890
1891 TRACE_FUNCTION("queatPlusFPI()");
1892
1893 ret = qAT_PlusFPI((T_ACI_CMD_SRC)srcId, idstr);
1894 if (ret EQ AT_CMPL)
1895 {
1896 sprintf(g_sa,"+FPI:\"%s\"",idstr);
1897 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1898 }
1899 else
1900 {
1901 cmdAtError(atError);
1902 }
1903 return (map_aci_2_ati_rslt(ret));
1904 }
1905
1906 /*
1907 +--------------------------------------------------------------------+
1908 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1909 | STATE : code ROUTINE : atPlusFPS |
1910 +--------------------------------------------------------------------+
1911
1912 PURPOSE : +FPS command (page status)
1913 */
1914
1915 GLOBAL T_ATI_RSLT setatPlusFPS (char *cl, UBYTE srcId)
1916 {
1917 T_ACI_RETURN ret = AT_FAIL;
1918 T_ACI_FPS_PPR ppr=FPS_PPR_NotPresent;
1919
1920 cl = parse(cl,"d",&ppr);
1921 if ( !cl)
1922 {
1923 cmdAtError(atError);
1924 return ATI_FAIL;
1925 }
1926 #ifdef FF_ATI_BAT
1927 {
1928 T_BAT_cmd_send cmd;
1929 T_BAT_cmd_set_plus_fps my_bat_set_plus_fps;
1930
1931 TRACE_FUNCTION("setatPlusFPS() calls bat_send() <=== as APPLICATION");
1932
1933 memset(&my_bat_set_plus_fps, 0, sizeof(my_bat_set_plus_fps));
1934 cmd.ctrl_params = BAT_CMD_SET_PLUS_FPS;
1935 cmd.params.ptr_set_plus_fps = &my_bat_set_plus_fps;
1936
1937 my_bat_set_plus_fps.ppr = ppr;
1938
1939 bat_send(ati_bat_get_client(srcId), &cmd);
1940
1941 return ATI_EXCT; /* executing, because response is passed by callback function */
1942 }
1943 #else /* OLD FUNCTION BODY */
1944
1945 TRACE_FUNCTION("setatPlusFPS()");
1946
1947 ret = sAT_PlusFPS((T_ACI_CMD_SRC)srcId, ppr);
1948 if (ret EQ AT_FAIL)
1949 {
1950 cmdAtError(atError);
1951 }
1952 return (map_aci_2_ati_rslt(ret));
1953
1954 #endif /* no FF_ATI_BAT*/
1955 }
1956
1957 GLOBAL T_ATI_RSLT queatPlusFPS (char *cl, UBYTE srcId)
1958 {
1959 T_ACI_RETURN ret = AT_FAIL;
1960 T_ACI_FPS_PPR ppr=FPS_PPR_NotPresent;
1961
1962 TRACE_FUNCTION("queatPlusFPS()");
1963
1964 ret = qAT_PlusFPS((T_ACI_CMD_SRC)srcId, &ppr);
1965 if (ret EQ AT_CMPL)
1966 {
1967 sprintf(g_sa,"+FPS:%d",ppr);
1968 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
1969 }
1970 else
1971 {
1972 cmdAtError(atError);
1973 }
1974 return (map_aci_2_ati_rslt(ret));
1975 }
1976
1977 /*
1978 +--------------------------------------------------------------------+
1979 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
1980 | STATE : code ROUTINE : atPlusFPW |
1981 +--------------------------------------------------------------------+
1982
1983 PURPOSE : +FPW command (password string)
1984 */
1985
1986 GLOBAL T_ATI_RSLT setatPlusFPW (char *cl, UBYTE srcId)
1987 {
1988 T_ACI_RETURN ret = AT_FAIL;
1989 char pwdstr[MAX_ID_CHAR]={0};
1990
1991 cl = parse(cl,"s",(LONG)MAX_ID_CHAR,pwdstr);
1992 if (!cl)
1993 {
1994 cmdAtError(atError);
1995 return ATI_FAIL;
1996 }
1997 #ifdef FF_ATI_BAT
1998 {
1999 T_BAT_cmd_send cmd;
2000 T_BAT_cmd_set_plus_fpw my_bat_set_plus_fpw;
2001
2002 TRACE_FUNCTION("setatPlusFPW() calls bat_send() <=== as APPLICATION");
2003
2004 memset(&my_bat_set_plus_fpw, 0, sizeof(my_bat_set_plus_fpw));
2005 cmd.ctrl_params = BAT_CMD_SET_PLUS_FPW;
2006 cmd.params.ptr_set_plus_fpw = &my_bat_set_plus_fpw;
2007
2008 my_bat_set_plus_fpw.c_pw_str = strlen(pwdstr);
2009 memcpy(my_bat_set_plus_fpw.pw_str, pwdstr, my_bat_set_plus_fpw.c_pw_str);
2010
2011 bat_send(ati_bat_get_client(srcId), &cmd);
2012
2013 return ATI_EXCT; /* executing, because response is passed by callback function */
2014 }
2015 #else /* OLD FUNCTION BODY */
2016
2017 TRACE_FUNCTION("setatPlusFPW()");
2018
2019 ret = sAT_PlusFPW((T_ACI_CMD_SRC)srcId, pwdstr);
2020 if (ret EQ AT_FAIL)
2021 {
2022 cmdAtError(atError);
2023 }
2024 return (map_aci_2_ati_rslt(ret));
2025
2026 #endif /* no FF_ATI_BAT*/
2027 }
2028
2029 GLOBAL T_ATI_RSLT queatPlusFPW (char *cl, UBYTE srcId)
2030 {
2031 T_ACI_RETURN ret = AT_FAIL;
2032 char pwdstr[MAX_ID_CHAR]={0};
2033
2034 TRACE_FUNCTION("queatPlusFPW()");
2035
2036 ret = qAT_PlusFPW((T_ACI_CMD_SRC)srcId, pwdstr);
2037 if (ret EQ AT_CMPL)
2038 {
2039 sprintf(g_sa,"+FPW:\"%s\"",pwdstr);
2040 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2041 }
2042 else
2043 {
2044 cmdAtError(atError);
2045 }
2046 return (map_aci_2_ati_rslt(ret));
2047 }
2048
2049 /*
2050 +--------------------------------------------------------------------+
2051 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2052 | STATE : code ROUTINE : atPlusFRQ |
2053 +--------------------------------------------------------------------+
2054
2055 PURPOSE : +FRQ command (quality control)
2056 */
2057
2058 GLOBAL T_ATI_RSLT setatPlusFRQ (char *cl, UBYTE srcId)
2059 {
2060 T_ACI_RETURN ret = AT_FAIL;
2061 UBYTE pgl = NOT_PRESENT_8BIT,
2062 cbl = NOT_PRESENT_8BIT;
2063
2064 cl = parse(cl,"xx",&pgl,&cbl);
2065 if ( !cl )
2066 {
2067 cmdAtError(atError);
2068 return ATI_FAIL;
2069 }
2070 #ifdef FF_ATI_BAT
2071 {
2072 T_BAT_cmd_send cmd;
2073 T_BAT_cmd_set_plus_frq my_bat_set_plus_frq;
2074
2075 TRACE_FUNCTION("setatPlusFRQ() calls bat_send() <=== as APPLICATION");
2076
2077 memset(&my_bat_set_plus_frq, 0, sizeof(my_bat_set_plus_frq));
2078 cmd.ctrl_params = BAT_CMD_SET_PLUS_FRQ;
2079 cmd.params.ptr_set_plus_frq = &my_bat_set_plus_frq;
2080
2081 my_bat_set_plus_frq.pgl = pgl;
2082 my_bat_set_plus_frq.cbl = cbl;
2083
2084 bat_send(ati_bat_get_client(srcId), &cmd);
2085
2086 return ATI_EXCT; /* executing, because response is passed by callback function */
2087 }
2088 #else /* OLD FUNCTION BODY */
2089
2090 TRACE_FUNCTION("setatPlusFRQ()");
2091
2092 ret = sAT_PlusFRQ((T_ACI_CMD_SRC)srcId, pgl, cbl);
2093 if (ret EQ AT_FAIL)
2094 {
2095 cmdAtError(atError);
2096 }
2097 return (map_aci_2_ati_rslt(ret));
2098
2099 #endif /* no FF_ATI_BAT*/
2100 }
2101
2102 GLOBAL T_ATI_RSLT queatPlusFRQ (char *cl, UBYTE srcId)
2103 {
2104 T_ACI_RETURN ret = AT_FAIL;
2105 SHORT pgl = ACI_NumParmNotPresent,
2106 cbl = ACI_NumParmNotPresent;
2107
2108 TRACE_FUNCTION("queatPlusFRQ()");
2109
2110 ret = qAT_PlusFRQ((T_ACI_CMD_SRC)srcId, &pgl,&cbl);
2111 if (ret EQ AT_CMPL)
2112 {
2113 sprintf(g_sa,"+FRQ:%X,%X",pgl,cbl);
2114 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2115 }
2116 else
2117 {
2118 cmdAtError(atError);
2119 }
2120 return (map_aci_2_ati_rslt(ret));
2121 }
2122
2123 /*
2124 +--------------------------------------------------------------------+
2125 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2126 | STATE : code ROUTINE : atPlusFCT |
2127 +--------------------------------------------------------------------+
2128
2129 PURPOSE : +FCT command (phase C response timeout)
2130 */
2131
2132 GLOBAL T_ATI_RSLT setatPlusFCT (char *cl, UBYTE srcId)
2133 {
2134 T_ACI_RETURN ret = AT_FAIL;
2135 UBYTE val = NOT_PRESENT_8BIT;
2136
2137 cl = parse(cl,"x",&val);
2138 if ( !cl )
2139 {
2140 cmdAtError(atError);
2141 return ATI_FAIL;
2142 }
2143 #ifdef FF_ATI_BAT
2144 {
2145 T_BAT_cmd_send cmd;
2146 T_BAT_cmd_set_plus_fct my_bat_set_plus_fct;
2147
2148 TRACE_FUNCTION("setatPlusFCT() calls bat_send() <=== as APPLICATION");
2149
2150 memset(&my_bat_set_plus_fct, 0, sizeof(my_bat_set_plus_fct));
2151 cmd.ctrl_params = BAT_CMD_SET_PLUS_FCT;
2152 cmd.params.ptr_set_plus_fct = &my_bat_set_plus_fct;
2153
2154 my_bat_set_plus_fct.value = val;
2155
2156 bat_send(ati_bat_get_client(srcId), &cmd);
2157
2158 return ATI_EXCT; /* executing, because response is passed by callback function */
2159 }
2160 #else /* OLD FUNCTION BODY */
2161
2162 TRACE_FUNCTION("setatPlusFCT()");
2163
2164 ret = sAT_PlusFCT((T_ACI_CMD_SRC)srcId,val);
2165 if (ret EQ AT_FAIL)
2166 {
2167 cmdAtError(atError);
2168 }
2169 return (map_aci_2_ati_rslt(ret));
2170
2171 #endif /* no FF_ATI_BAT*/
2172 }
2173
2174 GLOBAL T_ATI_RSLT queatPlusFCT (char *cl, UBYTE srcId)
2175 {
2176 T_ACI_RETURN ret = AT_FAIL;
2177 SHORT val=-1;
2178
2179 TRACE_FUNCTION("queatPlusFCT()");
2180
2181 ret = qAT_PlusFCT((T_ACI_CMD_SRC)srcId,(SHORT*)&val);
2182 if (ret EQ AT_CMPL)
2183 {
2184 sprintf(g_sa,"+FCT:%X",val);
2185 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2186 }
2187 else
2188 {
2189 cmdAtError(atError);
2190 }
2191 return (map_aci_2_ati_rslt(ret));
2192 }
2193
2194 /*
2195 +--------------------------------------------------------------------+
2196 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2197 | STATE : code ROUTINE : atPlusFSA |
2198 +--------------------------------------------------------------------+
2199
2200 PURPOSE : +FSA command (destination subaddress string)
2201 */
2202
2203 GLOBAL T_ATI_RSLT setatPlusFSA (char *cl, UBYTE srcId)
2204 {
2205 T_ACI_RETURN ret = AT_FAIL;
2206 char substr[MAX_ID_CHAR]={0};
2207
2208 cl = parse(cl,"s",(LONG)MAX_ID_CHAR,substr);
2209 if (!cl)
2210 {
2211 cmdAtError(atError);
2212 return ATI_FAIL;
2213 }
2214 #ifdef FF_ATI_BAT
2215 {
2216 T_BAT_cmd_send cmd;
2217 T_BAT_cmd_set_plus_fsa my_bat_set_plus_fsa;
2218
2219 TRACE_FUNCTION("setatPlusFSA() calls bat_send() <=== as APPLICATION");
2220
2221 memset(&my_bat_set_plus_fsa, 0, sizeof(my_bat_set_plus_fsa));
2222 cmd.ctrl_params = BAT_CMD_SET_PLUS_FSA;
2223 cmd.params.ptr_set_plus_fsa = &my_bat_set_plus_fsa;
2224
2225 my_bat_set_plus_fsa.c_sub_str = strlen(substr);
2226 memcpy(my_bat_set_plus_fsa.sub_str, substr, my_bat_set_plus_fsa.c_sub_str);
2227
2228 bat_send(ati_bat_get_client(srcId), &cmd);
2229
2230 return ATI_EXCT; /* executing, because response is passed by callback function */
2231 }
2232 #else /* OLD FUNCTION BODY */
2233
2234 TRACE_FUNCTION("setatPlusFSA()");
2235
2236 ret = sAT_PlusFSA((T_ACI_CMD_SRC)srcId, substr);
2237 if (ret EQ AT_FAIL)
2238 {
2239 cmdAtError(atError);
2240 }
2241 return (map_aci_2_ati_rslt(ret));
2242
2243 #endif /* no FF_ATI_BAT*/
2244 }
2245
2246 GLOBAL T_ATI_RSLT queatPlusFSA (char *cl, UBYTE srcId)
2247 {
2248 T_ACI_RETURN ret = AT_FAIL;
2249 char substr[MAX_ID_CHAR]={0};
2250
2251 TRACE_FUNCTION("queatPlusFSA()");
2252
2253 ret = qAT_PlusFSA((T_ACI_CMD_SRC)srcId, substr);
2254 if (ret EQ AT_CMPL)
2255 {
2256 sprintf(g_sa,"+FSA:\"%s\"",substr);
2257 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2258 }
2259 else
2260 {
2261 cmdAtError(atError);
2262 }
2263 return (map_aci_2_ati_rslt(ret));
2264 }
2265
2266 /*
2267 +--------------------------------------------------------------------+
2268 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2269 | STATE : code ROUTINE : atPlusFSP |
2270 +--------------------------------------------------------------------+
2271
2272 PURPOSE : +FSP command (document to poll indication)
2273 */
2274
2275 GLOBAL T_ATI_RSLT setatPlusFSP (char *cl, UBYTE srcId)
2276 {
2277 T_ACI_RETURN ret = AT_FAIL;
2278 T_ACI_FSP_VAL val=FSP_VAL_NotPresent;
2279
2280 cl = parse(cl, "d", &val);
2281 if ( !cl )
2282 {
2283 cmdAtError(atError);
2284 return ATI_FAIL;
2285 }
2286 #ifdef FF_ATI_BAT
2287 {
2288 T_BAT_cmd_send cmd;
2289 T_BAT_cmd_set_plus_fsp my_bat_set_plus_fsp;
2290
2291 TRACE_FUNCTION("setatPlusFSP() calls bat_send() <=== as APPLICATION");
2292
2293 memset(&my_bat_set_plus_fsp, 0, sizeof(my_bat_set_plus_fsp));
2294 cmd.ctrl_params = BAT_CMD_SET_PLUS_FSP;
2295 cmd.params.ptr_set_plus_fsp = &my_bat_set_plus_fsp;
2296
2297 my_bat_set_plus_fsp.poll = val;
2298
2299 bat_send(ati_bat_get_client(srcId), &cmd);
2300
2301 return ATI_EXCT; /* executing, because response is passed by callback function */
2302 }
2303 #else /* OLD FUNCTION BODY */
2304
2305 TRACE_FUNCTION("setatPlusFSP()");
2306
2307 ret = sAT_PlusFSP((T_ACI_CMD_SRC)srcId, val);
2308 if (ret EQ AT_FAIL)
2309 {
2310 cmdAtError(atError);
2311 }
2312 return (map_aci_2_ati_rslt(ret));
2313
2314 #endif /* no FF_ATI_BAT*/
2315 }
2316
2317 GLOBAL T_ATI_RSLT queatPlusFSP (char *cl, UBYTE srcId)
2318 {
2319 T_ACI_RETURN ret = AT_FAIL;
2320 T_ACI_FSP_VAL val=FSP_VAL_NotPresent;
2321
2322 TRACE_FUNCTION("queatPlusFSP()");
2323
2324 ret = qAT_PlusFSP((T_ACI_CMD_SRC)srcId, &val);
2325 if (ret EQ AT_CMPL)
2326 {
2327 sprintf(g_sa,"+FSP:%d",val);
2328 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2329 }
2330 else
2331 {
2332 cmdAtError(atError);
2333 }
2334 return (map_aci_2_ati_rslt(ret));
2335 }
2336
2337 /*--------- Action Commands -------------------------------------*/
2338
2339
2340
2341 /*
2342 +--------------------------------------------------------------------+
2343 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2344 | STATE : code ROUTINE : atPlusFDT |
2345 +--------------------------------------------------------------------+
2346
2347 PURPOSE : +FDT command (data transmission)
2348 */
2349
2350 GLOBAL T_ATI_RSLT setatPlusFDT(char *cl, UBYTE srcId)
2351 {
2352 T_ACI_RETURN ret = AT_FAIL;
2353
2354 TRACE_FUNCTION("setatPlusFDT()");
2355 ret = sAT_PlusFDT((T_ACI_CMD_SRC)srcId);
2356 if (ret EQ AT_FAIL)
2357 {
2358 cmdAtError(atError);
2359 }
2360 return (map_aci_2_ati_rslt(ret));
2361 }
2362
2363 /*
2364 +--------------------------------------------------------------------+
2365 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2366 | STATE : code ROUTINE : atPlusFDR |
2367 +--------------------------------------------------------------------+
2368
2369 PURPOSE : +FDR command (data reception)
2370 */
2371
2372 GLOBAL T_ATI_RSLT setatPlusFDR(char *cl, UBYTE srcId)
2373 {
2374 T_ACI_RETURN ret = AT_FAIL;
2375
2376 TRACE_FUNCTION("setatPlusFDR()");
2377
2378 ret = sAT_PlusFDR((T_ACI_CMD_SRC)srcId);
2379 if (ret EQ AT_FAIL)
2380 {
2381 cmdAtError(atError);
2382 }
2383 return (map_aci_2_ati_rslt(ret));
2384 }
2385
2386 /*
2387 +--------------------------------------------------------------------+
2388 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2389 | STATE : code ROUTINE : atPlusFIP |
2390 +--------------------------------------------------------------------+
2391
2392 PURPOSE :
2393
2394 ITU-T.32/8.3.6 Initialize facsimile parameters, +FIP
2395
2396 – Syntax: +FIP[=<value>]
2397
2398 The +FIP command causes the DCE
2399 to initialize all Service Class 2 Facsimile Parameters
2400 to the manufacturer determined default settings.
2401
2402 This command does not change the setting of +FCLASS.
2403 This command has the same effect as if the DTE had issued
2404 individual parameter setting commands.
2405
2406 Manufacturers may also provide a selection of default profiles,
2407 chosen by the optional <value>.
2408
2409 If <value> is unspecified or 0, the parameters shall be set to those
2410 specified in this Recommendation (e.g. Appendix I).
2411
2412 For other <value>s, the manufacturer determines the profile settings.
2413
2414 This command may be issued during a session.
2415
2416 The DCE shall use the new settings at the next time they are sampled;
2417 for example, a new +FIS setting would be used the next time
2418 the DCE enters Phase B.
2419 */
2420
2421 GLOBAL T_ATI_RSLT setatPlusFIP(char *cl, UBYTE srcId)
2422 {
2423 T_ACI_RETURN ret = AT_FAIL;
2424
2425 #ifdef FF_ATI_BAT
2426 {
2427 /*
2428 T_BAT_cmd_send cmd;
2429 T_BAT_cmd_set_plus_fip my_bat_set_plus_fip; //???
2430
2431 TRACE_FUNCTION("setatPlusFIP() calls bat_send() <=== as APPLICATION");
2432
2433 memset(&my_bat_set_plus_fip, 0, sizeof(my_bat_set_plus_fip));
2434 cmd.ctrl_params = BAT_CMD_SET_PLUS_FIP;
2435 cmd.params.ptr_set_plus_fip = &my_bat_set_plus_fip;
2436
2437 my_bat_set_plus_fip.value = val;
2438 bat_send(ati_bat_get_client(srcId), &cmd);
2439
2440 return ATI_EXCT;
2441 */
2442 TRACE_EVENT("setatPlusFIP(): is obsolete ? <=== !!! consult KJF");
2443 return ATI_FAIL;
2444 }
2445 #else /* OLD FUNCTION BODY */
2446
2447 TRACE_FUNCTION("setatPlusFIP()");
2448
2449 ret = sAT_PlusFIP((T_ACI_CMD_SRC)srcId);
2450 if (ret EQ AT_FAIL)
2451 {
2452 cmdAtError(atError);
2453 }
2454 return (map_aci_2_ati_rslt(ret));
2455 /*
2456 * sAT_PlusFIP always returns AT_CMPL in the present implementation
2457 * and so setatPlusFIP always results in an error ..
2458 * this happens for example in testcase ACIFD052
2459 */
2460
2461 #endif /* no FF_ATI_BAT*/
2462 }
2463
2464 /*
2465 +--------------------------------------------------------------------+
2466 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2467 | STATE : code ROUTINE : atPlusFKS |
2468 +--------------------------------------------------------------------+
2469
2470 PURPOSE : +FKS command (terminate)
2471 */
2472
2473 GLOBAL T_ATI_RSLT setatPlusFKS(char *cl, UBYTE srcId)
2474 {
2475 T_ACI_RETURN ret = AT_FAIL;
2476
2477 #ifdef FF_ATI_BAT
2478 {
2479 T_BAT_cmd_send cmd;
2480 /*
2481 T_BAT_cmd_set_plus_fks my_bat_set_plus_fks; //???
2482
2483 TRACE_FUNCTION("setatPlusFKS() calls bat_send() <=== as APPLICATION");
2484
2485 memset(&my_bat_set_plus_fks, 0, sizeof(my_bat_set_plus_fks));
2486 cmd.ctrl_params = BAT_CMD_SET_PLUS_FKS;
2487 cmd.params.ptr_set_plus_fks = &my_bat_set_plus_fks;
2488
2489 my_bat_set_plus_fks.value = val;
2490 */
2491 bat_send(ati_bat_get_client(srcId), &cmd);
2492
2493 return ATI_EXCT; /* executing, because response is passed by callback function */
2494 }
2495 #else /* OLD FUNCTION BODY */
2496
2497 TRACE_FUNCTION("setatPlusFKS()");
2498
2499 ret = sAT_PlusFKS((T_ACI_CMD_SRC)srcId);
2500 if (ret EQ AT_FAIL)
2501 {
2502 cmdAtError(atError);
2503 }
2504 return (map_aci_2_ati_rslt(ret));
2505
2506 #endif /* no FF_ATI_BAT*/
2507 }
2508
2509 /*
2510 +--------------------------------------------------------------------+
2511 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2512 | STATE : code ROUTINE : atPlusFIT |
2513 +--------------------------------------------------------------------+
2514
2515 PURPOSE : +FIT command (inactivity timeout)
2516 */
2517
2518 GLOBAL T_ATI_RSLT setatPlusFIT (char *cl, UBYTE srcId)
2519 {
2520 T_ACI_RETURN ret = AT_FAIL;
2521 T_ACI_FIT_ACT act = FIT_ACT_NotPresent;
2522 SHORT time = ACI_NumParmNotPresent;
2523
2524 cl = parse(cl,"dd",&time,&act);
2525 if ( !cl)
2526 {
2527 cmdAtError(atError);
2528 return ATI_FAIL;
2529 }
2530 #ifdef FF_ATI_BAT
2531 {
2532 T_BAT_cmd_send cmd;
2533 T_BAT_cmd_set_plus_fit my_bat_set_plus_fit;
2534
2535 TRACE_FUNCTION("setatPlusFIT() calls bat_send() <=== as APPLICATION");
2536
2537 memset(&my_bat_set_plus_fit, 0, sizeof(my_bat_set_plus_fit));
2538 cmd.ctrl_params = BAT_CMD_SET_PLUS_FIT;
2539 cmd.params.ptr_set_plus_fit = &my_bat_set_plus_fit;
2540
2541 my_bat_set_plus_fit.time = time;
2542 my_bat_set_plus_fit.action = act;
2543
2544 bat_send(ati_bat_get_client(srcId), &cmd);
2545
2546 return ATI_EXCT; /* executing, because response is passed by callback function */
2547 }
2548 #else /* OLD FUNCTION BODY */
2549
2550 TRACE_FUNCTION("setatPlusFIT()");
2551
2552 ret = sAT_PlusFIT((T_ACI_CMD_SRC)srcId, time, act);
2553 if (ret EQ AT_FAIL)
2554 {
2555 cmdAtError(atError);
2556 }
2557 return (map_aci_2_ati_rslt(ret));
2558
2559 #endif /* no FF_ATI_BAT*/
2560 }
2561
2562 GLOBAL T_ATI_RSLT queatPlusFIT (char *cl, UBYTE srcId)
2563 {
2564 T_ACI_RETURN ret = AT_FAIL;
2565 T_ACI_FIT_ACT act = FIT_ACT_NotPresent;
2566 SHORT time = ACI_NumParmNotPresent;
2567
2568 TRACE_FUNCTION("queatPlusFIT()");
2569
2570 ret = qAT_PlusFIT((T_ACI_CMD_SRC)srcId, &time, &act);
2571 if (ret EQ AT_CMPL)
2572 {
2573 sprintf(g_sa,"+FIT:%d,%d",time,act);
2574 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2575 }
2576 else
2577 {
2578 cmdAtError(atError);
2579 }
2580 return (map_aci_2_ati_rslt(ret));
2581 }
2582
2583 /*
2584 +--------------------------------------------------------------------+
2585 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2586 | STATE : code ROUTINE : atPlusFBO |
2587 +--------------------------------------------------------------------+
2588
2589 PURPOSE : +FBO command (data bit order)
2590 */
2591
2592 GLOBAL T_ATI_RSLT setatPlusFBO (char *cl, UBYTE srcId)
2593 {
2594 T_ACI_RETURN ret = AT_FAIL;
2595 T_ACI_FBO_VAL val = FBO_VAL_NotPresent;
2596
2597 cl = parse(cl,"d",&val);
2598 if ( !cl)
2599 {
2600 cmdAtError(atError);
2601 return ATI_FAIL;
2602 }
2603 #ifdef FF_ATI_BAT
2604 {
2605 T_BAT_cmd_send cmd;
2606 T_BAT_cmd_set_plus_fbo my_bat_set_plus_fbo;
2607
2608 TRACE_FUNCTION("setatPlusFBO() calls bat_send() <=== as APPLICATION");
2609
2610 memset(&my_bat_set_plus_fbo, 0, sizeof(my_bat_set_plus_fbo));
2611 cmd.ctrl_params = BAT_CMD_SET_PLUS_FBO;
2612 cmd.params.ptr_set_plus_fbo = &my_bat_set_plus_fbo;
2613
2614 my_bat_set_plus_fbo.value = val;
2615
2616 bat_send(ati_bat_get_client(srcId), &cmd);
2617
2618 return ATI_EXCT; /* executing, because response is passed by callback function */
2619 }
2620 #else /* OLD FUNCTION BODY */
2621
2622 TRACE_FUNCTION("setatPlusFBO()");
2623
2624 ret = sAT_PlusFBO((T_ACI_CMD_SRC)srcId,val);
2625 if (ret EQ AT_FAIL)
2626 {
2627 cmdAtError(atError);
2628 }
2629 return (map_aci_2_ati_rslt(ret));
2630
2631 #endif /* no FF_ATI_BAT*/
2632 }
2633
2634 GLOBAL T_ATI_RSLT queatPlusFBO (char *cl, UBYTE srcId)
2635 {
2636 T_ACI_RETURN ret = AT_FAIL;
2637 T_ACI_FBO_VAL val = FBO_VAL_NotPresent;
2638
2639 TRACE_FUNCTION("queatPlusFBO()");
2640
2641 ret = qAT_PlusFBO((T_ACI_CMD_SRC)srcId, &val);
2642 if (ret EQ AT_CMPL)
2643 {
2644 sprintf(g_sa,"+FBO:%d",val);
2645 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2646 }
2647 else
2648 {
2649 cmdAtError(atError);
2650 }
2651 return (map_aci_2_ati_rslt(ret));
2652 }
2653
2654 /*
2655 +--------------------------------------------------------------------+
2656 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2657 | STATE : code ROUTINE : atPlusFBS |
2658 +--------------------------------------------------------------------+
2659
2660 PURPOSE : +FBS command (buffer size)
2661 */
2662
2663 GLOBAL T_ATI_RSLT queatPlusFBS (char *cl, UBYTE srcId)
2664 {
2665 SHORT tbs;
2666 SHORT rbs;
2667 T_ACI_RETURN ret = AT_FAIL;
2668
2669 TRACE_FUNCTION("queatPlusFBS()");
2670
2671 ret = qAT_PlusFBS((T_ACI_CMD_SRC)srcId, &tbs,&rbs);
2672 if (ret EQ AT_CMPL)
2673 {
2674 sprintf(g_sa,"+FBS:%X,%X",tbs,rbs);
2675 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2676 }
2677 else
2678 {
2679 cmdAtError(atError);
2680 }
2681 return (map_aci_2_ati_rslt(ret));
2682 }
2683
2684 /*---------------------- Call Backs -----------------------------------------*/
2685
2686 /*
2687 +--------------------------------------------------------------------+
2688 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2689 | STATE : code ROUTINE : rCI_PlusFCI |
2690 +--------------------------------------------------------------------+
2691
2692 PURPOSE : +FCI answer (remote ID CSI report)
2693 */
2694
2695 GLOBAL void rCI_PlusFCI( /*UBYTE srcId,*/ CHAR * rmtId)
2696 {
2697 UBYTE srcId = srcId_cb;
2698
2699 if (fd.FNR.idr_stat)
2700 {
2701 if(rmtId)
2702 sprintf(g_sa,"%s\"%s\"","+FCI:",rmtId);
2703 else
2704 strcpy(g_sa,"+FCI:");
2705 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2706 }
2707 }
2708
2709 /*
2710 +--------------------------------------------------------------------+
2711 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2712 | STATE : code ROUTINE : rCI_PlusFCO |
2713 +--------------------------------------------------------------------+
2714
2715 PURPOSE : +FCO answer (connect information)
2716 */
2717
2718 GLOBAL void rCI_PlusFCO(void)
2719 {
2720 UBYTE srcId = srcId_cb;
2721
2722 io_sendMessage(srcId, "+FCO", ATI_NORMAL_OUTPUT);
2723 }
2724
2725 /*
2726 +--------------------------------------------------------------------+
2727 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2728 | STATE : code ROUTINE : rCI_PlusFCS |
2729 +--------------------------------------------------------------------+
2730
2731 PURPOSE : +FCS answer (DCS frame information)
2732 */
2733
2734 GLOBAL void rCI_PlusFCS ( /*UBYTE srcId,*/
2735 T_ACI_F_VR vr,
2736 T_ACI_F_BR br,
2737 T_ACI_F_WD wd,
2738 T_ACI_F_LN ln,
2739 T_ACI_F_DF df,
2740 T_ACI_F_EC ec,
2741 T_ACI_F_BF bf,
2742 T_ACI_F_ST st,
2743 T_ACI_F_JP jp )
2744 {
2745 UBYTE srcId = srcId_cb;
2746
2747 if (fd.FNR.tpr_stat)
2748 {
2749 sprintf(g_sa,"+FCS:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
2750 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2751 }
2752 }
2753
2754 /*
2755 +--------------------------------------------------------------------+
2756 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2757 | STATE : code ROUTINE : rCI_PlusFDM |
2758 +--------------------------------------------------------------------+
2759
2760 PURPOSE : +FDM answer (transition to data modem)
2761 */
2762 GLOBAL void rCI_PlusFDM (UBYTE srcId)
2763 {
2764 io_sendMessage(srcId, "+FDM", ATI_NORMAL_OUTPUT);
2765 }
2766
2767 /*
2768 +--------------------------------------------------------------------+
2769 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2770 | STATE : code ROUTINE : atPlusFET |
2771 +--------------------------------------------------------------------+
2772
2773 PURPOSE : +FET command (procedure interrupt enable)
2774 */
2775 GLOBAL void rCI_PlusFET( /*UBYTE srcId,*/ T_ACI_FET_PPM ppm)
2776 {
2777 UBYTE srcId = srcId_cb;
2778
2779 sprintf(g_sa,"%s%d","+FET:",ppm);
2780 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2781 }
2782
2783 /*
2784 +--------------------------------------------------------------------+
2785 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2786 | STATE : code ROUTINE : rCI_PlusFFD |
2787 +--------------------------------------------------------------------+
2788
2789 PURPOSE : +FFD answer (file diagnostics)
2790 */
2791 GLOBAL void rCI_PlusFFD (UBYTE srcId)
2792 {
2793 io_sendMessage(srcId, "+FFD", ATI_NORMAL_OUTPUT);
2794 }
2795
2796 /*
2797 +--------------------------------------------------------------------+
2798 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2799 | STATE : code ROUTINE : rCI_PlusFHS |
2800 +--------------------------------------------------------------------+
2801
2802 PURPOSE : +FHS answer (hang up information)
2803 */
2804
2805 GLOBAL void rCI_PlusFHS( /*UBYTE srcId,*/ T_ACI_FHS_STAT stat)
2806 {
2807 UBYTE srcId = srcId_cb;
2808
2809 sprintf(g_sa,"+FHS:%02X", stat);
2810 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2811 }
2812
2813 /*
2814 +--------------------------------------------------------------------+
2815 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2816 | STATE : code ROUTINE : rCI_PlusFHR |
2817 +--------------------------------------------------------------------+
2818
2819 PURPOSE : +FHR answer (received HDLC frame reporting)
2820 */
2821
2822
2823 GLOBAL void rCI_PlusFHR( /*UBYTE srcId,*/ USHORT len, UBYTE * hdlc)
2824 {
2825 UBYTE srcId = srcId_cb;
2826
2827 if (fd.FBU_stat)
2828 {
2829 strcpy(g_sa,"+FHR:");
2830 OutHexReport(srcId, len, hdlc);
2831 }
2832 }
2833
2834 /*
2835 +--------------------------------------------------------------------+
2836 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2837 | STATE : code ROUTINE : rCI_PlusFHT |
2838 +--------------------------------------------------------------------+
2839
2840 PURPOSE : +FHT answer (transmitted HDLC Frame reporting)
2841 */
2842
2843
2844 GLOBAL void rCI_PlusFHT( /*UBYTE srcId,*/ USHORT len, UBYTE * hdlc)
2845 {
2846 UBYTE srcId = srcId_cb;
2847
2848 if (fd.FBU_stat)
2849 {
2850 strcpy(g_sa,"+FHT:");
2851 OutHexReport(srcId, len, hdlc);
2852 }
2853 }
2854
2855 /*
2856 +--------------------------------------------------------------------+
2857 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2858 | STATE : code ROUTINE : rCI_PlusFIS |
2859 +--------------------------------------------------------------------+
2860
2861 PURPOSE : +FIS answer (DIS frame information)
2862 */
2863
2864 GLOBAL void rCI_PlusFIS ( /*UBYTE srcId,*/
2865 T_ACI_F_VR vr,
2866 T_ACI_F_BR br,
2867 T_ACI_F_WD wd,
2868 T_ACI_F_LN ln,
2869 T_ACI_F_DF df,
2870 T_ACI_F_EC ec,
2871 T_ACI_F_BF bf,
2872 T_ACI_F_ST st,
2873 T_ACI_F_JP jp )
2874 {
2875 UBYTE srcId = srcId_cb;
2876
2877 if (fd.FNR.rpr_stat)
2878 {
2879 sprintf(g_sa,"+FIS:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
2880 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2881 }
2882 }
2883
2884
2885 /*
2886 +--------------------------------------------------------------------+
2887 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2888 | STATE : code ROUTINE : rCI_PlusFNC |
2889 +--------------------------------------------------------------------+
2890
2891 PURPOSE : +FNC answer (non standard command reporting)
2892 */
2893
2894
2895 GLOBAL void rCI_PlusFNC( /*UBYTE srcId,*/ USHORT len, UBYTE * nsc)
2896 {
2897 UBYTE srcId = srcId_cb;
2898
2899 if (fd.FNR.nsr_stat)
2900 {
2901 strcpy(g_sa,"+FNC:");
2902
2903 OutHexReport(srcId, len, nsc);
2904 }
2905 }
2906
2907
2908 /*
2909 +--------------------------------------------------------------------+
2910 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2911 | STATE : code ROUTINE : rCI_PlusFNF |
2912 +--------------------------------------------------------------------+
2913
2914 PURPOSE : +FNF answer (non standard facility reporting)
2915 */
2916
2917
2918 GLOBAL void rCI_PlusFNF( /*UBYTE srcId,*/ USHORT len, UBYTE * nsf)
2919 {
2920 UBYTE srcId = srcId_cb;
2921
2922 if (fd.FNR.nsr_stat)
2923 {
2924 strcpy(g_sa,"+FNF:");
2925
2926 OutHexReport(srcId, len, nsf);
2927 }
2928 }
2929
2930 /*
2931 +--------------------------------------------------------------------+
2932 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2933 | STATE : code ROUTINE : rCI_PlusFNS |
2934 +--------------------------------------------------------------------+
2935
2936 PURPOSE : +FNS answer (non standard setup reporting)
2937 */
2938
2939
2940 GLOBAL void rCI_PlusFNS( /*UBYTE srcId,*/ USHORT len, UBYTE * nss)
2941 {
2942 UBYTE srcId = srcId_cb;
2943
2944 if (fd.FNR.nsr_stat)
2945 {
2946 strcpy(g_sa,"+FNS:");
2947
2948 OutHexReport(srcId, len, nss);
2949 }
2950 }
2951
2952 /*
2953 +--------------------------------------------------------------------+
2954 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2955 | STATE : code ROUTINE : rCI_PlusFPA |
2956 +--------------------------------------------------------------------+
2957
2958 PURPOSE : +FPA answer (report polling address)
2959 */
2960 GLOBAL void rCI_PlusFPA (/*UBYTE srcId,*/ char *sep)
2961 {
2962 UBYTE srcId = srcId_cb;
2963
2964 if(sep)
2965 sprintf(g_sa,"+FPA:\"%s\"",sep);
2966 else
2967 strcpy(g_sa,"+FPA:");
2968 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2969 }
2970
2971 /*
2972 +--------------------------------------------------------------------+
2973 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2974 | STATE : code ROUTINE : rCI_PlusFPI |
2975 +--------------------------------------------------------------------+
2976
2977 PURPOSE : +FPI answer (remote ID CIG report)
2978 */
2979
2980 GLOBAL void rCI_PlusFPI( /*UBYTE srcId,*/ CHAR *cig)
2981 {
2982 UBYTE srcId = srcId_cb;
2983
2984 if (fd.FNR.idr_stat)
2985 {
2986 if(cig)
2987 sprintf(g_sa,"%s\"%s\"","+FPI:",cig);
2988 else
2989 strcpy(g_sa,"+FPI:");
2990 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
2991 }
2992 }
2993
2994
2995 /*
2996 +--------------------------------------------------------------------+
2997 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
2998 | STATE : code ROUTINE : rCI_PlusFPO |
2999 +--------------------------------------------------------------------+
3000
3001 PURPOSE : +FPO answer (polling request)
3002 */
3003
3004 GLOBAL void rCI_PlusFPO(void)
3005 {
3006 UBYTE srcId = srcId_cb;
3007
3008 io_sendMessage(srcId, "+FPO", ATI_NORMAL_OUTPUT);
3009 }
3010
3011 /*
3012 +--------------------------------------------------------------------+
3013 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3014 | STATE : code ROUTINE : rCI_PlusFPS |
3015 +--------------------------------------------------------------------+
3016
3017 PURPOSE : +FPS answer (DIS frame information)
3018 */
3019
3020 GLOBAL void rCI_PlusFPS ( /*UBYTE srcId,*/
3021 T_ACI_FPS_PPR ppr,
3022 SHORT lc,
3023 SHORT blc,
3024 SHORT cblc,
3025 SHORT lbc )
3026 {
3027 UBYTE srcId = srcId_cb;
3028
3029 sprintf(g_sa,"%s%d,%d,%d,%d,%d","+FPS:",ppr,lc,blc,cblc,lbc);
3030 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
3031 }
3032
3033 /*
3034 +--------------------------------------------------------------------+
3035 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3036 | STATE : code ROUTINE : rCI_PlusFPW |
3037 +--------------------------------------------------------------------+
3038
3039 PURPOSE : +FPW answer (report password)
3040 */
3041 GLOBAL void rCI_PlusFPW (/*UBYTE srcId,*/ char *pwd)
3042 {
3043 UBYTE srcId = srcId_cb;
3044
3045 if(pwd)
3046 sprintf(g_sa,"+FPW:\"%s\"",pwd);
3047 else
3048 strcpy(g_sa,"+FPW:");
3049 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
3050 }
3051
3052
3053 /*
3054 +--------------------------------------------------------------------+
3055 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3056 | STATE : code ROUTINE : rCI_PlusFSA |
3057 +--------------------------------------------------------------------+
3058
3059 PURPOSE : +FSA answer (report subaddress)
3060 */
3061 GLOBAL void rCI_PlusFSA (/*UBYTE srcId,*/ char *sub)
3062 {
3063 UBYTE srcId = srcId_cb;
3064
3065 if(sub)
3066 sprintf(g_sa,"+FSA:\"%s\"",sub);
3067 else
3068 sprintf(g_sa,"+FSA:");
3069 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
3070 }
3071
3072 /*
3073 +--------------------------------------------------------------------+
3074 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3075 | STATE : code ROUTINE : rCI_PlusFTC |
3076 +--------------------------------------------------------------------+
3077
3078 PURPOSE : +FTC answer (DTC frame information)
3079 */
3080
3081 GLOBAL void rCI_PlusFTC ( /*UBYTE srcId,*/
3082 T_ACI_F_VR vr,
3083 T_ACI_F_BR br,
3084 T_ACI_F_WD wd,
3085 T_ACI_F_LN ln,
3086 T_ACI_F_DF df,
3087 T_ACI_F_EC ec,
3088 T_ACI_F_BF bf,
3089 T_ACI_F_ST st,
3090 T_ACI_F_JP jp )
3091 {
3092 UBYTE srcId = srcId_cb;
3093
3094 if (fd.FNR.rpr_stat)
3095 {
3096
3097 sprintf(g_sa,"+FTC:%X,%d,%d,%d,%d,%d,%X,%d,%X",vr,br,wd,ln,df,ec,bf,st,jp);
3098 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
3099
3100 }
3101 }
3102
3103 /*
3104 +--------------------------------------------------------------------+
3105 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3106 | STATE : code ROUTINE : rCI_PlusFTI |
3107 +--------------------------------------------------------------------+
3108
3109 PURPOSE : +FTI answer (remote ID TSI report)
3110 */
3111
3112 GLOBAL void rCI_PlusFTI( CHAR * tsi)
3113 {
3114 UBYTE srcId = srcId_cb;
3115
3116 if (fd.FNR.idr_stat)
3117 {
3118 if(tsi)
3119 sprintf(g_sa,"%s\"%s\"","+FTI:",tsi);
3120 else
3121 strcpy(g_sa,"+FTI:");
3122 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
3123 }
3124 }
3125
3126 /*
3127 +--------------------------------------------------------------------+
3128 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3129 | STATE : code ROUTINE : rCI_PlusFVO |
3130 +--------------------------------------------------------------------+
3131
3132 PURPOSE : +FVO answer (transition to voice)
3133 */
3134
3135 GLOBAL void rCI_PlusFVO(void /*UBYTE srcId*/)
3136 {
3137 UBYTE srcId = srcId_cb;
3138
3139 io_sendMessage(srcId, "+FVO", ATI_NORMAL_OUTPUT);
3140 }
3141
3142 /*
3143 +--------------------------------------------------------------------+
3144 | PROJECT : GSM-F&D (8411) MODULE : ACI_FD_CMD |
3145 | STATE : code ROUTINE : OutHexReport |
3146 +--------------------------------------------------------------------+
3147
3148 PURPOSE : formatted hex report output
3149 */
3150
3151 GLOBAL void OutHexReport( UBYTE srcId, USHORT len, UBYTE * buf )
3152 {
3153 USHORT i;
3154 UBYTE tmpBuf[SIZE_TMP_BUF];
3155 /* memory should be allocated before the function is called for sa !!!
3156
3157 sa needs at most (len * SIZE_TMP_BUF + 1) for what will be used here */
3158 for( i=0; i < len; i++ )
3159 {
3160 sprintf((char*)tmpBuf, "%02X ", buf[i]);
3161 strcat( g_sa, (char*)tmpBuf );
3162
3163 }
3164 g_sa[strlen(g_sa)-1] = '\0'; /* cut off last space char */
3165 io_sendMessage(srcId, g_sa, ATI_FORCED_OUTPUT);
3166 }
3167
3168 #endif /* FF_FAX */
3169
3170 #endif /* FAX_AND_DATA */
3171
3172
3173