FreeCalypso > hg > fc-magnetite
comparison src/g23m-aci/aci/psa_t30f.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 : GSM-PS (6147) | |
4 | Modul : PSA_T30F | |
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 defines the functions for the protocol | |
18 | stack adapter for T30. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 #ifdef FF_FAX | |
22 | |
23 #ifndef PSA_T30F_C | |
24 #define PSA_T30F_C | |
25 #endif | |
26 | |
27 #include "aci_all.h" | |
28 | |
29 #undef TRACING | |
30 | |
31 /*==== INCLUDES ===================================================*/ | |
32 #include "aci_cmh.h" | |
33 #include "ati_cmd.h" | |
34 #include "aci_cmd.h" | |
35 | |
36 #include "dti.h" | |
37 #include "dti_conn_mng.h" | |
38 | |
39 #include "aci_fd.h" | |
40 #include "aci.h" | |
41 #include "psa.h" | |
42 #include "psa_t30.h" | |
43 #include "cmh.h" | |
44 #include "cmh_t30.h" | |
45 #include "psa_util.h" | |
46 | |
47 /*==== CONSTANTS ==================================================*/ | |
48 #define ITM_WDT (14) /* item width in chars */ | |
49 #define HDR_WDT (10) /* header width in chars */ | |
50 | |
51 /*==== TYPES ======================================================*/ | |
52 | |
53 | |
54 /*==== EXPORT =====================================================*/ | |
55 | |
56 /*==== VARIABLES ==================================================*/ | |
57 | |
58 /*==== FUNCTIONS ==================================================*/ | |
59 | |
60 /* | |
61 +-------------------------------------------------------------------+ | |
62 | PROJECT : GSM-PS (6147) MODULE : PSA_T30 | | |
63 | ROUTINE : psaT30_Init | | |
64 +-------------------------------------------------------------------+ | |
65 | |
66 PURPOSE : initialize the protocol stack adapter for T30. | |
67 | |
68 */ | |
69 | |
70 GLOBAL void psaT30_Init ( void ) | |
71 { | |
72 memset (&t30ShrdPrm, 0, sizeof (T_T30_SHRD_PRM)); | |
73 t30ShrdPrm.faxStat = NO_VLD_FS; | |
74 t30ShrdPrm.T30_is_activated = FALSE; | |
75 } | |
76 | |
77 /* | |
78 +-------------------------------------------------------------------+ | |
79 | PROJECT : GSM-PS (6147) MODULE : PSA_RAF | | |
80 | ROUTINE : psaT30_shrPrmDump | | |
81 +-------------------------------------------------------------------+ | |
82 | |
83 PURPOSE : this function dumps the shared parameter to the debug | |
84 output. | |
85 */ | |
86 | |
87 #ifdef TRACING | |
88 GLOBAL void psaT30_shrPrmDump ( void ) | |
89 { | |
90 char lnBuf[80]; /* holds buffer for output line */ | |
91 SHORT chrNr; /* holds number of processed chars */ | |
92 | |
93 /* --- call id -----------------------------------------------*/ | |
94 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " call id" ); | |
95 | |
96 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.cId ); | |
97 TRACE_EVENT( lnBuf ); | |
98 | |
99 /* --- FAX status --------------------------------------------*/ | |
100 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "FAX status" ); | |
101 | |
102 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.faxStat ); | |
103 TRACE_EVENT( lnBuf ); | |
104 | |
105 /* --- transmission rate -------------------------------------*/ | |
106 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "trans rate" ); | |
107 | |
108 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.trans_rate ); | |
109 TRACE_EVENT( lnBuf ); | |
110 | |
111 /* --- half rate ---------------------------------------------*/ | |
112 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " half rate" ); | |
113 | |
114 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.half_rate ); | |
115 TRACE_EVENT( lnBuf ); | |
116 | |
117 /* --- threshold ---------------------------------------------*/ | |
118 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " threshold" ); | |
119 | |
120 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.threshold ); | |
121 TRACE_EVENT( lnBuf ); | |
122 | |
123 /* --- frames per prim ---------------------------------------*/ | |
124 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "frame/prim" ); | |
125 | |
126 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.frames_per_prim ); | |
127 TRACE_EVENT( lnBuf ); | |
128 | |
129 /* --- hdlc report -------------------------------------------*/ | |
130 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " HDLC rpt" ); | |
131 | |
132 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.hdlc_report ); | |
133 TRACE_EVENT( lnBuf ); | |
134 | |
135 /* --- final --------------------------------------------------*/ | |
136 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "final flag" ); | |
137 | |
138 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.final ); | |
139 TRACE_EVENT( lnBuf ); | |
140 | |
141 /* --- signal receive -----------------------------------------*/ | |
142 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "signal rcv" ); | |
143 | |
144 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.sgn_rcv ); | |
145 TRACE_EVENT( lnBuf ); | |
146 | |
147 /* --- signal send --------------------------------------------*/ | |
148 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "signal snd" ); | |
149 | |
150 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.sgn_snd ); | |
151 TRACE_EVENT( lnBuf ); | |
152 | |
153 /* --- complete -----------------------------------------------*/ | |
154 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " complete" ); | |
155 | |
156 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.cmpl ); | |
157 TRACE_EVENT( lnBuf ); | |
158 | |
159 /* --- error cause --------------------------------------------*/ | |
160 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " err cause" ); | |
161 | |
162 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.err_cause ); | |
163 TRACE_EVENT( lnBuf ); | |
164 | |
165 /* --- eol ----------------------------------------------------*/ | |
166 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " eol" ); | |
167 | |
168 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, t30ShrdPrm.eol ); | |
169 TRACE_EVENT( lnBuf ); | |
170 } | |
171 #endif /* of #ifdef TRACING */ | |
172 #endif /* FF_FAX */ | |
173 /*==== EOF ========================================================*/ | |
174 |