comparison g23m/condat/ms/src/aci/psa_aaap.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : ACI
4 | Modul : psa_aaa
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This modul ...
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifdef DTI
22
23 #ifndef PSA_AAAP_C
24 #define PSA_AAAP_C
25 #endif
26
27 #include "aci_all.h"
28
29 /*==== INCLUDES ===================================================*/
30 #include "aci_cmh.h"
31 #include "ati_cmd.h"
32 #include "aci_cmd.h"
33 #include "dti.h" /* functionality of the dti library */
34
35 #include "aci.h"
36 #include "aci_lst.h"
37
38 #include "dti_conn_mng.h"
39 #include "dti_cntrl_mng.h"
40 #include "psa_uart.h"
41 #include "ati_io.h"
42
43 #include "aci_mem.h"
44
45 #include "ati_src_riv.h"
46 #include "psa_aaa.h"
47
48
49 /*
50 +-----------------------------------------------------------------------+
51 | PROJECT : GSM-F&D (8411) MODULE : psa_aaa |
52 | STATE : code ROUTINE : psa_aaa_cmd_req |
53 +-----------------------------------------------------------------------+
54
55 PURPOSE : -
56 */
57 GLOBAL const void psa_aaa_cmd_req (T_AAA_CMD_REQ *cmd)
58 {
59 TRACE_FUNCTION("psa_aaa_cmd_req()");
60 /*
61 * the results of this request are send to AAA by the
62 * call back function riv_src_result_cb() which calls
63 * psa_aaa_cmd_cnf() | psa_aaa_pres_ind() | psa_aaa_ures_ind()
64 */
65 ati_src_riv_proc_cmd (cmd);
66
67 PFREE (cmd);
68 }
69
70 /*
71 +-----------------------------------------------------------------------+
72 | PROJECT : GSM-F&D (8411) MODULE : psa_aaa |
73 | STATE : code ROUTINE : psa_aaa_open_port_req |
74 +-----------------------------------------------------------------------+
75
76 PURPOSE : -
77 */
78 GLOBAL const void psa_aaa_open_port_req (T_AAA_OPEN_PORT_REQ *cmd)
79 {
80 UBYTE dti_id = DTI_DTI_ID_NOTPRESENT;
81 UBYTE port_number = cmd->port_number;
82 UBYTE sub_no = cmd->sub_no;
83
84 TRACE_FUNCTION("psa_aaa_open_port_req()");
85
86 dti_id = ati_src_riv_open_port (port_number,
87 sub_no,
88 cmd->capability);
89
90 PFREE (cmd);
91 /*
92 * we send here the confirmation, because there is no call back.
93 * if dti_id = DTI_DTI_ID_NOTPRESENT, then the request failed
94 */
95 psaAAA_open_port_cnf (port_number, sub_no, dti_id);
96 }
97
98 /*
99 +-----------------------------------------------------------------------+
100 | PROJECT : GSM-F&D (8411) MODULE : psa_aaa |
101 | STATE : code ROUTINE : psa_aaa_close_port_req|
102 +-----------------------------------------------------------------------+
103
104 PURPOSE : -
105 */
106 GLOBAL const void psa_aaa_close_port_req (T_AAA_CLOSE_PORT_REQ *cmd)
107 {
108 TRACE_FUNCTION("psa_aaa_close_port_req()");
109
110 ati_src_riv_close_port (cmd->port_number, cmd->sub_no);
111
112 PFREE (cmd);
113 /*
114 * we send here the confirmation, because there is no call back
115 */
116 psaAAA_close_port_cnf (cmd->port_number, cmd->sub_no);
117 }
118
119
120 /*
121 +-----------------------------------------------------------------------+
122 | PROJECT : GSM-F&D (8411) MODULE : psa_aaa |
123 | STATE : code ROUTINE : psa_aaa_dti_rsp |
124 +-----------------------------------------------------------------------+
125
126 PURPOSE : - the response to psa_aaa_dti_ind()
127 */
128 GLOBAL const void psa_aaa_dti_rsp (T_AAA_DTI_RES *cmd)
129 {
130 T_DTI_CONN_LINK_ID link_id;
131
132 TRACE_FUNCTION("psa_aaa_dti_rsp()");
133 /*
134 * we need the link_id again, which we had to remember at psaAAA_dti_ind()
135 */
136 link_id = dti_cntrl_get_link_id (DTI_ENTITY_AAA, cmd->port_number, cmd->sub_no);
137
138 ati_src_riv_dti_rsp (link_id);
139
140 PFREE (cmd);
141 }
142
143
144 /*
145 +-----------------------------------------------------------------------+
146 | PROJECT : GSM-F&D (8411) MODULE : psa_aaa |
147 | STATE : code ROUTINE : psa_aaa_disconnect_rsp |
148 +-----------------------------------------------------------------------+
149
150 PURPOSE : - the response to psa_aaa_disconnect_ind()
151 */
152 GLOBAL const void psa_aaa_disconnect_rsp (T_AAA_DISCONNECT_RES *cmd)
153 {
154 T_DTI_CONN_LINK_ID link_id;
155
156 TRACE_FUNCTION("psa_aaa_disconnect_rsp()");
157 /*
158 * we need the link_id again, which we had to remember at psaAAA_dti_ind()
159 */
160 link_id = dti_cntrl_get_link_id (DTI_ENTITY_AAA, cmd->port_number, cmd->sub_no);
161
162 ati_src_riv_disconnect_rsp (link_id);
163
164 PFREE (cmd);
165 }
166
167
168 #endif /* DTI */