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