FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/ati_em_ret.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 : | |
4 | Modul : | |
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 data preparation for the at-cmd output. | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef ATI_EM_RET_C | |
22 #define ATI_EM_RET_C | |
23 #endif | |
24 | |
25 #include "aci_all.h" | |
26 /*===== INCLUDES ===================================================*/ | |
27 #include "aci_cmh.h" | |
28 #include "ati_cmd.h" | |
29 #include "aci_mem.h" | |
30 #include "aci_io.h" | |
31 #include "aci_cmd.h" | |
32 #include "ati_cmd.h" | |
33 | |
34 #include "aci.h" | |
35 #include "psa.h" | |
36 | |
37 #ifdef GPRS | |
38 #include "gprs.h" | |
39 #endif | |
40 | |
41 #if (defined(FAX_AND_DATA) || defined(UART) || defined(GPRS)) | |
42 #include "dti.h" | |
43 #include "dti_conn_mng.h" | |
44 #endif | |
45 | |
46 #include "cmh.h" | |
47 #include "cmh_snd.h" | |
48 #include "aci_em.h" | |
49 #include "cmh_em.h" | |
50 #ifdef GPRS | |
51 #include "gaci.h" | |
52 #include "gaci_cmh.h" | |
53 #include "cmh_sm.h" | |
54 #endif | |
55 | |
56 #include "aci_lst.h" | |
57 #include "ati_int.h" | |
58 | |
59 /*==== CONSTANTS ==================================================*/ | |
60 | |
61 /*==== TYPES ======================================================*/ | |
62 | |
63 /*==== EXPORT =====================================================*/ | |
64 EXTERN void em_aci_sem (UBYTE entity, UBYTE *buffer, UBYTE buf_index_tmp); | |
65 | |
66 EXTERN SHORT em_relcs; | |
67 | |
68 #if !defined (WIN32) | |
69 EXTERN CHAR* l1_version(void); | |
70 EXTERN CHAR* dl_version(void); | |
71 EXTERN CHAR* rr_version(void); | |
72 EXTERN CHAR* mm_version(void); | |
73 EXTERN CHAR* cc_version(void); | |
74 EXTERN CHAR* ss_version(void); | |
75 EXTERN CHAR* sim_version(void); | |
76 EXTERN CHAR* sms_version(void); | |
77 //EXTERN CHAR* aci_version(void); | |
78 #endif | |
79 | |
80 /*==== VARIABLES ==================================================*/ | |
81 | |
82 /*==== FUNCTIONS ==================================================*/ | |
83 | |
84 /* | |
85 +--------------------------------------------------------------------+ | |
86 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET | | |
87 | STATE : code ROUTINE : rCI_OK | | |
88 +--------------------------------------------------------------------+ | |
89 | |
90 PURPOSE : handles AT_OK call back | |
91 | |
92 */ | |
93 | |
94 GLOBAL void rCI_PercentEM ( /*UBYTE srcId,*/ T_EM_VAL * val_tmp ) | |
95 { | |
96 char *me="%EM: "; | |
97 //#if !defined (WIN32) | |
98 char *ver="%VER: "; | |
99 //#endif /* WIN32 */ | |
100 int i=0, j=0; | |
101 UBYTE srcId = srcId_cb,c_state,cid; | |
102 USHORT tmp = 0; | |
103 | |
104 TRACE_FUNCTION("rCI_PercentEM ()"); | |
105 | |
106 switch(val_tmp->em_utype) | |
107 { | |
108 case EM_SUBCLASS_SC: | |
109 sprintf(g_sa, "%s%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", | |
110 me, | |
111 val_tmp->em_u.em_sc_val.arfcn, val_tmp->em_u.em_sc_val.c1, | |
112 val_tmp->em_u.em_sc_val.c2, val_tmp->em_u.em_sc_val.rxlev, | |
113 val_tmp->em_u.em_sc_val.bsic, val_tmp->em_u.em_sc_val.cell_id, | |
114 val_tmp->em_u.em_sc_val.dsc, | |
115 val_tmp->em_u.em_sc_val.txlev, val_tmp->em_u.em_sc_val.tn, | |
116 val_tmp->em_u.em_sc_val.rlt, val_tmp->em_u.em_sc_val.tav, | |
117 val_tmp->em_u.em_sc_val.rxlev_f, val_tmp->em_u.em_sc_val.rxlev_s, | |
118 val_tmp->em_u.em_sc_val.rxqual_f, val_tmp->em_u.em_sc_val.rxqual_s, | |
119 val_tmp->em_u.em_sc_val.lac, val_tmp->em_u.em_sc_val.cba, | |
120 val_tmp->em_u.em_sc_val.cbq, val_tmp->em_u.em_sc_val.cell_type_ind, | |
121 val_tmp->em_u.em_sc_val.vocoder); | |
122 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
123 break; | |
124 #ifdef GPRS | |
125 case EM_SUBCLASS_SC_GPRS: | |
126 sprintf(g_sa, "%s%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", | |
127 me, | |
128 val_tmp->em_u.em_sc_gprs_val.tn, val_tmp->em_u.em_sc_gprs_val.nmo, | |
129 val_tmp->em_u.em_sc_gprs_val.net_ctrl.spgc_ccch_sup, | |
130 val_tmp->em_u.em_sc_gprs_val.net_ctrl.priority_access_thr, | |
131 val_tmp->em_u.em_sc_gprs_val.cba, val_tmp->em_u.em_sc_gprs_val.rac, | |
132 val_tmp->em_u.em_sc_gprs_val.tav, val_tmp->em_u.em_sc_gprs_val.dsc, | |
133 val_tmp->em_u.em_sc_gprs_val.c31, val_tmp->em_u.em_sc_gprs_val.c32, | |
134 val_tmp->em_u.em_sc_gprs_val.nco); | |
135 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
136 break; | |
137 #endif /* GPRS */ | |
138 case EM_SUBCLASS_NC: | |
139 sprintf(g_sa, "%s%d", me, val_tmp->em_u.em_nc_val.no_ncells); | |
140 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
141 | |
142 sprintf(g_sa, "%d,%d,%d,%d,%d,%d", | |
143 val_tmp->em_u.em_nc_val.arfcn_nc[0], val_tmp->em_u.em_nc_val.arfcn_nc[1], | |
144 val_tmp->em_u.em_nc_val.arfcn_nc[2], val_tmp->em_u.em_nc_val.arfcn_nc[3], | |
145 val_tmp->em_u.em_nc_val.arfcn_nc[4], val_tmp->em_u.em_nc_val.arfcn_nc[5]); | |
146 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
147 | |
148 sprintf(g_sa, "%d,%d,%d,%d,%d,%d", | |
149 val_tmp->em_u.em_nc_val.c1_nc[0], val_tmp->em_u.em_nc_val.c1_nc[1], | |
150 val_tmp->em_u.em_nc_val.c1_nc[2], val_tmp->em_u.em_nc_val.c1_nc[3], | |
151 val_tmp->em_u.em_nc_val.c1_nc[4], val_tmp->em_u.em_nc_val.c1_nc[5]); | |
152 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
153 | |
154 sprintf(g_sa, "%d,%d,%d,%d,%d,%d", | |
155 val_tmp->em_u.em_nc_val.c2_nc[0], val_tmp->em_u.em_nc_val.c2_nc[1], | |
156 val_tmp->em_u.em_nc_val.c2_nc[2], val_tmp->em_u.em_nc_val.c2_nc[3], | |
157 val_tmp->em_u.em_nc_val.c2_nc[4], val_tmp->em_u.em_nc_val.c2_nc[5]); | |
158 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
159 | |
160 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
161 val_tmp->em_u.em_nc_val.rxlev_nc[0], val_tmp->em_u.em_nc_val.rxlev_nc[1], | |
162 val_tmp->em_u.em_nc_val.rxlev_nc[2], val_tmp->em_u.em_nc_val.rxlev_nc[3], | |
163 val_tmp->em_u.em_nc_val.rxlev_nc[4], val_tmp->em_u.em_nc_val.rxlev_nc[5]); | |
164 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
165 | |
166 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
167 val_tmp->em_u.em_nc_val.bsic_nc[0], val_tmp->em_u.em_nc_val.bsic_nc[1], | |
168 val_tmp->em_u.em_nc_val.bsic_nc[2], val_tmp->em_u.em_nc_val.bsic_nc[3], | |
169 val_tmp->em_u.em_nc_val.bsic_nc[4], val_tmp->em_u.em_nc_val.bsic_nc[5]); | |
170 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
171 | |
172 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
173 val_tmp->em_u.em_nc_val.cell_id_nc[0], val_tmp->em_u.em_nc_val.cell_id_nc[1], | |
174 val_tmp->em_u.em_nc_val.cell_id_nc[2], val_tmp->em_u.em_nc_val.cell_id_nc[3], | |
175 val_tmp->em_u.em_nc_val.cell_id_nc[4], val_tmp->em_u.em_nc_val.cell_id_nc[5]); | |
176 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
177 | |
178 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
179 val_tmp->em_u.em_nc_val.lac_nc[0], val_tmp->em_u.em_nc_val.lac_nc[1], | |
180 val_tmp->em_u.em_nc_val.lac_nc[2], val_tmp->em_u.em_nc_val.lac_nc[3], | |
181 val_tmp->em_u.em_nc_val.lac_nc[4], val_tmp->em_u.em_nc_val.lac_nc[5]); | |
182 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
183 | |
184 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
185 val_tmp->em_u.em_nc_val.frame_offset[0], val_tmp->em_u.em_nc_val.frame_offset[1], | |
186 val_tmp->em_u.em_nc_val.frame_offset[2], val_tmp->em_u.em_nc_val.frame_offset[3], | |
187 val_tmp->em_u.em_nc_val.frame_offset[4], val_tmp->em_u.em_nc_val.frame_offset[5]); | |
188 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
189 | |
190 sprintf(g_sa,"%ld,%ld,%ld,%ld,%ld,%ld", | |
191 val_tmp->em_u.em_nc_val.time_alignmt[0], val_tmp->em_u.em_nc_val.time_alignmt[1], | |
192 val_tmp->em_u.em_nc_val.time_alignmt[2], val_tmp->em_u.em_nc_val.time_alignmt[3], | |
193 val_tmp->em_u.em_nc_val.time_alignmt[4], val_tmp->em_u.em_nc_val.time_alignmt[5]); | |
194 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
195 | |
196 sprintf(g_sa,"%ld,%ld,%ld,%ld,%ld,%ld", | |
197 val_tmp->em_u.em_nc_val.cba_nc[0], val_tmp->em_u.em_nc_val.cba_nc[1], | |
198 val_tmp->em_u.em_nc_val.cba_nc[2], val_tmp->em_u.em_nc_val.cba_nc[3], | |
199 val_tmp->em_u.em_nc_val.cba_nc[4], val_tmp->em_u.em_nc_val.cba_nc[5]); | |
200 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
201 | |
202 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
203 val_tmp->em_u.em_nc_val.cbq_nc[0], val_tmp->em_u.em_nc_val.cbq_nc[1], | |
204 val_tmp->em_u.em_nc_val.cbq_nc[2], val_tmp->em_u.em_nc_val.cbq_nc[3], | |
205 val_tmp->em_u.em_nc_val.cbq_nc[4], val_tmp->em_u.em_nc_val.cbq_nc[5]); | |
206 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
207 | |
208 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
209 val_tmp->em_u.em_nc_val.cell_type_ind[0], val_tmp->em_u.em_nc_val.cell_type_ind[1], | |
210 val_tmp->em_u.em_nc_val.cell_type_ind[2], val_tmp->em_u.em_nc_val.cell_type_ind[3], | |
211 val_tmp->em_u.em_nc_val.cell_type_ind[4], val_tmp->em_u.em_nc_val.cell_type_ind[5]); | |
212 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
213 | |
214 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
215 val_tmp->em_u.em_nc_val.rac[0], val_tmp->em_u.em_nc_val.rac[1], | |
216 val_tmp->em_u.em_nc_val.rac[2], val_tmp->em_u.em_nc_val.rac[3], | |
217 val_tmp->em_u.em_nc_val.rac[4], val_tmp->em_u.em_nc_val.rac[5]); | |
218 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
219 | |
220 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
221 val_tmp->em_u.em_nc_val.cell_resel_offset[0], val_tmp->em_u.em_nc_val.cell_resel_offset[1], | |
222 val_tmp->em_u.em_nc_val.cell_resel_offset[2], val_tmp->em_u.em_nc_val.cell_resel_offset[3], | |
223 val_tmp->em_u.em_nc_val.cell_resel_offset[4], val_tmp->em_u.em_nc_val.cell_resel_offset[5]); | |
224 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
225 | |
226 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
227 val_tmp->em_u.em_nc_val.temp_offset[0], val_tmp->em_u.em_nc_val.temp_offset[1], | |
228 val_tmp->em_u.em_nc_val.temp_offset[2], val_tmp->em_u.em_nc_val.temp_offset[3], | |
229 val_tmp->em_u.em_nc_val.temp_offset[4], val_tmp->em_u.em_nc_val.temp_offset[5]); | |
230 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
231 | |
232 sprintf(g_sa,"%d,%d,%d,%d,%d,%d", | |
233 val_tmp->em_u.em_nc_val.rxlev_acc_min[0], val_tmp->em_u.em_nc_val.rxlev_acc_min[1], | |
234 val_tmp->em_u.em_nc_val.rxlev_acc_min[2], val_tmp->em_u.em_nc_val.rxlev_acc_min[3], | |
235 val_tmp->em_u.em_nc_val.rxlev_acc_min[4], val_tmp->em_u.em_nc_val.rxlev_acc_min[5]); | |
236 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
237 break; | |
238 case EM_SUBCLASS_LOC_PAG: | |
239 sprintf(g_sa,"%s%d,%d,%d%d%d,%d%d%d,%ld", | |
240 me, | |
241 val_tmp->em_u.em_loc_val.bs_pa_mfrms, val_tmp->em_u.em_loc_val.t3212, | |
242 val_tmp->em_u.em_loc_val.mcc[0], val_tmp->em_u.em_loc_val.mcc[1], val_tmp->em_u.em_loc_val.mcc[2], | |
243 val_tmp->em_u.em_loc_val.mnc[0], val_tmp->em_u.em_loc_val.mnc[1], val_tmp->em_u.em_loc_val.mnc[2], | |
244 val_tmp->em_u.em_loc_val.tmsi); | |
245 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
246 break; | |
247 case EM_SUBCLASS_PLMN: | |
248 sprintf(g_sa,"%s%d,%d,%d,%d,%d", | |
249 me, | |
250 val_tmp->em_u.em_plmn_val.no_creq_max, val_tmp->em_u.em_plmn_val.reest_flag, | |
251 val_tmp->em_u.em_plmn_val.txpwr_max, val_tmp->em_u.em_plmn_val.rxlev_min, | |
252 em_relcs); | |
253 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
254 break; | |
255 case EM_SUBCLASS_CIPH_HOP_DTX: | |
256 sprintf(g_sa,"%s%d,%d,%d,%d,%d,%d", | |
257 me, | |
258 val_tmp->em_u.em_cip_val.ciph_stat, | |
259 val_tmp->em_u.em_cip_val.hop, | |
260 val_tmp->em_u.em_cip_val.arfcn, | |
261 val_tmp->em_u.em_cip_val.hsn, | |
262 val_tmp->em_u.em_cip_val.dtx_stat, | |
263 val_tmp->em_u.em_cip_val.v_start); | |
264 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
265 | |
266 if(val_tmp->em_u.em_cip_val.hop) | |
267 { | |
268 sprintf(g_sa,"%d,%d", | |
269 val_tmp->em_u.em_cip_val.hop_chn.maio, | |
270 val_tmp->em_u.em_cip_val.hop_chn.nr_arfcns); | |
271 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
272 | |
273 i=0; | |
274 j=0; | |
275 /* The while loop exits when the content of ma[] equals 0xFFFF and the index exceeds the value 63 */ | |
276 while(val_tmp->em_u.em_cip_val.hop_chn.ma[j] NEQ NOT_PRESENT_16BIT && j<EM_MAX_MA_CHANNELS) | |
277 { | |
278 i+=sprintf(g_sa+i, "%d,", val_tmp->em_u.em_cip_val.hop_chn.ma[j++]); | |
279 if (i>(int)sizeof(g_sa)-20) /* Check if we reach the buffer limit */ | |
280 { | |
281 io_sendMessage(srcId, g_sa,ATI_ECHO_OUTPUT); /* and send the data in chunks w/o CRLF */ | |
282 i=0; | |
283 g_sa[0]='\0'; | |
284 } | |
285 } | |
286 if(i>0) | |
287 { | |
288 g_sa[i-1]='\0'; | |
289 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
290 } | |
291 | |
292 if(val_tmp->em_u.em_cip_val.v_start) | |
293 { | |
294 sprintf(g_sa,"%d,%d", | |
295 val_tmp->em_u.em_cip_val.hop_chn2.maio, | |
296 val_tmp->em_u.em_cip_val.hop_chn2.nr_arfcns); | |
297 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
298 | |
299 i=0; | |
300 j=0; | |
301 /* The while loop exits when the content of ma[] equals 0xFFFF and the index exceeds the value 63 */ | |
302 while(val_tmp->em_u.em_cip_val.hop_chn2.ma[j] NEQ NOT_PRESENT_16BIT && j<EM_MAX_MA_CHANNELS) | |
303 { | |
304 i+=sprintf(g_sa+i, "%d,", val_tmp->em_u.em_cip_val.hop_chn2.ma[j++]); | |
305 if (i>(int)sizeof(g_sa)-20) | |
306 { | |
307 io_sendMessage(srcId, g_sa,ATI_ECHO_OUTPUT); | |
308 i=0; | |
309 g_sa[0]='\0'; | |
310 } | |
311 } | |
312 if(i>0) | |
313 { | |
314 g_sa[i-1]='\0'; | |
315 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
316 } | |
317 } | |
318 } /* hopping is configured */ | |
319 | |
320 break; | |
321 case EM_SUBCLASS_POWER: | |
322 sprintf(g_sa,"%s%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", | |
323 me, | |
324 val_tmp->em_u.em_power_val.classm2.rev_lev, val_tmp->em_u.em_power_val.classm2.es_ind, | |
325 val_tmp->em_u.em_power_val.classm2.a5_1, val_tmp->em_u.em_power_val.classm2.rf_pow_cap, | |
326 val_tmp->em_u.em_power_val.classm2.ps_cap, val_tmp->em_u.em_power_val.classm2.ss_screen, | |
327 val_tmp->em_u.em_power_val.classm2.sm_cap, val_tmp->em_u.em_power_val.classm2.freq_cap, | |
328 val_tmp->em_u.em_power_val.classm2.class_3, val_tmp->em_u.em_power_val.classm2.cmsp, | |
329 val_tmp->em_u.em_power_val.classm2.a5_3, val_tmp->em_u.em_power_val.classm2.a5_2); | |
330 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
331 | |
332 sprintf(g_sa,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", | |
333 val_tmp->em_u.em_power_val.classm3.mb_sub, val_tmp->em_u.em_power_val.classm3.a5_7, | |
334 val_tmp->em_u.em_power_val.classm3.a5_6, val_tmp->em_u.em_power_val.classm3.a5_5, | |
335 val_tmp->em_u.em_power_val.classm3.a5_4, val_tmp->em_u.em_power_val.classm3.v_radio_cap_2, | |
336 val_tmp->em_u.em_power_val.classm3.radio_cap_2, val_tmp->em_u.em_power_val.classm3.v_radio_cap_1, | |
337 val_tmp->em_u.em_power_val.classm3.radio_cap_1, val_tmp->em_u.em_power_val.classm3.v_r_support, | |
338 val_tmp->em_u.em_power_val.classm3.r_support, val_tmp->em_u.em_power_val.classm3.v_m_s_class, | |
339 val_tmp->em_u.em_power_val.classm3.m_s_class, val_tmp->em_u.em_power_val.classm3.ucs2_treat, | |
340 val_tmp->em_u.em_power_val.classm3.ext_meas_cap, val_tmp->em_u.em_power_val.classm3.v_meas_cap, | |
341 val_tmp->em_u.em_power_val.classm3.meas_cap.sw_time, val_tmp->em_u.em_power_val.classm3.meas_cap.sws_time); | |
342 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
343 break; | |
344 case EM_SUBCLASS_ID: | |
345 i=0; | |
346 i=sprintf(g_sa,"%s%d,%d,%d,%d,", | |
347 me, | |
348 val_tmp->em_u.em_id_val.em_imeisv.ident_type, | |
349 val_tmp->em_u.em_id_val.em_imeisv.odd_even, | |
350 val_tmp->em_u.em_id_val.em_imeisv.v_ident_dig, | |
351 val_tmp->em_u.em_id_val.em_imeisv.c_ident_dig); | |
352 for(j=0; j<15; j++) { | |
353 i+=sprintf(g_sa+i,"%d,", val_tmp->em_u.em_id_val.em_imeisv.ident_dig[j]); | |
354 } | |
355 i+=sprintf(g_sa+i,"%d", val_tmp->em_u.em_id_val.em_imeisv.ident_dig[15]); | |
356 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
357 | |
358 i=0; | |
359 i=sprintf(g_sa,"%d,%d,%d,%d,", | |
360 val_tmp->em_u.em_id_val.em_imsi.ident_type, | |
361 val_tmp->em_u.em_id_val.em_imsi.odd_even, | |
362 val_tmp->em_u.em_id_val.em_imsi.v_ident_dig, | |
363 val_tmp->em_u.em_id_val.em_imsi.c_ident_dig); | |
364 for(j=0; j<15; j++) { | |
365 i+=sprintf(g_sa+i,"%d,", val_tmp->em_u.em_id_val.em_imsi.ident_dig[j]); | |
366 } | |
367 i+=sprintf(g_sa+i,"%d", val_tmp->em_u.em_id_val.em_imsi.ident_dig[15]); | |
368 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
369 | |
370 sprintf(g_sa,"%ld", val_tmp->em_u.em_id_val.tmsi); | |
371 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
372 break; | |
373 case EM_SUBCLASS_SW_VERSION: | |
374 #if !defined (WIN32) | |
375 sprintf(g_sa,"%s%s",ver,l1_version()); | |
376 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
377 sprintf(g_sa,"%s%s",ver,dl_version()); | |
378 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
379 sprintf(g_sa,"%s%s",ver,rr_version()); | |
380 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
381 sprintf(g_sa,"%s%s",ver,mm_version()); | |
382 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
383 sprintf(g_sa,"%s%s",ver,cc_version()); | |
384 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
385 sprintf(g_sa,"%s%s",ver,ss_version()); | |
386 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
387 sprintf(g_sa,"%s%s",ver,sim_version()); | |
388 io_sendMessage(srcId, g_sa,ATI_NORMAL_OUTPUT); | |
389 sprintf(g_sa,"%s%s",ver,sms_version()); | |
390 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
391 #else | |
392 sprintf(g_sa,"%s%s",ver,"ALR"); | |
393 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
394 sprintf(g_sa,"%s%s",ver,"DL"); | |
395 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
396 sprintf(g_sa,"%s%s",ver,"RR"); | |
397 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
398 sprintf(g_sa,"%s%s",ver,"MM"); | |
399 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
400 sprintf(g_sa,"%s%s",ver,"CC"); | |
401 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
402 sprintf(g_sa,"%s%s",ver,"SMS"); | |
403 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
404 sprintf(g_sa,"%s%s",ver,"SS"); | |
405 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
406 sprintf(g_sa,"%s%s",ver,"ACI"); | |
407 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
408 #endif /* WIN 32 */ | |
409 break; | |
410 #ifdef GPRS | |
411 case EM_SUBCLASS_GMM: /*SAP needed*/ | |
412 sprintf(g_sa, "%s%d,%u,%u,%u,%u,%d,%d,%d", | |
413 me, | |
414 val_tmp->em_u.em_gmm_val.ready_state, | |
415 val_tmp->em_u.em_gmm_val.tlli, | |
416 val_tmp->em_u.em_gmm_val.ptmsi, | |
417 val_tmp->em_u.em_gmm_val.ptmsi_sig, | |
418 val_tmp->em_u.em_gmm_val.ready_timer, | |
419 val_tmp->em_u.em_gmm_val.ciphering_algorithm, | |
420 val_tmp->em_u.em_gmm_val.t3312.t3312_deactivated, | |
421 val_tmp->em_u.em_gmm_val.t3312.t3312_val); | |
422 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
423 break; | |
424 case EM_SUBCLASS_GRLC: | |
425 sprintf(g_sa, "%s%d,%d,%d,%d,%d,%d,%d,%d,%d", | |
426 me, | |
427 val_tmp->em_u.em_grlc_val.grlc_state, | |
428 val_tmp->em_u.em_grlc_val.tbf_mod, | |
429 val_tmp->em_u.em_grlc_val.ul_tbf_par.tfi, | |
430 val_tmp->em_u.em_grlc_val.ul_tbf_par.mac_mod, | |
431 val_tmp->em_u.em_grlc_val.ul_tbf_par.ul_nb_block, | |
432 val_tmp->em_u.em_grlc_val.ul_tbf_par.cv, | |
433 val_tmp->em_u.em_grlc_val.ul_tbf_par.cs, | |
434 val_tmp->em_u.em_grlc_val.dl_tbf_par.tfi, | |
435 val_tmp->em_u.em_grlc_val.dl_tbf_par.mac_mod); | |
436 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
437 break; | |
438 #endif /*GPRS*/ | |
439 case EM_SUBCLASS_AMR: | |
440 sprintf(g_sa, "%s%d,%d,%d,%d,%d,%d,", | |
441 me, | |
442 val_tmp->em_u.em_amr_val.amr_vocoder, | |
443 val_tmp->em_u.em_amr_val.amr_icmi, | |
444 val_tmp->em_u.em_amr_val.amr_icm, | |
445 val_tmp->em_u.em_amr_val.amr_acs, | |
446 val_tmp->em_u.em_amr_val.amr_first_codec, | |
447 val_tmp->em_u.em_amr_val.amr_nr_modes); | |
448 | |
449 #ifdef _SIMULATION_ | |
450 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); /* Simulation needs CRLF */ | |
451 #else | |
452 io_sendMessage(srcId, g_sa, ATI_ECHO_OUTPUT); /* send without CRLF */ | |
453 #endif | |
454 | |
455 sprintf(g_sa, "%d,%d,%d,%d,%d,%d", | |
456 val_tmp->em_u.em_amr_val.amr_cod_prop[0].amr_codec_thr, val_tmp->em_u.em_amr_val.amr_cod_prop[0].amr_codec_hyst, | |
457 val_tmp->em_u.em_amr_val.amr_cod_prop[1].amr_codec_thr, val_tmp->em_u.em_amr_val.amr_cod_prop[1].amr_codec_hyst, | |
458 val_tmp->em_u.em_amr_val.amr_cod_prop[2].amr_codec_thr, val_tmp->em_u.em_amr_val.amr_cod_prop[2].amr_codec_hyst); | |
459 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
460 break; | |
461 #ifdef GPRS | |
462 case EM_SUBCLASS_PDP: | |
463 sprintf(g_sa, "%s%d", me,MAX_CID); | |
464 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
465 | |
466 for(cid=1;cid<=MAX_PDP_CTXT;cid++) | |
467 { | |
468 c_state = get_state_over_cid( cid ); | |
469 | |
470 if((c_state EQ CS_UNDEFINED) OR (c_state EQ CS_INVALID_STATE)) | |
471 sprintf(g_sa, "%d", c_state); | |
472 else | |
473 { | |
474 sprintf(g_sa, "%d,%s,%s,%s", | |
475 c_state, | |
476 pdp_context[cid-1].con.pdp_type, | |
477 pdp_context[cid-1].con.apn, | |
478 ((c_state EQ CS_ACTIVATED) OR (c_state EQ CS_DATA_LINK)) | |
479 ? pdp_context[cid-1].allocated_pdp_addr : pdp_context[cid-1].con.pdp_addr); | |
480 } | |
481 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
482 } /* MAX_CID */ | |
483 | |
484 break; | |
485 #endif | |
486 default: | |
487 break; | |
488 } /* switch */ | |
489 } | |
490 | |
491 GLOBAL void rCI_PercentEMET ( /*UBYTE srcId,*/ T_DRV_SIGNAL_EM_EVENT * Signal ) | |
492 { | |
493 int i=0, j=0; | |
494 UBYTE srcId = srcId_cb; | |
495 | |
496 TRACE_FUNCTION("rCI_PercentEMET ()"); | |
497 | |
498 if (Signal->Data.alr.length NEQ 0) | |
499 { | |
500 char *me="%EMET L1: "; | |
501 | |
502 i+=sprintf(g_sa+i, "%s",me); | |
503 for(j=0; j<Signal->Data.alr.length; j++) { | |
504 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
505 } | |
506 | |
507 i+=sprintf(g_sa+i,"%s", "FF"); | |
508 } | |
509 if (Signal->Data.dl.length NEQ 0) | |
510 { | |
511 char *me="%EMET DL: "; | |
512 | |
513 i+=sprintf(g_sa+i, "%s",me); | |
514 for(j=0; j<Signal->Data.dl.length; j++) { | |
515 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
516 } | |
517 | |
518 i+=sprintf(g_sa+i,"%s", "FF"); | |
519 } | |
520 if (Signal->Data.rr.length NEQ 0) | |
521 { | |
522 char *me="%EMET RR: "; | |
523 | |
524 i+=sprintf(g_sa+i, "%s",me); | |
525 for(j=0; j<Signal->Data.rr.length; j++) { | |
526 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
527 } | |
528 | |
529 i+=sprintf(g_sa+i,"%s", "FF"); | |
530 } | |
531 if (Signal->Data.mm.length NEQ 0) | |
532 { | |
533 char *me="%EMET MM: "; | |
534 | |
535 i+=sprintf(g_sa+i, "%s",me); | |
536 for(j=0; j<Signal->Data.mm.length; j++) { | |
537 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
538 } | |
539 | |
540 i+=sprintf(g_sa+i,"%s", "FF"); | |
541 } | |
542 if (Signal->Data.cc.length NEQ 0) | |
543 { | |
544 char *me="%EMET CC: "; | |
545 | |
546 i+=sprintf(g_sa+i, "%s",me); | |
547 for(j=0; j<Signal->Data.cc.length; j++) { | |
548 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
549 } | |
550 | |
551 i+=sprintf(g_sa+i,"%s", "FF"); | |
552 } | |
553 if (Signal->Data.ss.length NEQ 0) | |
554 { | |
555 char *me="%EMET SS: "; | |
556 | |
557 i+=sprintf(g_sa+i, "%s",me); | |
558 for(j=0; j<Signal->Data.ss.length; j++) { | |
559 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
560 } | |
561 | |
562 i+=sprintf(g_sa+i,"%s", "FF"); | |
563 } | |
564 if (Signal->Data.sms.length NEQ 0) | |
565 { | |
566 char *me="%EMET SMS: "; | |
567 | |
568 i+=sprintf(g_sa+i, "%s",me); | |
569 for(j=0; j<Signal->Data.sms.length; j++) { | |
570 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
571 } | |
572 | |
573 i+=sprintf(g_sa+i,"%s", "FF"); | |
574 } | |
575 if (Signal->Data.sim.length NEQ 0) | |
576 { | |
577 char *me="%EMET SIM: "; | |
578 | |
579 i+=sprintf(g_sa+i, "%s",me); | |
580 for(j=0; j<Signal->Data.sim.length; j++) { | |
581 i+=sprintf(g_sa+i,"%d,", *(Signal->Pointer++)); | |
582 } | |
583 | |
584 i+=sprintf(g_sa+i,"%s", "FF"); | |
585 } | |
586 if (i EQ 0) | |
587 { | |
588 char *me="%EMET END"; | |
589 i=sprintf(g_sa, "%s",me); | |
590 } | |
591 | |
592 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
593 | |
594 } /* rCI_PercentEMET */ | |
595 | |
596 | |
597 GLOBAL void rCI_PercentEMETS ( UBYTE entity ) | |
598 { | |
599 TRACE_FUNCTION("rCI_PercentEMETS ()"); | |
600 } | |
601 | |
602 /*+++++++++++++++++++++++++++++++++++++++++ E O F +++++++++++++++++++++++++++++++++++++++++*/ | |
603 |