FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/cmh_t30q.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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 = 0; | |
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 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
787 | |
788 TRACE_FUNCTION ("qAT_PlusFBS()"); | |
789 | |
790 /* | |
791 *------------------------------------------------------------------- | |
792 * check command source | |
793 *------------------------------------------------------------------- | |
794 */ | |
795 if(!cmh_IsVldCmdSrc (srcId)) | |
796 { | |
797 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
798 return( AT_FAIL ); | |
799 } | |
800 | |
801 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
802 | |
803 /* | |
804 *------------------------------------------------------------------- | |
805 * fill in parameters | |
806 *------------------------------------------------------------------- | |
807 */ | |
808 *tbs = (SHORT)t30ShrdPrm.tbs; | |
809 *rbs = (SHORT)t30ShrdPrm.rbs; | |
810 | |
811 return( AT_CMPL ); | |
812 } | |
813 | |
814 /* | |
815 +--------------------------------------------------------------------+ | |
816 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
817 | STATE : code ROUTINE : qAT_PlusFEA | | |
818 +--------------------------------------------------------------------+ | |
819 | |
820 PURPOSE : This is the functional counterpart to the +FEA? AT | |
821 command which returns the current setting for phase C EOL | |
822 alignment. | |
823 | |
824 <value>: alignment. | |
825 */ | |
826 | |
827 GLOBAL T_ACI_RETURN qAT_PlusFEA (T_ACI_CMD_SRC srcId, | |
828 SHORT * value ) | |
829 { | |
830 | |
831 TRACE_FUNCTION ("qAT_PlusFEA()"); | |
832 | |
833 /* | |
834 *------------------------------------------------------------------- | |
835 * fill in parameters | |
836 *------------------------------------------------------------------- | |
837 */ | |
838 *value = 0; | |
839 | |
840 return( AT_CMPL ); | |
841 } | |
842 | |
843 /* | |
844 +--------------------------------------------------------------------+ | |
845 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
846 | STATE : code ROUTINE : qAT_PlusFCT | | |
847 +--------------------------------------------------------------------+ | |
848 | |
849 PURPOSE : This is the functional counterpart to the +FCT? AT | |
850 command which returns the current setting phase C response | |
851 timeout. | |
852 | |
853 <value>: timeout. | |
854 */ | |
855 | |
856 GLOBAL T_ACI_RETURN qAT_PlusFCT (T_ACI_CMD_SRC srcId, | |
857 SHORT * value ) | |
858 { | |
859 | |
860 TRACE_FUNCTION ("qAT_PlusFCT()"); | |
861 | |
862 /* | |
863 *------------------------------------------------------------------- | |
864 * fill in parameters | |
865 *------------------------------------------------------------------- | |
866 */ | |
867 *value = 30; | |
868 | |
869 return( AT_CMPL ); | |
870 } | |
871 | |
872 /* | |
873 +--------------------------------------------------------------------+ | |
874 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
875 | STATE : code ROUTINE : qAT_PlusFMS | | |
876 +--------------------------------------------------------------------+ | |
877 | |
878 PURPOSE : This is the functional counterpart to the +FMS? AT | |
879 command which returns the current setting for minimum | |
880 phase C speed. | |
881 | |
882 <br>: minimum phase C speed. | |
883 */ | |
884 | |
885 GLOBAL T_ACI_RETURN qAT_PlusFMS (T_ACI_CMD_SRC srcId, | |
886 T_ACI_F_BR * br) | |
887 { | |
888 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
889 | |
890 TRACE_FUNCTION ("qAT_PlusFMS()"); | |
891 | |
892 /* | |
893 *------------------------------------------------------------------- | |
894 * check command source | |
895 *------------------------------------------------------------------- | |
896 */ | |
897 if(!cmh_IsVldCmdSrc (srcId)) | |
898 { | |
899 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
900 return( AT_FAIL ); | |
901 } | |
902 | |
903 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
904 | |
905 /* | |
906 *------------------------------------------------------------------- | |
907 * fill in parameters | |
908 *------------------------------------------------------------------- | |
909 */ | |
910 *br = pT30CmdPrm -> FMSbr; | |
911 | |
912 return( AT_CMPL ); | |
913 } | |
914 | |
915 /* | |
916 +--------------------------------------------------------------------+ | |
917 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
918 | STATE : code ROUTINE : qAT_PlusFIE | | |
919 +--------------------------------------------------------------------+ | |
920 | |
921 PURPOSE : This is the functional counterpart to the +FIE? AT | |
922 command which returns the current setting for procedure | |
923 interrupt enable. | |
924 | |
925 <value>: PI enable. | |
926 */ | |
927 | |
928 GLOBAL T_ACI_RETURN qAT_PlusFIE (T_ACI_CMD_SRC srcId, | |
929 T_ACI_FIE_VAL *value) | |
930 { | |
931 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
932 | |
933 TRACE_FUNCTION ("qAT_PlusFIE()"); | |
934 | |
935 /* | |
936 *------------------------------------------------------------------- | |
937 * check command source | |
938 *------------------------------------------------------------------- | |
939 */ | |
940 if(!cmh_IsVldCmdSrc (srcId)) | |
941 { | |
942 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
943 return( AT_FAIL ); | |
944 } | |
945 | |
946 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
947 | |
948 /* | |
949 *------------------------------------------------------------------- | |
950 * fill in parameters | |
951 *------------------------------------------------------------------- | |
952 */ | |
953 *value = pT30CmdPrm -> FIEval; | |
954 | |
955 return( AT_CMPL ); | |
956 } | |
957 | |
958 /* | |
959 +--------------------------------------------------------------------+ | |
960 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
961 | STATE : code ROUTINE : qAT_PlusFFC | | |
962 +--------------------------------------------------------------------+ | |
963 | |
964 PURPOSE : This is the functional counterpart to the +FFC? AT | |
965 command which returns the current setting of format | |
966 converersion parameters. | |
967 | |
968 <vrc>: vertical resolution format. | |
969 <dfc>: data format. | |
970 <lnc>: page length format. | |
971 <wdc>: page width format. | |
972 */ | |
973 | |
974 GLOBAL T_ACI_RETURN qAT_PlusFFC (T_ACI_CMD_SRC srcId, | |
975 T_ACI_FFC_VRC * vrc, | |
976 T_ACI_FFC_DFC * dfc, | |
977 T_ACI_FFC_LNC * lnc, | |
978 T_ACI_FFC_WDC * wdc) | |
979 { | |
980 | |
981 TRACE_FUNCTION ("qAT_PlusFFC()"); | |
982 | |
983 /* | |
984 *------------------------------------------------------------------- | |
985 * fill in parameters | |
986 *------------------------------------------------------------------- | |
987 */ | |
988 *vrc = FFC_VRC_Ignored; | |
989 *dfc = FFC_DFC_Ignored; | |
990 *lnc = FFC_LNC_Ignored; | |
991 *wdc = FFC_WDC_Ignored; | |
992 | |
993 return( AT_CMPL ); | |
994 } | |
995 | |
996 /* | |
997 +--------------------------------------------------------------------+ | |
998 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
999 | STATE : code ROUTINE : qAT_PlusFCS | | |
1000 +--------------------------------------------------------------------+ | |
1001 | |
1002 PURPOSE : This is the functional counterpart to the +FCS? AT | |
1003 command which returns the current session results. | |
1004 | |
1005 <vr>: resolution. | |
1006 <br>: bit rate. | |
1007 <wd>: page width. | |
1008 <ln>: page length. | |
1009 <df>: data compression. | |
1010 <ec>: error correction. | |
1011 <bt>: file transer. | |
1012 <st>: scan time. | |
1013 <jp>: JPEG mode. | |
1014 */ | |
1015 | |
1016 GLOBAL T_ACI_RETURN qAT_PlusFCS (T_ACI_CMD_SRC srcId, | |
1017 T_ACI_F_VR * vr, T_ACI_F_BR * br, | |
1018 T_ACI_F_WD * wd, T_ACI_F_LN * ln, | |
1019 T_ACI_F_DF * df, T_ACI_F_EC * ec, | |
1020 T_ACI_F_BF * bf, T_ACI_F_ST * st, | |
1021 T_ACI_F_JP * jp) | |
1022 { | |
1023 | |
1024 TRACE_FUNCTION ("qAT_PlusFCS()"); | |
1025 | |
1026 /* | |
1027 *------------------------------------------------------------------- | |
1028 * fill in parameters | |
1029 *------------------------------------------------------------------- | |
1030 */ | |
1031 #ifdef _SIMULATION_ /* simulates negotiation */ | |
1032 | |
1033 { | |
1034 T_T30_CMD_PRM *pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1035 | |
1036 *vr = pT30CmdPrm->FISvr; | |
1037 *br = pT30CmdPrm->FISbr; | |
1038 *wd = pT30CmdPrm->FISwd; | |
1039 *ln = pT30CmdPrm->FISln; | |
1040 *df = pT30CmdPrm->FISdf; | |
1041 *ec = pT30CmdPrm->FISec; | |
1042 *bf = pT30CmdPrm->FISbf; | |
1043 *st = pT30CmdPrm->FISst; | |
1044 *jp = pT30CmdPrm->FISjp; | |
1045 } | |
1046 | |
1047 #else | |
1048 | |
1049 *vr = t30NgtPrms.FCSvr; | |
1050 *br = t30NgtPrms.FCSbr; | |
1051 *wd = t30NgtPrms.FCSwd; | |
1052 *ln = t30NgtPrms.FCSln; | |
1053 *df = t30NgtPrms.FCSdf; | |
1054 *ec = t30NgtPrms.FCSec; | |
1055 *bf = t30NgtPrms.FCSbf; | |
1056 *st = t30NgtPrms.FCSst; | |
1057 *jp = t30NgtPrms.FCSjp; | |
1058 | |
1059 #endif | |
1060 | |
1061 return( AT_CMPL ); | |
1062 } | |
1063 | |
1064 /* | |
1065 +--------------------------------------------------------------------+ | |
1066 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1067 | STATE : code ROUTINE : qAT_PlusFPS | | |
1068 +--------------------------------------------------------------------+ | |
1069 | |
1070 PURPOSE : This is the functional counterpart to the +FPS? AT command | |
1071 which returns the current setting of the post page | |
1072 response. | |
1073 | |
1074 <ppr>: post page response. | |
1075 */ | |
1076 | |
1077 GLOBAL T_ACI_RETURN qAT_PlusFPS (T_ACI_CMD_SRC srcId, | |
1078 T_ACI_FPS_PPR * ppr ) | |
1079 { | |
1080 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1081 | |
1082 TRACE_FUNCTION ("qAT_PlusFPS()"); | |
1083 | |
1084 /* | |
1085 *------------------------------------------------------------------- | |
1086 * check command source | |
1087 *------------------------------------------------------------------- | |
1088 */ | |
1089 if(!cmh_IsVldCmdSrc (srcId)) | |
1090 { | |
1091 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1092 return( AT_FAIL ); | |
1093 } | |
1094 | |
1095 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1096 | |
1097 /* | |
1098 *------------------------------------------------------------------- | |
1099 * fill in parameters | |
1100 *------------------------------------------------------------------- | |
1101 */ | |
1102 *ppr = pT30CmdPrm -> FPSppr; | |
1103 | |
1104 return( AT_CMPL ); | |
1105 } | |
1106 | |
1107 /* | |
1108 +--------------------------------------------------------------------+ | |
1109 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1110 | STATE : code ROUTINE : qAT_PlusFSP | | |
1111 +--------------------------------------------------------------------+ | |
1112 | |
1113 PURPOSE : This is the functional counterpart to the +FSP? AT command | |
1114 which returns the current polling possibilities. | |
1115 | |
1116 <value>: polling mode. | |
1117 */ | |
1118 | |
1119 GLOBAL T_ACI_RETURN qAT_PlusFSP (T_ACI_CMD_SRC srcId, | |
1120 T_ACI_FSP_VAL * value ) | |
1121 { | |
1122 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1123 | |
1124 TRACE_FUNCTION ("qAT_PlusFSP()"); | |
1125 | |
1126 /* | |
1127 *------------------------------------------------------------------- | |
1128 * check command source | |
1129 *------------------------------------------------------------------- | |
1130 */ | |
1131 if(!cmh_IsVldCmdSrc (srcId)) | |
1132 { | |
1133 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1134 return( AT_FAIL ); | |
1135 } | |
1136 | |
1137 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1138 | |
1139 /* | |
1140 *------------------------------------------------------------------- | |
1141 * fill in parameters | |
1142 *------------------------------------------------------------------- | |
1143 */ | |
1144 *value = pT30CmdPrm -> FSPval; | |
1145 | |
1146 return( AT_CMPL ); | |
1147 } | |
1148 | |
1149 /* | |
1150 +--------------------------------------------------------------------+ | |
1151 | PROJECT : GSM-PS (6147) MODULE : CMH_T30Q | | |
1152 | STATE : code ROUTINE : qAT_PlusFAP | | |
1153 +--------------------------------------------------------------------+ | |
1154 | |
1155 PURPOSE : This is the functional counterpart to the +FAP? AT command | |
1156 which returns the current address and polling capabilities. | |
1157 | |
1158 <sub>: destination subaddressing. | |
1159 <sep>: selective polling. | |
1160 <pwd>: password. | |
1161 */ | |
1162 | |
1163 GLOBAL T_ACI_RETURN qAT_PlusFAP (T_ACI_CMD_SRC srcId, | |
1164 T_ACI_FAP_VAL * sub, | |
1165 T_ACI_FAP_VAL * sep, | |
1166 T_ACI_FAP_VAL * pwd ) | |
1167 { | |
1168 T_T30_CMD_PRM * pT30CmdPrm; /* points to T30 command parameters */ | |
1169 | |
1170 TRACE_FUNCTION ("qAT_PlusFAP()"); | |
1171 | |
1172 /* | |
1173 *------------------------------------------------------------------- | |
1174 * check command source | |
1175 *------------------------------------------------------------------- | |
1176 */ | |
1177 if(!cmh_IsVldCmdSrc (srcId)) | |
1178 { | |
1179 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
1180 return( AT_FAIL ); | |
1181 } | |
1182 | |
1183 pT30CmdPrm = &fnd_cmhPrm[srcId].t30CmdPrm; | |
1184 | |
1185 /* | |
1186 *------------------------------------------------------------------- | |
1187 * fill in parameters | |
1188 *------------------------------------------------------------------- | |
1189 */ | |
1190 *sub = pT30CmdPrm -> FAPsub; | |
1191 *sep = pT30CmdPrm -> FAPsep; | |
1192 *pwd = pT30CmdPrm -> FAPpwd; | |
1193 | |
1194 return( AT_CMPL ); | |
1195 } | |
1196 #endif /* DTI OR FF_FAX*/ | |
1197 | |
1198 /*==== EOF ========================================================*/ |