comparison g23m/condat/ms/src/aci/ati_sat.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-F&D (8411)
4 | Modul : ATI
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 : AT Command Interpreter for SAT related commands
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifdef SIM_TOOLKIT
22
23 #ifndef ATI_SAT_C
24 #define ATI_SAT_C
25
26 #include "aci_all.h"
27 /*==== INCLUDES ===================================================*/
28 #include "aci_cmh.h"
29 #include "ati_cmd.h"
30 #include "aci_cmd.h"
31 #include "aci_lst.h"
32
33 #include "aci_io.h"
34 #include "aci_prs.h"
35
36 #include "ati_int.h"
37
38 #ifdef FF_ATI_BAT
39
40 #include "typedefs.h"
41 #include "gdd.h"
42 #include "bat.h"
43
44 #include "ati_bat.h"
45 #endif /* FF_ATI_BAT */
46
47 /*==== CONSTANTS ==================================================*/
48
49 /*==== TYPES ======================================================*/
50
51 /*==== EXPORT =====================================================*/
52
53 /*==== VARIABLES ==================================================*/
54 GLOBAL UBYTE sat[CMD_SRC_MAX];
55
56 /*==== FUNCTIONS ==================================================*/
57
58 /*
59 +--------------------------------------------------------------------+
60 | PROJECT : GSM-F&D (8411) MODULE : ACI_SAT_CMD |
61 | STATE : code ROUTINE : atPercentSATC |
62 +--------------------------------------------------------------------+
63
64 PURPOSE : %SATC Configuration for SIM application toolkit.
65 */
66
67 GLOBAL void aci_sat_cmd_init (void)
68 {
69 T_ACI_CMD_SRC i;
70 for (i=0; i<CMD_SRC_MAX; i++)
71 sat[i] = 0; /* no SIM Toolkit indications */
72 }
73
74 /*
75 +--------------------------------------------------------------------+
76 | PROJECT : GSM-F&D (8411) MODULE : ACI_SAT_CMD |
77 | STATE : code ROUTINE : atPercentSATC |
78 +--------------------------------------------------------------------+
79
80 PURPOSE : %SATC Configuration for SIM application toolkit.
81 */
82
83 GLOBAL T_ATI_RSLT setatPercentSATC(char *cl, UBYTE srcId)
84 {
85 T_ACI_RETURN ret = AT_FAIL;
86 USHORT lenPrfl = 0;
87 USHORT lenPrflStr = 0;
88 SHORT stat = -1;
89 UBYTE *satPrflStr = NULL;
90
91 cl=parse(cl,"rl", &stat,&lenPrflStr,&satPrflStr );
92 #ifdef FF_SAT_E
93 if(!cl OR (stat NEQ -1 AND stat > SATC_ENA_CL_E))
94 #else
95 if(!cl OR (stat NEQ -1 AND stat > 1))
96 #endif
97 {
98 cmdCmeError(CME_ERR_OpNotAllow);
99 return(ATI_FAIL);
100 }
101
102 if( stat NEQ -1 )
103 {
104 sat[srcId] = (UBYTE)stat;
105 }
106
107 if( lenPrflStr )
108 {
109 utl_hexToGsm( satPrflStr, lenPrflStr, satPrflStr, &lenPrfl, GSM_ALPHA_Def,
110 CSCS_ALPHA_Reserved );
111
112 #ifdef FF_ATI_BAT
113 {
114 T_BAT_cmd_send cmd;
115 T_BAT_cmd_set_percent_satc my_bat_set_percent_satc = {0};
116 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
117
118 TRACE_FUNCTION("setatPercentSATC() calls bat_send() <=== as APPLICATION");
119
120 cmd.ctrl_params = BAT_CMD_SET_PERCENT_SATC;
121 cmd.params.ptr_set_percent_satc = &my_bat_set_percent_satc;
122
123 /* Copy and trucate if necessary the satcmd string */
124 if(my_bat_set_percent_satc.c_satprfl = (U8)lenPrfl)
125 {
126 memcpy(my_bat_set_percent_satc.satprfl,
127 satPrflStr,
128 my_bat_set_percent_satc.c_satprfl <= BAT_MAX_CPIN_PIN_LEN ?
129 my_bat_set_percent_satc.c_satprfl : BAT_MAX_CPIN_PIN_LEN);
130 }
131
132 src_params->curAtCmd = AT_CMD_SATC;
133
134 bat_send(ati_bat_get_client(srcId), &cmd);
135 return ATI_EXCT; /* executing, because response is passed by callback function */
136 }
137
138 #else /* no FF_ATI_BAT */
139
140 TRACE_FUNCTION("setatPercentSATC");
141
142 ret = sAT_PercentSATC( srcId, lenPrfl, satPrflStr );
143 if (ret EQ AT_FAIL)
144 {
145 cmdCmeError(CME_ERR_Unknown);
146 }
147 return (map_aci_2_ati_rslt(ret));
148 #endif /* no FF_ATI_BAT */
149 }
150 return(ATI_CMPL);
151 }
152
153 GLOBAL T_ATI_RSLT tesatPercentSATC(char *cl, UBYTE srcId)
154 {
155 TRACE_FUNCTION("tesatPercentSATC");
156
157 sprintf(g_sa,"%s: (0,1),(%d)", "%SATC", MAX_STK_PRF*2);
158 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
159 return ATI_CMPL;
160 }
161
162 GLOBAL T_ATI_RSLT queatPercentSATC(char *cl, UBYTE srcId)
163 {
164 #ifdef FF_ATI_BAT
165
166 T_BAT_cmd_send cmd;
167 T_BAT_no_parameter dummy;
168
169 TRACE_FUNCTION("queatPercentSATC() calls bat_send() <=== as APPLICATION");
170
171 cmd.ctrl_params = BAT_CMD_QUE_PERCENT_SATC;
172 dummy.bat_dummy = 0xFF;
173 cmd.params.ptr_que_percent_satc = &dummy;
174 bat_send(ati_bat_get_client(srcId), &cmd);
175 return ATI_EXCT; /* executing, because response is passed by callback function */
176
177 #else /* no FF_ATI_BAT */
178
179 T_ACI_RETURN ret = AT_FAIL;
180 USHORT lenPrfl = 0;
181 USHORT lenPrflStr = 0;
182 SHORT stat = -1;
183 UBYTE satPrfl[MAX_STK_PRF];
184 UBYTE i;
185
186 TRACE_FUNCTION("queatPercentSATC");
187
188 ret = qAT_PercentSATC(srcId,(SHORT*)&lenPrfl, satPrfl);
189 if (ret EQ AT_CMPL)
190 {
191 i=sprintf(g_sa,"%s: %d,\"", "%SATC", sat[srcId]);
192
193 if (lenPrfl)
194 {
195 utl_binToHex( satPrfl, lenPrfl, g_sa +i );
196 }
197
198 i+=lenPrfl*2;
199 g_sa[i++]='"';
200 g_sa[i]='\0';
201
202 ci_remTrailCom(g_sa,(USHORT)strlen(g_sa));
203 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
204 }
205 else
206 {
207 cmdCmeError(CME_ERR_Unknown);
208 }
209 return (map_aci_2_ati_rslt(ret));
210
211 #endif /* no FF_ATI_BAT */
212 }
213
214 /*
215 +--------------------------------------------------------------------+
216 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
217 | STATE : code ROUTINE : atPercentSATE |
218 +--------------------------------------------------------------------+
219
220 PURPOSE : %SATE Send SAT envelope command
221 */
222 GLOBAL T_ATI_RSLT atPercentSATE(char *cl, UBYTE srcId)
223 {
224 T_ACI_RETURN ret = AT_FAIL;
225 UBYTE *satCmd = NULL ;
226 USHORT lenCmd = 0;
227 USHORT lenCmdStr = 0;
228 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
229
230 cl = parse(cl,"l", &lenCmdStr,&satCmd );
231
232 if(!cl)
233 {
234 cmdCmeError(CME_ERR_OpNotAllow);
235 return ATI_FAIL;
236 }
237
238 utl_hexToGsm( satCmd, lenCmdStr, satCmd, &lenCmd, GSM_ALPHA_Def,
239 CSCS_ALPHA_Reserved );
240
241 #ifdef FF_ATI_BAT
242 {
243 T_BAT_cmd_send cmd;
244 T_BAT_cmd_set_percent_sate my_bat_set_percent_sate = {0};
245
246 TRACE_FUNCTION("setatPercentSATE() calls bat_send() <=== as APPLICATION");
247
248 cmd.ctrl_params = BAT_CMD_SET_PERCENT_SATE;
249 cmd.params.ptr_set_percent_sate = &my_bat_set_percent_sate;
250
251 /* Copy and trucate if necessary the satemd string */
252 if(my_bat_set_percent_sate.c_satcmd = (U8)lenCmd)
253 {
254 memcpy(my_bat_set_percent_sate.satcmd,
255 satCmd,
256 my_bat_set_percent_sate.c_satcmd <= BAT_MAX_STK_CMD ?
257 my_bat_set_percent_sate.c_satcmd : BAT_MAX_STK_CMD);
258 }
259
260 src_params->curAtCmd = AT_CMD_SATE;
261
262 bat_send(ati_bat_get_client(srcId), &cmd);
263 return ATI_EXCT; /* executing, because response is passed by callback function */
264 }
265
266 #else /* no FF_ATI_BAT */
267
268 TRACE_FUNCTION("atPercentSATE");
269
270 ret = sAT_PercentSATE( srcId, lenCmd, satCmd );
271 if (ret EQ AT_EXCT)
272 {
273 src_params->curAtCmd = AT_CMD_SATE;
274 }
275 if (ret EQ AT_FAIL)
276 {
277 cmdCmeError(CME_ERR_Unknown);
278 }
279 return (map_aci_2_ati_rslt(ret));
280 #endif /* no FF_ATI_BAT */
281 }
282
283 /*
284 +--------------------------------------------------------------------+
285 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
286 | STATE : code ROUTINE : atPercentSATR |
287 +--------------------------------------------------------------------+
288
289 PURPOSE : %SATE Send SAT command response
290 */
291 GLOBAL T_ATI_RSLT atPercentSATR(char *cl, UBYTE srcId)
292 {
293 T_ACI_RETURN ret = AT_FAIL;
294 UBYTE *satRsp = NULL ;
295 USHORT lenRsp = 0;
296 USHORT lenRspStr = 0;
297
298 cl = parse(cl,"l", &lenRspStr,&satRsp );
299
300 if(!cl)
301 {
302 cmdCmeError(CME_ERR_OpNotAllow);
303 return ATI_FAIL;
304 }
305
306 utl_hexToGsm( satRsp, lenRspStr, satRsp, &lenRsp, GSM_ALPHA_Def,
307 CSCS_ALPHA_Reserved );
308
309 #ifdef FF_ATI_BAT
310 {
311 T_BAT_cmd_send cmd;
312 T_BAT_cmd_set_percent_satr my_bat_set_percent_satr = {0};
313 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
314
315 TRACE_FUNCTION("setatPercentSATR() calls bat_send() <=== as APPLICATION");
316
317 cmd.ctrl_params = BAT_CMD_SET_PERCENT_SATR;
318 cmd.params.ptr_set_percent_satr = &my_bat_set_percent_satr;
319
320 /* Copy and trucate if necessary the satrmd string */
321 if(my_bat_set_percent_satr.c_satrsp = (U8)lenRsp)
322 {
323 memcpy(my_bat_set_percent_satr.satrsp,
324 satRsp,
325 my_bat_set_percent_satr.c_satrsp <= BAT_MAX_STK_CMD ?
326 my_bat_set_percent_satr.c_satrsp : BAT_MAX_STK_CMD);
327 }
328
329 src_params->curAtCmd = AT_CMD_SATR;
330
331 bat_send(ati_bat_get_client(srcId), &cmd);
332 return ATI_EXCT; /* executing, because response is passed by callback function */
333 }
334
335 #else /* no FF_ATI_BAT */
336
337 TRACE_FUNCTION("atPercentSATR");
338
339 ret = sAT_PercentSATR(srcId, lenRsp, satRsp );
340
341 if (ret NEQ AT_CMPL)
342 {
343 cmdCmeError(CME_ERR_Unknown);
344 }
345 return (map_aci_2_ati_rslt(ret));
346 #endif /* no FF_ATI_BAT */
347 }
348
349 /*
350 +--------------------------------------------------------------------+
351 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
352 | STATE : code ROUTINE : atPercentSATT |
353 +--------------------------------------------------------------------+
354
355 PURPOSE : %SATT Terminate SAT command or session
356 */
357 GLOBAL T_ATI_RSLT atPercentSATT(char *cl, UBYTE srcId)
358 {
359 T_ACI_RETURN ret = AT_FAIL;
360 T_ACI_SATT_CS cs = SATT_CS_NotPresent;
361
362
363 cl = parse(cl,"d", &cs );
364 if(!cl)
365 {
366 cmdCmeError(CME_ERR_OpNotAllow);
367 return ATI_FAIL;
368 }
369
370 #ifdef FF_ATI_BAT
371 {
372 T_BAT_cmd_send cmd;
373 T_BAT_cmd_set_percent_satt my_bat_set_percent_satt = {0};
374 T_ATI_SRC_PARAMS *src_params = find_element (ati_src_list, srcId, search_ati_src_id);
375
376 TRACE_FUNCTION("setatPercentSATT() calls bat_send() <=== as APPLICATION");
377
378 cmd.ctrl_params = BAT_CMD_SET_PERCENT_SATT;
379 cmd.params.ptr_set_percent_satt = &my_bat_set_percent_satt;
380
381 my_bat_set_percent_satt.cs = (T_BAT_percent_satt_cs)cs;
382
383 src_params->curAtCmd = AT_CMD_SATT;
384
385 bat_send(ati_bat_get_client(srcId), &cmd);
386 return ATI_EXCT; /* executing, because response is passed by callback function */
387 }
388
389 #else /* no FF_ATI_BAT */
390
391 TRACE_FUNCTION("atPercentSATT");
392
393 ret = sAT_PercentSATT( srcId, cs );
394
395 if (ret NEQ AT_CMPL)
396 {
397 cmdCmeError(CME_ERR_Unknown);
398 }
399 return (map_aci_2_ati_rslt(ret));
400 #endif /* no FF_ATI_BAT */
401 }
402
403 /*
404 +--------------------------------------------------------------------+
405 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
406 | STATE : code ROUTINE : setatPercentEFRSLT |
407 +--------------------------------------------------------------------+
408
409 PURPOSE : %EFRSLT Response to EF update indication
410 */
411 GLOBAL T_ATI_RSLT setatPercentEFRSLT(char *cl,UBYTE srcId)
412 {
413 T_ACI_EFRSLT_RES res;
414 T_ACI_RETURN ret;
415
416 TRACE_FUNCTION("setatPercentEFRSLT()");
417
418 switch(*cl)
419 {
420 case '0':
421 res=EFRSLT_RES_FAIL;
422 break;
423
424 case '1':
425 res=EFRSLT_RES_OK;
426 break;
427
428 default:
429 cmdCmeError(CME_ERR_OpNotSupp);
430 return(ATI_FAIL);
431 }
432
433 #ifdef FF_ATI_BAT
434
435 {
436 T_BAT_cmd_send cmd;
437 T_BAT_cmd_set_percent_efrslt efrslt;
438
439 cmd.ctrl_params=BAT_CMD_SET_PERCENT_EFRSLT;
440 cmd.params.ptr_set_percent_efrslt=&efrslt;
441
442 /*
443 * This relies on T_BAT_percent_efrslt_result and T_ACI_EFRSLT_RES
444 * being identical.
445 */
446 efrslt.result=(T_BAT_percent_efrslt_result)res;
447
448 bat_send(ati_bat_get_client(srcId),&cmd);
449 return(ATI_EXCT);
450 }
451
452 #else
453
454 ret=sAT_PercentEFRSLT(srcId,res);
455 return(map_aci_2_ati_rslt(ret));
456
457 #endif /*FF_ATI_BAT*/
458 }
459
460
461 /*
462 +--------------------------------------------------------------------+
463 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
464 | STATE : code ROUTINE : setatPercentSIMEF |
465 +--------------------------------------------------------------------+
466
467 PURPOSE : %SIMEF Receive notification of EF updates
468 */
469 GLOBAL T_ATI_RSLT setatPercentSIMEF(char *cl,UBYTE srcId)
470 {
471 T_ACI_SIMEF_MODE mode;
472 T_ACI_RETURN ret;
473
474 TRACE_FUNCTION("setatPercentSIMEF()");
475
476 switch(*cl)
477 {
478 case '0':
479 mode=SIMEF_MODE_OFF;
480 break;
481
482 case '1':
483 mode=SIMEF_MODE_ON;
484 break;
485
486 default:
487 cmdCmeError(CME_ERR_OpNotSupp);
488 return(ATI_FAIL);
489 }
490
491 ret=sAT_PercentSIMEF(srcId,mode);
492
493 return(map_aci_2_ati_rslt(ret));
494 }
495
496
497 /*
498 +--------------------------------------------------------------------+
499 | PROJECT : GSM-F&D (8411) MODULE : ACI_CMD |
500 | STATE : code ROUTINE : queatPercentSIMEF |
501 +--------------------------------------------------------------------+
502
503 PURPOSE : %SIMEF Receive notification of EF updates
504 */
505 GLOBAL T_ATI_RSLT queatPercentSIMEF(char *cl, UBYTE srcId)
506 {
507 T_ACI_RETURN ret;
508 T_ACI_SIMEF_MODE mode;
509
510 TRACE_FUNCTION("queatPercentSIMEF");
511
512 ret=qAT_PercentSIMEF(srcId,&mode);
513
514 if (ret EQ AT_CMPL)
515 {
516 sprintf(g_sa,"%s: %d","%SIMEF",mode);
517 io_sendMessage(srcId,g_sa,ATI_NORMAL_OUTPUT);
518 }
519
520 return(map_aci_2_ati_rslt(ret));
521 }
522
523
524 /*
525 +--------------------------------------------------------------------+
526 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET |
527 | STATE : code ROUTINE : handle_rCI_PercentSATx |
528 +--------------------------------------------------------------------+
529
530 PURPOSE : handles chunked output for several rCI_PercentSAT functions
531 */
532
533 LOCAL void handle_rCI_PercentSATx ( CHAR *prefix,
534 SHORT len,
535 UBYTE *satCmd,
536 T_ACI_SATN_CNTRL_TYPE cntrl_type)
537 {
538 SHORT i;
539 UBYTE srcId = srcId_cb;
540 SHORT chunksize;
541 T_ATI_OUTPUT_TYPE output_type = ATI_INDICATION_OUTPUT |
542 ATI_BEGIN_CRLF_OUTPUT;
543
544 if( sat[srcId] )
545 {
546 i=sprintf(g_sa, "%s: \"", prefix);
547 do
548 {
549 chunksize = (sizeof(g_sa)-i-2)/2; /* -2 for '"' and '\0' at the end, /2 since we occupy two bytes after binToHex */
550
551 if (cntrl_type NEQ SATN_CNTRL_BY_SIM_Not_Present)
552 {
553 chunksize -= 2; /* Take another 2 characters off for the ,<cntrl_type> */
554 }
555 chunksize = MINIMUM(len, chunksize);
556
557 utl_binToHex( satCmd, chunksize, g_sa+i );
558
559 if ((len -= chunksize) EQ 0)
560 {
561 /* end reached? then append CRLF to the last output */
562 output_type |= ATI_END_CRLF_OUTPUT;
563
564 i+=2*chunksize;
565
566 g_sa[i++]='"'; /* closing quotation marks */
567
568 /*
569 ** Add the control type onto the end, if given
570 */
571 if (cntrl_type NEQ SATN_CNTRL_BY_SIM_Not_Present)
572 {
573 g_sa[i++] = ',';
574 switch(cntrl_type)
575 {
576 case SATN_CNTRL_BY_SIM_CALL:
577 g_sa[i++] = '0';
578 break;
579
580 case SATN_CNTRL_BY_SIM_SS:
581 g_sa[i++] = '1';
582 break;
583
584 case SATN_CNTRL_BY_SIM_USSD:
585 g_sa[i++] = '2';
586 break;
587
588 case SATN_CNTRL_BY_SIM_SMS:
589 g_sa[i++] = '3';
590 break;
591
592 default:
593 i--;
594 break;
595 }
596
597 }
598
599 g_sa[i]='\0';
600 }
601
602 io_sendMessageEx(srcId, g_sa, output_type);
603
604 /* remove the BEGIN_CRLF for the next possible chunk */
605 output_type &= ~ATI_BEGIN_CRLF_OUTPUT;
606
607 g_sa[0] = '\0';
608 i=0;
609 satCmd += chunksize;
610 } while (len);
611 }
612 }
613
614
615 /*
616 +--------------------------------------------------------------------+
617 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET |
618 | STATE : code ROUTINE : rCI_PercentSATI |
619 +--------------------------------------------------------------------+
620
621 PURPOSE : handles AT_PercentSATI call back
622
623 */
624
625 GLOBAL void rCI_PercentSATI ( /*UBYTE srcId,*/
626 SHORT len,
627 UBYTE *satCmd)
628 {
629 TRACE_FUNCTION("rCI_PercentSATI()");
630 handle_rCI_PercentSATx ("%SATI", len, satCmd, SATN_CNTRL_BY_SIM_Not_Present);
631 }
632
633 /*
634 +--------------------------------------------------------------------+
635 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET |
636 | STATE : code ROUTINE : rCI_PercentSATE |
637 +--------------------------------------------------------------------+
638
639 PURPOSE : handles AT_PercentSATE call back
640
641 */
642
643 GLOBAL void rCI_PercentSATE ( /*UBYTE srcId,*/
644 SHORT len,
645 UBYTE *satCmd)
646 {
647 TRACE_FUNCTION("rCI_PercentSATE()");
648 handle_rCI_PercentSATx ("%SATE", len, satCmd, SATN_CNTRL_BY_SIM_Not_Present);
649 }
650
651 /*
652 +--------------------------------------------------------------------+
653 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET |
654 | STATE : code ROUTINE : rCI_PercentSATN |
655 +--------------------------------------------------------------------+
656
657 PURPOSE : handles AT_PercentSATN call back
658
659 */
660
661 GLOBAL void rCI_PercentSATN ( /*UBYTE srcId,*/
662 SHORT len,
663 UBYTE *satCmd,
664 T_ACI_SATN_CNTRL_TYPE cntrl_type)
665 {
666 TRACE_FUNCTION("rCI_PercentSATN()");
667 handle_rCI_PercentSATx ("%SATN", len, satCmd, cntrl_type);
668 }
669
670 /*
671 +--------------------------------------------------------------------+
672 | PROJECT : GSM-F&D (8411) MODULE : ACI_RET |
673 | STATE : code ROUTINE : rCI_PercentSATA |
674 +--------------------------------------------------------------------+
675
676 PURPOSE : handles AT_PercentSATA call back
677
678 */
679
680 #ifdef FF_SAT_E
681 GLOBAL void rCI_PercentSATA ( /*UBYTE srcId,*/
682 SHORT cId,
683 LONG rdlTimeout_ms,
684 T_ACI_SATA_ADD *addParm )
685 #else
686 GLOBAL void rCI_PercentSATA ( /*UBYTE srcId,*/
687 SHORT cId,
688 LONG rdlTimeout_ms)
689 #endif /* FF_SAT_E */
690 {
691 UBYTE i;
692 UBYTE srcId = srcId_cb;
693
694 TRACE_FUNCTION("rCI_PercentSATA()");
695
696 if( sat[srcId] )
697 {
698 i=sprintf(g_sa,"%s: ","%SATA");
699
700 if(rdlTimeout_ms NEQ ACI_NumParmNotPresent)
701 {
702 i+=sprintf( g_sa+i, "%d", rdlTimeout_ms );
703 }
704
705 #ifdef FF_SAT_E
706 if( sat[srcId] EQ SATC_ENA_CL_E )
707 {
708 sprintf( g_sa+i, ",%d,%d", addParm->chnType, addParm->chnEst );
709 }
710 #endif /* FF_SAT_E */
711
712 io_sendIndication(srcId, g_sa, ATI_NORMAL_OUTPUT);
713 }
714 }
715
716 #endif /* ATI_SAT_C */
717
718 #endif /* #ifdef SIM_TOOLKIT */
719