FreeCalypso > hg > fc-magnetite
annotate src/g23m-fad/app/app_bat.c @ 391:1da4c0cc9fc2
scripts/mkcomp-test.sh: default the new CHIPSET etc variables
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 Jan 2018 20:18:45 +0000 |
parents | 90eb61ecd093 |
children |
rev | line source |
---|---|
174
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +------------------------------------------------------------------------------ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | File: app_bat.c |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 +------------------------------------------------------------------------------ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 | Copyright 2004 Texas Instruments Berlin, AG |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | All rights reserved. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | This file is confidential and a trade secret of Texas |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | Instruments Berlin, AG |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | The receipt of or possession of this file does not convey |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | any rights to reproduce or disclose its contents or to |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | manufacture, use, or sell anything it may describe, in |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | whole, or in part, without the specific written consent of |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | Texas Instruments Berlin, AG. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 +----------------------------------------------------------------------------- |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 | Purpose : Test functions for testing the BAT interface -- command parser. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 +----------------------------------------------------------------------------- |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #define APP_BAT_C |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 /*==== INCLUDES =============================================================*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 #include "app_util.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #include "bat.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "bat_ctrl.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #include "bat_intern.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include <string.h> /* String functions, e. g. strncpy(). */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include <ctype.h> |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include <stdlib.h> |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "vsi.h" /* A lot of macros. */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #ifndef _SIMULATION_ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "custom.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "gsm.h" /* A lot of macros. */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "tools.h" /* Common tools. */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #endif /* _SIMULATION_ */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "bat_cfg.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #include "p_app.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #ifdef FF_GPF_TCPIP |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "socket_api.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #endif |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "app.h" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #define NO_ADD_VAL 0xFFFFFFFF |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 GLOBAL void app_bat_send_result_prim (U8 result, U32 add_info); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 * Command handler |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 GLOBAL char *app_bat_close(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 GLOBAL char *app_bat_cmd_data(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 GLOBAL char *app_bat_complete_test(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 GLOBAL char *app_bat_flow_control_test1(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 GLOBAL char *app_bat_uns_rcv_and_abort_test(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 GLOBAL char *app_bat_multi_channel_creation_test(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 GLOBAL char *app_bat_ctrl(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 GLOBAL char *app_bat_deinit(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 GLOBAL char *app_bat_delete(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 GLOBAL char *app_bat_init(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 GLOBAL char *app_bat_new(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 GLOBAL char *app_bat_open(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 GLOBAL char *app_bat_receive_data_cb(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 GLOBAL char *app_bat_send_cpin(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 GLOBAL char *app_bat_send_cnmi(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 GLOBAL char *app_bat_send_ata(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 GLOBAL char *app_bat_send_atd(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 GLOBAL char *app_bat_send_ath(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 GLOBAL char *app_bat_send_q_cscb(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 GLOBAL char *app_bat_send_q_cpinf(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 GLOBAL char *app_bat_send_q_cpol(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 GLOBAL char *app_bat_send_t_cpol(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 GLOBAL char *app_bat_send_cfun(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 GLOBAL char *app_bat_send_cmgs(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 GLOBAL char *app_bat_send_cmgl(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 GLOBAL char *app_bat_send_cops(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 GLOBAL char *app_bat_send_ccwa(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 GLOBAL char *app_bat_signal_cb(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 GLOBAL char *app_bat_uns_open (app_cmd_entry_t *, char *, char *, char *, core_func_t ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 GLOBAL char *app_bat_send_cpbr(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 GLOBAL char *app_bat_send_cpbw(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 GLOBAL char *app_bat_send_q_cgatt(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 GLOBAL char *app_bat_send_q_cgact(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 GLOBAL char *app_bat_send_cgatt(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 GLOBAL char *app_bat_send_cgact(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 GLOBAL char *app_bat_send_cgdcont(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 GLOBAL char *app_bat_send_cgpco(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 GLOBAL char *app_bat_send_q_cgpco(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 GLOBAL char *app_bat_quer_set_clck (app_cmd_entry_t *, char *, char *, char *, core_func_t ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 GLOBAL char *app_bat_send_per_als (app_cmd_entry_t *, char *, char *, char *, core_func_t ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 GLOBAL char *app_bat_send_q_cscs(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 GLOBAL char *app_bat_send_q_clcc(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 GLOBAL char *app_bat_send_cscs(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 GLOBAL char *app_bat_send_csms(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 GLOBAL char *app_bat_send_cgsms(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 GLOBAL char *app_bat_send_cpbf(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 GLOBAL char *app_bat_send_cgmi(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 GLOBAL char *app_bat_send_cgmm(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 GLOBAL char *app_bat_send_cgmr(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 GLOBAL char *app_bat_send_cgsn(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 GLOBAL char *app_bat_stress_test(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 GLOBAL char *app_bat_send_cniv(app_cmd_entry_t *, char *, char *,char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 GLOBAL char *app_bat_send_q_cniv(app_cmd_entry_t *, char *, char *,char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 GLOBAL char *app_bat_send_custom(app_cmd_entry_t *, char *, char *, char *, core_func_t); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 * Core functions (to be called by the command handler, if applicable) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 /* -- No core functions required for now */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 /* Command handler table. */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 static app_cmd_entry_t app_bat_cmd_table[] = { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 { "bat_init", app_bat_init, 0, "[InstNum]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 { "bat_deinit", app_bat_deinit, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 { "bat_new", app_bat_new, 0, "[ClntNum]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 { "bat_delete", app_bat_delete, 0, "[InstHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 { "bat_open", app_bat_open, 0, "[InstHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 { "bat_uns_open", app_bat_uns_open, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 { "bat_close", app_bat_close, 0, "[ClntHndl]"}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 { "bat_ctrl", app_bat_ctrl, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 { "bat_receive_data_cb", app_bat_receive_data_cb, 0, "[ConHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 { "bat_signal_cb", app_bat_signal_cb, 0, "[ConHndl][SigNum]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 { "bat_complete_test", app_bat_complete_test, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 { "bat_flow_control_test1", app_bat_flow_control_test1, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 { "bat_uns_rcv_and_abort_test", app_bat_uns_rcv_and_abort_test, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 { "bat_multi_channel_creation_test", app_bat_multi_channel_creation_test, 0, "" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 { "bat_send_q_cscb", app_bat_send_q_cscb, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 { "bat_send_q_clcc", app_bat_send_q_clcc, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 { "bat_send_q_cscs", app_bat_send_q_cscs, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 { "bat_send_q_cpinf", app_bat_send_q_cpinf, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 { "bat_send_q_cpol", app_bat_send_q_cpol, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 { "bat_send_q_cgatt", app_bat_send_q_cgatt, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 { "bat_send_q_cgact", app_bat_send_q_cgact, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 { "bat_send_q_cgpco", app_bat_send_q_cgpco, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 { "bat_send_t_cpol", app_bat_send_t_cpol, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 { "bat_send_cfun", app_bat_send_cfun, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 { "bat_send_cgmi", app_bat_send_cgmi, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 { "bat_send_cgmm", app_bat_send_cgmm, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 { "bat_send_cgmr", app_bat_send_cgmr, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 { "bat_send_cgsn", app_bat_send_cgsn, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 { "bat_send_cmgs", app_bat_send_cmgs, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 { "bat_send_cmgl", app_bat_send_cmgl, 0, "[ClntHndl] [UNREAD|READ|UNSENT|SENT|ALL]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 { "bat_send_cops", app_bat_send_cops, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 { "bat_send_cpin", app_bat_send_cpin, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 { "bat_send_cnmi", app_bat_send_cnmi, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 { "bat_send_csms", app_bat_send_csms, 0, "[ClntHndl] [service]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 { "bat_send_cgsms", app_bat_send_cgsms, 0, "[ClntHndl] [service]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 { "bat_send_ccwa", app_bat_send_ccwa, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 { "bat_send_ata", app_bat_send_ata, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 { "bat_send_atd", app_bat_send_atd, 0, "[ClntHndl] [phone number]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 { "bat_send_ath", app_bat_send_ath, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 { "bat_send_cscs", app_bat_send_cscs, 0, "[ClntHndl] [charset]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 { "bat_send_cpbr", app_bat_send_cpbr, 0, "[ClntHndl] [index]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 { "bat_send_cpbw", app_bat_send_cpbw, 0, "[ClntHndl] [index] [name]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 { "bat_send_cpbf", app_bat_send_cpbf, 0, "[ClntHndl] [search string]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 { "bat_send_cgatt", app_bat_send_cgatt, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 { "bat_send_cgact", app_bat_send_cgact, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 { "bat_send_cgdcont", app_bat_send_cgdcont, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 { "bat_send_cgpco", app_bat_send_cgpco, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 { "bat_clck_query", app_bat_quer_set_clck, 0, "[ConHndl] [ConCom]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 { "bat_send_per_als", app_bat_send_per_als, 0, "[ConHndl] [ConCom]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 { "bat_stress_test", app_bat_stress_test, 0, "[ClntHndl]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 { "bat_send_cniv", app_bat_send_cniv, 0, "[ClntHndl]"}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 { "bat_send_q_cniv", app_bat_send_q_cniv, 0, "[ClntHndl]"}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 { "bat_send_custom", app_bat_send_custom, 0, "[ClntHndl] [custom string]" }, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 { 0, 0, 0, 0}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 } ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 /*==== Local data ============================================================*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 typedef struct |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 size_t size; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 } T_app_map_response_2_size; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 static T_app_map_response_2_size response_2_size[] = |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_AT_OK = 0x0 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 {sizeof(T_BAT_res_at_connect)}, /* BAT_RES_AT_CONNECT = 0x1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_AT_NO_CARRIER_FINAL = 0x2 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 {sizeof(T_BAT_res_plus_cme_error)}, /* BAT_RES_PLUS_CME_ERROR = 0x3 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 {sizeof(T_BAT_res_plus_cms_error)}, /* BAT_RES_PLUS_CMS_ERROR = 0x4 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_AT_BUSY = 0x5 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_AT_CHANNEL_BUSY = 0x6 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_AT_NO_ANSWER = 0x7 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 {sizeof(T_BAT_res_plus_ext_error)}, /* BAT_RES_PLUS_EXT_ERROR = 0x8 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 {sizeof(T_BAT_res_que_percent_als)}, /* BAT_RES_QUE_PERCENT_ALS = 0x9 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 {sizeof(T_BAT_res_tst_percent_als)}, /* BAT_RES_TST_PERCENT_ALS = 0xa */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 {sizeof(T_BAT_res_que_percent_atr)}, /* BAT_RES_QUE_PERCENT_ATR = 0xb */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 {sizeof(T_BAT_res_que_percent_band)}, /* BAT_RES_QUE_PERCENT_BAND = 0xc */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 {sizeof(T_BAT_res_tst_percent_band)}, /* BAT_RES_TST_PERCENT_BAND = 0xd */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 {sizeof(T_BAT_res_que_plus_cacm)}, /* BAT_RES_QUE_PLUS_CACM = 0xe */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 {sizeof(T_BAT_res_que_plus_camm)}, /* BAT_RES_QUE_PLUS_CAMM = 0xf */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 {sizeof(T_BAT_res_set_plus_caoc)}, /* BAT_RES_SET_PLUS_CAOC = 0x10 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 {sizeof(T_BAT_res_set_plus_cbc)}, /* BAT_RES_SET_PLUS_CBC = 0x11 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 {sizeof(T_BAT_res_que_percent_cbhz)}, /* BAT_RES_QUE_PERCENT_CBHZ = 0x12 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 {sizeof(T_BAT_res_tst_percent_cbhz)}, /* BAT_RES_TST_PERCENT_CBHZ = 0x13 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 {sizeof(T_BAT_res_que_plus_cbst)}, /* BAT_RES_QUE_PLUS_CBST = 0x14 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 {sizeof(T_BAT_res_que_percent_ccbs)}, /* BAT_RES_QUE_PERCENT_CCBS = 0x15 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 {sizeof(T_BAT_res_set_plus_ccfc)}, /* BAT_RES_SET_PLUS_CCFC = 0x16 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 {sizeof(T_BAT_res_que_plus_cclk)}, /* BAT_RES_QUE_PLUS_CCLK = 0x17 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 {sizeof(T_BAT_res_que_plus_ccug)}, /* BAT_RES_QUE_PLUS_CCUG = 0x18 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 {sizeof(T_BAT_res_set_plus_ccwa)}, /* BAT_RES_SET_PLUS_CCWA = 0x19 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 {sizeof(T_BAT_res_set_plus_ccwa_w)}, /* BAT_RES_SET_PLUS_CCWA_W = 0x1a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 {sizeof(T_BAT_res_set_plus_ceer)}, /* BAT_RES_SET_PLUS_CEER = 0x1b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 {sizeof(T_BAT_res_que_plus_cfun)}, /* BAT_RES_QUE_PLUS_CFUN = 0x1c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 {sizeof(T_BAT_res_que_percent_cgaatt)}, /* BAT_RES_QUE_PERCENT_CGAATT = 0x1d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 {sizeof(T_BAT_res_que_plus_cgact)}, /* BAT_RES_QUE_PLUS_CGACT = 0x1e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 {sizeof(T_BAT_res_que_plus_cgatt)}, /* BAT_RES_QUE_PLUS_CGATT = 0x1f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 {sizeof(T_BAT_res_que_percent_cgclass)}, /* BAT_RES_QUE_PERCENT_CGCLASS = 0x20 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 {sizeof(T_BAT_res_que_plus_cgclass)}, /* BAT_RES_QUE_PLUS_CGCLASS = 0x21 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 {sizeof(T_BAT_res_que_plus_cgdcont)}, /* BAT_RES_QUE_PLUS_CGDCONT = 0x22 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 {sizeof(T_BAT_res_set_plus_cgpaddr)}, /* BAT_RES_SET_PLUS_CGPADDR = 0x23 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 {sizeof(T_BAT_res_tst_plus_cgpaddr)}, /* BAT_RES_TST_PLUS_CGPADDR = 0x24 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 {sizeof(T_BAT_res_set_percent_cgpco)}, /* BAT_RES_SET_PERCENT_CGPCO = 0x25 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 {sizeof(T_BAT_res_que_percent_cgppp)}, /* BAT_RES_QUE_PERCENT_CGPPP = 0x26 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 {sizeof(T_BAT_res_que_plus_cgqmin)}, /* BAT_RES_QUE_PLUS_CGQMIN = 0x27 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 {sizeof(T_BAT_res_que_plus_cgqreq)}, /* BAT_RES_QUE_PLUS_CGQREQ = 0x28 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 {sizeof(T_BAT_res_que_percent_cgreg)}, /* BAT_RES_QUE_PERCENT_CGREG = 0x29 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 {sizeof(T_BAT_res_que_plus_cgreg)}, /* BAT_RES_QUE_PLUS_CGREG = 0x2a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 {sizeof(T_BAT_res_que_plus_cgsms)}, /* BAT_RES_QUE_PLUS_CGSMS = 0x2b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 {sizeof(T_BAT_res_set_percent_chpl)}, /* BAT_RES_SET_PERCENT_CHPL = 0x2c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 {sizeof(T_BAT_res_set_percent_chpl_w)}, /* BAT_RES_SET_PERCENT_CHPL_W = 0x2d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 {sizeof(T_BAT_res_set_plus_cimi)}, /* BAT_RES_SET_PLUS_CIMI = 0x2e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 {sizeof(T_BAT_res_que_plus_cind)}, /* BAT_RES_QUE_PLUS_CIND = 0x2f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 {sizeof(T_BAT_res_que_plus_clan)}, /* BAT_RES_QUE_PLUS_CLAN = 0x30 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 {sizeof(T_BAT_res_tst_plus_clan)}, /* BAT_RES_TST_PLUS_CLAN = 0x31 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 {sizeof(T_BAT_res_que_plus_clcc)}, /* BAT_RES_QUE_PLUS_CLCC = 0x32 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 {sizeof(T_BAT_res_set_plus_clck)}, /* BAT_RES_SET_PLUS_CLCK = 0x33 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 {sizeof(T_BAT_res_que_plus_clip)}, /* BAT_RES_QUE_PLUS_CLIP = 0x34 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 {sizeof(T_BAT_res_que_plus_clip_w)}, /* BAT_RES_QUE_PLUS_CLIP_W = 0x35 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 {sizeof(T_BAT_res_que_plus_clir)}, /* BAT_RES_QUE_PLUS_CLIR = 0x36 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_SET_PLUS_CLVL = 0x37 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 {sizeof(T_BAT_res_que_plus_clvl)}, /* BAT_RES_QUE_PLUS_CLVL = 0x38 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 {sizeof(T_BAT_res_que_plus_cmer)}, /* BAT_RES_QUE_PLUS_CMER = 0x39 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 {sizeof(T_BAT_res_set_plus_cmgc)}, /* BAT_RES_SET_PLUS_CMGC = 0x3a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 {sizeof(T_BAT_res_set_plus_cmgl)}, /* BAT_RES_SET_PLUS_CMGL = 0x3b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 {sizeof(T_BAT_res_set_plus_cmgl_w)}, /* BAT_RES_SET_PLUS_CMGL_W = 0x3c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 {sizeof(T_BAT_res_set_plus_cmgr)}, /* BAT_RES_SET_PLUS_CMGR = 0x3d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 {sizeof(T_BAT_res_set_plus_cmgr_w)}, /* BAT_RES_SET_PLUS_CMGR_W = 0x3e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 {sizeof(T_BAT_res_set_plus_cmgs)}, /* BAT_RES_SET_PLUS_CMGS = 0x3f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 {sizeof(T_BAT_res_set_plus_cmgw)}, /* BAT_RES_SET_PLUS_CMGW = 0x40 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 {sizeof(T_BAT_res_que_plus_cmod)}, /* BAT_RES_QUE_PLUS_CMOD = 0x41 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 {sizeof(T_BAT_res_que_plus_cmut)}, /* BAT_RES_QUE_PLUS_CMUT = 0x42 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 {sizeof(T_BAT_res_que_plus_cmux)}, /* BAT_RES_QUE_PLUS_CMUX = 0x43 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 {sizeof(T_BAT_res_que_percent_cnap)}, /* BAT_RES_QUE_PERCENT_CNAP = 0x44 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 {sizeof(T_BAT_res_que_plus_cnmi)}, /* BAT_RES_QUE_PLUS_CNMI = 0x45 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 {sizeof(T_BAT_res_set_plus_cnum)}, /* BAT_RES_SET_PLUS_CNUM = 0x46 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 {sizeof(T_BAT_res_set_plus_cnum_w)}, /* BAT_RES_SET_PLUS_CNUM_W = 0x47 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 {sizeof(T_BAT_res_que_plus_colp)}, /* BAT_RES_QUE_PLUS_COLP = 0x48 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 {sizeof(T_BAT_res_que_plus_colp_w)}, /* BAT_RES_QUE_PLUS_COLP_W = 0x49 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 {sizeof(T_BAT_res_que_percent_cops)}, /* BAT_RES_QUE_PERCENT_COPS = 0x4a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 {sizeof(T_BAT_res_tst_percent_cops)}, /* BAT_RES_TST_PERCENT_COPS = 0x4b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 {sizeof(T_BAT_res_que_plus_cops)}, /* BAT_RES_QUE_PLUS_COPS = 0x4c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 {sizeof(T_BAT_res_tst_plus_cops)}, /* BAT_RES_TST_PLUS_COPS = 0x4d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 {sizeof(T_BAT_res_que_percent_cops_w)}, /* BAT_RES_QUE_PERCENT_COPS_W = 0x4e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 {sizeof(T_BAT_res_tst_percent_cops_w)}, /* BAT_RES_TST_PERCENT_COPS_W = 0x4f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 {sizeof(T_BAT_res_set_percent_cpals)}, /* BAT_RES_SET_PERCENT_CPALS = 0x50 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 {sizeof(T_BAT_res_que_percent_cpals)}, /* BAT_RES_QUE_PERCENT_CPALS = 0x51 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 {sizeof(T_BAT_res_set_percent_cpals_w)}, /* BAT_RES_SET_PERCENT_CPALS_W = 0x52 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 {sizeof(T_BAT_res_que_percent_cpals_w)}, /* BAT_RES_QUE_PERCENT_CPALS_W = 0x53 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 {sizeof(T_BAT_res_set_plus_cpas)}, /* BAT_RES_SET_PLUS_CPAS = 0x54 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 {sizeof(T_BAT_res_set_plus_cpbf)}, /* BAT_RES_SET_PLUS_CPBF = 0x55 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 {sizeof(T_BAT_res_tst_plus_cpbf)}, /* BAT_RES_TST_PLUS_CPBF = 0x56 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 {sizeof(T_BAT_res_set_plus_cpbf_w)}, /* BAT_RES_SET_PLUS_CPBF_W = 0x57 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 {sizeof(T_BAT_res_tst_plus_cpbf_w)}, /* BAT_RES_TST_PLUS_CPBF_W = 0x58 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 {sizeof(T_BAT_res_set_plus_cpbr)}, /* BAT_RES_SET_PLUS_CPBR = 0x59 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 {sizeof(T_BAT_res_tst_plus_cpbr)}, /* BAT_RES_TST_PLUS_CPBR = 0x5a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 {sizeof(T_BAT_res_set_plus_cpbr_w)}, /* BAT_RES_SET_PLUS_CPBR_W = 0x5b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 {sizeof(T_BAT_res_tst_plus_cpbr_w)}, /* BAT_RES_TST_PLUS_CPBR_W = 0x5c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 {sizeof(T_BAT_res_que_percent_cpbs)}, /* BAT_RES_QUE_PERCENT_CPBS = 0x5d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 {sizeof(T_BAT_res_que_plus_cpbs)}, /* BAT_RES_QUE_PLUS_CPBS = 0x5e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 {sizeof(T_BAT_res_tst_plus_cpbw)}, /* BAT_RES_TST_PLUS_CPBW = 0x5f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 {sizeof(T_BAT_res_tst_plus_cpbw_w)}, /* BAT_RES_TST_PLUS_CPBW_W = 0x60 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 {sizeof(T_BAT_res_set_percent_cpcfu)}, /* BAT_RES_SET_PERCENT_CPCFU = 0x61 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 {sizeof(T_BAT_res_que_percent_cphs)}, /* BAT_RES_QUE_PERCENT_CPHS = 0x62 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 {sizeof(T_BAT_res_que_plus_cpin)}, /* BAT_RES_QUE_PLUS_CPIN = 0x63 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 {sizeof(T_BAT_res_que_percent_cpinf)}, /* BAT_RES_QUE_PERCENT_CPINF = 0x64 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 {sizeof(T_BAT_res_set_percent_cpmb)}, /* BAT_RES_SET_PERCENT_CPMB = 0x65 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 {sizeof(T_BAT_res_que_percent_cpmb)}, /* BAT_RES_QUE_PERCENT_CPMB = 0x66 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 {sizeof(T_BAT_res_tst_percent_cpmbw)}, /* BAT_RES_TST_PERCENT_CPMBW = 0x67 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 {sizeof(T_BAT_res_tst_percent_cpmbw_w)}, /* BAT_RES_TST_PERCENT_CPMBW_W = 0x68 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 {sizeof(T_BAT_res_set_percent_cpmb_w)}, /* BAT_RES_SET_PERCENT_CPMB_W = 0x69 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 {sizeof(T_BAT_res_set_plus_cpms)}, /* BAT_RES_SET_PLUS_CPMS = 0x6a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 {sizeof(T_BAT_res_que_plus_cpms)}, /* BAT_RES_QUE_PLUS_CPMS = 0x6b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 {sizeof(T_BAT_res_set_percent_cpnums)}, /* BAT_RES_SET_PERCENT_CPNUMS = 0x6c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 {sizeof(T_BAT_res_tst_percent_cpnums)}, /* BAT_RES_TST_PERCENT_CPNUMS = 0x6d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 {sizeof(T_BAT_res_set_percent_cpnums_w)},/* BAT_RES_SET_PERCENT_CPNUMS_W = 0x6e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 {sizeof(T_BAT_res_tst_percent_cpnums_w)},/* BAT_RES_TST_PERCENT_CPNUMS_W = 0x6f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 {sizeof(T_BAT_res_que_plus_cpol)}, /* BAT_RES_QUE_PLUS_CPOL = 0x70 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 {sizeof(T_BAT_res_tst_plus_cpol)}, /* BAT_RES_TST_PLUS_CPOL = 0x71 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 {sizeof(T_BAT_res_que_plus_cpol_w)}, /* BAT_RES_QUE_PLUS_CPOL_W = 0x72 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 {sizeof(T_BAT_res_tst_plus_cpol_w)}, /* BAT_RES_TST_PLUS_CPOL_W = 0x73 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 {sizeof(T_BAT_res_que_percent_cpopn)}, /* BAT_RES_QUE_PERCENT_CPOPN = 0x74 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 {sizeof(T_BAT_res_que_percent_cprsm)}, /* BAT_RES_QUE_PERCENT_CPRSM = 0x75 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 {sizeof(T_BAT_res_que_plus_cpuc)}, /* BAT_RES_QUE_PLUS_CPUC = 0x76 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 {sizeof(T_BAT_res_que_plus_cpuc_w)}, /* BAT_RES_QUE_PLUS_CPUC_W = 0x77 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 {sizeof(T_BAT_res_set_percent_cpvwi)}, /* BAT_RES_SET_PERCENT_CPVWI = 0x78 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 {sizeof(T_BAT_res_que_percent_creg)}, /* BAT_RES_QUE_PERCENT_CREG = 0x79 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 {sizeof(T_BAT_res_tst_plus_cres)}, /* BAT_RES_TST_PLUS_CRES = 0x7a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 {sizeof(T_BAT_res_que_plus_crlp)}, /* BAT_RES_QUE_PLUS_CRLP = 0x7b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 {sizeof(T_BAT_res_set_plus_crsm)}, /* BAT_RES_SET_PLUS_CRSM = 0x7c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 {sizeof(T_BAT_res_tst_plus_csas)}, /* BAT_RES_TST_PLUS_CSAS = 0x7d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 {sizeof(T_BAT_res_que_plus_csca)}, /* BAT_RES_QUE_PLUS_CSCA = 0x7e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 {sizeof(T_BAT_res_que_plus_cscb)}, /* BAT_RES_QUE_PLUS_CSCB = 0x7f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 {sizeof(T_BAT_res_que_plus_cscs)}, /* BAT_RES_QUE_PLUS_CSCS = 0x80 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 {sizeof(T_BAT_res_set_plus_csim)}, /* BAT_RES_SET_PLUS_CSIM = 0x81 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 {sizeof(T_BAT_res_que_plus_csms)}, /* BAT_RES_QUE_PLUS_CSMS = 0x82 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 {sizeof(T_BAT_res_que_plus_csns)}, /* BAT_RES_QUE_PLUS_CSNS = 0x83 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 {sizeof(T_BAT_res_que_percent_csq)}, /* BAT_RES_QUE_PERCENT_CSQ = 0x84 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 {sizeof(T_BAT_res_set_plus_csq)}, /* BAT_RES_SET_PLUS_CSQ = 0x85 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 {sizeof(T_BAT_res_que_plus_csta)}, /* BAT_RES_QUE_PLUS_CSTA = 0x86 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 {sizeof(T_BAT_res_que_plus_csvm)}, /* BAT_RES_QUE_PLUS_CSVM = 0x87 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 {sizeof(T_BAT_res_que_percent_ctty)}, /* BAT_RES_QUE_PERCENT_CTTY = 0x88 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 {sizeof(T_BAT_res_que_plus_ctzu)}, /* BAT_RES_QUE_PLUS_CTZU = 0x89 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 {sizeof(T_BAT_res_que_percent_cust)}, /* BAT_RES_QUE_PERCENT_CUST = 0x8a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 {sizeof(T_BAT_res_que_percent_data)}, /* BAT_RES_QUE_PERCENT_DATA = 0x8b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 {sizeof(T_BAT_res_set_percent_dinf)}, /* BAT_RES_SET_PERCENT_DINF = 0x8c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 {sizeof(T_BAT_res_que_plus_ds)}, /* BAT_RES_QUE_PLUS_DS = 0x8d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 {sizeof(T_BAT_res_que_plus_fap)}, /* BAT_RES_QUE_PLUS_FAP = 0x8e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 {sizeof(T_BAT_res_que_plus_fbo)}, /* BAT_RES_QUE_PLUS_FBO = 0x8f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 {sizeof(T_BAT_res_que_plus_fbs)}, /* BAT_RES_QUE_PLUS_FBS = 0x90 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 {sizeof(T_BAT_res_que_plus_fbu)}, /* BAT_RES_QUE_PLUS_FBU = 0x91 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 {sizeof(T_BAT_res_que_plus_fcc)}, /* BAT_RES_QUE_PLUS_FCC = 0x92 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 {sizeof(T_BAT_res_que_plus_fclass)}, /* BAT_RES_QUE_PLUS_FCLASS = 0x93 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 {sizeof(T_BAT_res_que_plus_fcq)}, /* BAT_RES_QUE_PLUS_FCQ = 0x94 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 {sizeof(T_BAT_res_que_plus_fcr)}, /* BAT_RES_QUE_PLUS_FCR = 0x95 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 {sizeof(T_BAT_res_que_plus_fcs)}, /* BAT_RES_QUE_PLUS_FCS = 0x96 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 {sizeof(T_BAT_res_que_plus_fct)}, /* BAT_RES_QUE_PLUS_FCT = 0x97 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 {sizeof(T_BAT_res_que_plus_fea)}, /* BAT_RES_QUE_PLUS_FEA = 0x98 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 {sizeof(T_BAT_res_que_plus_ffc)}, /* BAT_RES_QUE_PLUS_FFC = 0x99 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 {sizeof(T_BAT_res_que_plus_fhs)}, /* BAT_RES_QUE_PLUS_FHS = 0x9a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 {sizeof(T_BAT_res_que_plus_fie)}, /* BAT_RES_QUE_PLUS_FIE = 0x9b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 {sizeof(T_BAT_res_que_plus_fis)}, /* BAT_RES_QUE_PLUS_FIS = 0x9c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 {sizeof(T_BAT_res_que_plus_fit)}, /* BAT_RES_QUE_PLUS_FIT = 0x9d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 {sizeof(T_BAT_res_que_plus_fli)}, /* BAT_RES_QUE_PLUS_FLI = 0x9e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 {sizeof(T_BAT_res_que_plus_flo)}, /* BAT_RES_QUE_PLUS_FLO = 0x9f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 {sizeof(T_BAT_res_que_plus_flp)}, /* BAT_RES_QUE_PLUS_FLP = 0xa0 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 {sizeof(T_BAT_res_que_plus_fms)}, /* BAT_RES_QUE_PLUS_FMS = 0xa1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 {sizeof(T_BAT_res_que_plus_fns)}, /* BAT_RES_QUE_PLUS_FNS = 0xa2 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 {sizeof(T_BAT_res_que_plus_fpa)}, /* BAT_RES_QUE_PLUS_FPA = 0xa3 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 {sizeof(T_BAT_res_que_plus_fpi)}, /* BAT_RES_QUE_PLUS_FPI = 0xa4 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 {sizeof(T_BAT_res_que_plus_fps)}, /* BAT_RES_QUE_PLUS_FPS = 0xa5 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 {sizeof(T_BAT_res_que_plus_fpw)}, /* BAT_RES_QUE_PLUS_FPW = 0xa6 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 {sizeof(T_BAT_res_que_plus_frq)}, /* BAT_RES_QUE_PLUS_FRQ = 0xa7 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 {sizeof(T_BAT_res_que_plus_fsa)}, /* BAT_RES_QUE_PLUS_FSA = 0xa8 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 {sizeof(T_BAT_res_que_plus_fsp)}, /* BAT_RES_QUE_PLUS_FSP = 0xa9 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 {sizeof(T_BAT_res_que_plus_icf)}, /* BAT_RES_QUE_PLUS_ICF = 0xaa */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 {sizeof(T_BAT_res_que_plus_ifc)}, /* BAT_RES_QUE_PLUS_IFC = 0xab */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 {sizeof(T_BAT_res_que_percent_imei)}, /* BAT_RES_QUE_PERCENT_IMEI = 0xac */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 {sizeof(T_BAT_res_que_plus_ipr)}, /* BAT_RES_QUE_PLUS_IPR = 0xad */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 {sizeof(T_BAT_res_que_percent_pbcf)}, /* BAT_RES_QUE_PERCENT_PBCF = 0xae */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 {sizeof(T_BAT_res_que_percent_ppp)}, /* BAT_RES_QUE_PERCENT_PPP = 0xaf */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 {sizeof(T_BAT_res_que_percent_pvrf)}, /* BAT_RES_QUE_PERCENT_PVRF = 0xb0 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 {sizeof(T_BAT_res_que_percent_rdl)}, /* BAT_RES_QUE_PERCENT_RDL = 0xb1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 {sizeof(T_BAT_res_que_percent_rdlb)}, /* BAT_RES_QUE_PERCENT_RDLB = 0xb2 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 {sizeof(T_BAT_res_que_percent_satc)}, /* BAT_RES_QUE_PERCENT_SATC = 0xb3 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 {sizeof(T_BAT_res_que_percent_satcc)}, /* BAT_RES_QUE_PERCENT_SATCC = 0xb4 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 {sizeof(T_BAT_res_set_percent_sate)}, /* BAT_RES_SET_PERCENT_SATE = 0xb5 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 {sizeof(T_BAT_res_que_plus_ws46)}, /* BAT_RES_QUE_PLUS_WS46 = 0xb6 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 {sizeof(T_BAT_res_que_plus_cdip)}, /* BAT_RES_QUE_PLUS_CDIP = 0xb7 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 {sizeof(T_BAT_res_set_percent_cmgr)}, /* BAT_RES_SET_PERCENT_CMGR = 0xb8 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 {sizeof(T_BAT_res_set_percent_cmgl)}, /* BAT_RES_SET_PERCENT_CMGL = 0xb9 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 {sizeof(T_BAT_res_set_plus_cmss)}, /* BAT_RES_SET_PLUS_CMSS = 0xba */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 {sizeof(T_BAT_res_set_plus_cgmi)}, /* BAT_RES_SET_PLUS_CGMI = 0xbb */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 {sizeof(T_BAT_res_set_plus_cgmm)}, /* BAT_RES_SET_PLUS_CGMM = 0xbc */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 {sizeof(T_BAT_res_set_plus_cgmr)}, /* BAT_RES_SET_PLUS_CGMR = 0xbd */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 {sizeof(T_BAT_res_set_plus_cgsn)}, /* BAT_RES_SET_PLUS_CGSN = 0xbe */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 {0}, /*As response structure of command id=0xbf is absent still to get the proper size of structure of response according to the command id */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 {0}, /*As response structure of command id=0xc0 is absent still to get the proper size of structure of response according to the command id */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 {sizeof(T_BAT_res_que_percent_cniv)}, /* BAT_RES_QUE_PERCENT_CNIV = 0xc1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 }; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 static T_app_map_response_2_size unsolicited_2_size[] = |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_UNS_AT_BUSY = 0x1000 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_UNS_AT_NO_ANSWER = 0x1001 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 {sizeof(T_BAT_res_uns_plus_cbm)}, /* BAT_RES_UNS_PLUS_CBM = 0x1002 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 {sizeof(T_BAT_res_uns_plus_cbmi)}, /* BAT_RES_UNS_PLUS_CBMI = 0x1003 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 {sizeof(T_BAT_res_uns_percent_ccbs)}, /* BAT_RES_UNS_PERCENT_CCBS = 0x1004 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 // {sizeof(T_BAT_res_uns_percent_cccm)}, /* BAT_RES_UNS_PERCENT_CCCM = 0x1005 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 {sizeof(T_BAT_res_uns_plus_cccm)}, /* BAT_RES_UNS_PLUS_CCCM = 0x1006 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 {sizeof(T_BAT_res_uns_percent_cccn)}, /* BAT_RES_UNS_PERCENT_CCCN = 0x1007 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 {sizeof(T_BAT_res_uns_plus_ccwa)}, /* BAT_RES_UNS_PLUS_CCWA = 0x1008 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 {sizeof(T_BAT_res_uns_plus_ccwa_w)}, /* BAT_RES_UNS_PLUS_CCWA_W = 0x1009 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_UNS_PLUS_CCWE = 0x100a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 {sizeof(T_BAT_res_uns_plus_cds)}, /* BAT_RES_UNS_PLUS_CDS = 0x100b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_UNS_PLUS_CCWV = 0x100c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 {sizeof(T_BAT_res_uns_percent_cgev)}, /* BAT_RES_UNS_PERCENT_CGEV = 0x100d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 {sizeof(T_BAT_res_uns_plus_cgev)}, /* BAT_RES_UNS_PLUS_CGEV = 0x100e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 {sizeof(T_BAT_res_uns_percent_cgreg)}, /* BAT_RES_UNS_PERCENT_CGREG = 0x100f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 {sizeof(T_BAT_res_uns_plus_cgreg)}, /* BAT_RES_UNS_PLUS_CGREG = 0x1010 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 {sizeof(T_BAT_res_uns_plus_clae)}, /* BAT_RES_UNS_PLUS_CLAE = 0x1011 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 {sizeof(T_BAT_res_uns_plus_clav)}, /* BAT_RES_UNS_PLUS_CLAV = 0x1012 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 {sizeof(T_BAT_res_uns_plus_clip)}, /* BAT_RES_UNS_PLUS_CLIP = 0x1013 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 {sizeof(T_BAT_res_uns_plus_clip_w)}, /* BAT_RES_UNS_PLUS_CLIP_W = 0x1014 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 {sizeof(T_BAT_res_uns_plus_cmt)}, /* BAT_RES_UNS_PLUS_CMT = 0x1015 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 {sizeof(T_BAT_res_uns_plus_cmti)}, /* BAT_RES_UNS_PLUS_CMTI = 0x1016 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 {sizeof(T_BAT_res_uns_plus_cmt_w)}, /* BAT_RES_UNS_PLUS_CMT_W = 0x1017 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 {sizeof(T_BAT_res_uns_percent_cnap)}, /* BAT_RES_UNS_PERCENT_CNAP = 0x1018 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 {sizeof(T_BAT_res_uns_plus_colp)}, /* BAT_RES_UNS_PLUS_COLP = 0x1019 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 {sizeof(T_BAT_res_uns_plus_colp_w)}, /* BAT_RES_UNS_PLUS_COLP_W = 0x101a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 {sizeof(T_BAT_res_uns_percent_cpi)}, /* BAT_RES_UNS_PERCENT_CPI = 0x101b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 {sizeof(T_BAT_res_uns_percent_cpi_w)}, /* BAT_RES_UNS_PERCENT_CPI_W = 0x101c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 {sizeof(T_BAT_res_uns_percent_cpri)}, /* BAT_RES_UNS_PERCENT_CPRI = 0x101d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 {sizeof(T_BAT_res_uns_percent_cproam)}, /* BAT_RES_UNS_PERCENT_CPROAM = 0x101e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 {sizeof(T_BAT_res_uns_percent_cpvwi)}, /* BAT_RES_UNS_PERCENT_CPVWI = 0x101f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 {sizeof(T_BAT_res_uns_plus_cr)}, /* BAT_RES_UNS_PLUS_CR = 0x1020 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 {sizeof(T_BAT_res_uns_percent_creg)}, /* BAT_RES_UNS_PERCENT_CREG = 0x1021 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 {sizeof(T_BAT_res_uns_plus_cring)}, /* BAT_RES_UNS_PLUS_CRING = 0x1022 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 {sizeof(T_BAT_res_uns_percent_csq)}, /* BAT_RES_UNS_PERCENT_CSQ = 0x1023 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 {sizeof(T_BAT_res_uns_plus_cssi)}, /* BAT_RES_UNS_PLUS_CSSI = 0x1024 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 {sizeof(T_BAT_res_uns_percent_cssn)}, /* BAT_RES_UNS_PERCENT_CSSN = 0x1025 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 {sizeof(T_BAT_res_uns_plus_cssu)}, /* BAT_RES_UNS_PLUS_CSSU = 0x1026 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 {sizeof(T_BAT_res_uns_percent_cstat)}, /* BAT_RES_UNS_PERCENT_CSTAT = 0x1027 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 {sizeof(T_BAT_res_uns_percent_ctyi)}, /* BAT_RES_UNS_PERCENT_CTYI = 0x1028 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 {sizeof(T_BAT_res_uns_plus_ctzr)}, /* BAT_RES_UNS_PLUS_CTZR = 0x1029 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 {sizeof(T_BAT_res_uns_percent_ctzv)}, /* BAT_RES_UNS_PERCENT_CTZV = 0x102a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 {sizeof(T_BAT_res_uns_plus_ctzv)}, /* BAT_RES_UNS_PLUS_CTZV = 0x102b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 {sizeof(T_BAT_res_uns_percent_ctzv_w)}, /* BAT_RES_UNS_PERCENT_CTZV_W = 0x102c */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 {sizeof(T_BAT_res_uns_plus_cusd)}, /* BAT_RES_UNS_PLUS_CUSD = 0x102d */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 {sizeof(T_BAT_res_uns_plus_cusd_w)}, /* BAT_RES_UNS_PLUS_CUSD_W = 0x102e */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 {sizeof(T_BAT_no_parameter)}, /* BAT_RES_UNS_AT_NO_CARRIER = 0x102f */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 {sizeof(T_BAT_res_uns_plus_fhs)}, /* BAT_RES_UNS_PLUS_FHS = 0x1030 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 {sizeof(T_BAT_res_uns_plus_ilrr)}, /* BAT_RES_UNS_PLUS_ILRR = 0x1031 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 {sizeof(T_BAT_res_uns_percent_rdl)}, /* BAT_RES_UNS_PERCENT_RDL = 0x1032 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 {sizeof(T_BAT_res_uns_percent_rdlb)}, /* BAT_RES_UNS_PERCENT_RDLB = 0x1033 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 {sizeof(T_BAT_res_uns_percent_sata)}, /* BAT_RES_UNS_PERCENT_SATA = 0x1034 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 {sizeof(T_BAT_res_uns_percent_sati)}, /* BAT_RES_UNS_PERCENT_SATI = 0x1035 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 {sizeof(T_BAT_res_uns_percent_satn)}, /* BAT_RES_UNS_PERCENT_SATN = 0x1036 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 {sizeof(T_BAT_res_uns_percent_simef)}, /* BAT_RES_UNS_PERCENT_SIMEF = 0x1037 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 {sizeof(T_BAT_res_uns_percent_simins)}, /* BAT_RES_UNS_PERCENT_SIMINS = 0x1038 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 {sizeof(T_BAT_res_uns_percent_simrem)}, /* BAT_RES_UNS_PERCENT_SIMREM = 0x1039 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 {sizeof(T_BAT_res_uns_percent_sncnt)}, /* BAT_RES_UNS_PERCENT_SNCNT = 0x103a */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 {sizeof(T_BAT_res_uns_percent_cniv)} /* BAT_RES_UNS_PERCENT_CNIV = 0x103b */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 }; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 GLOBAL T_BAT_client clnt_table[BAT_MAX_TEST_INST_NUM][BAT_MAX_TEST_CLNT_NUM+1] = |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 /* NrOfCl, Clnt0, Clnt1, Clnt2, Clnt3 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 {{0,0xffff,0xffff,0xffff,0xffff}, /* instance 0 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 {0,0xffff,0xffff,0xffff,0xffff}}; /* instance 1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 #define RESP_LINES 20 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 #define RESP_LINE_LEN 256 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 LOCAL CHAR at_cmd_resp_param [RESP_LINES][RESP_LINE_LEN]; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 struct app_bat_globals |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 T_BAT_plus_cscs_cs cs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 } app_bat_globs = {BAT_CSCS_CS_IRA}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 /*==== Local functions =======================================================*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 /*--------------------------------------------------------------------------- |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 * Definition of command handler functions |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 *---------------------------------------------------------------------------*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 GLOBAL void signal_cb (T_BAT_client client, T_BAT_signal signal) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 TRACE_FUNCTION ("signal_cb()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, SIGNAL IS: %d", client, signal); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 GLOBAL void signal_cb1 (T_BAT_client client, T_BAT_signal signal) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 TRACE_FUNCTION ("signal_cb1()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, SIGNAL IS: %d", client, signal); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 GLOBAL void signal_cb2 (T_BAT_client client, T_BAT_signal signal) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 TRACE_FUNCTION ("signal_cb2()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, SIGNAL IS: %d", client, signal); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 #define BITFIELD_CHECK(x, y) (x & y) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 LOCAL int app_bat_get_size (T_BAT_ctrl_response ctrl_response) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 if (BITFIELD_CHECK(ctrl_response, 0x1000)) /* BAT_BIT_12 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 return (unsolicited_2_size[ctrl_response - 0x1000].size); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 return (response_2_size[ctrl_response].size); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 LOCAL void response_content (T_BAT_cmd_response *resp) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 int resp_len = app_bat_get_size(resp->ctrl_response); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 TRACE_EVENT_P2("response_content(): response = 0x%04X, size = %i", resp->ctrl_response, resp_len); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 TRACE_BINDUMP(GDD_DIO_handle, TC_USER4, "BAT RESPONSE PARAMETER", (U8 *)resp->response.ptr_at_ok, resp_len); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 typedef enum |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 CLIENT_HANDLE_OK = 0, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 CLIENT_HANDLE_OUT_OF_BOUNDS, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 CLIENT_HANDLE_NOT_VALID |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 } T_CLIENT_HANDLE_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 LOCAL T_CLIENT_HANDLE_ERROR check_client_handle (T_BAT_client clnt_hndl) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 U8 clnt_hndl_upper = (U8)((clnt_hndl&0xff00)>>8); /* the instance */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 U8 clnt_hndl_lower = (U8) (clnt_hndl&0x00ff); /* the client */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 TRACE_EVENT_P2("check_client_handle(): instance = %d, client = %d", clnt_hndl_upper, clnt_hndl_lower); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 if((clnt_hndl_lower >= BAT_MAX_TEST_CLNT_NUM) OR (clnt_hndl_upper >= BAT_MAX_TEST_INST_NUM)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 return (CLIENT_HANDLE_OUT_OF_BOUNDS); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 if(clnt_table[clnt_hndl_upper][0] EQ 0) /* first element in clnt_table informs about Nr of Clnts */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 return (CLIENT_HANDLE_NOT_VALID); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 if(clnt_table[clnt_hndl_upper][clnt_hndl_lower] EQ 0xffff) /* invalid client */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 return (CLIENT_HANDLE_NOT_VALID); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 return (CLIENT_HANDLE_OK); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 LOCAL char *error_client_handle (T_CLIENT_HANDLE_ERROR err) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 TRACE_FUNCTION("error_client_handle()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 switch (err) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 case (CLIENT_HANDLE_OUT_OF_BOUNDS): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 TRACE_ERROR("Input clnt_hndl out of bounds"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 return ("Input clnt_hndl out of bounds"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 case (CLIENT_HANDLE_NOT_VALID): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 TRACE_ERROR("client handle not valid"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 return ("client handle not valid"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 default: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 TRACE_ERROR("unknown client handle error"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 return ("unknown client handle error"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 GLOBAL int response_cb (T_BAT_client client, T_BAT_cmd_response *rsp) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 TRACE_FUNCTION("response_cb()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, RESPONSE TAG IS: 0x%04x", client, rsp->ctrl_response); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 response_content (rsp); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 switch (rsp->ctrl_response) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 case (BAT_RES_SET_PLUS_CMGL): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 T_BAT_res_set_plus_cmgl *ptr_set_plus_cmgl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 ptr_set_plus_cmgl =( void *) (rsp->response.ptr_set_plus_cmgl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 TRACE_EVENT("BAT_RES_SET_PLUS_CMGL response"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 TRACE_EVENT_P1("index = %d", ptr_set_plus_cmgl->sms_index); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 TRACE_EVENT_P1("status = %d", ptr_set_plus_cmgl->stat); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 case (BAT_RES_SET_PLUS_CPBR): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 T_BAT_res_set_plus_cpbr *ptr_set_plus_cpbr; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 ptr_set_plus_cpbr =( void *) (rsp->response.ptr_set_plus_cpbr); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 TRACE_EVENT("BAT_RES_SET_PLUS_CPBR response"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 memset(at_cmd_resp_param[0], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 memset(at_cmd_resp_param[1], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 memcpy(at_cmd_resp_param[0], ptr_set_plus_cpbr->number, ptr_set_plus_cpbr->c_number) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 memcpy(at_cmd_resp_param[1], ptr_set_plus_cpbr->text, ptr_set_plus_cpbr->c_text) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 TRACE_EVENT_P4("+CPBR: %d,\"%s\",%d,\"%s\"", ptr_set_plus_cpbr->index, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 at_cmd_resp_param[0], |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 ptr_set_plus_cpbr->type, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 at_cmd_resp_param[1]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 case (BAT_RES_SET_PLUS_CPBF): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 T_BAT_res_set_plus_cpbf *ptr_set_plus_cpbf; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 ptr_set_plus_cpbf =( void *) (rsp->response.ptr_set_plus_cpbf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 TRACE_EVENT("BAT_RES_SET_PLUS_CPBF response"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 memset(at_cmd_resp_param[0], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 memset(at_cmd_resp_param[1], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 memcpy(at_cmd_resp_param[0], ptr_set_plus_cpbf->number, ptr_set_plus_cpbf->c_number) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 memcpy(at_cmd_resp_param[1], ptr_set_plus_cpbf->text, ptr_set_plus_cpbf->c_text) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 TRACE_EVENT_P4("+CPBF: %d,\"%s\",%d,\"%s\"", ptr_set_plus_cpbf->index, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 at_cmd_resp_param[0], |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 ptr_set_plus_cpbf->type, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 at_cmd_resp_param[1]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 case (BAT_RES_QUE_PLUS_CGATT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 T_BAT_res_que_plus_cgatt *ptr_que_plus_cgatt; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 ptr_que_plus_cgatt =( void *) (rsp->response.ptr_que_plus_cgatt); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 TRACE_EVENT("BAT_RES_QUE_PLUS_CGATT:"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 if (ptr_que_plus_cgatt->state EQ BAT_CGATT_STATE_DETACHED) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 TRACE_EVENT("BAT_RES_QUE_PLUS_CGATT: GPRS DETACHED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 TRACE_EVENT("BAT_RES_QUE_PLUS_CGATT: GPRS ATTACHED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 case (BAT_RES_QUE_PLUS_CGACT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 T_BAT_res_que_plus_cgact *ptr_que_plus_cgact; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 ptr_que_plus_cgact =( void *) (rsp->response.ptr_que_plus_cgact); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 if(ptr_que_plus_cgact->state EQ BAT_CGACT_STATE_DEACTIVATED) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 TRACE_EVENT("BAT_RES_QUE_PLUS_CGACT: GPRS DEACTIVATED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 TRACE_EVENT("BAT_RES_QUE_PLUS_CGACT: GPRS ACTIVATED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 case (BAT_RES_QUE_PLUS_CGDCONT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 T_BAT_res_que_plus_cgdcont *ptr_que_plus_cgdcont; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 ptr_que_plus_cgdcont =( void *) (rsp->response.ptr_que_plus_cgdcont); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 memset(at_cmd_resp_param[0], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 memset(at_cmd_resp_param[1], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 memcpy(at_cmd_resp_param[0], ptr_que_plus_cgdcont->apn, ptr_que_plus_cgdcont->c_apn) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 memcpy(at_cmd_resp_param[1], ptr_que_plus_cgdcont->pdp_addr, ptr_que_plus_cgdcont->c_pdp_addr) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 TRACE_EVENT_P1("BAT_RES_QUE_PLUS_CGCONT: APN is %s", at_cmd_resp_param[0]) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 TRACE_EVENT_P1("BAT_RES_QUE_PLUS_CGCONT: PDP Address is %s", at_cmd_resp_param[1]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 case (BAT_RES_SET_PERCENT_CGPCO): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 T_BAT_res_set_percent_cgpco *ptr_que_per_cgpco; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 ptr_que_per_cgpco =( void *) (rsp->response.ptr_set_percent_cgpco); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 memset(at_cmd_resp_param[0], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 memset(at_cmd_resp_param[1], 0x00, RESP_LINE_LEN) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 memcpy(at_cmd_resp_param[0], ptr_que_per_cgpco->pco, ptr_que_per_cgpco->c_pco) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 TRACE_EVENT_P1("BAT_RES_SET_PERCENT_CGPCO: PCO STRING %s", at_cmd_resp_param[0]) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 case (BAT_RES_QUE_PLUS_CPOL): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 rsp->response.ptr_que_plus_cpol->oper[rsp->response.ptr_que_plus_cpol->c_oper] = '\0'; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 TRACE_EVENT_P3("BAT_RES_QUE_PLUS_CPOL: %d,%d,\"%s\"", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 rsp->response.ptr_que_plus_cpol->index, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 rsp->response.ptr_que_plus_cpol->format, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 rsp->response.ptr_que_plus_cpol->oper); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 case (BAT_RES_TST_PLUS_CPOL): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 TRACE_EVENT_P2("BAT_RES_TST_PLUS_CPOL: %d,%d", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 rsp->response.ptr_tst_plus_cpol->index1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 rsp->response.ptr_tst_plus_cpol->index2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 case (BAT_RES_QUE_PLUS_CSCS): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 TRACE_EVENT_P1("BAT_RES_QUE_PLUS_CSCS: %d", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 rsp->response.ptr_que_plus_cscs->cs); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 case (BAT_RES_SET_PLUS_CCWA): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 TRACE_EVENT_P1("BAT_RES_SET_PLUS_CCWA: %d", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 rsp->response.ptr_set_plus_ccwa->status); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 case (BAT_RES_SET_PLUS_CGMI): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 TRACE_EVENT_P1("BAT_RES_SET_PLUS_CGMI: %s", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 rsp->response.ptr_set_plus_cgmi->manufacturer); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 case (BAT_RES_SET_PLUS_CGMM): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 TRACE_EVENT_P1("BAT_RES_SET_PLUS_CGMM: %s", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 rsp->response.ptr_set_plus_cgmm->model); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 case (BAT_RES_SET_PLUS_CGMR): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 TRACE_EVENT_P1("BAT_RES_SET_PLUS_CGMR: %s", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 rsp->response.ptr_set_plus_cgmr->revision); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 case (BAT_RES_SET_PLUS_CGSN): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 TRACE_EVENT_P1("BAT_RES_SET_PLUS_CGSN: %s", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 rsp->response.ptr_set_plus_cgsn->sn); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 case (BAT_RES_AT_OK): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 TRACE_EVENT("BAT_RES_AT_OK"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 case (BAT_RES_AT_CONNECT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 TRACE_EVENT("BAT_RES_AT_CONNECT"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 case (BAT_RES_AT_NO_CARRIER_FINAL): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 TRACE_EVENT("BAT_RES_AT_NO_CARRIER_FINAL"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 case (BAT_RES_PLUS_CME_ERROR): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 TRACE_EVENT("BAT_RES_PLUS_CME_ERROR"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 case (BAT_RES_PLUS_CMS_ERROR): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 TRACE_EVENT("BAT_RES_PLUS_CMS_ERROR"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 case (BAT_RES_AT_BUSY): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 TRACE_EVENT("BAT_RES_AT_BUSY"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 case BAT_RES_UNS_AT_BUSY: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 TRACE_EVENT("BAT_RES_UNS_AT_BUSY"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 case BAT_RES_AT_CHANNEL_BUSY: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 TRACE_EVENT("BAT_RES_AT_CHANNEL_BUSY"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 case (BAT_RES_AT_NO_ANSWER): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 TRACE_EVENT("BAT_RES_AT_NO_ANSWER"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 case BAT_RES_UNS_AT_NO_ANSWER: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 TRACE_EVENT("BAT_RES_UNS_AT_NO_ANSWER"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 case (BAT_RES_PLUS_EXT_ERROR): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 TRACE_EVENT("BAT_RES_PLUS_EXT_ERROR"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 default: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 TRACE_EVENT("response_cb(): THIS BAT CMD RESPONSE IS STILL UNCOVERED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 GLOBAL int response_cb_busy (T_BAT_client client, T_BAT_cmd_response *rsp) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 static int i = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 TRACE_FUNCTION ("response_cb_busy()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, RESPONSE TAG IS: 0x%04x", client, rsp->ctrl_response); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 TRACE_EVENT_P1("CONTENT OF RESPONSE IS: %s", rsp->response.ptr_at_ok); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 /* returns 1 (busy) for the the first call and 0 (ok) for the second call */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 if (i EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 i++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 return 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 typedef enum |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 MOTO_CMD_MAID = 0x2001, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 MOTO_CMD_MAPV, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 MOTO_CMD_MDBAD, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 MOTO_CMD_MDBL, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 MOTO_CMD_MDBR, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 MOTO_CMD_MDBW, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 MOTO_CMD_MDFILE, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 MOTO_CMD_MDIR, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 MOTO_CMD_MFOLDER, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 MOTO_CMD_MODE, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 MOTO_CMD_MPBR, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 MOTO_CMD_MPBW, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 MOTO_CMD_MPDPM , |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 MOTO_CMD_MR, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 MOTO_CMD_MSYN, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 MOTO_CMD_MTDR, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 MOTO_CMD_MW |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 } T_MOTO_CMD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 GLOBAL int unsolicited_result_cb (T_BAT_client client, T_BAT_cmd_response *rsp) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 TRACE_FUNCTION ("unsolicited_result_cb()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 TRACE_EVENT_P2("CLIENT HNDL IS: 0x%04x, RESPONSE TAG IS: 0x%04x", client, rsp->ctrl_response); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 if (rsp->ctrl_response & 0x2000) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 rsp->response.ptr_custom->buf[rsp->response.ptr_custom->c_buf] = '\0'; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 TRACE_BINDUMP(GDD_DIO_handle, TC_USER4, "USER DATA", (U8 *)rsp->response.ptr_custom->buf, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 rsp->response.ptr_custom->c_buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 TRACE_EVENT_P2("unsolicited_result_cb(): custom: len = %d %s", |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 rsp->response.ptr_custom->c_buf, rsp->response.ptr_custom->buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 response_content (rsp); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 switch (rsp->ctrl_response) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 case (BAT_RES_UNS_PERCENT_CPI): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 T_BAT_res_uns_percent_cpi *cpi = rsp->response.ptr_res_percent_cpi; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 switch(cpi->msgtype) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 case(BAT_P_CPI_TYPE_SETUP): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 TRACE_EVENT("BAT_P_CPI_TYPE_SETUP"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 case(BAT_P_CPI_TYPE_DISC): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 TRACE_EVENT("BAT_P_CPI_TYPE_DISC"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 case(BAT_P_CPI_TYPE_ALERTING): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 TRACE_EVENT("BAT_P_CPI_TYPE_ALERTING"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 case(BAT_P_CPI_TYPE_PROC): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 TRACE_EVENT("BAT_P_CPI_TYPE_PROC"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 case(BAT_P_CPI_TYPE_SYNC): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 TRACE_EVENT("BAT_P_CPI_TYPE_SYNC"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 case(BAT_P_CPI_TYPE_PROGRESS): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 TRACE_EVENT("BAT_P_CPI_TYPE_PROGRESS"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 case(BAT_P_CPI_TYPE_CONNECT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 TRACE_EVENT("BAT_P_CPI_TYPE_CONNECT"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 case(BAT_P_CPI_TYPE_RELEASE): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 TRACE_EVENT("BAT_P_CPI_TYPE_RELEASE"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 case(BAT_P_CPI_TYPE_REJECT): |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 TRACE_EVENT("BAT_P_CPI_TYPE_REJECT"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 default: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 TRACE_EVENT("unsolicited_result_cb(): THIS BAT CMD RESPONSE IS STILL UNCOVERED"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 break ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 GLOBAL void instance_signal_cb (T_BAT_signal result) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 TRACE_FUNCTION ("instance_signal_cb()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 TRACE_EVENT_P1("SIGNAL IS: %d", result); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 +-------------------------------------------------------------------+ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 | PROJECT : MODULE : app_bat | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 | ROUTINE : app_bat_send_result_prim| |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 +-------------------------------------------------------------------+ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 PURPOSE : Provides the output over APP. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 GLOBAL void app_bat_send_result_prim (U8 result, U32 add_info) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 #ifndef _TARGET_ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 /* send message to the test interface*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 PALLOC (app_bat_test_result, APP_BAT_TEST_RSLT); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 TRACE_FUNCTION_P2("app_bat_send_result_prim(): result is: %d, add_info is: %d", result, add_info); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 app_bat_test_result->test_rslt = result; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 app_bat_test_result->additional_info = add_info; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 PSEND (hCommMMI, app_bat_test_result); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 #endif /* _TARGET_ */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 GLOBAL char *app_bat_init (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 void *mem = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 int inst_num = get_item(param1, BAT_MAX_TEST_INST_NUM, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 TRACE_FUNCTION("app_bat_init()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 MALLOC(mem, BAT_INSTANCE_HEADER_SIZE*inst_num); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 result = bat_init(mem, (U8)inst_num); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 return "Call to bat_init() failed"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 GLOBAL char *app_bat_deinit (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 T_BAT_return result = bat_deinit(); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 TRACE_FUNCTION("app_bat_deinit()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 return ("Call to bat_deinit() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 GLOBAL char *app_bat_new (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 void *mem = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 T_BAT_instance inst_hndl = BAT_INVALID_INSTANCE_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 int i = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 int clnt_num = get_item(param1, BAT_MAX_TEST_CLNT_NUM, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 TRACE_FUNCTION("app_bat_new()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 /* Find free slot for connection handle */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 for (i = 0; i < BAT_MAX_TEST_INST_NUM && clnt_table[i][0] != 0; i++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 if(clnt_num > BAT_MAX_TEST_CLNT_NUM OR i > BAT_MAX_TEST_INST_NUM) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 return ("Max instance num too big"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 MALLOC(mem, (clnt_num*BAT_CLIENT_SIZE + BAT_INSTANCE_SIZE)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 app_set_config (); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 result = bat_new (&inst_hndl, mem, (U8)clnt_num, BAT_APP_CONFIG, instance_signal_cb); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 TRACE_EVENT_P1 ("inst_hndl is %d", inst_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 if(result != BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 return("Call to bat_new() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 clnt_table[inst_hndl][0]++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 GLOBAL char *app_bat_delete (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 T_BAT_instance inst_hndl = BAT_BROADCAST_CHANNEL; /* connection number -index into local static connection table */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 TRACE_FUNCTION("app_bat_delete()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 inst_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 if(inst_hndl >= BAT_MAX_TEST_INST_NUM) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 return ("Connection number out of bounds"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 result = bat_delete (inst_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 if(result != BAT_OK ) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 return ("Call to gdd_close failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 clnt_table[inst_hndl][0] = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 GLOBAL char *app_bat_uns_open (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 T_BAT_client client; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 TRACE_FUNCTION("app_bat_uns_open()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 if (bat_uns_open(0, &client, unsolicited_result_cb)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 return ("Call to bat_uns_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 GLOBAL char *app_bat_open (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; /* connection number -index into local static connection table */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 T_BAT_instance inst_hndl = BAT_BROADCAST_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 U8 clnt_hndl_upper = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 U8 clnt_hndl_lower = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 TRACE_FUNCTION("app_bat_open()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 inst_hndl = get_item(param1, 0, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 if (inst_hndl >= BAT_MAX_TEST_INST_NUM) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 return ("input inst_hndl is wrong"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 if ( clnt_table[inst_hndl][0] EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 return("input inst_hndl is wrong, instance is not opened yet"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 result = bat_open (inst_hndl, &clnt_hndl, response_cb, signal_cb); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 if(result != BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 return("Call to bat_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 clnt_hndl_upper = (U8)((0xff00&clnt_hndl)>>8); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 clnt_hndl_lower = (U8) (0x00ff&clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 TRACE_EVENT_P2("The returned clnt_hndl is 0x%02X%02X", clnt_hndl_upper, clnt_hndl_lower); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 if(clnt_hndl_upper NEQ inst_hndl) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 return("clnt_hndl is wrong"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 clnt_table[inst_hndl][clnt_hndl_lower+1] = clnt_hndl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 clnt_table[inst_hndl][0]++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 TRACE_EVENT_P3("app_bat_open(): clnt_table[%d][%d] = 0x%04X", inst_hndl, clnt_hndl_lower+1, clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 app_bat_uns_open (cmd_entry_ptr, param1, param2, param3, core_func); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 GLOBAL char *app_bat_close (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; /* connection number -index into local static connection table */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 U8 clnt_hndl_upper; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 U8 clnt_hndl_lower; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 clnt_hndl_upper = (U8)((clnt_hndl&0xff00)>>8); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 clnt_hndl_lower = (U8) (clnt_hndl&0x00ff); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 result = bat_close (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 return ("Call to bat_close() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 clnt_table[clnt_hndl_upper][clnt_hndl_lower+1] = 0xffff; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 clnt_table[clnt_hndl_upper][0]--; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 * sending of BAT commands |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 GLOBAL char *app_bat_send_q_clcc(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 T_BAT_no_parameter my_que_plus_clcc; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 TRACE_FUNCTION("app_bat_send_q_clcc()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PLUS_CLCC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 my_bat_cmd_send.params.ptr_que_plus_clcc = &my_que_plus_clcc ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 my_que_plus_clcc.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 if (result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 return ("Call to bat_send_q_clcc() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 GLOBAL char *app_bat_send_q_cscs(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 T_BAT_no_parameter my_que_plus_cscs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 TRACE_FUNCTION("app_bat_send_q_cscs()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1210 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PLUS_CSCS ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1214 my_bat_cmd_send.params.ptr_que_plus_cscs = &my_que_plus_cscs ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 my_que_plus_cscs.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1217 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1218 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1219 if (result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1220 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1221 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1222 return ("Call to bat_send_q_cscs() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1223 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1224 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1225 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1226 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1227 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1228 GLOBAL char *app_bat_send_csms(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1229 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1230 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1231 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1232 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1233 T_BAT_cmd_set_plus_csms my_set_plus_csms; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1234 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1235 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1236 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1237 TRACE_FUNCTION("app_bat_send_csms()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1238 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1239 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1240 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1241 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1242 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1243 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1244 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1245 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1246 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1247 memset(&my_set_plus_csms, sizeof(my_set_plus_csms), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1248 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CSMS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1249 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1250 my_bat_cmd_send.params.ptr_set_plus_csms = &my_set_plus_csms; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1251 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1252 /* resolve the service requested */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1253 my_set_plus_csms.service = (T_BAT_plus_csms_service)atoi(param2);; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1254 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1255 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1256 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1257 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1258 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1259 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1260 return ("Call to bat_send_csms() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1261 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1262 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1263 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1264 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1265 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1266 GLOBAL char *app_bat_send_ccwa (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1267 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1268 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1269 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1270 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1271 T_BAT_cmd_set_plus_ccwa my_set_plus_ccwa; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1272 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1273 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1274 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1275 TRACE_FUNCTION("app_bat_send_ccwa()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1276 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1277 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1278 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1279 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1280 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1281 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1282 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1283 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1284 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1285 memset(&my_set_plus_ccwa, sizeof(my_set_plus_ccwa), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1286 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CCWA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1287 my_bat_cmd_send.params.ptr_set_plus_ccwa = &my_set_plus_ccwa; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1288 my_set_plus_ccwa.mode = (T_BAT_plus_ccwa_mode) atoi(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1289 my_set_plus_ccwa.bearer_class = BAT_CCWA_CLASS_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1290 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1291 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1292 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1293 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1294 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1295 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1296 return ("Call to bat_send_ccwa() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1297 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1298 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1299 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1300 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1301 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1302 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1303 GLOBAL char *app_bat_send_cgsms(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1304 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1305 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1306 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1307 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1308 T_BAT_cmd_set_plus_cgsms my_set_plus_cgsms; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1309 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1310 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1311 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1312 TRACE_FUNCTION("app_bat_send_cgsms()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1313 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1314 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1315 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1316 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1317 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1318 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1319 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1320 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1321 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1322 memset(&my_set_plus_cgsms, sizeof(my_set_plus_cgsms), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1323 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CGSMS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1324 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1325 my_bat_cmd_send.params.ptr_set_plus_cgsms = &my_set_plus_cgsms; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1326 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1327 /* resolve the service requested */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1328 my_set_plus_cgsms.service = (T_BAT_plus_cgsms_service) atoi(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1329 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1330 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1331 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1332 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1333 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1334 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1335 return ("Call to bat_send_cgsms() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1336 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1337 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1338 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1339 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1340 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1341 GLOBAL char *app_bat_send_cscs(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1342 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1343 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1344 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1345 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1346 T_BAT_cmd_set_plus_cscs my_set_plus_cscs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1347 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1348 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1349 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1350 TRACE_FUNCTION("app_bat_send_cscs()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1351 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1352 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1353 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1354 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1355 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1356 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1357 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1359 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1360 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CSCS ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1361 my_bat_cmd_send.params.ptr_set_plus_cscs = &my_set_plus_cscs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1362 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1363 /* on ATI is also supported some Scandinavian smoerebroed */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1364 if (param2 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1365 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1366 if (strcmp(param2, "IRA") EQ 0) my_set_plus_cscs.cs = BAT_CSCS_CS_IRA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1367 else if (strcmp(param2, "GSM") EQ 0) my_set_plus_cscs.cs = BAT_CSCS_CS_GSM; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1368 else if (strcmp(param2, "HEX") EQ 0) my_set_plus_cscs.cs = BAT_CSCS_CS_HEX; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1369 else if (strcmp(param2, "UCS2") EQ 0) my_set_plus_cscs.cs = BAT_CSCS_CS_UCS2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1370 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1371 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1372 TRACE_EVENT("app_bat_send_cscs(): support only UCS2, HEX, GSM, IRA (default)"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1373 my_set_plus_cscs.cs = BAT_CSCS_CS_IRA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1374 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1375 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1377 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 my_set_plus_cscs.cs = BAT_CSCS_CS_IRA; /*default = International Reference Alphabet */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1379 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1380 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1381 app_bat_globs.cs = my_set_plus_cscs.cs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1382 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1383 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1384 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1385 if (result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1386 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1387 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1388 return ("Call to bat_send_cscs() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1389 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1390 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1391 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1392 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1393 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1394 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1395 GLOBAL char *app_bat_send_cpbr (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1396 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1397 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1398 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1400 T_BAT_cmd_set_plus_cpbr my_set_plus_cpbr; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1401 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1402 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1403 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1404 TRACE_FUNCTION("app_bat_send_cpbr()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1405 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1406 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1407 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1408 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1409 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1410 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1411 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1412 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1413 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1414 memset(&my_set_plus_cpbr, sizeof(my_set_plus_cpbr), 0); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1415 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CPBR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1416 my_bat_cmd_send.params.ptr_set_plus_cpbr = &my_set_plus_cpbr; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1418 /* without given any parameters, set to the same as AT+CPBR=1,1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1419 if (param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1420 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1421 my_set_plus_cpbr.index1 = 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1422 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1423 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1424 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1425 my_set_plus_cpbr.index1 = atoi(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1426 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1427 if (param3 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1428 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1429 my_set_plus_cpbr.index2 = my_set_plus_cpbr.index1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1430 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1431 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1432 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1433 my_set_plus_cpbr.index2 = atoi(param3) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1434 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1435 TRACE_EVENT_P2("app_bat_send_cpbr(): send binary AT+CPBR=%d,%d", my_set_plus_cpbr.index1, my_set_plus_cpbr.index2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1436 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1437 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1438 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1439 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1440 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1441 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1442 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1443 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1444 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1445 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1446 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1447 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1448 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1449 GLOBAL char *app_bat_send_cpbw (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1450 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1451 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1452 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1453 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1454 T_BAT_cmd_set_plus_cpbw my_set_plus_cpbw; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1455 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1456 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1457 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1458 TRACE_FUNCTION("app_bat_send_cpbw()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1459 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1460 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1461 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1462 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1463 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1464 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1465 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1466 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1467 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1468 memset(&my_set_plus_cpbw, sizeof(my_set_plus_cpbw), 0); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1469 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CPBW; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1470 my_bat_cmd_send.params.ptr_set_plus_cpbw = &my_set_plus_cpbw; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1471 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1472 if( param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1473 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1474 my_set_plus_cpbw.index = 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1475 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1476 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1477 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1478 my_set_plus_cpbw.index = atoi(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1479 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1480 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1481 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1482 * AT+CPBW=index,"number",type,"name" |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1483 * with test application we can only get 3 parameters, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1484 * where normally param1 --> clnt_hndl |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1485 * param2 --> index |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1486 * param3 --> number |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1487 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1488 * But we are more interrested in changing the phone book name |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1489 * due to different character sets. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1490 * That's why we assign param3 to the name and hard code the number |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1491 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1492 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1493 if(param3==NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1494 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1495 strcpy((char *)(my_set_plus_cpbw.text), "Doe, John"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1496 my_set_plus_cpbw.c_text = strlen("Doe, John"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1497 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1498 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1499 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1500 strcpy((char *)my_set_plus_cpbw.text, param3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1501 my_set_plus_cpbw.c_text = strlen(param3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1502 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1503 my_set_plus_cpbw.v_text = TRUE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1504 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1505 my_set_plus_cpbw.v_number = TRUE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1506 strcpy((char *)(my_set_plus_cpbw.number), "12345678" ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1507 my_set_plus_cpbw.c_number = strlen((const char *)(my_set_plus_cpbw.number)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1508 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1509 TRACE_EVENT_P2("app_bat_send_cpbw(): %s, %s", my_set_plus_cpbw.number, my_set_plus_cpbw.text); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1510 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1511 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1512 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1513 if (result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1514 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1515 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1516 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1517 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1518 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1519 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1520 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1521 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1522 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1523 GLOBAL char *app_bat_send_cpbf (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1524 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1525 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1526 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1527 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1528 T_BAT_cmd_set_plus_cpbf my_set_plus_cpbf; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1529 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1530 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1531 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1532 TRACE_FUNCTION("app_bat_send_cpbf()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1533 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1534 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1535 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1536 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1537 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1538 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1539 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1540 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1541 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1542 memset(&my_set_plus_cpbf, sizeof(my_set_plus_cpbf), 0); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1543 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CPBF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1544 my_bat_cmd_send.params.ptr_set_plus_cpbf = &my_set_plus_cpbf; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1545 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1546 if( param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1547 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1548 my_set_plus_cpbf.c_findtext = sizeof("Hello")-1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1549 strcpy((char *)my_set_plus_cpbf.findtext,"Hello"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1550 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1551 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1552 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1553 my_set_plus_cpbf.c_findtext = strlen(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1554 strcpy((char *)my_set_plus_cpbf.findtext,param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1555 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1556 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1557 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1558 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1559 if (result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1560 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1561 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1562 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1563 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1564 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1565 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1566 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1567 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1568 GLOBAL char *app_bat_send_cgmi(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1569 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1570 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1571 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1572 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1573 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1574 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1575 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1576 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1577 TRACE_FUNCTION("app_bat_send_cgmi()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1578 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1579 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1580 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1581 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1582 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1583 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1584 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1585 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1586 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1587 lbatSend.ctrl_params = BAT_CMD_SET_PLUS_CGMI; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1588 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1589 lbatSend.params.ptr_set_plus_cgmi = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1590 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1591 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1592 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1593 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1594 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1595 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1596 return ("Call to app_bat_send_cgmi() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1597 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1598 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1599 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1600 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1601 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1602 GLOBAL char *app_bat_send_cgmm(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1603 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1604 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1605 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1606 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1607 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1608 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1609 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1610 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1611 TRACE_FUNCTION("app_bat_send_cgmm()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1612 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1613 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1614 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1615 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1616 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1618 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 lbatSend.ctrl_params = BAT_CMD_SET_PLUS_CGMM; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 lbatSend.params.ptr_set_plus_cgmm = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1625 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1626 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1627 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1628 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1629 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1630 return ("Call to app_bat_send_cgmm() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1631 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1632 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1633 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1634 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1636 GLOBAL char *app_bat_send_cgmr(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1637 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1638 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1639 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1640 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1641 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1642 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1643 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1644 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1645 TRACE_FUNCTION("app_bat_send_cgmr()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1646 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1647 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1648 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1649 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1651 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1652 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1654 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1655 lbatSend.ctrl_params = BAT_CMD_SET_PLUS_CGMR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1656 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1657 lbatSend.params.ptr_set_plus_cgmr = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1658 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1659 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1660 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1661 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1662 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1663 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1664 return ("Call to app_bat_send_cgmr() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1665 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1666 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1667 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1668 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1669 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1670 GLOBAL char *app_bat_send_cgsn(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1671 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1672 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1675 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1676 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1679 TRACE_FUNCTION("app_bat_send_cgsn()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1680 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1681 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1682 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1683 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1684 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1685 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1686 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1687 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1688 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1689 lbatSend.ctrl_params = BAT_CMD_SET_PLUS_CGSN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1690 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1691 lbatSend.params.ptr_set_plus_cgsn = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1692 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1693 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1694 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1695 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1696 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1697 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1698 return("Call to app_bat_send_cgsn() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1699 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1700 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1701 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1702 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1703 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1704 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1705 * add some gprs command for test TCPIP |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1706 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1707 GLOBAL char *app_bat_send_q_cgatt(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1708 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1709 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1710 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1711 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1712 T_BAT_no_parameter my_que_plus_cgatt; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1713 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1714 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1715 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1716 TRACE_FUNCTION("app_bat_send_q_cgactt()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1717 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1718 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1719 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1720 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1721 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1722 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1723 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1724 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1725 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1726 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PLUS_CGATT ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1727 my_bat_cmd_send.params.ptr_que_plus_cgatt = &my_que_plus_cgatt ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1728 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1729 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1730 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1731 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1732 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1733 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1734 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1735 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1736 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1737 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1738 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1739 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1740 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1741 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1742 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1743 GLOBAL char *app_bat_send_q_cgact(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1744 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1745 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1746 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1747 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1748 T_BAT_no_parameter my_que_plus_cgact; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1749 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1750 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1751 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1752 TRACE_FUNCTION("app_bat_send_q_cgact()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1753 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1754 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1755 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1756 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1757 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1758 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1759 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1760 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1761 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1762 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PLUS_CGACT ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1763 my_bat_cmd_send.params.ptr_que_plus_cgact = &my_que_plus_cgact ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1764 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1765 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1766 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1767 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1768 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1769 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1770 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1771 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1772 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1773 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1774 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1775 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1776 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1777 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1778 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1779 GLOBAL char *app_bat_send_cgatt(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1780 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1781 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1782 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1783 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1784 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1785 T_BAT_cmd_set_plus_cgatt my_set_plus_cgatt; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1786 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1787 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1788 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1789 TRACE_FUNCTION("app_bat_send_cgatt()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1790 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1791 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1792 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1793 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1794 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1795 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1796 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1797 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1798 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1799 memset(&my_set_plus_cgatt , sizeof(my_set_plus_cgatt), 0 ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1800 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CGATT ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1801 my_bat_cmd_send.params.ptr_set_plus_cgatt = &my_set_plus_cgatt ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1802 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1803 if(param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1804 my_set_plus_cgatt.state = BAT_CGATT_STATE_ATTACHED; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1805 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1806 my_set_plus_cgatt.state = (T_BAT_plus_cgatt_state) atoi(param2) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1807 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1808 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1809 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1810 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1811 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1812 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1813 return ("Call to bat_send_cgatt() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1814 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1815 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1816 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1817 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1818 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1819 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1820 GLOBAL char *app_bat_send_cgact(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1821 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1822 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1823 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1824 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1825 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1826 T_BAT_cmd_set_plus_cgact my_set_plus_cgact; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1827 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1828 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1829 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1830 TRACE_FUNCTION("app_bat_send_cgact()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1831 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1832 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1833 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1834 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1835 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1836 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1837 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1838 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1839 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1840 memset(&my_set_plus_cgact , sizeof(my_set_plus_cgact), 0 ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1841 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CGACT ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1842 my_bat_cmd_send.params.ptr_set_plus_cgact = &my_set_plus_cgact ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1843 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1844 if(param2==NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1845 my_set_plus_cgact.state =(T_BAT_plus_cgact_state) 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1846 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1847 my_set_plus_cgact.state=(T_BAT_plus_cgact_state) atoi(param2) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1848 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1849 /* set Activate which pdp context !!! */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1850 my_set_plus_cgact.c_cid = 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1851 my_set_plus_cgact.cid[0] = (T_BAT_pdp_cid) 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1852 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1853 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1854 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1855 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1856 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1857 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1858 return ("Call to bat_send_cgact() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1859 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1860 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1861 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1862 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1863 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1864 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1865 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1866 GLOBAL char *app_bat_send_cgpco(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1867 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1868 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1869 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1870 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1871 T_BAT_cmd_set_percent_cgpco my_set_per_cgpco ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1872 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1873 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1874 CHAR User[10] ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1875 CHAR Pass[10] ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1876 USHORT pco_len = 100; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1877 UBYTE pco_array[100]; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1878 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1879 TRACE_FUNCTION("app_bat_send_cgpco()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1880 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1881 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1882 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1883 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1884 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1885 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1886 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1887 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1888 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1889 memset(&my_set_per_cgpco , sizeof(my_set_per_cgpco), 0 ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1890 memset(pco_array , 0x00 , sizeof(pco_array)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1891 memset(User , 0x00 , sizeof(User)) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1892 memset(Pass , 0x00 , sizeof(Pass)) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1893 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1894 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1895 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PERCENT_CGPCO ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1896 my_bat_cmd_send.params.ptr_set_percent_cgpco= &my_set_per_cgpco ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1897 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1898 if(param2!=NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1899 strcpy(User ,param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1900 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1901 strcpy(User ,"WAP"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1902 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1903 if(param3!=NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1904 strcpy(Pass ,param3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1905 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1906 strcpy(Pass ,"WAP"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1907 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1908 my_set_per_cgpco.cid = (T_BAT_pdp_cid)1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1909 my_set_per_cgpco.format = (T_BAT_percent_cgpco_format) 1 ; /* ASCII mode */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1910 my_set_per_cgpco.mode = (T_BAT_percent_cgpco_mode) 0 ; /* Set parameter command */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1911 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1912 my_set_per_cgpco.v_pco = 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1913 my_set_per_cgpco.c_pco = 0 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1914 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1915 #if 0 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1916 ret = utl_create_pco (pco_array, &pco_len, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1917 ACI_PCO_CONTENTMASK_AUTH | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1918 ACI_PCO_CONTENTMASK_DNS1 | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1919 ACI_PCO_CONTENTMASK_DNS2, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1920 ACI_PCO_CONFIG_PROT_PPP, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1921 ACI_PCO_AUTH_PROT_PAP, (UBYTE*)&User, (UBYTE*)&Pass, dns_adr1, dns_adr2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1922 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1923 ret = utl_create_pco (pco_array, &pco_len, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1924 0x00000001 | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1925 0x00000002 | |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1926 0x00000004, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1927 0, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1928 0xc023, (UBYTE*)&User, (UBYTE*)&Pass, dns_adr1, dns_adr2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1929 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1930 #endif |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1931 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1932 strcpy((char *)pco_array, "PAP,WAP,WAP,10.2.3.4,10.0.0.10" ) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1933 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1934 TRACE_EVENT_P2("=======Input PCO common string is ===%s==== len is %d", pco_array, pco_len) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1935 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1936 memcpy(&my_set_per_cgpco.pco, &pco_array, pco_len ) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1937 my_set_per_cgpco.c_pco = pco_len ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1938 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1939 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1940 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1941 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1942 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1943 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1944 return ("Call to bat_send_cgpco() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1945 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1946 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1947 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1948 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1949 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1950 GLOBAL char *app_bat_send_q_cgpco(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1951 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1952 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1953 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1954 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1955 T_BAT_cmd_set_percent_cgpco my_set_per_cgpco ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1956 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1957 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1958 USHORT pco_len = 100; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1959 UBYTE pco_array[100]; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1960 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1961 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1962 TRACE_FUNCTION("app_bat_send_q_cgpco()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1963 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1964 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1965 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1966 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1967 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1968 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1969 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1970 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1971 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1972 memset(&my_set_per_cgpco , sizeof(my_set_per_cgpco), 0 ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1973 memset(pco_array , 0x00 , sizeof(pco_array)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1974 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1975 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1976 my_bat_cmd_send.ctrl_params = (T_BAT_ctrl_params) BAT_CMD_SET_PERCENT_CGPCO ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1977 my_bat_cmd_send.params.ptr_set_percent_cgpco= &my_set_per_cgpco ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1978 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1979 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1980 my_set_per_cgpco.cid = (T_BAT_pdp_cid) 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1981 my_set_per_cgpco.format = (T_BAT_percent_cgpco_format) 1 ; /* ASCII mode */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1982 my_set_per_cgpco.mode = (T_BAT_percent_cgpco_mode) 1 ; /* Query parameter command */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1983 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1984 my_set_per_cgpco.v_pco = 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1985 my_set_per_cgpco.c_pco = 0 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1986 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1987 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1988 TRACE_EVENT_P2("pco_array = %s, len = %d", pco_array, pco_len) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1989 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1990 memcpy(&my_set_per_cgpco.pco, &pco_array, pco_len ) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1991 my_set_per_cgpco.c_pco = pco_len ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1992 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1993 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1994 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1995 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1996 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1997 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1998 return ("Call to bat_send_cgpco() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1999 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2000 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2001 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2002 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2003 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2004 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2005 GLOBAL char *app_bat_send_cgdcont(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2006 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2007 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2008 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2009 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2010 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2011 T_BAT_cmd_set_plus_cgdcont my_set_plus_cgdcont ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2012 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2013 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2014 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2015 TRACE_FUNCTION("app_bat_send_cgdcont()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2016 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2017 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2018 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2019 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2020 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2021 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2022 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2023 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2024 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2025 memset(&my_set_plus_cgdcont , sizeof(my_set_plus_cgdcont), 0 ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2026 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CGDCONT ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2027 my_bat_cmd_send.params.ptr_set_plus_cgdcont = &my_set_plus_cgdcont ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2028 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2029 if(param2!=NULL ) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2030 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2031 memcpy( my_set_plus_cgdcont.apn , param2, strlen(param2) ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2032 my_set_plus_cgdcont.c_apn = strlen(param2) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2033 my_set_plus_cgdcont.v_apn = 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2034 my_set_plus_cgdcont.pdp_type = BAT_PDP_TYPE_IPV4 ; //PDP_T_IP ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2035 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2036 my_set_plus_cgdcont.cid =(T_BAT_pdp_cid) 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2037 my_set_plus_cgdcont.v_pdp_addr= 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2038 my_set_plus_cgdcont.c_pdp_addr= 16 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2039 memset(my_set_plus_cgdcont.pdp_addr , '\0' , 16 ) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2040 my_set_plus_cgdcont.d_comp = (T_BAT_plus_cgdcont_d_comp) -1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2041 my_set_plus_cgdcont.h_comp = (T_BAT_plus_cgdcont_h_comp) -1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2042 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2043 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2044 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2045 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2046 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2047 strcpy( (char *)my_set_plus_cgdcont.apn , "CMWAP" ); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2048 my_set_plus_cgdcont.c_apn = strlen("CMWAP") ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2049 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2050 my_set_plus_cgdcont.v_apn = 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2051 my_set_plus_cgdcont.pdp_type = BAT_PDP_TYPE_IPV4; //PDP_T_IP ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2052 my_set_plus_cgdcont.cid = (T_BAT_pdp_cid) 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2053 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2054 my_set_plus_cgdcont.v_pdp_addr= 1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2055 my_set_plus_cgdcont.c_pdp_addr= 16 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2056 memset(my_set_plus_cgdcont.pdp_addr ,'\0' , 16 ) ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2057 my_set_plus_cgdcont.d_comp = (T_BAT_plus_cgdcont_d_comp) -1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2058 my_set_plus_cgdcont.h_comp = (T_BAT_plus_cgdcont_h_comp) -1 ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2059 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2060 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2061 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2062 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2063 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2064 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2065 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2066 return ("Call to bat_send_cgdcont() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2067 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2068 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2069 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2070 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2071 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2072 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2073 GLOBAL char *app_bat_send_cfun (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2074 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2075 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2076 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2077 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2078 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2079 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2080 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2081 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2082 TRACE_FUNCTION("app_bat_send_cfun()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2083 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2084 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2085 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2086 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2087 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2088 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2089 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2090 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2091 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2092 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2093 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2094 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2095 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2096 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2097 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2098 my_set_plus_cfun.rst = BAT_CFUN_RST_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2099 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2100 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2101 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2102 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2103 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2104 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2105 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2106 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2107 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2108 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2109 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2110 #define MAX_SM_LEN 176 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2111 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2112 typedef struct /* data buffer for Short Messages */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2113 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2114 UBYTE data[MAX_SM_LEN]; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2115 UBYTE len; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2116 } T_ACI_SM_DATA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2117 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2118 LOCAL char *HexToGsm(char *cl, U8 *value) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2119 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2120 int i; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2121 U8 character; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2122 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2123 *value = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2124 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2125 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2126 * for both nibbles |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2127 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2128 for (i=0;i<2;i++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2129 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2130 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2131 * shift the result of the last loop |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2132 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2133 *value = (*value) << 4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2134 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2135 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2136 * Isolate next nibble in ASCII |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2137 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2138 character = toupper(*cl++); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2139 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2140 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2141 * convert Nibble character to value |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2142 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2143 switch (character) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2144 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2145 case 'A': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2146 case 'B': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2147 case 'C': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2148 case 'D': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2149 case 'E': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2150 case 'F': |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2151 *value = *value + (character - 'A' + 10); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2152 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2153 default: |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2154 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2155 * 0-9 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2156 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2157 *value = *value + (character - '0'); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2158 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2159 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2160 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2161 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2162 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2163 * return pointer to the rest of PDU |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2164 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2165 return cl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2166 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2167 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2168 GLOBAL char *app_bat_send_cmgs (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2169 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2170 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2171 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2172 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2173 T_BAT_cmd_set_plus_cmgs my_set_plus_cmgs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2174 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2175 char *cl, cl_str[] = "079194710600403401000B811027513356F8000008C22015442FCFE9"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2176 T_ACI_SM_DATA pdu; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2177 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2178 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2179 TRACE_FUNCTION("app_bat_send_cmgs()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2180 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2181 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2182 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2183 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2184 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2185 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2186 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2187 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2188 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2189 pdu.len = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2190 cl = cl_str; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2191 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2192 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2193 U8 i = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2194 U8 sca_len = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2195 U8 offset = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2196 U8 pdu_message_octets_length = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2197 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2198 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2199 * Extract the length (excluding SCA octets) outto be parsed from |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2200 * the input pointer cl |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2201 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2202 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2203 SHORT length_of_pdu_message = strlen(cl)/2 - 8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2204 TRACE_EVENT_P1("length_of_pdu_message: %d", length_of_pdu_message); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2205 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2206 HexToGsm (cl, &sca_len); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2207 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2208 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2209 calculation of the real length of PDU string |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2210 The first octet in the input is an indicator of the length of the SMSC information supplied. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2211 And this Octet and the SMSC content do not count in the real length of PDU string. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2212 so here, the length of the input needs to minus 2 + sca_len*2 and then divide 2. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2213 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2214 pdu_message_octets_length = (strlen(cl)-2-sca_len*2)/2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2215 TRACE_EVENT_P1("pdu_message_octets_length: %d", pdu_message_octets_length); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2216 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2217 pdu.len = length_of_pdu_message + sca_len + 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2218 TRACE_EVENT_P1("pdu.len: %d", pdu.len); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2219 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2220 for (i = offset; i < pdu.len AND *cl NEQ '\0' AND i < MAX_SM_LEN; i++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2221 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2222 cl = HexToGsm(cl, &pdu.data[i]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2223 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2224 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2225 memset(&my_set_plus_cmgs, sizeof(my_set_plus_cmgs), 0); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2226 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CMGS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2227 my_bat_cmd_send.params.ptr_set_plus_cmgs = &my_set_plus_cmgs; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2228 memcpy(my_set_plus_cmgs.pdu, pdu.data, pdu.len); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2229 my_set_plus_cmgs.c_pdu = pdu.len; /* total length */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2230 my_set_plus_cmgs.length = my_set_plus_cmgs.c_pdu; /* length without SCA */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2231 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2232 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2233 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2234 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2235 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2236 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2237 return ("Call to bat_send_cmgs() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2238 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2239 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2240 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2241 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2242 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2243 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2244 GLOBAL char *app_bat_send_cmgl (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2245 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2246 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2247 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2248 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2249 T_BAT_cmd_set_plus_cmgl my_set_plus_cmgl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2250 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2251 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2252 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2253 TRACE_FUNCTION("app_bat_send_cmgs()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2254 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2255 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2256 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2257 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2258 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2259 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2260 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2261 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2262 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2263 if( param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2264 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2265 my_set_plus_cmgl.stat = BAT_CMGL_STAT_ALL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2266 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2267 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2268 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2269 if (strcmp(param2, "ALL") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2270 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2271 my_set_plus_cmgl.stat = BAT_CMGL_STAT_ALL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2272 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2273 if (strcmp(param2, "SENT") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2274 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2275 my_set_plus_cmgl.stat = BAT_CMGL_STAT_STO_SEND; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2276 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2277 if (strcmp(param2, "UNSENT") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2278 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2279 my_set_plus_cmgl.stat = BAT_CMGL_STAT_STO_UNSENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2280 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2281 if (strcmp(param2, "READ") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2282 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2283 my_set_plus_cmgl.stat = BAT_CMGL_STAT_REC_READ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2284 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2285 if (strcmp(param2, "UNREAD") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2286 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2287 my_set_plus_cmgl.stat = BAT_CMGL_STAT_REC_UNREAD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2288 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2289 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2290 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2291 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CMGL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2292 my_bat_cmd_send.params.ptr_set_plus_cmgl = &my_set_plus_cmgl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2293 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2294 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2295 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2296 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2297 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2298 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2299 return ("Call to bat_send_cmgl() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2300 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2301 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2302 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2303 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2304 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2305 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2306 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2307 GLOBAL char *app_bat_send_cops (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2308 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2309 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2310 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2311 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2312 T_BAT_cmd_set_plus_cops my_set_plus_cops; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2313 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2314 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2315 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2316 TRACE_FUNCTION("app_bat_send_cops()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2317 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2318 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2319 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2320 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2321 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2322 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2323 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2324 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2325 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2326 memset(&my_set_plus_cops, sizeof(my_set_plus_cops), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2327 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_COPS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2328 my_bat_cmd_send.params.ptr_set_plus_cops = &my_set_plus_cops; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2329 my_set_plus_cops.mode = BAT_COPS_MODE_AUTO; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2330 my_set_plus_cops.format = BAT_COPS_FORMAT_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2331 my_set_plus_cops.v_oper = FALSE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2332 my_set_plus_cops.c_oper = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2333 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2334 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2335 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2336 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2337 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2338 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2339 return ("Call to bat_send_cops() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2340 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2341 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2342 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2343 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2344 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2345 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2346 GLOBAL char *app_bat_send_cpin (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2347 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2348 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2349 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2350 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2351 T_BAT_cmd_set_plus_cpin my_cmd_plus_cpin; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2352 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2353 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2354 char number[] = "1236"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2355 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2356 clnt_hndl = get_item(param1, 0, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2357 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2358 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2359 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2360 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2361 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2362 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2363 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2364 memset(&my_cmd_plus_cpin, sizeof(my_cmd_plus_cpin), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2365 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CPIN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2366 my_bat_cmd_send.params.ptr_set_plus_cpin = &my_cmd_plus_cpin; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2367 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2368 if (param2) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2369 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2370 strcpy((char *)&(my_cmd_plus_cpin.pin), (const char *)param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2371 my_cmd_plus_cpin.c_pin = strlen(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2372 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2373 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2374 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2375 strcpy((char *)&(my_cmd_plus_cpin.pin), (const char *)number); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2376 my_cmd_plus_cpin.c_pin = strlen(number); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2377 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2378 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2379 if (param3) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2380 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2381 strcpy((char *)&(my_cmd_plus_cpin.newpin), (const char *)param3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2382 my_cmd_plus_cpin.c_newpin = strlen(param3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2383 my_cmd_plus_cpin.v_newpin = 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2384 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2385 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2386 TRACE_EVENT_P1("app_bat_send_cpin(): PIN = %s", my_cmd_plus_cpin.pin); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2387 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2388 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2389 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2390 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2391 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2392 return ("Call to bat_send_cpin() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2393 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2394 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2395 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2396 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2397 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2398 GLOBAL char *app_bat_send_cnmi (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2399 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2400 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2401 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2402 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2403 T_BAT_cmd_set_plus_cnmi my_cmd_plus_cnmi; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2404 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2405 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2406 SHORT mt = BAT_CNMI_MT_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2407 SHORT bm = BAT_CNMI_BM_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2408 SHORT ds = BAT_CNMI_DS_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2409 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2410 clnt_hndl = get_item(param1, 0, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2411 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2412 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2413 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2414 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2415 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2416 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2417 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2418 memset(&my_cmd_plus_cnmi, sizeof(my_cmd_plus_cnmi), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2419 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CNMI; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2420 my_bat_cmd_send.params.ptr_set_plus_cnmi = &my_cmd_plus_cnmi; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2421 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2422 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2423 * +CNMI has up to three parameters. These may as well all be |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2424 * delivered in "param2", separated by commas. We can extract them |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2425 * using the ATI function "parse()". The extraction is done |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2426 * not to elements of the BAT message directly, but via intermediate local |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2427 * variables. This is to avoid any issues with variable sizes. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2428 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2429 TRACE_EVENT_P1("app_bat_send_cnmi(): param2 = :%s:", param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2430 if (!parse(param2,"ddd", &mt, &bm, &ds)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2431 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2432 app_bat_send_result_prim(1,NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2433 return("Failed to parse +CNMI"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2434 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2435 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2436 /* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2437 * Now copy the data into the BAT message structure. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2438 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2439 my_cmd_plus_cnmi.mt = (T_BAT_VAL_plus_cnmi_mt)mt; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2440 my_cmd_plus_cnmi.bm = (T_BAT_VAL_plus_cnmi_bm)bm; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2441 my_cmd_plus_cnmi.ds = (T_BAT_VAL_plus_cnmi_ds)ds; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2442 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2443 TRACE_EVENT_P3("app_bat_send_cnmi(): mt = %d bm = %d ds = %d", my_cmd_plus_cnmi.mt, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2444 my_cmd_plus_cnmi.bm, my_cmd_plus_cnmi.ds); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2445 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2446 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2447 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2448 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2449 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2450 return ("Call to bat_send_cnmi() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2451 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2452 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2453 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2454 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2455 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2456 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2457 GLOBAL char *app_bat_send_atd (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2458 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2459 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2460 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2461 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2462 T_BAT_cmd_at_d my_cmd_atd; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2463 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2464 char number[] = "03039831270;"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2465 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2466 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2467 TRACE_FUNCTION("app_bat_send_atd()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2468 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2469 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2470 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2471 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2472 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2473 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2474 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2475 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2476 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2477 memset(&my_cmd_atd, sizeof(my_cmd_atd), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2478 my_bat_cmd_send.ctrl_params = BAT_CMD_AT_D; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2479 my_bat_cmd_send.params.ptr_at_d = &my_cmd_atd; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2480 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2481 if (param2) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2482 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2483 strcpy((char *)&(my_cmd_atd.dial_string), (const char *)param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2484 my_cmd_atd.c_dial_string = strlen(param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2485 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2486 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2487 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2488 strcpy((char *)&(my_cmd_atd.dial_string), (const char *)number); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2489 my_cmd_atd.c_dial_string = strlen(number); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2490 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2491 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2492 TRACE_EVENT_P1("app_bat_send_atd(): call %s", my_cmd_atd.dial_string); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2493 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2494 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2495 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2496 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2497 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2498 return ("Call to bat_send_atd() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2499 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2500 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2501 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2502 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2503 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2504 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2505 GLOBAL char *app_bat_send_ata (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2506 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2507 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2508 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2509 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2510 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2511 T_BAT_no_parameter dummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2512 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2513 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2514 TRACE_FUNCTION("app_bat_send_ata()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2515 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2516 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2517 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2518 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2519 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2520 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2521 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2522 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2523 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2524 dummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2525 my_bat_cmd_send.ctrl_params = BAT_CMD_AT_A; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2526 my_bat_cmd_send.params.ptr_at_a = &dummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2527 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2528 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2529 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2530 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2531 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2532 return ("Call to bat_send_ata() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2533 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2534 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2535 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2536 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2537 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2538 GLOBAL char *app_bat_send_per_als (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2539 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2540 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2541 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2542 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2543 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2544 T_BAT_cmd_set_percent_als my_set_per_als; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2545 T_BAT_no_parameter my_quer_per_als; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2546 int clnt_com = get_item(param2, 0, TRUE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2547 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2548 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2549 TRACE_FUNCTION("app_bat_send_per_als()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2550 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2551 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2552 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2553 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2554 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2555 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2556 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2557 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2558 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2559 if(clnt_com EQ BAT_CMD_SET_PERCENT_ALS) /* AT%ALS = 0 or 1 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2560 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2561 memset(&my_set_per_als, sizeof(my_set_per_als), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2562 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PERCENT_ALS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2563 my_bat_cmd_send.params.ptr_set_percent_als = &my_set_per_als; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2564 my_set_per_als.mode = BAT_P_ALS_MOD_SPEECH; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2565 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2566 else /* AT%ALS? */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2567 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2568 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PERCENT_ALS; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2569 my_bat_cmd_send.params.ptr_que_percent_als = &my_quer_per_als; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2570 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2571 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2572 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2573 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2574 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2575 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2576 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2577 return ("Call to bat_send_per_als() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2578 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2579 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2580 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2581 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2582 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2583 GLOBAL char *app_bat_send_ath (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2584 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2585 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2586 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2587 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2588 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2589 T_BAT_no_parameter dummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2590 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2591 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2592 TRACE_FUNCTION("app_bat_send_ath()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2593 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2594 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2595 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2596 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2597 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2598 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2599 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2600 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2601 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2602 dummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2603 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2604 my_bat_cmd_send.ctrl_params = BAT_CMD_AT_H; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2605 my_bat_cmd_send.params.ptr_at_h = &dummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2606 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2607 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2608 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2609 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2610 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2611 return ("Call to bat_send_ath() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2612 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2613 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2614 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2615 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2616 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2617 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2618 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2619 GLOBAL char *app_bat_send_q_cscb(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2620 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2621 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2622 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2623 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2624 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2625 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2626 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2627 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2628 TRACE_FUNCTION("app_bat_send_q_cscb()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2629 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2630 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2631 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2632 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2633 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2634 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2635 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2636 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2637 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2638 lbatSend.ctrl_params = BAT_CMD_QUE_PLUS_CSCB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2639 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2640 lbatSend.params.ptr_que_plus_cscb = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2641 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2642 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2643 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2644 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2645 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2646 TRACE_ERROR("Call to app_bat_send_q_cscb() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2647 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2648 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2649 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2650 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2651 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2652 GLOBAL char *app_bat_send_q_cpinf(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2653 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2654 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2655 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2656 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2657 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2658 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2659 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2660 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2661 TRACE_FUNCTION("bat_send_q_cpinf()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2662 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2663 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2664 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2665 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2666 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2667 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2668 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2669 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2670 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2671 lbatSend.ctrl_params = BAT_CMD_QUE_PERCENT_CPINF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2672 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2673 lbatSend.params.ptr_que_percent_cpinf = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2674 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2675 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2676 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2677 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2678 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2679 TRACE_ERROR("Call to bat_send_q_cpinf() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2680 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2681 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2682 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2683 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2684 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2685 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2686 GLOBAL char *app_bat_send_q_cpol(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2687 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2688 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2689 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2690 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2691 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2692 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2693 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2694 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2695 TRACE_FUNCTION("bat_send_q_cpol()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2696 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2697 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2698 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2699 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2700 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2701 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2702 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2703 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2704 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2705 lbatSend.ctrl_params = BAT_CMD_QUE_PLUS_CPOL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2706 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2707 lbatSend.params.ptr_que_plus_cpol = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2708 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2709 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2710 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2711 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2712 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2713 TRACE_ERROR("Call to app_bat_send_q_cpinf() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2714 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2715 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2716 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2717 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2718 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2719 GLOBAL char *app_bat_send_t_cpol(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2720 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2721 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2722 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2723 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2724 T_BAT_cmd_send lbatSend; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2725 T_BAT_no_parameter lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2726 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2727 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2728 TRACE_FUNCTION("bat_send_t_cpol()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2729 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2730 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2731 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2732 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2733 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2734 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2735 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2736 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2737 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2738 lbatSend.ctrl_params = BAT_CMD_TST_PLUS_CPOL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2739 lbatDummy.bat_dummy = 0xFF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2740 lbatSend.params.ptr_tst_plus_cpol = &lbatDummy; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2741 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2742 result = bat_send (clnt_hndl, &lbatSend); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2743 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2744 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2745 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2746 TRACE_ERROR("Call to app_bat_send_t_cpinf() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2747 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2748 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2749 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2750 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2751 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2752 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2753 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2754 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2755 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2756 GLOBAL char *app_bat_quer_set_clck (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2757 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2758 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2759 /* bat_clck_query 0 0 --> unlock FDN, 0 1 --> lock FDN, 0 2 --> query status FDN */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2760 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2761 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2762 T_BAT_cmd_set_plus_clck my_set_plus_clck; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2763 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2764 int mode = BAT_CLCK_MODE_QUERY; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2765 char passwd[] = "0000"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2766 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2767 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2768 TRACE_FUNCTION("app_bat_quer_set_clck()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2769 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2770 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2771 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2772 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2773 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2774 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2775 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2776 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2777 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2778 mode = get_item(param2, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2779 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2780 memset(&my_set_plus_clck, sizeof(my_set_plus_clck), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2781 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CLCK; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2782 my_bat_cmd_send.params.ptr_set_plus_clck= &my_set_plus_clck; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2783 my_set_plus_clck.fac = BAT_CLCK_FAC_FD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2784 my_set_plus_clck.bearer_class = BAT_CLASS_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2785 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2786 if(mode NEQ BAT_CLCK_MODE_QUERY) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2787 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2788 memset(&my_set_plus_clck.passwd, sizeof(my_set_plus_clck.passwd), 0); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2789 strcpy((char *)&(my_set_plus_clck.passwd), (const char *)passwd); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2790 my_set_plus_clck.c_passwd = strlen(passwd); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2791 my_set_plus_clck.v_passwd = 1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2792 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2793 my_set_plus_clck.mode =(T_BAT_plus_clck_mode) mode; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2794 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2795 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2796 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2797 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2798 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2799 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2800 return ("Call to app_bat_send_cops() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2801 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2802 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2803 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2804 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2805 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2806 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2807 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2808 GLOBAL char *app_bat_ctrl(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2809 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2810 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2811 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2812 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2813 T_BAT_ctrl app_bat_ctrl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2814 app_bat_ctrl.event = BAT_ABORT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2815 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2816 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2817 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2818 if(param2 && !strcmp(string_to_lower(param2), "READY")) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2819 app_bat_ctrl.event = BAT_APP_READY_RESOURCE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2820 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2821 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2822 result = bat_ctrl (clnt_hndl, &app_bat_ctrl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2823 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2824 if(result != BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2825 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2826 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2827 return ("Call to bat_ctrl() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2828 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2829 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2830 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2831 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2832 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2833 GLOBAL char *app_bat_receive_data_cb(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2834 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2835 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2836 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2837 T_GDD_CON_HANDLE con_hndl = 0xffff; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2838 char *buf = "BAT_LIB_TEST"; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2839 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2840 TRACE_FUNCTION("app_bat_receive_data_cb()") ; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2841 con_hndl = (T_GDD_CON_HANDLE) get_item(param1, 0x0100, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2842 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2843 result = (T_BAT_return) bat_gdd_receive_data_cb(con_hndl, (T_GDD_BUF *)buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2844 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2845 if(result != BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2846 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2847 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2848 return ("Call to app_bat_receive_data_cb() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2849 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2850 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2851 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2852 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2853 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2854 GLOBAL char *app_bat_signal_cb(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2855 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2856 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2857 T_GDD_CON_HANDLE con_hndl = 0xffff; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2858 T_GDD_SIGNAL gdd_sig = {(T_GDD_SIGTYPE)0}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2859 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2860 con_hndl = get_item(param1, 0x0100, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2861 gdd_sig.sig = (T_GDD_SIGTYPE) get_item(param2, 1, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2862 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2863 bat_gdd_signal_cb(con_hndl, gdd_sig); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2864 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2865 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2866 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2867 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2868 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2869 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2870 /***************************************************************************************** |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2871 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2872 * This test case tests the complete use scenario: initializing the instances, opening |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2873 * different clients, sending cmd, closing the clients, deiniting the instances. Then repeat |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2874 * this once more. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2875 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2876 *****************************************************************************************/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2877 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2878 LOCAL void free_mem(void *mem1, void *mem2, void *mem3, void *mem4, void *mem5) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2879 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2880 if (mem1 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2881 MFREE(mem1); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2882 if (mem2 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2883 MFREE(mem2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2884 if (mem3 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2885 MFREE(mem3); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2886 if (mem4 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2887 MFREE(mem4); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2888 if (mem5 NEQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2889 MFREE(mem5); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2890 return; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2891 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2892 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2893 GLOBAL char *app_bat_complete_test(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2894 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2895 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2896 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2897 void *mem1 = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2898 void *mem2 = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2899 int inst_num = 2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2900 int clnt_num = 2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2901 int i; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2902 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2903 T_BAT_instance inst_hndl = BAT_INVALID_INSTANCE_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2904 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2905 T_BAT_client client = BAT_INVALID_CLIENT_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2906 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2907 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2908 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2909 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2910 TRACE_FUNCTION("app_bat_complete_test()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2911 for (i = 0; i < 2; i ++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2912 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2913 MALLOC(mem1, BAT_INSTANCE_HEADER_SIZE*inst_num); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2914 MALLOC(mem2, (clnt_num*BAT_CLIENT_SIZE + BAT_INSTANCE_SIZE)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2915 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2916 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2917 TRACE_EVENT_P1 ("calling bat_init() the %d th time", i); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2918 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2919 if (bat_init(mem1, (U8)inst_num) NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2920 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2921 TRACE_ERROR("ERROR: Call to bat_init() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2922 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2923 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2924 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2925 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2926 app_set_config (); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2927 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2928 if (bat_new (&inst_hndl, mem2, (U8)clnt_num, BAT_APP_CONFIG, instance_signal_cb) NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2929 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2930 TRACE_ERROR("Call to bat_new() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2931 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2932 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2933 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2934 vsi_t_sleep (VSI_CALLER 100); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2935 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2936 if (bat_open (inst_hndl, &clnt_hndl, response_cb, signal_cb) NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2937 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2938 TRACE_ERROR("Call to bat_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2939 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2940 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2941 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2942 vsi_t_sleep (VSI_CALLER 100); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2943 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2944 if (bat_uns_open(0, &client, unsolicited_result_cb)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2945 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2946 TRACE_ERROR("Call to bat_uns_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2947 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2948 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2949 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2950 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2951 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2952 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2953 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2954 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2955 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2956 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2957 my_set_plus_cfun.rst = BAT_CFUN_RST_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2958 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2959 TRACE_EVENT("calling bat_send()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2960 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2961 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2962 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2963 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2964 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2965 TRACE_ERROR("Call to bat_send() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2966 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2967 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2968 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2969 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2970 vsi_t_sleep (VSI_CALLER 200); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2971 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2972 TRACE_EVENT("calling bat_close()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2973 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2974 result = bat_close (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2975 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2976 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2977 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2978 TRACE_ERROR("Call to bat_close() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2979 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2980 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2981 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2982 vsi_t_sleep (VSI_CALLER 100); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2983 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2984 TRACE_EVENT("calling bat_close() for unsolicited"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2985 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2986 result = bat_close (client); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2987 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2988 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2989 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2990 TRACE_ERROR("Call to bat_close() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2991 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2992 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2993 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2994 result = bat_delete(inst_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2995 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2996 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2997 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2998 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2999 TRACE_ERROR("Call to bat_delete() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3000 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3001 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3002 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3003 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3004 result = bat_deinit(); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3005 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3006 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3007 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3008 TRACE_ERROR("Call to bat_deinit() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3009 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3010 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3011 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3012 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3013 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3014 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3015 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3016 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3017 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3018 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3019 /***************************************************************************************** |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3020 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3021 * This test case tests the flow control between app and BAT Lib |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3022 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3023 *****************************************************************************************/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3024 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3025 GLOBAL char *app_bat_flow_control_test1(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3026 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3027 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3028 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3029 void *mem1 = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3030 void *mem2 = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3031 int inst_num = 2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3032 int clnt_num = 2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3033 T_BAT_instance inst_hndl = BAT_INVALID_INSTANCE_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3034 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3035 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3036 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3037 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3038 T_BAT_ctrl app_bat_ctrl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3039 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3040 TRACE_FUNCTION("app_bat_complete_test1()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3041 MALLOC(mem1, BAT_INSTANCE_HEADER_SIZE*inst_num); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3042 MALLOC(mem2, (clnt_num*BAT_CLIENT_SIZE + BAT_INSTANCE_SIZE)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3043 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3044 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3045 TRACE_EVENT("calling bat_init()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3046 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3047 result = bat_init(mem1, (U8)inst_num); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3048 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3049 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3050 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3051 TRACE_ERROR("ERROR: Call to bat_init() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3052 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3053 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3054 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3055 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3056 app_set_config (); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3057 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3058 TRACE_EVENT("calling bat_new()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3059 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3060 result = bat_new (&inst_hndl, mem2, (U8)clnt_num, BAT_APP_CONFIG, instance_signal_cb); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3061 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3062 TRACE_EVENT_P1 ("inst_hndl is %d", inst_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3063 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3064 if(result != BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3065 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3066 TRACE_ERROR("Call to bat_new() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3067 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3068 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3069 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3070 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3071 TRACE_EVENT("calling bat_open()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3072 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3073 result = bat_open (inst_hndl, &clnt_hndl, response_cb_busy, signal_cb); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3074 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3075 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3076 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3077 TRACE_ERROR("Call to bat_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3078 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3079 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3080 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3081 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3082 TRACE_EVENT("calling bat_uns_open()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3083 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3084 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3085 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3086 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3087 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3088 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3089 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3090 my_set_plus_cfun.rst = BAT_CFUN_RST_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3091 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3092 TRACE_EVENT("calling bat_send()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3093 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3094 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3095 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3096 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3097 TRACE_ERROR("Call to bat_send() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3098 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3099 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3100 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3101 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3102 app_bat_ctrl.event = BAT_APP_READY_RESOURCE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3103 result = bat_ctrl(clnt_hndl, &app_bat_ctrl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3104 vsi_t_sleep (VSI_CALLER 500); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3105 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3106 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3107 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3108 TRACE_ERROR("Call to bat_ctrl() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3109 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3110 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3111 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3112 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3113 vsi_t_sleep (VSI_CALLER 500); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3114 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3115 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3116 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3117 TRACE_ERROR("Call to bat_send() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3118 free_mem(mem1,mem2,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3119 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3120 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3121 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3122 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3123 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3124 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3125 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3126 /***************************************************************************************** |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3127 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3128 * This test case specifically tests receiving of unsolicited code, aborting of a |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3129 * running command and running a 2nd BAT cmd afterwords. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3130 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3131 * NOTE: this test case has to be used together with the PSI simulation stub. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3132 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3133 *****************************************************************************************/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3134 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3135 GLOBAL char *app_bat_uns_rcv_and_abort_test(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3136 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3137 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3138 T_BAT_instance inst_hndl = BAT_INVALID_INSTANCE_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3139 T_BAT_client clnt_hndl = BAT_INVALID_CLIENT_HANDLE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3140 int i; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3141 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3142 static T_BAT_client test_clnt_table[1][8+1] = { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3143 {0,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3144 static void *mem_hdr = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3145 void *mem_inst = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3146 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3147 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3148 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3149 T_BAT_ctrl app_bat_ctrl; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3150 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3151 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3152 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3153 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3154 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3155 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3156 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3157 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3158 my_set_plus_cfun.rst = BAT_CFUN_RST_RESET; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3159 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3160 TRACE_FUNCTION("app_bat_uns_rcv_and_abort_test()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3161 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3162 MALLOC(mem_hdr, BAT_INSTANCE_HEADER_SIZE*4); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3163 MALLOC(mem_inst, BAT_INSTANCE_SIZE + 8*BAT_CLIENT_SIZE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3164 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3165 TRACE_EVENT("calling bat_init()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3166 /* init BAT */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3167 if ( bat_init(mem_hdr, 1)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3168 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3169 TRACE_ERROR ("Call to bat_init () failed!"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3170 MFREE(mem_hdr); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3171 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3172 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3173 app_set_config (); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3174 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3175 TRACE_EVENT("calling bat_new()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3176 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3177 if (bat_new (&inst_hndl, mem_inst, 8, BAT_APP_CONFIG, instance_signal_cb) OR inst_hndl NEQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3178 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3179 TRACE_ERROR("Call to bat_new() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3180 free_mem(mem_hdr, mem_inst,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3181 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3182 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3183 TRACE_EVENT_P1 ("inst_hndl is %d", inst_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3184 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3185 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3186 TRACE_EVENT("calling bat_uns_open()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3187 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3188 if (bat_uns_open(0, &clnt_hndl, unsolicited_result_cb)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3189 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3190 free_mem(mem_hdr, mem_inst,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3191 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3192 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3193 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3194 /* create BAT client for this instance */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3195 for (i = 0; i < 8; i ++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3196 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3197 TRACE_EVENT_P1("Open clnt_id %d for inst 0", i); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3198 if (bat_open(inst_hndl, &test_clnt_table[inst_hndl][i+1],response_cb, signal_cb)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3199 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3200 TRACE_ERROR("Call to bat_open() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3201 free_mem(mem_hdr, mem_inst,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3202 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3203 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3204 vsi_t_sleep (VSI_CALLER 100); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3205 test_clnt_table[inst_hndl][0]++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3206 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3207 TRACE_EVENT("calling bat_send()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3208 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3209 /* send out a command from all clients */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3210 if (bat_send (test_clnt_table[inst_hndl][i+1], &my_bat_cmd_send)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3211 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3212 TRACE_ERROR("Call to 1st bat_send() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3213 free_mem(mem_hdr, mem_inst,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3214 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3215 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3216 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3217 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3218 /* abort the cmd running on client 7 */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3219 if (i EQ 7) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3220 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3221 app_bat_ctrl.event = BAT_ABORT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3222 if (bat_ctrl(test_clnt_table[inst_hndl][i+1], &app_bat_ctrl)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3223 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3224 TRACE_ERROR("Call to bat_ctrl() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3225 MFREE(mem_inst); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3226 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3227 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3228 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3229 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3230 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3231 /* send out another command from all clients */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3232 if (bat_send (test_clnt_table[inst_hndl][i+1], &my_bat_cmd_send)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3233 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3234 TRACE_ERROR("Call to 2nd bat_send() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3235 free_mem(mem_hdr, mem_inst,NULL,NULL,NULL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3236 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3237 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3238 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3239 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3240 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3241 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3242 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3243 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3244 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3245 /***************************************************************************************** |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3246 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3247 * This test case tests the opening of multiple channels, sending of AT cmds, receiving of |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3248 * unsolicited code, aborting of a running command. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3249 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3250 * NOTE: this test case has to be used together with the PSI simulation stub. |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3251 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3252 *****************************************************************************************/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3253 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3254 GLOBAL char *app_bat_multi_channel_creation_test(app_cmd_entry_t *cmd_entry_ptr, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3255 char *param1, char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3256 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3257 T_BAT_instance inst_hndl[4] = {0xff,0xff,0xff,0xff}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3258 int i,j; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3259 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3260 /* 4 instance with 8 clnts each, the first element is the num of opened clnts */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3261 static T_BAT_client test_clnt_table[4][6+1] = { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3262 {0,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3263 {0,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3264 {0,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3265 {0,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3266 void *mem_hdr = NULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3267 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3268 void *mem_inst[4] = {NULL,NULL,NULL,NULL}; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3269 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3270 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3271 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3272 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3273 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3274 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3275 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3276 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3277 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3278 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3279 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3280 my_set_plus_cfun.rst = BAT_CFUN_RST_RESET; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3281 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3282 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3283 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3284 TRACE_FUNCTION("app_bat_multi_channel_creation_test()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3285 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3286 MALLOC(mem_hdr, BAT_INSTANCE_HEADER_SIZE*4); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3287 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3288 TRACE_EVENT("calling bat_init()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3289 /* init BAT */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3290 if ( bat_init(mem_hdr, 4)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3291 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3292 TRACE_ERROR ("Call to bat_init () failed!"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3293 MFREE(mem_hdr); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3294 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3295 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3296 app_set_config (); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3297 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3298 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3299 /************************************************************************************************* |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3300 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3301 * create 4 BAT instances with each instance 6 clients |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3302 * |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3303 ************************************************************************************************/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3304 for (i = 0; i < 4; i ++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3305 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3306 TRACE_EVENT_P1("calling bat_new() for the %d th instance", i); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3307 MALLOC(mem_inst[i], BAT_INSTANCE_SIZE + 8*BAT_CLIENT_SIZE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3308 if (bat_new (&inst_hndl[i], mem_inst[i], 8, BAT_APP_CONFIG, instance_signal_cb) OR inst_hndl[i] NEQ i) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3309 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3310 free_mem (mem_hdr,mem_inst[0],mem_inst[1],mem_inst[2],mem_inst[3]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3311 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3312 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3313 TRACE_EVENT_P1 ("created inst_hndl: %d", inst_hndl[i]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3314 for (j = 0; j < 6; j ++) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3315 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3316 TRACE_EVENT_P1("Opened clnt_id: %d ", j); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3317 if (bat_open(inst_hndl[i], &test_clnt_table[i][j+1],response_cb, signal_cb)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3318 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3319 free_mem (mem_hdr,mem_inst[0],mem_inst[1],mem_inst[2],mem_inst[3]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3320 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3321 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3322 vsi_t_sleep (VSI_CALLER 100); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3323 test_clnt_table[inst_hndl[i]][0]++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3324 /* send out a command from all clients */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3325 if (bat_send (test_clnt_table[i][j+1], &my_bat_cmd_send)) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3326 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3327 free_mem (mem_hdr,mem_inst[0],mem_inst[1],mem_inst[2],mem_inst[3]); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3328 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3329 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3330 vsi_t_sleep (VSI_CALLER 300); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3331 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3332 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3333 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3334 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3335 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3336 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3337 GLOBAL char *app_bat_stress_test (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3338 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3339 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3340 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3341 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3342 T_BAT_cmd_set_plus_cfun my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3343 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3344 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3345 U16 i = 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3346 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3347 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3348 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3349 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3350 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3351 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3352 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3353 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3354 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3355 while (i<400) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3356 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3357 TRACE_EVENT_P1("Processing cycle %d",i); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3358 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3359 memset(&my_set_plus_cfun, sizeof(my_set_plus_cfun), FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3360 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3361 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PLUS_CFUN; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3362 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3363 my_bat_cmd_send.params.ptr_set_plus_cfun = &my_set_plus_cfun; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3364 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3365 /* full functionality mode*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3366 my_set_plus_cfun.fun = BAT_CFUN_FUN_FULL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3367 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3368 /* Reset the MT before changing functionality level */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3369 my_set_plus_cfun.rst = BAT_CFUN_RST_NOT_PRESENT; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3370 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3371 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3372 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3373 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3374 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3375 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3376 break; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3377 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3378 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3379 vsi_t_sleep (VSI_CALLER 3000); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3380 i++; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3381 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3382 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3383 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3384 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3385 return ("Call to bat_send_cfun() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3386 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3387 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3388 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3389 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3390 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3391 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3392 GLOBAL char *app_bat_send_cniv(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3393 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3394 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3395 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3396 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3397 T_BAT_cmd_set_percent_cniv my_cmd_percent_cniv; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3398 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3399 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3400 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3401 TRACE_FUNCTION("app_bat_send_cniv()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3402 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3403 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3404 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3405 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3406 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3407 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3408 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3409 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3410 memset(&my_cmd_percent_cniv, 0 , sizeof(my_cmd_percent_cniv)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3411 my_bat_cmd_send.ctrl_params = BAT_CMD_SET_PERCENT_CNIV; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3412 my_bat_cmd_send.params.ptr_set_percent_cniv = &my_cmd_percent_cniv; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3413 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3414 if ( (param2 NEQ NULL) AND atoi(param2) ) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3415 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3416 my_cmd_percent_cniv.mode= BAT_CNIV_MODE_ON; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3417 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3418 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3419 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3420 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3421 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3422 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3423 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3424 return ("Call to bat_send_cniv() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3425 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3426 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3427 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3428 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3429 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3430 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3431 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3432 GLOBAL char *app_bat_send_q_cniv(app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3433 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3434 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3435 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3436 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3437 T_BAT_no_parameter my_que_percent_cniv; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3438 T_BAT_cmd_send my_bat_cmd_send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3439 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3440 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3441 TRACE_FUNCTION("app_bat_send_q_cniv()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3442 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3443 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3444 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3445 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3446 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3447 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3448 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3449 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3450 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3451 my_bat_cmd_send.ctrl_params = BAT_CMD_QUE_PERCENT_CNIV; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3452 my_bat_cmd_send.params.ptr_que_percent_cniv = &my_que_percent_cniv; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3453 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3454 result = bat_send (clnt_hndl, &my_bat_cmd_send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3455 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3456 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3457 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3458 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3459 return ("Call to bat_send_q_cniv() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3460 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3461 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3462 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3463 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3464 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3465 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3466 GLOBAL char *app_bat_send_custom (app_cmd_entry_t *cmd_entry_ptr, char *param1, |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3467 char *param2, char *param3, core_func_t core_func) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3468 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3469 T_BAT_return result = BAT_ERROR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3470 T_BAT_client clnt_hndl = BAT_CONTROL_CHANNEL; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3471 T_BAT_cmd_send send; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3472 T_BAT_custom custom; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3473 T_CLIENT_HANDLE_ERROR err; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3474 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3475 TRACE_FUNCTION("app_bat_send_custom()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3476 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3477 clnt_hndl = get_item(param1, 0, FALSE); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3478 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3479 err = check_client_handle (clnt_hndl); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3480 if (err NEQ CLIENT_HANDLE_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3481 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3482 return (error_client_handle(err)); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3483 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3484 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3485 send.ctrl_params = BAT_CMD_CUSTOM; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3486 send.params.ptr_custom = &custom; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3487 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3488 if (param2 EQ NULL) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3489 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3490 strcpy((char *)custom.buf, "OK"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3491 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3492 else if (strcmp(param2, "DATA") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3493 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3494 custom.buf[0] = 0x80; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3495 custom.buf[1] = 0x81; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3496 custom.buf[2] = 0x82; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3497 custom.buf[3] = 0x83; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3498 custom.buf[4] = 0x84; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3499 custom.buf[5] = 0x85; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3500 custom.buf[6] = 0x86; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3501 custom.buf[7] = 0x87; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3502 custom.buf[8] = 0x88; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3503 custom.buf[9] = 0x89; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3504 custom.buf[10] = 0x8A; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3505 custom.buf[11] = 0x8B; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3506 custom.buf[12] = 0x8C; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3507 custom.buf[13] = 0x8D; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3508 custom.buf[14] = 0x8E; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3509 custom.buf[15] = 0x8F; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3510 custom.buf[16] = 0x90; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3511 custom.buf[17] = 0x91; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3512 custom.buf[18] = 0x92; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3513 custom.buf[19] = 0x93; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3514 custom.buf[20] = 0x94; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3515 custom.buf[21] = 0x95; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3516 custom.buf[22] = 0x96; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3517 custom.buf[23] = 0x97; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3518 custom.buf[24] = 0x98; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3519 custom.buf[25] = 0x99; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3520 custom.buf[26] = 0x9A; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3521 custom.buf[27] = 0x9B; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3522 custom.buf[28] = 0x9C; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3523 custom.buf[29] = 0x9D; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3524 custom.buf[30] = 0x9E; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3525 custom.buf[31] = 0x9F; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3526 custom.buf[32] = 0xA0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3527 custom.buf[33] = 0xA1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3528 custom.buf[34] = 0xA2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3529 custom.buf[35] = 0xA3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3530 custom.buf[36] = 0xA4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3531 custom.buf[37] = 0xA5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3532 custom.buf[38] = 0xA6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3533 custom.buf[39] = 0xA7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3534 custom.buf[40] = 0xA8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3535 custom.buf[41] = 0xA9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3536 custom.buf[42] = 0xAA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3537 custom.buf[43] = 0xAB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3538 custom.buf[44] = 0xAC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3539 custom.buf[45] = 0xAD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3540 custom.buf[46] = 0xAE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3541 custom.buf[47] = 0xAF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3542 custom.buf[48] = 0xB0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3543 custom.buf[49] = 0xB1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3544 custom.buf[50] = 0xB2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3545 custom.buf[51] = 0xB3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3546 custom.buf[52] = 0xB4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3547 custom.buf[53] = 0xB5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3548 custom.buf[54] = 0xB6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3549 custom.buf[55] = 0xB7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3550 custom.buf[56] = 0xB8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3551 custom.buf[57] = 0xB9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3552 custom.buf[58] = 0xBA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3553 custom.buf[59] = 0xBB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3554 custom.buf[60] = 0xBC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3555 custom.buf[61] = 0xBD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3556 custom.buf[62] = 0xBE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3557 custom.buf[63] = 0xBF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3558 custom.buf[64] = 0xC0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3559 custom.buf[65] = 0xC1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3560 custom.buf[66] = 0xC2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3561 custom.buf[67] = 0xC3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3562 custom.buf[68] = 0xC4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3563 custom.buf[69] = 0xC5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3564 custom.buf[70] = 0xC6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3565 custom.buf[71] = 0xC7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3566 custom.buf[72] = 0xC8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3567 custom.buf[73] = 0xC9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3568 custom.buf[74] = 0xCA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3569 custom.buf[75] = 0xCB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3570 custom.buf[76] = 0xCC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3571 custom.buf[77] = 0xCD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3572 custom.buf[78] = 0xCE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3573 custom.buf[79] = 0xCF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3574 custom.buf[80] = 0xD0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3575 custom.buf[81] = 0xD1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3576 custom.buf[82] = 0xD2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3577 custom.buf[83] = 0xD3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3578 custom.buf[84] = 0xD4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3579 custom.buf[85] = 0xD5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3580 custom.buf[86] = 0xD6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3581 custom.buf[87] = 0xD7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3582 custom.buf[88] = 0xD8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3583 custom.buf[89] = 0xD9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3584 custom.buf[90] = 0xDA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3585 custom.buf[91] = 0xDB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3586 custom.buf[92] = 0xDC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3587 custom.buf[93] = 0xDD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3588 custom.buf[94] = 0xDE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3589 custom.buf[95] = 0xDF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3590 custom.buf[96] = 0xE0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3591 custom.buf[97] = 0xE1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3592 custom.buf[98] = 0xE2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3593 custom.buf[99] = 0xE3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3594 custom.buf[100] = 0xE4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3595 custom.buf[101] = 0xE5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3596 custom.buf[102] = 0xE6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3597 custom.buf[103] = 0xE7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3598 custom.buf[104] = 0xE8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3599 custom.buf[105] = 0xE9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3600 custom.buf[106] = 0xEA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3601 custom.buf[107] = 0xEB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3602 custom.buf[108] = 0xEC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3603 custom.buf[109] = 0xED; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3604 custom.buf[110] = 0xEE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3605 custom.buf[111] = 0xEF; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3606 custom.buf[112] = 0xF0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3607 custom.buf[113] = 0xF1; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3608 custom.buf[114] = 0xF2; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3609 custom.buf[115] = 0xF3; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3610 custom.buf[116] = 0xF4; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3611 custom.buf[117] = 0xF5; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3612 custom.buf[118] = 0xF6; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3613 custom.buf[119] = 0xF7; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3614 custom.buf[120] = 0xF8; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3615 custom.buf[121] = 0xF9; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3616 custom.buf[122] = 0xFA; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3617 custom.buf[123] = 0xFB; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3618 custom.buf[124] = 0xFC; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3619 custom.buf[125] = 0xFD; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3620 custom.buf[126] = 0xFE; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3621 custom.buf[127] = 0x00; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3622 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3623 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3624 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3625 strcpy((char *)custom.buf, param2); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3626 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3627 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3628 if (param3 && strcmp(param3, "MR") EQ 0) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3629 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3630 send.ctrl_params = (T_BAT_ctrl_params)MOTO_CMD_MR; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3631 TRACE_EVENT_P1("app_bat_send_custom(): len = %d ", custom.c_buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3632 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3633 else |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3634 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3635 TRACE_EVENT_P2("app_bat_send_custom(): cmd = %s, len = %d ", custom.buf, custom.c_buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3636 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3637 custom.c_buf = strlen((char *)custom.buf); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3638 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3639 result = bat_send (clnt_hndl, &send); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3640 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3641 if(result NEQ BAT_OK) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3642 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3643 app_bat_send_result_prim(1, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3644 return ("Call to bat_send_ata() failed"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3645 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3646 app_bat_send_result_prim(0, NO_ADD_VAL); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3647 return 0; |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3648 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3649 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3650 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3651 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3652 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3653 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3654 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3655 /*--------------------------------------------------------------------------- |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3656 * Definition of core functions |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3657 *---------------------------------------------------------------------------*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3658 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3659 /* -- No core functions required for now */ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3660 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3661 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3662 /*==== Exported functions ====================================================*/ |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3663 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3664 char *app_handle_command_bat(char *command) |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3665 { |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3666 TRACE_FUNCTION ("app_handle_command_bat()"); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3667 return app_handle_command(command, app_bat_cmd_table); |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3668 } |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3669 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3670 |
90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3671 /* EOF */ |