FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-aci/aci/cmh_t30q.c @ 775:eedbf248bac0
gsm-fw/g23m-aci subtree: initial import from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 12 Oct 2014 01:45:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
774:40a721fd9854 | 775:eedbf248bac0 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : CMH_T30Q | |
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 T30. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 #if defined (DTI) || defined (FF_FAX) | |
22 | |
23 #ifndef CMH_T30Q_C | |
24 #define CMH_T30Q_C | |
25 #endif | |
26 | |
27 #include "aci_all.h" | |
28 /*==== INCLUDES ===================================================*/ | |
29 #include "aci_cmh.h" | |
30 #include "ati_cmd.h" | |
31 #include "aci_cmd.h" | |
32 | |
33 #include "dti.h" | |
34 #include "dti_conn_mng.h" | |
35 | |
36 #include "aci_fd.h" | |
37 | |
38 #include "psa.h" | |
39 #include "psa_t30.h" | |
40 #include "cmh.h" | |
41 #include "cmh_t30.h" | |
42 | |
43 #include "cmh_ra.h" | |
44 | |
45 /*==== CONSTANTS ==================================================*/ | |
46 | |
47 /*==== EXPORT =====================================================*/ | |
48 | |
49 /*==== VARIABLES ==================================================*/ | |
50 | |
51 /*==== FUNCTIONS ==================================================*/ | |
52 | |
53 /* | |
54 +--------------------------------------------------------------------+ | |
55 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
56 | STATE : code ROUTINE : qAT_PlusFCLASS | | |
57 +--------------------------------------------------------------------+ | |
58 | |
59 PURPOSE : This is the functional counterpart to the +FCLASS? AT | |
60 command which returns the current setting of class mode. | |
61 | |
62 <class_type>: class mode. | |
63 */ | |
64 | |
65 GLOBAL T_ACI_RETURN qAT_PlusFCLASS ( T_ACI_CMD_SRC srcId, | |
66 T_ACI_FCLASS_CLASS* class_type ) | |
67 { | |
68 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
69 | |
70 TRACE_FUNCTION ("qAT_PlusFCLASS()"); | |
71 | |
72 /* | |
73 *------------------------------------------------------------------- | |
74 * check command source | |
75 *------------------------------------------------------------------- | |
76 */ | |
77 if(!cmh_IsVldCmdSrc (srcId)) | |
78 { | |
79 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
80 return( AT_FAIL ); | |
81 } | |
82 | |
83 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
84 | |
85 /* | |
86 *------------------------------------------------------------------- | |
87 * fill in parameters | |
88 *------------------------------------------------------------------- | |
89 */ | |
90 *class_type = pT30CmdPrm -> FCLASSclass; | |
91 | |
92 return( AT_CMPL ); | |
93 } | |
94 | |
95 /* | |
96 +--------------------------------------------------------------------+ | |
97 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
98 | STATE : code ROUTINE : qAT_PlusFCR | | |
99 +--------------------------------------------------------------------+ | |
100 | |
101 PURPOSE : This is the functional counterpart to the +FCR? AT | |
102 command which returns the current setting of the receive | |
103 capability. | |
104 | |
105 <value>: receive capability. | |
106 */ | |
107 | |
108 GLOBAL T_ACI_RETURN qAT_PlusFCR ( T_ACI_CMD_SRC srcId, | |
109 T_ACI_FCR_VAL* value ) | |
110 { | |
111 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
112 | |
113 TRACE_FUNCTION ("qAT_PlusFCR()"); | |
114 | |
115 /* | |
116 *------------------------------------------------------------------- | |
117 * check command source | |
118 *------------------------------------------------------------------- | |
119 */ | |
120 if(!cmh_IsVldCmdSrc (srcId)) | |
121 { | |
122 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
123 return( AT_FAIL ); | |
124 } | |
125 | |
126 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
127 | |
128 /* | |
129 *------------------------------------------------------------------- | |
130 * fill in parameters | |
131 *------------------------------------------------------------------- | |
132 */ | |
133 *value = pT30CmdPrm -> FCRval; | |
134 | |
135 return( AT_CMPL ); | |
136 } | |
137 | |
138 /* | |
139 +--------------------------------------------------------------------+ | |
140 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
141 | STATE : code ROUTINE : qAT_PlusFLI | | |
142 +--------------------------------------------------------------------+ | |
143 | |
144 PURPOSE : This is the functional counterpart to the +FLI? AT | |
145 command which returns the current setting for the local | |
146 id string (CSI/TSI). | |
147 | |
148 <idStr>: local id string(0 terminated). | |
149 */ | |
150 | |
151 GLOBAL T_ACI_RETURN qAT_PlusFLI ( T_ACI_CMD_SRC srcId, | |
152 CHAR * idStr ) | |
153 { | |
154 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
155 | |
156 TRACE_FUNCTION ("qAT_PlusFLI()"); | |
157 | |
158 /* | |
159 *------------------------------------------------------------------- | |
160 * check command source | |
161 *------------------------------------------------------------------- | |
162 */ | |
163 if(!cmh_IsVldCmdSrc (srcId)) | |
164 { | |
165 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
166 return( AT_FAIL ); | |
167 } | |
168 | |
169 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
170 | |
171 /* | |
172 *------------------------------------------------------------------- | |
173 * fill in parameters | |
174 *------------------------------------------------------------------- | |
175 */ | |
176 strncpy( idStr, pT30CmdPrm -> FLIstr, MAX_ID_CHAR-1 ); | |
177 idStr[MAX_ID_CHAR-1] = 0; | |
178 | |
179 return( AT_CMPL ); | |
180 } | |
181 | |
182 /* | |
183 +--------------------------------------------------------------------+ | |
184 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
185 | STATE : code ROUTINE : qAT_PlusFPI | | |
186 +--------------------------------------------------------------------+ | |
187 | |
188 PURPOSE : This is the functional counterpart to the +FPI? AT | |
189 command which returns the current setting for the local | |
190 id string (CGI). | |
191 | |
192 <idStr>: local id string(0 terminated). | |
193 */ | |
194 | |
195 GLOBAL T_ACI_RETURN qAT_PlusFPI ( T_ACI_CMD_SRC srcId, | |
196 CHAR * idStr ) | |
197 { | |
198 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
199 | |
200 TRACE_FUNCTION ("qAT_PlusFPI()"); | |
201 | |
202 /* | |
203 *------------------------------------------------------------------- | |
204 * check command source | |
205 *------------------------------------------------------------------- | |
206 */ | |
207 if(!cmh_IsVldCmdSrc (srcId)) | |
208 { | |
209 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
210 return( AT_FAIL ); | |
211 } | |
212 | |
213 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
214 | |
215 /* | |
216 *------------------------------------------------------------------- | |
217 * fill in parameters | |
218 *------------------------------------------------------------------- | |
219 */ | |
220 strncpy( idStr, pT30CmdPrm -> FPIstr, MAX_ID_CHAR-1 ); | |
221 idStr[MAX_ID_CHAR-1] = 0; | |
222 | |
223 return( AT_CMPL ); | |
224 } | |
225 | |
226 /* | |
227 +--------------------------------------------------------------------+ | |
228 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
229 | STATE : code ROUTINE : qAT_PlusFSA | | |
230 +--------------------------------------------------------------------+ | |
231 | |
232 PURPOSE : This is the functional counterpart to the +FSA? AT | |
233 command which returns the current setting for the | |
234 destination subaddress string. | |
235 | |
236 <subStr>: destination subaddress string (0 terminated). | |
237 */ | |
238 | |
239 GLOBAL T_ACI_RETURN qAT_PlusFSA ( T_ACI_CMD_SRC srcId, | |
240 CHAR * subStr ) | |
241 { | |
242 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
243 | |
244 TRACE_FUNCTION ("qAT_PlusFSA()"); | |
245 | |
246 /* | |
247 *------------------------------------------------------------------- | |
248 * check command source | |
249 *------------------------------------------------------------------- | |
250 */ | |
251 if(!cmh_IsVldCmdSrc (srcId)) | |
252 { | |
253 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
254 return( AT_FAIL ); | |
255 } | |
256 | |
257 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
258 | |
259 /* | |
260 *------------------------------------------------------------------- | |
261 * fill in parameters | |
262 *------------------------------------------------------------------- | |
263 */ | |
264 strncpy( subStr, pT30CmdPrm -> FSAsub, MAX_ID_CHAR-1 ); | |
265 subStr[MAX_ID_CHAR-1] = 0; | |
266 | |
267 return( AT_CMPL ); | |
268 } | |
269 | |
270 /* | |
271 +--------------------------------------------------------------------+ | |
272 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
273 | STATE : code ROUTINE : qAT_PlusFPA | | |
274 +--------------------------------------------------------------------+ | |
275 | |
276 PURPOSE : This is the functional counterpart to the +FPA? AT | |
277 command which returns the current setting for the | |
278 selective polling address. | |
279 | |
280 <idStr>: selective polling address string(0 terminated). | |
281 */ | |
282 | |
283 GLOBAL T_ACI_RETURN qAT_PlusFPA ( T_ACI_CMD_SRC srcId, | |
284 CHAR * sepStr ) | |
285 { | |
286 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
287 | |
288 TRACE_FUNCTION ("qAT_PlusFPA()"); | |
289 | |
290 /* | |
291 *------------------------------------------------------------------- | |
292 * check command source | |
293 *------------------------------------------------------------------- | |
294 */ | |
295 if(!cmh_IsVldCmdSrc (srcId)) | |
296 { | |
297 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
298 return( AT_FAIL ); | |
299 } | |
300 | |
301 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
302 | |
303 /* | |
304 *------------------------------------------------------------------- | |
305 * fill in parameters | |
306 *------------------------------------------------------------------- | |
307 */ | |
308 strncpy( sepStr, pT30CmdPrm -> FPAsep, MAX_ID_CHAR-1 ); | |
309 sepStr[MAX_ID_CHAR-1] = 0; | |
310 | |
311 return( AT_CMPL ); | |
312 } | |
313 | |
314 /* | |
315 +--------------------------------------------------------------------+ | |
316 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
317 | STATE : code ROUTINE : qAT_PlusFPW | | |
318 +--------------------------------------------------------------------+ | |
319 | |
320 PURPOSE : This is the functional counterpart to the +FPW? AT | |
321 command which returns the current setting for the | |
322 password string. | |
323 | |
324 <idStr>: password string(0 terminated). | |
325 */ | |
326 | |
327 GLOBAL T_ACI_RETURN qAT_PlusFPW ( T_ACI_CMD_SRC srcId, | |
328 CHAR * pwdStr ) | |
329 { | |
330 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
331 | |
332 TRACE_FUNCTION ("qAT_PlusFPW()"); | |
333 | |
334 /* | |
335 *------------------------------------------------------------------- | |
336 * check command source | |
337 *------------------------------------------------------------------- | |
338 */ | |
339 if(!cmh_IsVldCmdSrc (srcId)) | |
340 { | |
341 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
342 return( AT_FAIL ); | |
343 } | |
344 | |
345 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
346 | |
347 /* | |
348 *------------------------------------------------------------------- | |
349 * fill in parameters | |
350 *------------------------------------------------------------------- | |
351 */ | |
352 strncpy( pwdStr, pT30CmdPrm -> FPWpwd, MAX_ID_CHAR-1 ); | |
353 pwdStr[MAX_ID_CHAR-1] = 0; | |
354 | |
355 return( AT_CMPL ); | |
356 } | |
357 | |
358 /* | |
359 +--------------------------------------------------------------------+ | |
360 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
361 | STATE : code ROUTINE : qAT_PlusFCC | | |
362 +--------------------------------------------------------------------+ | |
363 | |
364 PURPOSE : This is the functional counterpart to the +FCC? AT | |
365 command which returns the current setting of the DCE | |
366 capabilities. | |
367 | |
368 <vr>: resolution. | |
369 <br>: bit rate. | |
370 <wd>: page width. | |
371 <ln>: page length. | |
372 <df>: data compression. | |
373 <ec>: error correction. | |
374 <bt>: file transer. | |
375 <st>: scan time. | |
376 <jp>: JPEG mode. | |
377 */ | |
378 | |
379 GLOBAL T_ACI_RETURN qAT_PlusFCC ( T_ACI_CMD_SRC srcId, T_ACI_F_VR* vr, | |
380 T_ACI_F_BR* br, T_ACI_F_WD* wd, | |
381 T_ACI_F_LN* ln, T_ACI_F_DF* df, | |
382 T_ACI_F_EC* ec, T_ACI_F_BF* bf, | |
383 T_ACI_F_ST* st, T_ACI_F_JP* jp ) | |
384 { | |
385 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
386 | |
387 TRACE_FUNCTION ("qAT_PlusFCC()"); | |
388 | |
389 /* | |
390 *------------------------------------------------------------------- | |
391 * check command source | |
392 *------------------------------------------------------------------- | |
393 */ | |
394 if(!cmh_IsVldCmdSrc (srcId)) | |
395 { | |
396 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
397 return( AT_FAIL ); | |
398 } | |
399 | |
400 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
401 | |
402 /* | |
403 *------------------------------------------------------------------- | |
404 * fill in the parameters | |
405 *------------------------------------------------------------------- | |
406 */ | |
407 *vr = pT30CmdPrm -> FCCvr; | |
408 *br = pT30CmdPrm -> FCCbr; | |
409 *wd = pT30CmdPrm -> FCCwd; | |
410 *ln = pT30CmdPrm -> FCCln; | |
411 *df = pT30CmdPrm -> FCCdf; | |
412 *ec = pT30CmdPrm -> FCCec; | |
413 *bf = pT30CmdPrm -> FCCbf; | |
414 *st = pT30CmdPrm -> FCCst; | |
415 *jp = pT30CmdPrm -> FCCjp; | |
416 | |
417 return( AT_CMPL ); | |
418 } | |
419 | |
420 /* | |
421 +--------------------------------------------------------------------+ | |
422 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
423 | STATE : code ROUTINE : qAT_PlusFIS | | |
424 +--------------------------------------------------------------------+ | |
425 | |
426 PURPOSE : This is the functional counterpart to the +FIS? AT | |
427 command which returns the settings of the current session | |
428 capabilities. | |
429 | |
430 <vr>: resolution. | |
431 <br>: bit rate. | |
432 <wd>: page width. | |
433 <ln>: page length. | |
434 <df>: data compression. | |
435 <ec>: error correction. | |
436 <bt>: file transer. | |
437 <st>: scan time. | |
438 <jp>: JPEG mode. | |
439 */ | |
440 | |
441 GLOBAL T_ACI_RETURN qAT_PlusFIS ( T_ACI_CMD_SRC srcId, T_ACI_F_VR* vr, | |
442 T_ACI_F_BR* br, T_ACI_F_WD* wd, | |
443 T_ACI_F_LN* ln, T_ACI_F_DF* df, | |
444 T_ACI_F_EC* ec, T_ACI_F_BF* bf, | |
445 T_ACI_F_ST* st, T_ACI_F_JP* jp ) | |
446 { | |
447 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
448 | |
449 TRACE_FUNCTION ("qAT_PlusFIS()"); | |
450 | |
451 /* | |
452 *------------------------------------------------------------------- | |
453 * check command source | |
454 *------------------------------------------------------------------- | |
455 */ | |
456 if(!cmh_IsVldCmdSrc (srcId)) | |
457 { | |
458 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
459 return( AT_FAIL ); | |
460 } | |
461 | |
462 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
463 | |
464 /* | |
465 *------------------------------------------------------------------- | |
466 * fill in the parameters | |
467 *------------------------------------------------------------------- | |
468 */ | |
469 *vr = pT30CmdPrm -> FISvr; | |
470 *br = pT30CmdPrm -> FISbr; | |
471 *wd = pT30CmdPrm -> FISwd; | |
472 *ln = pT30CmdPrm -> FISln; | |
473 *df = pT30CmdPrm -> FISdf; | |
474 *ec = pT30CmdPrm -> FISec; | |
475 *bf = pT30CmdPrm -> FISbf; | |
476 *st = pT30CmdPrm -> FISst; | |
477 *jp = pT30CmdPrm -> FISjp; | |
478 | |
479 return( AT_CMPL ); | |
480 } | |
481 | |
482 /* | |
483 +--------------------------------------------------------------------+ | |
484 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
485 | STATE : code ROUTINE : qAT_PlusFNS | | |
486 +--------------------------------------------------------------------+ | |
487 | |
488 PURPOSE : This is the functional counterpart to the +FNS? AT | |
489 command which returns the current length and setting for | |
490 the non-standard facility string. | |
491 | |
492 <len>: length of nsf string in bytes. | |
493 <nsf>: nsf string. | |
494 */ | |
495 | |
496 GLOBAL T_ACI_RETURN qAT_PlusFNS ( T_ACI_CMD_SRC srcId, | |
497 UBYTE * len, | |
498 UBYTE * nsf ) | |
499 { | |
500 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
501 | |
502 TRACE_FUNCTION ("qAT_PlusFNS()"); | |
503 | |
504 /* | |
505 *------------------------------------------------------------------- | |
506 * check command source | |
507 *------------------------------------------------------------------- | |
508 */ | |
509 if(!cmh_IsVldCmdSrc (srcId)) | |
510 { | |
511 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
512 return( AT_FAIL ); | |
513 } | |
514 | |
515 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
516 | |
517 /* | |
518 *------------------------------------------------------------------- | |
519 * fill in parameters | |
520 *------------------------------------------------------------------- | |
521 */ | |
522 if (pT30CmdPrm -> FNSlen) | |
523 { | |
524 memcpy( nsf, pT30CmdPrm -> FNSoct, pT30CmdPrm -> FNSlen ); | |
525 } | |
526 | |
527 *len = pT30CmdPrm -> FNSlen; | |
528 | |
529 return( AT_CMPL ); | |
530 } | |
531 | |
532 /* | |
533 +--------------------------------------------------------------------+ | |
534 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
535 | STATE : code ROUTINE : qAT_PlusFLP | | |
536 +--------------------------------------------------------------------+ | |
537 | |
538 PURPOSE : This is the functional counterpart to the +FLP? AT | |
539 command which returns the current setting of indication | |
540 for a document to poll. | |
541 | |
542 <value>: polling indication. | |
543 */ | |
544 | |
545 GLOBAL T_ACI_RETURN qAT_PlusFLP ( T_ACI_CMD_SRC srcId, | |
546 T_ACI_FLP_VAL* value ) | |
547 { | |
548 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
549 | |
550 TRACE_FUNCTION ("qAT_PlusFLP()"); | |
551 | |
552 /* | |
553 *------------------------------------------------------------------- | |
554 * check command source | |
555 *------------------------------------------------------------------- | |
556 */ | |
557 if(!cmh_IsVldCmdSrc (srcId)) | |
558 { | |
559 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
560 return( AT_FAIL ); | |
561 } | |
562 | |
563 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
564 | |
565 /* | |
566 *------------------------------------------------------------------- | |
567 * fill in parameters | |
568 *------------------------------------------------------------------- | |
569 */ | |
570 *value = pT30CmdPrm -> FLPval; | |
571 | |
572 return( AT_CMPL ); | |
573 } | |
574 | |
575 /* | |
576 +--------------------------------------------------------------------+ | |
577 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
578 | STATE : code ROUTINE : qAT_PlusFCQ | | |
579 +--------------------------------------------------------------------+ | |
580 | |
581 PURPOSE : This is the functional counterpart to the +FCQ? AT | |
582 command which returns the current setting for copy quality. | |
583 | |
584 <rq>: receive quality. | |
585 <tq>: transmit quality. | |
586 */ | |
587 | |
588 GLOBAL T_ACI_RETURN qAT_PlusFCQ (T_ACI_CMD_SRC srcId, | |
589 T_ACI_FCQ_RQ * rq, | |
590 T_ACI_FCQ_TQ * tq ) | |
591 { | |
592 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
593 | |
594 TRACE_FUNCTION ("qAT_PlusFCQ()"); | |
595 | |
596 /* | |
597 *------------------------------------------------------------------- | |
598 * check command source | |
599 *------------------------------------------------------------------- | |
600 */ | |
601 if(!cmh_IsVldCmdSrc (srcId)) | |
602 { | |
603 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
604 return( AT_FAIL ); | |
605 } | |
606 | |
607 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
608 | |
609 /* | |
610 *------------------------------------------------------------------- | |
611 * fill in parameters | |
612 *------------------------------------------------------------------- | |
613 */ | |
614 *rq = pT30CmdPrm -> FCQrq; | |
615 *tq = FCQ_TQ_CQCDisabled; | |
616 | |
617 return( AT_CMPL ); | |
618 } | |
619 | |
620 /* | |
621 +--------------------------------------------------------------------+ | |
622 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
623 | STATE : code ROUTINE : qAT_PlusFRQ | | |
624 +--------------------------------------------------------------------+ | |
625 | |
626 PURPOSE : This is the functional counterpart to the +FRQ? AT | |
627 command which returns the current setting for receive | |
628 quality thresholds. | |
629 | |
630 <pgl>: percentage of good lines. | |
631 <cbl>: consecutive bad lines. | |
632 */ | |
633 | |
634 GLOBAL T_ACI_RETURN qAT_PlusFRQ (T_ACI_CMD_SRC srcId, | |
635 SHORT * pgl, | |
636 SHORT * cbl ) | |
637 { | |
638 | |
639 TRACE_FUNCTION ("qAT_PlusFRQ()"); | |
640 | |
641 /* | |
642 *------------------------------------------------------------------- | |
643 * fill in parameters | |
644 *------------------------------------------------------------------- | |
645 */ | |
646 *pgl = 0; | |
647 *cbl = 0; | |
648 | |
649 return( AT_CMPL ); | |
650 } | |
651 | |
652 /* | |
653 +--------------------------------------------------------------------+ | |
654 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
655 | STATE : code ROUTINE : qAT_PlusFHS | | |
656 +--------------------------------------------------------------------+ | |
657 | |
658 PURPOSE : This is the functional counterpart to the +FRQ? AT | |
659 command which returns the current call termination status. | |
660 | |
661 <status>: call termination status. | |
662 */ | |
663 | |
664 GLOBAL T_ACI_RETURN qAT_PlusFHS (T_ACI_CMD_SRC srcId, | |
665 T_ACI_FHS_STAT * status ) | |
666 { | |
667 | |
668 TRACE_FUNCTION ("qAT_PlusFHS()"); | |
669 | |
670 /* | |
671 *------------------------------------------------------------------- | |
672 * fill in parameters | |
673 *------------------------------------------------------------------- | |
674 */ | |
675 *status = FHSstat; | |
676 | |
677 return( AT_CMPL ); | |
678 } | |
679 | |
680 /* | |
681 +--------------------------------------------------------------------+ | |
682 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
683 | STATE : code ROUTINE : qAT_PlusFIT | | |
684 +--------------------------------------------------------------------+ | |
685 | |
686 PURPOSE : This is the functional counterpart to the +FIT? AT | |
687 command which returns the current setting for inactivity | |
688 timer. | |
689 | |
690 <time>: inactivity timeout. | |
691 <act> : action. | |
692 */ | |
693 | |
694 GLOBAL T_ACI_RETURN qAT_PlusFIT (T_ACI_CMD_SRC srcId, | |
695 SHORT * time, | |
696 T_ACI_FIT_ACT * act ) | |
697 { | |
698 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
699 | |
700 TRACE_FUNCTION ("qAT_PlusFIT()"); | |
701 | |
702 /* | |
703 *------------------------------------------------------------------- | |
704 * check command source | |
705 *------------------------------------------------------------------- | |
706 */ | |
707 if(!cmh_IsVldCmdSrc (srcId)) | |
708 { | |
709 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
710 return( AT_FAIL ); | |
711 } | |
712 | |
713 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
714 | |
715 /* | |
716 *------------------------------------------------------------------- | |
717 * fill in parameters | |
718 *------------------------------------------------------------------- | |
719 */ | |
720 *act = pT30CmdPrm -> FITact; | |
721 | |
722 *time = pT30CmdPrm -> FITtime / 1000; | |
723 return( AT_CMPL ); | |
724 } | |
725 | |
726 /* | |
727 +--------------------------------------------------------------------+ | |
728 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
729 | STATE : code ROUTINE : qAT_PlusFBO | | |
730 +--------------------------------------------------------------------+ | |
731 | |
732 PURPOSE : This is the functional counterpart to the +FBO? AT | |
733 command which returns the current setting for data bit | |
734 order. | |
735 | |
736 <value>: data bit order. | |
737 */ | |
738 | |
739 GLOBAL T_ACI_RETURN qAT_PlusFBO (T_ACI_CMD_SRC srcId, | |
740 T_ACI_FBO_VAL * value ) | |
741 { | |
742 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
743 | |
744 TRACE_FUNCTION ("qAT_PlusFBO()"); | |
745 | |
746 /* | |
747 *------------------------------------------------------------------- | |
748 * check command source | |
749 *------------------------------------------------------------------- | |
750 */ | |
751 if(!cmh_IsVldCmdSrc (srcId)) | |
752 { | |
753 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
754 return( AT_FAIL ); | |
755 } | |
756 | |
757 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
758 | |
759 /* | |
760 *------------------------------------------------------------------- | |
761 * fill in parameters | |
762 *------------------------------------------------------------------- | |
763 */ | |
764 *value = pT30CmdPrm -> FBOval; | |
765 | |
766 return( AT_CMPL ); | |
767 } | |
768 | |
769 /* | |
770 +--------------------------------------------------------------------+ | |
771 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
772 | STATE : code ROUTINE : qAT_PlusFBS | | |
773 +--------------------------------------------------------------------+ | |
774 | |
775 PURPOSE : This is the functional counterpart to the +FBS? AT | |
776 command which returns the current setting of buffer sizes. | |
777 | |
778 <tbs>: transmit buffer size. | |
779 <rbs>: receive buffer size. | |
780 */ | |
781 | |
782 GLOBAL T_ACI_RETURN qAT_PlusFBS (T_ACI_CMD_SRC srcId, | |
783 SHORT * tbs, | |
784 SHORT * rbs ) | |
785 { | |
786 | |
787 TRACE_FUNCTION ("qAT_PlusFBS()"); | |
788 | |
789 /* | |
790 *------------------------------------------------------------------- | |
791 * check command source | |
792 *------------------------------------------------------------------- | |
793 */ | |
794 if(!cmh_IsVldCmdSrc (srcId)) | |
795 { | |
796 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
797 return( AT_FAIL ); | |
798 } | |
799 | |
800 /* | |
801 *------------------------------------------------------------------- | |
802 * fill in parameters | |
803 *------------------------------------------------------------------- | |
804 */ | |
805 *tbs = (SHORT)t30ShrdPrm.tbs; | |
806 *rbs = (SHORT)t30ShrdPrm.rbs; | |
807 | |
808 return( AT_CMPL ); | |
809 } | |
810 | |
811 /* | |
812 +--------------------------------------------------------------------+ | |
813 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
814 | STATE : code ROUTINE : qAT_PlusFEA | | |
815 +--------------------------------------------------------------------+ | |
816 | |
817 PURPOSE : This is the functional counterpart to the +FEA? AT | |
818 command which returns the current setting for phase C EOL | |
819 alignment. | |
820 | |
821 <value>: alignment. | |
822 */ | |
823 | |
824 GLOBAL T_ACI_RETURN qAT_PlusFEA (T_ACI_CMD_SRC srcId, | |
825 SHORT * value ) | |
826 { | |
827 | |
828 TRACE_FUNCTION ("qAT_PlusFEA()"); | |
829 | |
830 /* | |
831 *------------------------------------------------------------------- | |
832 * fill in parameters | |
833 *------------------------------------------------------------------- | |
834 */ | |
835 *value = 0; | |
836 | |
837 return( AT_CMPL ); | |
838 } | |
839 | |
840 /* | |
841 +--------------------------------------------------------------------+ | |
842 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
843 | STATE : code ROUTINE : qAT_PlusFCT | | |
844 +--------------------------------------------------------------------+ | |
845 | |
846 PURPOSE : This is the functional counterpart to the +FCT? AT | |
847 command which returns the current setting phase C response | |
848 timeout. | |
849 | |
850 <value>: timeout. | |
851 */ | |
852 | |
853 GLOBAL T_ACI_RETURN qAT_PlusFCT (T_ACI_CMD_SRC srcId, | |
854 SHORT * value ) | |
855 { | |
856 | |
857 TRACE_FUNCTION ("qAT_PlusFCT()"); | |
858 | |
859 /* | |
860 *------------------------------------------------------------------- | |
861 * fill in parameters | |
862 *------------------------------------------------------------------- | |
863 */ | |
864 *value = 30; | |
865 | |
866 return( AT_CMPL ); | |
867 } | |
868 | |
869 /* | |
870 +--------------------------------------------------------------------+ | |
871 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
872 | STATE : code ROUTINE : qAT_PlusFMS | | |
873 +--------------------------------------------------------------------+ | |
874 | |
875 PURPOSE : This is the functional counterpart to the +FMS? AT | |
876 command which returns the current setting for minimum | |
877 phase C speed. | |
878 | |
879 <br>: minimum phase C speed. | |
880 */ | |
881 | |
882 GLOBAL T_ACI_RETURN qAT_PlusFMS (T_ACI_CMD_SRC srcId, | |
883 T_ACI_F_BR * br) | |
884 { | |
885 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
886 | |
887 TRACE_FUNCTION ("qAT_PlusFMS()"); | |
888 | |
889 /* | |
890 *------------------------------------------------------------------- | |
891 * check command source | |
892 *------------------------------------------------------------------- | |
893 */ | |
894 if(!cmh_IsVldCmdSrc (srcId)) | |
895 { | |
896 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
897 return( AT_FAIL ); | |
898 } | |
899 | |
900 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
901 | |
902 /* | |
903 *------------------------------------------------------------------- | |
904 * fill in parameters | |
905 *------------------------------------------------------------------- | |
906 */ | |
907 *br = pT30CmdPrm -> FMSbr; | |
908 | |
909 return( AT_CMPL ); | |
910 } | |
911 | |
912 /* | |
913 +--------------------------------------------------------------------+ | |
914 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
915 | STATE : code ROUTINE : qAT_PlusFIE | | |
916 +--------------------------------------------------------------------+ | |
917 | |
918 PURPOSE : This is the functional counterpart to the +FIE? AT | |
919 command which returns the current setting for procedure | |
920 interrupt enable. | |
921 | |
922 <value>: PI enable. | |
923 */ | |
924 | |
925 GLOBAL T_ACI_RETURN qAT_PlusFIE (T_ACI_CMD_SRC srcId, | |
926 T_ACI_FIE_VAL *value) | |
927 { | |
928 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
929 | |
930 TRACE_FUNCTION ("qAT_PlusFIE()"); | |
931 | |
932 /* | |
933 *------------------------------------------------------------------- | |
934 * check command source | |
935 *------------------------------------------------------------------- | |
936 */ | |
937 if(!cmh_IsVldCmdSrc (srcId)) | |
938 { | |
939 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
940 return( AT_FAIL ); | |
941 } | |
942 | |
943 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
944 | |
945 /* | |
946 *------------------------------------------------------------------- | |
947 * fill in parameters | |
948 *------------------------------------------------------------------- | |
949 */ | |
950 *value = pT30CmdPrm -> FIEval; | |
951 | |
952 return( AT_CMPL ); | |
953 } | |
954 | |
955 /* | |
956 +--------------------------------------------------------------------+ | |
957 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
958 | STATE : code ROUTINE : qAT_PlusFFC | | |
959 +--------------------------------------------------------------------+ | |
960 | |
961 PURPOSE : This is the functional counterpart to the +FFC? AT | |
962 command which returns the current setting of format | |
963 converersion parameters. | |
964 | |
965 <vrc>: vertical resolution format. | |
966 <dfc>: data format. | |
967 <lnc>: page length format. | |
968 <wdc>: page width format. | |
969 */ | |
970 | |
971 GLOBAL T_ACI_RETURN qAT_PlusFFC (T_ACI_CMD_SRC srcId, | |
972 T_ACI_FFC_VRC * vrc, | |
973 T_ACI_FFC_DFC * dfc, | |
974 T_ACI_FFC_LNC * lnc, | |
975 T_ACI_FFC_WDC * wdc) | |
976 { | |
977 | |
978 TRACE_FUNCTION ("qAT_PlusFFC()"); | |
979 | |
980 /* | |
981 *------------------------------------------------------------------- | |
982 * fill in parameters | |
983 *------------------------------------------------------------------- | |
984 */ | |
985 *vrc = FFC_VRC_Ignored; | |
986 *dfc = FFC_DFC_Ignored; | |
987 *lnc = FFC_LNC_Ignored; | |
988 *wdc = FFC_WDC_Ignored; | |
989 | |
990 return( AT_CMPL ); | |
991 } | |
992 | |
993 /* | |
994 +--------------------------------------------------------------------+ | |
995 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
996 | STATE : code ROUTINE : qAT_PlusFCS | | |
997 +--------------------------------------------------------------------+ | |
998 | |
999 PURPOSE : This is the functional counterpart to the +FCS? AT | |
1000 command which returns the current session results. | |
1001 | |
1002 <vr>: resolution. | |
1003 <br>: bit rate. | |
1004 <wd>: page width. | |
1005 <ln>: page length. | |
1006 <df>: data compression. | |
1007 <ec>: error correction. | |
1008 <bt>: file transer. | |
1009 <st>: scan time. | |
1010 <jp>: JPEG mode. | |
1011 */ | |
1012 | |
1013 GLOBAL T_ACI_RETURN qAT_PlusFCS (T_ACI_CMD_SRC srcId, | |
1014 T_ACI_F_VR * vr, T_ACI_F_BR * br, | |
1015 T_ACI_F_WD * wd, T_ACI_F_LN * ln, | |
1016 T_ACI_F_DF * df, T_ACI_F_EC * ec, | |
1017 T_ACI_F_BF * bf, T_ACI_F_ST * st, | |
1018 T_ACI_F_JP * jp) | |
1019 { | |
1020 | |
1021 TRACE_FUNCTION ("qAT_PlusFCS()"); | |
1022 | |
1023 /* | |
1024 *------------------------------------------------------------------- | |
1025 * fill in parameters | |
1026 *------------------------------------------------------------------- | |
1027 */ | |
1028 #ifdef _SIMULATION_ /* simulates negotiation */ | |
1029 | |
1030 { | |
1031 T_T30_CMD_PRM *pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1032 | |
1033 *vr = pT30CmdPrm->FISvr; | |
1034 *br = pT30CmdPrm->FISbr; | |
1035 *wd = pT30CmdPrm->FISwd; | |
1036 *ln = pT30CmdPrm->FISln; | |
1037 *df = pT30CmdPrm->FISdf; | |
1038 *ec = pT30CmdPrm->FISec; | |
1039 *bf = pT30CmdPrm->FISbf; | |
1040 *st = pT30CmdPrm->FISst; | |
1041 *jp = pT30CmdPrm->FISjp; | |
1042 } | |
1043 | |
1044 #else | |
1045 | |
1046 *vr = t30NgtPrms.FCSvr; | |
1047 *br = t30NgtPrms.FCSbr; | |
1048 *wd = t30NgtPrms.FCSwd; | |
1049 *ln = t30NgtPrms.FCSln; | |
1050 *df = t30NgtPrms.FCSdf; | |
1051 *ec = t30NgtPrms.FCSec; | |
1052 *bf = t30NgtPrms.FCSbf; | |
1053 *st = t30NgtPrms.FCSst; | |
1054 *jp = t30NgtPrms.FCSjp; | |
1055 | |
1056 #endif | |
1057 | |
1058 return( AT_CMPL ); | |
1059 } | |
1060 | |
1061 /* | |
1062 +--------------------------------------------------------------------+ | |
1063 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1064 | STATE : code ROUTINE : qAT_PlusFPS | | |
1065 +--------------------------------------------------------------------+ | |
1066 | |
1067 PURPOSE : This is the functional counterpart to the +FPS? AT command | |
1068 which returns the current setting of the post page | |
1069 response. | |
1070 | |
1071 <ppr>: post page response. | |
1072 */ | |
1073 | |
1074 GLOBAL T_ACI_RETURN qAT_PlusFPS (T_ACI_CMD_SRC srcId, | |
1075 T_ACI_FPS_PPR * ppr ) | |
1076 { | |
1077 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1078 | |
1079 TRACE_FUNCTION ("qAT_PlusFPS()"); | |
1080 | |
1081 /* | |
1082 *------------------------------------------------------------------- | |
1083 * check command source | |
1084 *------------------------------------------------------------------- | |
1085 */ | |
1086 if(!cmh_IsVldCmdSrc (srcId)) | |
1087 { | |
1088 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1089 return( AT_FAIL ); | |
1090 } | |
1091 | |
1092 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1093 | |
1094 /* | |
1095 *------------------------------------------------------------------- | |
1096 * fill in parameters | |
1097 *------------------------------------------------------------------- | |
1098 */ | |
1099 *ppr = pT30CmdPrm -> FPSppr; | |
1100 | |
1101 return( AT_CMPL ); | |
1102 } | |
1103 | |
1104 /* | |
1105 +--------------------------------------------------------------------+ | |
1106 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1107 | STATE : code ROUTINE : qAT_PlusFSP | | |
1108 +--------------------------------------------------------------------+ | |
1109 | |
1110 PURPOSE : This is the functional counterpart to the +FSP? AT command | |
1111 which returns the current polling possibilities. | |
1112 | |
1113 <value>: polling mode. | |
1114 */ | |
1115 | |
1116 GLOBAL T_ACI_RETURN qAT_PlusFSP (T_ACI_CMD_SRC srcId, | |
1117 T_ACI_FSP_VAL * value ) | |
1118 { | |
1119 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1120 | |
1121 TRACE_FUNCTION ("qAT_PlusFSP()"); | |
1122 | |
1123 /* | |
1124 *------------------------------------------------------------------- | |
1125 * check command source | |
1126 *------------------------------------------------------------------- | |
1127 */ | |
1128 if(!cmh_IsVldCmdSrc (srcId)) | |
1129 { | |
1130 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1131 return( AT_FAIL ); | |
1132 } | |
1133 | |
1134 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1135 | |
1136 /* | |
1137 *------------------------------------------------------------------- | |
1138 * fill in parameters | |
1139 *------------------------------------------------------------------- | |
1140 */ | |
1141 *value = pT30CmdPrm -> FSPval; | |
1142 | |
1143 return( AT_CMPL ); | |
1144 } | |
1145 | |
1146 /* | |
1147 +--------------------------------------------------------------------+ | |
1148 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1149 | STATE : code ROUTINE : qAT_PlusFAP | | |
1150 +--------------------------------------------------------------------+ | |
1151 | |
1152 PURPOSE : This is the functional counterpart to the +FAP? AT command | |
1153 which returns the current address and polling capabilities. | |
1154 | |
1155 <sub>: destination subaddressing. | |
1156 <sep>: selective polling. | |
1157 <pwd>: password. | |
1158 */ | |
1159 | |
1160 GLOBAL T_ACI_RETURN qAT_PlusFAP (T_ACI_CMD_SRC srcId, | |
1161 T_ACI_FAP_VAL * sub, | |
1162 T_ACI_FAP_VAL * sep, | |
1163 T_ACI_FAP_VAL * pwd ) | |
1164 { | |
1165 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1166 | |
1167 TRACE_FUNCTION ("qAT_PlusFAP()"); | |
1168 | |
1169 /* | |
1170 *------------------------------------------------------------------- | |
1171 * check command source | |
1172 *------------------------------------------------------------------- | |
1173 */ | |
1174 if(!cmh_IsVldCmdSrc (srcId)) | |
1175 { | |
1176 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1177 return( AT_FAIL ); | |
1178 } | |
1179 | |
1180 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1181 | |
1182 /* | |
1183 *------------------------------------------------------------------- | |
1184 * fill in parameters | |
1185 *------------------------------------------------------------------- | |
1186 */ | |
1187 *sub = pT30CmdPrm -> FAPsub; | |
1188 *sep = pT30CmdPrm -> FAPsep; | |
1189 *pwd = pT30CmdPrm -> FAPpwd; | |
1190 | |
1191 return( AT_CMPL ); | |
1192 } | |
1193 #endif /* DTI OR FF_FAX*/ | |
1194 | |
1195 /*==== EOF ========================================================*/ |